summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-22 12:49:04 +0200
committerNoel Grandin <noel@peralex.com>2015-05-25 10:31:35 +0200
commitb419da0f53cf7f65b1d0c58351176ece23fbfe1f (patch)
treeb29c038348d6aae8e5ec9c0c97ed8eeb41f5cd67 /include
parentacf5049188e1be0ededc70f9bbedaa0032610680 (diff)
convert SHOW constants to scoped enum
Change-Id: I2712a0901049885502cade31f9757f712048bb33
Diffstat (limited to 'include')
-rw-r--r--include/sfx2/childwin.hxx2
-rw-r--r--include/vcl/window.hxx18
2 files changed, 14 insertions, 6 deletions
diff --git a/include/sfx2/childwin.hxx b/include/sfx2/childwin.hxx
index eb43f8e38343..cffb5b634ed9 100644
--- a/include/sfx2/childwin.hxx
+++ b/include/sfx2/childwin.hxx
@@ -183,7 +183,7 @@ public:
Point GetPosPixel()
{ return pWindow->GetPosPixel(); }
virtual void Hide();
- virtual void Show( sal_uInt16 nFlags );
+ virtual void Show( ShowFlags nFlags );
SfxChildWindowFlags GetFlags() const
{ return GetInfo().nFlags; }
bool CanGetFocus() const;
diff --git a/include/vcl/window.hxx b/include/vcl/window.hxx
index 138a283f602d..fef38e5f06b1 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -168,10 +168,18 @@ namespace o3tl
}
// Flags for Show()
-#define SHOW_NOPARENTUPDATE ((sal_uInt16)0x0001)
-#define SHOW_NOFOCUSCHANGE ((sal_uInt16)0x0002)
-#define SHOW_NOACTIVATE ((sal_uInt16)0x0004)
-#define SHOW_FOREGROUNDTASK ((sal_uInt16)0x0008)
+enum class ShowFlags
+{
+ NONE = 0x0000,
+ NoParentUpdate = 0x0001,
+ NoFocusChange = 0x0002,
+ NoActivate = 0x0004,
+ ForegroundTask = 0x0008,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<ShowFlags> : is_typed_flags<ShowFlags, 0x000f> {};
+}
// Flags for SetZOrder()
#define WINDOW_ZORDER_BEFOR ((sal_uInt16)0x0001)
@@ -912,7 +920,7 @@ public:
// return the dialog we are contained in or NULL if un-contained
Dialog* GetParentDialog() const;
- void Show( bool bVisible = true, sal_uInt16 nFlags = 0 );
+ void Show( bool bVisible = true, ShowFlags nFlags = ShowFlags::NONE );
void Hide() { Show( false ); }
bool IsVisible() const;
bool IsReallyVisible() const;