diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-11 12:33:22 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-13 08:54:36 +0200 |
commit | 670b7ade84ec972d831055349e2bdbc2b1218955 (patch) | |
tree | 90e18c89c0e8d789c97eec18eb8c4285b9a37097 /include/vcl/decoview.hxx | |
parent | d61f0a8c8634827ad427ebb4609d389164c0cc79 (diff) |
convert BUTTON_DRAW constants to scoped enum
Change-Id: I6ad6558c855736a4a5268593ced9c8300235d4bd
Diffstat (limited to 'include/vcl/decoview.hxx')
-rw-r--r-- | include/vcl/decoview.hxx | 36 |
1 files changed, 22 insertions, 14 deletions
diff --git a/include/vcl/decoview.hxx b/include/vcl/decoview.hxx index ffe2b173ed4b..4a5bd17d7933 100644 --- a/include/vcl/decoview.hxx +++ b/include/vcl/decoview.hxx @@ -75,19 +75,27 @@ enum class DrawHighlightFrameStyle }; // Flags for DrawButton() -#define BUTTON_DRAW_DEFAULT ((sal_uInt16)0x0001) -#define BUTTON_DRAW_NOLIGHTBORDER ((sal_uInt16)0x0002) -#define BUTTON_DRAW_PRESSED ((sal_uInt16)0x0004) -#define BUTTON_DRAW_CHECKED ((sal_uInt16)0x0008) -#define BUTTON_DRAW_DONTKNOW ((sal_uInt16)0x0010) -#define BUTTON_DRAW_MONO ((sal_uInt16)0x0020) -#define BUTTON_DRAW_NOFILL ((sal_uInt16)0x0040) -#define BUTTON_DRAW_DISABLED ((sal_uInt16)0x0080) -#define BUTTON_DRAW_HIGHLIGHT ((sal_uInt16)0x0100) -#define BUTTON_DRAW_FLAT ((sal_uInt16)0x0200) -#define BUTTON_DRAW_NOLEFTLIGHTBORDER ((sal_uInt16)0x1000) -#define BUTTON_DRAW_NOTEXT ((sal_uInt16)0x2000) -#define BUTTON_DRAW_NOIMAGE ((sal_uInt16)0x4000) +enum class DrawButtonFlags +{ + NONE = 0x0000, + Default = 0x0001, + NoLightBorder = 0x0002, + Pressed = 0x0004, + Checked = 0x0008, + DontKnow = 0x0010, + Mono = 0x0020, + NoFill = 0x0040, + Disabled = 0x0080, + Highlight = 0x0100, + Flat = 0x0200, + NoLeftLightBorder = 0x1000, + NoText = 0x2000, + NoImage = 0x4000, +}; +namespace o3tl +{ + template<> struct typed_flags<DrawButtonFlags> : is_typed_flags<DrawButtonFlags, 0x73ff> {}; +} class VCL_DLLPUBLIC DecorationView { @@ -105,7 +113,7 @@ public: void DrawHighlightFrame( const Rectangle& rRect, DrawHighlightFrameStyle nStyle = DrawHighlightFrameStyle::Out, bool bTestBackground = false ); Rectangle DrawFrame( const Rectangle& rRect, DrawFrameStyle nStyle = DrawFrameStyle::Out, DrawFrameFlags nFlags = DrawFrameFlags::NONE ); - Rectangle DrawButton( const Rectangle& rRect, sal_uInt16 nStyle ); + Rectangle DrawButton( const Rectangle& rRect, DrawButtonFlags nStyle ); void DrawSeparator( const Point& rStart, const Point& rStop, bool bVertical = true ); void DrawHandle(const Rectangle& rRectangle, bool bVertical = true); }; |