MeVisLab Toolbox Reference
CSOSelectAndMoveAction.h
Go to the documentation of this file.
1/*************************************************************************************
2**
3** Copyright 2012, 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
15
16#pragma once
17
18#include "CSOPointingAction.h"
19
21
23
25{
26public:
27
29
30 bool isSensitiveAt(const SoPointerPosition& pos) override;
31
32 void startPressAt(const SoPointerPosition& pos) override;
33 void dragMoveTo(const SoPointerPosition& pos) override;
34 SoPointingAction* endPress(int clickCount) override;
35
36 bool wantsMouseOverUpdates() override { return true; }
37
38 void releaseGrab(StopMode) override
39 {
40 if (_hitEditor)
41 {
42 _hitEditor->reset();
43 }
44 }
45
46 int getCurrentCursor(SoViewerProxy* ) const override;
47
51
52 void setMode(int mode) override;
53 int getNumModes() const override;
54
55protected:
56
58
60 bool pointerHasMovedAtLeastByOnePixel(SbVec2f& pos) const;
61
66 SoRef<SoCSOEditorExtension> _hitEditor;
68
71 SbVec3f _sliceNormal;
72
74
76};
77
CSOPointingAction(SoView2DCSOExtensibleEditor *editor, const std::string &id)
int getCurrentCursor(SoViewerProxy *) const override
ml::CSOPathPoints * _hitPathPoints
void setInteractOnlyWithSelectedCSO(bool flag)
void setMode(int mode) override
bool isAllowedToDrag(const SoPointerPosition &pos)
SoPointingAction * endPress(int clickCount) override
ml::CSOSeedPoint * _hitSeedPoint
int getNumModes() const override
void releaseGrab(StopMode) override
CSOSelectAndMoveAction(SoView2DCSOExtensibleEditor *editor)
SoRef< SoCSOEditorExtension > _hitEditor
void dragMoveTo(const SoPointerPosition &pos) override
Continues the drag to given device position.
bool wantsMouseOverUpdates() override
bool pointerHasMovedAtLeastByOnePixel(SbVec2f &pos) const
bool isSensitiveAt(const SoPointerPosition &pos) override
void startPressAt(const SoPointerPosition &pos) override
SoPointerPosition manages the current position of the mouse cursor.
StopMode
Argument type for releaseGrab().
SoPointingAction(SoInteractionOwner *owner, std::string id, bool positionSensitive=true)
Definition CSO.h:44