diff options
author | dsinclair <dsinclair@chromium.org> | 2016-05-16 11:38:28 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-05-16 11:38:28 -0700 |
commit | 92cb5e580cecf0412b74d51e8863ed557e2bd47a (patch) | |
tree | acdc33aa1bd876742ae62bd5901183413b2ead1b /fpdfsdk/pdfwindow/PWL_Wnd.h | |
parent | 719a7a71d4cf1b714ad7f76e5f9ca28cfd5b74d3 (diff) | |
download | pdfium-92cb5e580cecf0412b74d51e8863ed557e2bd47a.tar.xz |
Convert border style defines to an enum class.
There were two defines, BBS_ and PBS_ for the various border styles in the
system. They were the same, except PBS_ had an extra SHADOW define which was
never used.
This CL combines both of those into a single BorderStyle enum class and updates
the code as needed.
Also, removes ADDBIT, GETBIT unused defines. Updates barcode code to use
the util.h defines instead of redefinition. fsdk_baseannot names starting with _ were cleaned up and some #defines moved to constants.
Review-Url: https://codereview.chromium.org/1980973002
Diffstat (limited to 'fpdfsdk/pdfwindow/PWL_Wnd.h')
-rw-r--r-- | fpdfsdk/pdfwindow/PWL_Wnd.h | 20 |
1 files changed, 6 insertions, 14 deletions
diff --git a/fpdfsdk/pdfwindow/PWL_Wnd.h b/fpdfsdk/pdfwindow/PWL_Wnd.h index 319e6da9a4..c8552fb985 100644 --- a/fpdfsdk/pdfwindow/PWL_Wnd.h +++ b/fpdfsdk/pdfwindow/PWL_Wnd.h @@ -68,14 +68,6 @@ class IPWL_Provider; #define PRES_MULTIPAGES 0x0200L #define PRES_TEXTOVERFLOW 0x0400L -// border style -#define PBS_SOLID 0 -#define PBS_DASH 1 -#define PBS_BEVELED 2 -#define PBS_INSET 3 -#define PBS_UNDERLINED 4 -#define PBS_SHADOW 5 - // notification messages #define PNM_ADDCHILD 0x00000000L #define PNM_REMOVECHILD 0x00000001L @@ -203,7 +195,7 @@ struct PWL_CREATEPARAM { dwFlags(0), sBackgroundColor(), hAttachedWnd(NULL), - nBorderStyle(PBS_SOLID), + nBorderStyle(BorderStyle::SOLID), dwBorderWidth(1), sBorderColor(), sTextColor(), @@ -225,7 +217,7 @@ struct PWL_CREATEPARAM { uint32_t dwFlags; // optional CPWL_Color sBackgroundColor; // optional FX_HWND hAttachedWnd; // required for no-reader framework - int32_t nBorderStyle; // optional + BorderStyle nBorderStyle; // optional int32_t dwBorderWidth; // optional CPWL_Color sBorderColor; // optional CPWL_Color sTextColor; // optional @@ -322,14 +314,14 @@ class CPWL_Wnd : public CPWL_TimerHandler { virtual CPWL_Color GetTextStrokeColor() const; virtual FX_FLOAT GetFontSize() const; virtual int32_t GetInnerBorderWidth() const; - virtual CPWL_Color GetBorderLeftTopColor(int32_t nBorderStyle) const; - virtual CPWL_Color GetBorderRightBottomColor(int32_t nBorderStyle) const; + virtual CPWL_Color GetBorderLeftTopColor(BorderStyle nBorderStyle) const; + virtual CPWL_Color GetBorderRightBottomColor(BorderStyle nBorderStyle) const; virtual void SetFontSize(FX_FLOAT fFontSize); void SetBackgroundColor(const CPWL_Color& color); void SetClipRect(const CFX_FloatRect& rect); - void SetBorderStyle(int32_t eBorderStyle); + void SetBorderStyle(BorderStyle eBorderStyle); virtual CFX_FloatRect GetWindowRect() const; virtual CFX_FloatRect GetClientRect() const; @@ -341,7 +333,7 @@ class CPWL_Wnd : public CPWL_TimerHandler { void RemoveFlag(uint32_t dwFlags); const CFX_FloatRect& GetClipRect() const; CPWL_Wnd* GetParentWindow() const; - int32_t GetBorderStyle() const; + BorderStyle GetBorderStyle() const; const CPWL_Dash& GetBorderDash() const; void* GetAttachedData() const; |