MeVisLab Toolbox Reference
CSOAbstractCreateAction.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 {
26 public:
27 
28  CSOAbstractCreateAction(SoView2DCSOExtensibleEditor* editor, const std::string& id);
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  int getCurrentCursor(SoViewerProxy* ) const override;
37 
38  void setMode(int mode) override;
39  int getNumModes() const override;
40 
41 protected:
42 
43  virtual void callCreateStartPressAt(const SoPointerPosition& pos) = 0;
44  virtual void callCreateDragMoveTo(const SoPointerPosition& pos) = 0;
45  virtual bool callCreateEndPress(int clickCount) = 0;
46 
47  SoRef<SoCSOEditorExtension> _activeEditor;
48 
50  SbVec3f _sliceNormal;
51 
53 };
54 
#define SOCSO_EXPORT
Header file for system independent resolution.
Definition: SoCSOSystem.h:21
CSOAbstractCreateAction(SoView2DCSOExtensibleEditor *editor, const std::string &id)
virtual bool callCreateEndPress(int clickCount)=0
int getCurrentCursor(SoViewerProxy *) const override
Returns the cursor ID to display for this action, as defined in SoViewerProxy.h - this gets (at least...
void setMode(int mode) override
This gets called if the mode was changed and before startPressAt is called.
virtual void callCreateDragMoveTo(const SoPointerPosition &pos)=0
void dragMoveTo(const SoPointerPosition &pos) override
Continues the drag to given device position.
SoRef< SoCSOEditorExtension > _activeEditor
bool isSensitiveAt(const SoPointerPosition &pos) override
Returns true if the gesture is startable at the given device position.
virtual void callCreateStartPressAt(const SoPointerPosition &pos)=0
SoCSOEditorExtension * getActiveEditorChecked() const
int getNumModes() const override
Returns the number of different modes this action has - modes can be changed during drag and handle d...
SoPointingAction * endPress(int clickCount) override
Ends the drag at last device position.
void startPressAt(const SoPointerPosition &pos) override
Starts a drag at given device position.
Base class for an editor extension for the SoView2DCSOExtensibleEditor.
SoPointerPosition manages the current position of the mouse cursor.
SoPointingAction is the base class for any mouse based interaction.
This class gives access to state of a viewer during scene graph traversal.
Definition: SoViewerProxy.h:30