summaryrefslogtreecommitdiffstats
path: root/include/vcl/floatwin.hxx
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-13 08:44:58 +0200
committerNoel Grandin <noel@peralex.com>2015-05-13 09:25:51 +0200
commit666f42854e04141541227d88130ff3338aff07b6 (patch)
treee14a945622bcb0c87d3015ea2e514f1b593624bf /include/vcl/floatwin.hxx
parentconvert FLOATWIN_POPUPMODE constants to scoped enum (diff)
downloadcore-666f42854e04141541227d88130ff3338aff07b6.tar.gz
core-666f42854e04141541227d88130ff3338aff07b6.zip
convert FLOATWIN_POPUPMODEEND constants to scoped enum
Change-Id: I36fea4608c744c941bdff401b649fa46302b4dbd
Diffstat (limited to 'include/vcl/floatwin.hxx')
-rw-r--r--include/vcl/floatwin.hxx20
1 files changed, 14 insertions, 6 deletions
diff --git a/include/vcl/floatwin.hxx b/include/vcl/floatwin.hxx
index d02b191aa279..2a35d6e6dc4f 100644
--- a/include/vcl/floatwin.hxx
+++ b/include/vcl/floatwin.hxx
@@ -58,10 +58,18 @@ namespace o3tl
template<> struct typed_flags<FloatWinPopupFlags> : is_typed_flags<FloatWinPopupFlags, 0x03ffff> {};
}
-#define FLOATWIN_POPUPMODEEND_CANCEL ((sal_uInt16)0x0001)
-#define FLOATWIN_POPUPMODEEND_TEAROFF ((sal_uInt16)0x0002)
-#define FLOATWIN_POPUPMODEEND_DONTCALLHDL ((sal_uInt16)0x0004)
-#define FLOATWIN_POPUPMODEEND_CLOSEALL ((sal_uInt16)0x0008)
+enum class FloatWinPopupEndFlags
+{
+ NONE = 0x00,
+ Cancel = 0x01,
+ TearOff = 0x02,
+ DontCallHdl = 0x04,
+ CloseAll = 0x08,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<FloatWinPopupEndFlags> : is_typed_flags<FloatWinPopupEndFlags, 0x0f> {};
+}
#define FLOATWIN_TITLE_NORMAL ((sal_uInt16)0x0001)
#define FLOATWIN_TITLE_TEAROFF ((sal_uInt16)0x0002)
@@ -121,7 +129,7 @@ public:
SAL_DLLPRIVATE static Point ImplCalcPos( vcl::Window* pWindow,
const Rectangle& rRect, FloatWinPopupFlags nFlags,
sal_uInt16& rArrangeIndex );
- SAL_DLLPRIVATE void ImplEndPopupMode( sal_uInt16 nFlags = 0, sal_uLong nFocusId = 0 );
+ SAL_DLLPRIVATE void ImplEndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE, sal_uLong nFocusId = 0 );
SAL_DLLPRIVATE Rectangle& ImplGetItemEdgeClipRect();
SAL_DLLPRIVATE bool ImplIsInPrivatePopupMode() const { return mbInPopupMode; }
virtual void doDeferredInit(WinBits nBits) SAL_OVERRIDE;
@@ -144,7 +152,7 @@ public:
void StartPopupMode( const Rectangle& rRect, FloatWinPopupFlags nFlags = FloatWinPopupFlags::NONE );
void StartPopupMode( ToolBox* pBox, FloatWinPopupFlags nFlags = FloatWinPopupFlags::NONE );
- void EndPopupMode( sal_uInt16 nFlags = 0 );
+ void EndPopupMode( FloatWinPopupEndFlags nFlags = FloatWinPopupEndFlags::NONE );
void AddPopupModeWindow( vcl::Window* pWindow );
FloatWinPopupFlags GetPopupModeFlags() const { return mnPopupModeFlags; }
void SetPopupModeFlags( FloatWinPopupFlags nFlags ) { mnPopupModeFlags = nFlags; }