diff options
author | Noel Grandin <noel@peralex.com> | 2015-04-24 15:55:53 +0200 |
---|---|---|
committer | Noel Grandin <noel@peralex.com> | 2015-04-29 10:41:40 +0200 |
commit | 0a9f331de48e63d7188f7e253770debd5e3c180e (patch) | |
tree | b3d9c778eff2c49ac8a716fe4c7399bf97f970f2 /include/svx | |
parent | 2a6806a81b3fd9218af18c685b2ede36a86956f6 (diff) |
convert SDRMOUSE constants to scoped enum
Change-Id: Ia5389095683a1c012a988ed71bf769a1f25d80fb
Diffstat (limited to 'include/svx')
-rw-r--r-- | include/svx/svdview.hxx | 18 |
1 files changed, 11 insertions, 7 deletions
diff --git a/include/svx/svdview.hxx b/include/svx/svdview.hxx index bb9db821d2fa..f583301726f9 100644 --- a/include/svx/svdview.hxx +++ b/include/svx/svdview.hxx @@ -82,9 +82,13 @@ enum SdrEventKind {SDREVENT_NONE, SDREVENT_BRKMARK, SDREVENT_EXECUTEURL}; -#define SDRMOUSEBUTTONDOWN 1 -#define SDRMOUSEMOVE 2 -#define SDRMOUSEBUTTONUP 3 +/* for PickAnything() */ +enum class SdrMouseEventKind +{ + BUTTONDOWN = 1, + MOVE = 2, + BUTTONUP = 3, +}; // helper class SdrViewEvent struct SVX_DLLPUBLIC SdrViewEvent @@ -126,8 +130,8 @@ public: SdrViewEvent(); ~SdrViewEvent(); - // nEventKind is SDRMOUSEBUTTONDOWN, SDRMOUSEMOVE oder SDRMOUSEBUTTONUP - void SetMouseEvent(const MouseEvent& rMEvt, sal_uInt16 nEventKind); + // nEventKind is SdrMouseEventKind::BUTTONDOWN, SdrMouseEventKind::MOVE or SdrMouseEventKind::BUTTONUP + void SetMouseEvent(const MouseEvent& rMEvt, SdrMouseEventKind nEventKind); }; // helper class for all D&D overlays @@ -174,7 +178,7 @@ public: // deactivate the MouseDispatcher with the help of the methode below and you have // to implement it yourself. Example for MouseButtonDown: // SdrViewEvent aVEvt; - // SdrHitKind eHit=pSdrView->PickAnything(rMEvt,SDRMOUSEBUTTONDOWN,aVEvt); + // SdrHitKind eHit=pSdrView->PickAnything(rMEvt,SdrMouseEventKind::BUTTONDOWN,aVEvt); // ... hier Applikationsspezifischer Eingriff ... // pSdrView->DoMouseEvent(aVEvt); // SetPointer(GetPreferredPointer(...)) @@ -214,7 +218,7 @@ public: // OutputDevice is necessary to determine HandleSize. // If NULL the first signed on Win is used. Pointer GetPreferredPointer(const Point& rMousePos, const OutputDevice* pOut, sal_uInt16 nModifier=0, bool bLeftDown=false) const; - SdrHitKind PickAnything(const MouseEvent& rMEvt, sal_uInt16 nMouseDownOrMoveOrUp, SdrViewEvent& rVEvt) const; + SdrHitKind PickAnything(const MouseEvent& rMEvt, SdrMouseEventKind nMouseDownOrMoveOrUp, SdrViewEvent& rVEvt) const; SdrHitKind PickAnything(const Point& rLogicPos, SdrViewEvent& rVEvt) const; bool DoMouseEvent(const SdrViewEvent& rVEvt); virtual SdrViewContext GetContext() const; |