summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-22 13:48:09 +0200
committerNoel Grandin <noel@peralex.com>2015-05-25 10:31:35 +0200
commit65be8fd0f7f30eaca4fbc35e3fdc9cb7763cb44d (patch)
treebbfe99aba8f0155c7365b4b9d4bcd226654d88d6 /include
parentb419da0f53cf7f65b1d0c58351176ece23fbfe1f (diff)
convert WINDOW_ZORDER constants to scoped enum
Change-Id: I91a583fe7d4195ee6bc73b4854f757517b38408b
Diffstat (limited to 'include')
-rw-r--r--include/vcl/window.hxx18
1 files changed, 13 insertions, 5 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index fef38e5f06b1..cc5c695a90d6 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -182,10 +182,18 @@ namespace o3tl
}
// Flags for SetZOrder()
-#define WINDOW_ZORDER_BEFOR ((sal_uInt16)0x0001)
-#define WINDOW_ZORDER_BEHIND ((sal_uInt16)0x0002)
-#define WINDOW_ZORDER_FIRST ((sal_uInt16)0x0004)
-#define WINDOW_ZORDER_LAST ((sal_uInt16)0x0008)
+enum class ZOrderFlags
+{
+ NONE = 0x0000,
+ Before = 0x0001,
+ Behind = 0x0002,
+ First = 0x0004,
+ Last = 0x0008,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ZOrderFlags> : is_typed_flags<ZOrderFlags, 0x000f> {};
+}
// Activate-Flags
#define ACTIVATE_MODE_GRABFOCUS ((sal_uInt16)0x0001)
@@ -1005,7 +1013,7 @@ public:
sal_uInt16 GetActivateMode() const;
void ToTop( sal_uInt16 nFlags = 0 );
- void SetZOrder( vcl::Window* pRefWindow, sal_uInt16 nFlags );
+ void SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags );
void EnableAlwaysOnTop( bool bEnable = true );
bool IsAlwaysOnTopEnabled() const;