summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-25 10:30:37 +0200
committerNoel Grandin <noel@peralex.com>2015-05-25 10:32:24 +0200
commitc7efb51e31a4eea48ffed291e5c7fb907b1811e4 (patch)
tree86603c3d873648b701c357506bcd23993e97807e /include
parent4de86ac0c62b446426136b620cfd65d088c51cd8 (diff)
convert TOTOP constants to scoped enum
Change-Id: I85ba631ba298f1034dc5b6a04a5ff3d509c41bcb
Diffstat (limited to 'include')
-rw-r--r--include/vcl/window.hxx24
1 files changed, 16 insertions, 8 deletions
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index eb2d6a864169..c791ddea0600 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -207,10 +207,18 @@ namespace o3tl
}
// ToTop-Flags
-#define TOTOP_RESTOREWHENMIN ((sal_uInt16)0x0001)
-#define TOTOP_FOREGROUNDTASK ((sal_uInt16)0x0002)
-#define TOTOP_NOGRABFOCUS ((sal_uInt16)0x0004)
-#define TOTOP_GRABFOCUSONLY ((sal_uInt16)0x0008)
+enum class ToTopFlags
+{
+ NONE = 0x0000,
+ RestoreWhenMin = 0x0001,
+ ForegroundTask = 0x0002,
+ NoGrabFocus = 0x0004,
+ GrabFocusOnly = 0x0008,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ToTopFlags> : is_typed_flags<ToTopFlags, 0x000f> {};
+}
// Flags for Invalidate
#define INVALIDATE_CHILDREN ((sal_uInt16)0x0001)
@@ -671,9 +679,9 @@ private:
SAL_DLLPRIVATE void ImplToBottomChild();
SAL_DLLPRIVATE void ImplCalcToTop( ImplCalcToTopData* pPrevData );
- SAL_DLLPRIVATE void ImplToTop( sal_uInt16 nFlags );
- SAL_DLLPRIVATE void ImplStartToTop( sal_uInt16 nFlags );
- SAL_DLLPRIVATE void ImplFocusToTop( sal_uInt16 nFlags, bool bReallyVisible );
+ SAL_DLLPRIVATE void ImplToTop( ToTopFlags nFlags );
+ SAL_DLLPRIVATE void ImplStartToTop( ToTopFlags nFlags );
+ SAL_DLLPRIVATE void ImplFocusToTop( ToTopFlags nFlags, bool bReallyVisible );
SAL_DLLPRIVATE void ImplShowAllOverlaps();
SAL_DLLPRIVATE void ImplHideAllOverlaps();
@@ -1020,7 +1028,7 @@ public:
void SetActivateMode( ActivateModeFlags nMode );
ActivateModeFlags GetActivateMode() const;
- void ToTop( sal_uInt16 nFlags = 0 );
+ void ToTop( ToTopFlags nFlags = ToTopFlags::NONE );
void SetZOrder( vcl::Window* pRefWindow, ZOrderFlags nFlags );
void EnableAlwaysOnTop( bool bEnable = true );
bool IsAlwaysOnTopEnabled() const;