diff options
author | Noel Grandin <noel@peralex.com> | 2015-05-12 08:15:34 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-05-13 08:54:41 +0200 |
commit | 4c27e84145fc8546b180b81c15f58d2382779ac9 (patch) | |
tree | 7e0067927997c673301fd7f657b5b6205c2ec088 /include/vcl/event.hxx | |
parent | 670b7ade84ec972d831055349e2bdbc2b1218955 (diff) |
convert ENDTRACK_ constants to scoped enum
Change-Id: Iaccd9c3be1ae24f7f9861f9049cd5b52f155170f
Diffstat (limited to 'include/vcl/event.hxx')
-rw-r--r-- | include/vcl/event.hxx | 28 |
1 files changed, 8 insertions, 20 deletions
diff --git a/include/vcl/event.hxx b/include/vcl/event.hxx index 89929d085018..973203356ac1 100644 --- a/include/vcl/event.hxx +++ b/include/vcl/event.hxx @@ -338,18 +338,6 @@ inline UserDrawEvent::UserDrawEvent( OutputDevice* pOut, } -// - Tracking-Types - - - -#define ENDTRACK_CANCEL ((sal_uInt16)0x0001) -#define ENDTRACK_KEY ((sal_uInt16)0x0002) -#define ENDTRACK_FOCUS ((sal_uInt16)0x0004) -#define ENDTRACK_END ((sal_uInt16)0x1000) -#define ENDTRACK_DONTCALLHDL ((sal_uInt16)0x8000) - -#define TRACKING_REPEAT ((sal_uInt16)0x0100) - - // - TrackingEvent - @@ -357,32 +345,32 @@ class VCL_DLLPUBLIC TrackingEvent { private: MouseEvent maMEvt; - sal_uInt16 mnFlags; + TrackingEventFlags mnFlags; public: explicit TrackingEvent(); explicit TrackingEvent( const MouseEvent&, - sal_uInt16 nTrackFlags = 0 ); + TrackingEventFlags nTrackFlags = TrackingEventFlags::NONE ); const MouseEvent& GetMouseEvent() const { return maMEvt; } bool IsTrackingRepeat() const - { return ((mnFlags & TRACKING_REPEAT) != 0); } + { return bool(mnFlags & TrackingEventFlags::Repeat); } bool IsTrackingEnded() const - { return ((mnFlags & ENDTRACK_END) != 0); } + { return bool(mnFlags & TrackingEventFlags::End); } bool IsTrackingCanceled() const - { return ((mnFlags & ENDTRACK_CANCEL) != 0); } - sal_uInt16 GetTrackingFlags() const { return mnFlags; } + { return bool(mnFlags & TrackingEventFlags::Cancel); } + TrackingEventFlags GetTrackingFlags() const { return mnFlags; } }; inline TrackingEvent::TrackingEvent() { - mnFlags = 0; + mnFlags = TrackingEventFlags::NONE; } inline TrackingEvent::TrackingEvent( const MouseEvent& rMEvt, - sal_uInt16 nTrackFlags ) : + TrackingEventFlags nTrackFlags ) : maMEvt( rMEvt ) { mnFlags = nTrackFlags; |