MeVisLab Toolbox Reference
SoOffsetPointingAction.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2014, MeVis Medical Solutions AG
4**
5** The user may use this file in accordance with the license agreement provided with
6** the Software or, alternatively, in accordance with the terms contained in a
7** written agreement between the user and MeVis Medical Solutions AG.
8**
9** For further information use the contact form at https://www.mevislab.de/contact
10**
11**************************************************************************************/
12
13#ifndef SO_OFFSET_POINTING_ACTION_H
14#define SO_OFFSET_POINTING_ACTION_H
15
18
19#include "SoPointingAction.h"
20
22{
23public:
24
27
28 bool isEnabled() const override;
29 void setEnabled(bool enabled) override;
30
31 bool isSensitiveAt(const SoPointerPosition&) override { return true; }
32 int getCurrentCursor(SoViewerProxy* viewerProxy) const override;
33 std::string getCurrentStatusMessage() const override;
34 void startPressAt(const SoPointerPosition& pos) override;
35 void dragMoveTo(const SoPointerPosition& pos) override;
36 SoPointingAction* endPress(int clickCount) override;
37
38 void setOffsetParameters(double sensitivityX, double sensitivityY, bool swapAxes);
39
40protected:
41 SoOffsetAction* proxiedOffsetAction() const override { return _offsetAction; }
42
43private:
44 SoOffsetAction* _offsetAction;
45 double _sensitivityX;
46 double _sensitivityY;
47 int _lastPosX;
48 int _lastPosY;
49 bool _swapAxes;
50};
51
52#endif // __SoOffsetPointingAction_H
#define SOMANAGEDINTERACTION_API
File to resolve system dependencies in View2D library.
int getCurrentCursor(SoViewerProxy *viewerProxy) const override
std::string getCurrentStatusMessage() const override
SoOffsetAction * proxiedOffsetAction() const override
void setEnabled(bool enabled) override
Sets the enabled status of this interaction.
void startPressAt(const SoPointerPosition &pos) override
SoPointingAction * endPress(int clickCount) override
void setOffsetParameters(double sensitivityX, double sensitivityY, bool swapAxes)
bool isSensitiveAt(const SoPointerPosition &) override
bool isEnabled() const override
SoOffsetPointingAction(SoOffsetAction *offsetAction)
Standard constructor.
void dragMoveTo(const SoPointerPosition &pos) override
Continues the drag to given device position.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction(SoInteractionOwner *owner, std::string id, bool positionSensitive=true)