summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorNoel Grandin <noel@peralex.com>2015-05-27 15:09:52 +0200
committerNoel Grandin <noel@peralex.com>2015-05-28 12:47:07 +0200
commit79db3fc0ee41a6284eb2175a4780f4157cb708f6 (patch)
tree5a9fd718cd188bc3491f2f80758bbcd83fa2b342 /include
parenta086ca18987a91543a65a3965b2bbc4c022400f8 (diff)
convert STARTTRACK constants to scoped enum
Change-Id: I9b441688eb59ffd3540b014716a9abe7969c9be4
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 f3f3b4da1ca0..62f7a127db14 100644
--- a/include/vcl/window.hxx
+++ b/include/vcl/window.hxx
@@ -286,13 +286,21 @@ namespace o3tl
#define SHOWTRACK_STYLE ((sal_uInt16)0x000F)
// Flags for StartTracking()
-#define STARTTRACK_KEYINPUT ((sal_uInt16)0x0001)
-#define STARTTRACK_KEYMOD ((sal_uInt16)0x0002)
-#define STARTTRACK_NOKEYCANCEL ((sal_uInt16)0x0004)
-#define STARTTRACK_SCROLLREPEAT ((sal_uInt16)0x0008)
-#define STARTTRACK_BUTTONREPEAT ((sal_uInt16)0x0010)
-#define STARTTRACK_MOUSEBUTTONDOWN ((sal_uInt16)0x0020)
-#define STARTTRACK_FOCUSCANCEL ((sal_uInt16)0x0040)
+enum class StartTrackingFlags
+{
+ NONE = 0x0000,
+ KeyInput = 0x0001,
+ KeyMod = 0x0002,
+ NoKeyCancel = 0x0004,
+ ScrollRepeat = 0x0008,
+ ButtonRepeat = 0x0010,
+ MouseButtonDown = 0x0020,
+ FocusCancel = 0x0040,
+};
+namespace o3tl
+{
+ template<> struct typed_flags<StartTrackingFlags> : is_typed_flags<StartTrackingFlags, 0x007f> {};
+}
// Flags for StartAutoScroll()
enum class StartAutoScrollFlags
@@ -1248,7 +1256,7 @@ public:
sal_uInt16 nFlags = SHOWTRACK_SMALL );
void InvertTracking( const Polygon& rPoly, sal_uInt16 nFlags = 0 );
- void StartTracking( sal_uInt16 nFlags = 0 );
+ void StartTracking( StartTrackingFlags nFlags = StartTrackingFlags::NONE );
void EndTracking( TrackingEventFlags nFlags = TrackingEventFlags::NONE );
bool IsTracking() const;