MeVisLab Toolbox Reference
CSOBulgeAction Class Reference

#include <CSOBulgeAction.h>

Inheritance diagram for CSOBulgeAction:
CSOPointingAction SoPointingAction SoInteraction

Public Member Functions

 CSOBulgeAction (SoView2DCSOExtensibleEditor *editor)
bool isSensitiveAt (const SoPointerPosition &pos) override
void startPressAt (const SoPointerPosition &pos) override
void dragMoveTo (const SoPointerPosition &pos) override
 Continues the drag to given device position.
SoPointingActionendPress (int clickCount) override
int getCurrentCursor (SoViewerProxy *) const override
void setInteractOnlyWithSelectedCSO (bool flag)
void setMode (int mode) override
int getNumModes () const override
bool isInViewportRegion (const SoPointerPosition &pos) const
Public Member Functions inherited from CSOPointingAction
 CSOPointingAction (SoView2DCSOExtensibleEditor *editor, const std::string &id)
Public Member Functions inherited from SoPointingAction
 SoPointingAction (SoInteractionOwner *owner, std::string id, bool positionSensitive=true)
virtual bool isPositionSensitive () const
void clearTriggers ()
 Removes all triggers.
void setTrigger (int triggerMask, int ignoreMask=0)
void setTrigger (const Trigger &trigger)
 Same with Trigger object.
void addTrigger (const Trigger &trigger)
 Adds another default modifier/button mask as trigger.
TriggerList getTriggers () const
 Returns the list of default modifier/button mask combinations set for this action.
virtual bool triggersAction (int mask)
virtual std::string getCurrentStatusMessage () const
virtual void setHighlightAt (const SoPointerPosition &)
virtual void unsetHighlight ()
virtual void dragCancelled ()
virtual bool wantsMouseOverUpdates ()
void grabReleased ()
virtual void releaseGrab (StopMode)
virtual bool wantsImmediateDragUpdates ()
Public Member Functions inherited from SoInteraction
 SoInteraction (InteractionType type, SoInteractionOwner *owner, const std::string &id, bool registerWithOwner=true)
virtual ~SoInteraction ()
SoInteractionOwnergetOwner () const
 Returns the interaction provider of this entry.
virtual bool isEnabled () const
virtual void setEnabled (bool enabled)
 Sets the enabled status of this interaction.
std::string getID () const
void setID (const std::string &id)
 Sets the ID of this interaction.
std::string getFullID () const
InteractionType getInteractionType () const
 Returns type of interaction object.
template<class T>
bool isOfType () const
 Convenience method for checking type.
int getMenuPriority () const
void setMenuPriority (int priority)
 Sets the priority value for ordered display in menus/tool boxes.
virtual std::string getUserName () const
virtual void setUserName (const std::string &name)
 Sets the user name of this interaction entry.
virtual std::string getIconFile () const
 Returns the filename of an icon (e.g., for use in a tool box or in menu).
virtual void setIconFile (const std::string &file)
 Sets the filename of an icon used for this interaction entry.
virtual std::string getDescription () const
 Returns the description for user help.
virtual void setDescription (const std::string &descr)
 Sets the description for user help.
virtual void ref ()
virtual void unref ()
int getStateVersion () const
void touch ()
 Increments the version number of attribute state to mark attribute changes.

Protected Member Functions

void initializeMembers ()
bool isAllowedToDrag (const SoPointerPosition &pos)
bool isEligibleForBulging (ml::CSO *cso, View2DSliceList *slicelist, SoCSOBulgeEditor *bulgeEditor)
Protected Member Functions inherited from CSOPointingAction
bool isInsideImage (const SoPointerPosition &pos)
void setView2DImage (const SoPointerPosition &pos)
void updateImageStatistics (ml::CSO *cso)
void setActionActive ()
 Set/unset the maskValid flag in the editor.
void unsetActionActive ()
Protected Member Functions inherited from SoPointingAction
virtual SoOffsetActionproxiedOffsetAction () const

Protected Attributes

ml::CSOList_hitCSOList
ml::CSO_hitCSO
ml::CSOSeedPoint_hitSeedPoint
ml::CSOPathPoints_hitPathPoints
unsigned int _hitPathPointIndex
SoCSOBulgeEditor_hitEditor
float _hitDistance
SbVec3f _initialPosition
SbVec3f _sliceNormal
bool _interactOnlyWithSelectedCSOs
int _cursorShape
Protected Attributes inherited from CSOPointingAction
SoView2DCSOExtensibleEditor_editor
SoSFMLImage_image

Additional Inherited Members

Public Types inherited from SoPointingAction
enum  StopMode { AbortAction , FinishAction }
 Argument type for releaseGrab(). More...
enum  { Button1Mask = ManagedMouseButtonTrigger::Button1Mask , Button2Mask = ManagedMouseButtonTrigger::Button2Mask , Button3Mask = ManagedMouseButtonTrigger::Button3Mask , AllButtonsMask = ManagedMouseButtonTrigger::AllButtonsMask }
enum  { TypeId = TypePointingAction }
typedef ManagedMouseButtonTrigger Trigger
typedef std::list< TriggerTriggerList
 List of triggers.
Public Types inherited from SoInteraction
enum  {
  NoModifier = ManagedActionTrigger::NoModifier , ShiftModifier = ManagedActionTrigger::ShiftModifier , ControlModifier = ManagedActionTrigger::ControlModifier , AltModifier = ManagedActionTrigger::AltModifier ,
  AllModifiersMask = ManagedActionTrigger::AllModifiersMask , ShiftMask = ShiftModifier , CtrlMask = ControlModifier , AltMask = AltModifier
}
enum  InteractionType { TypePointingAction , TypeCommandAction , TypeOffsetAction }
 Enum identifying subtypes of this class. More...

Detailed Description

Definition at line 25 of file CSOBulgeAction.h.

Constructor & Destructor Documentation

◆ CSOBulgeAction()

CSOBulgeAction::CSOBulgeAction ( SoView2DCSOExtensibleEditor * editor)

Member Function Documentation

◆ dragMoveTo()

void CSOBulgeAction::dragMoveTo ( const SoPointerPosition & pos)
overridevirtual

Continues the drag to given device position.

Implements SoPointingAction.

◆ endPress()

SoPointingAction * CSOBulgeAction::endPress ( int clickCount)
overridevirtual

Ends the drag at last device position. If this method returns a non-NULL SoPointingAction, the pointing device is restricted to this SoPointingAction until releaseGrab() is called or another call to endPress returns NULL. This is useful if the end user is required to click at at least one other position.

Note that locking of the returned action breaks down if the same node is used in several viewers, since each viewer usually has its own interaction controller that manages locked actions on its own.

Parameters
clickCountgives the number of clicks at the last start position. This is, for a normal drag it is 0, for a single click it is 1, for a double click it is 2, and for a triple click it is 3. Note that for a clickCount greater than zero, you will not have received any dragMoveTo calls if wantsImmediateDragUpdates returns false.

Implements SoPointingAction.

References SoPointingAction::SoPointingAction().

◆ getCurrentCursor()

int CSOBulgeAction::getCurrentCursor ( SoViewerProxy * ) const
overridevirtual

Returns the cursor ID to display for this action, as defined in SoViewerProxy.h - this gets (at least) called after setMode(), isSensitiveAt(), startPressAt(), dragMoveTo(), and endPress().

The SoViewerProxy pointer is provided so one can define custom cursors when this method is called (see header file SoViewerProxy.h for instructions).

Reimplemented from SoPointingAction.

◆ getNumModes()

int CSOBulgeAction::getNumModes ( ) const
overridevirtual

Returns the number of different modes of this action - modes can be changed during drag, and handle drag restrictions or drag result. Modes are normally controlled through the modifier keys.

Reimplemented from SoPointingAction.

◆ initializeMembers()

void CSOBulgeAction::initializeMembers ( )
protected

◆ isAllowedToDrag()

bool CSOBulgeAction::isAllowedToDrag ( const SoPointerPosition & pos)
protected

◆ isEligibleForBulging()

bool CSOBulgeAction::isEligibleForBulging ( ml::CSO * cso,
View2DSliceList * slicelist,
SoCSOBulgeEditor * bulgeEditor )
protected

◆ isInViewportRegion()

bool CSOBulgeAction::isInViewportRegion ( const SoPointerPosition & pos) const
inline

◆ isSensitiveAt()

bool CSOBulgeAction::isSensitiveAt ( const SoPointerPosition & pos)
overridevirtual

Returns true if the gesture is startable at the given device position. Otherwise, a mouse click will be handed to another SoPointingAction and the cursor shape of this action is ignored!

Note
Only called if isPositionSensitive() returns true.

Implements SoPointingAction.

◆ setInteractOnlyWithSelectedCSO()

void CSOBulgeAction::setInteractOnlyWithSelectedCSO ( bool flag)
inline

Sets this action to be active only for selected CSOs or for all CSOs.

Definition at line 41 of file CSOBulgeAction.h.

References _interactOnlyWithSelectedCSOs.

◆ setMode()

void CSOBulgeAction::setMode ( int )
overridevirtual

This gets called if the mode was changed and before startPressAt is called. Use this value to implement different dragging modes.

Note
You must override getNumModes() to return the number of required modes.

Reimplemented from SoPointingAction.

◆ startPressAt()

void CSOBulgeAction::startPressAt ( const SoPointerPosition & pos)
overridevirtual

Starts a drag at given device position. It is guaranteed that this will be followed by (possibly) dragMoveTo calls and either an endPress or dragCancelled call.

Implements SoPointingAction.

Member Data Documentation

◆ _cursorShape

int CSOBulgeAction::_cursorShape
protected

Definition at line 78 of file CSOBulgeAction.h.

◆ _hitCSO

ml::CSO* CSOBulgeAction::_hitCSO
protected

Definition at line 66 of file CSOBulgeAction.h.

◆ _hitCSOList

ml::CSOList* CSOBulgeAction::_hitCSOList
protected

Definition at line 65 of file CSOBulgeAction.h.

◆ _hitDistance

float CSOBulgeAction::_hitDistance
protected

Definition at line 71 of file CSOBulgeAction.h.

◆ _hitEditor

SoCSOBulgeEditor* CSOBulgeAction::_hitEditor
protected

Definition at line 70 of file CSOBulgeAction.h.

◆ _hitPathPointIndex

unsigned int CSOBulgeAction::_hitPathPointIndex
protected

Definition at line 69 of file CSOBulgeAction.h.

◆ _hitPathPoints

ml::CSOPathPoints* CSOBulgeAction::_hitPathPoints
protected

Definition at line 68 of file CSOBulgeAction.h.

◆ _hitSeedPoint

ml::CSOSeedPoint* CSOBulgeAction::_hitSeedPoint
protected

Definition at line 67 of file CSOBulgeAction.h.

◆ _initialPosition

SbVec3f CSOBulgeAction::_initialPosition
protected

Definition at line 73 of file CSOBulgeAction.h.

◆ _interactOnlyWithSelectedCSOs

bool CSOBulgeAction::_interactOnlyWithSelectedCSOs
protected

Definition at line 76 of file CSOBulgeAction.h.

Referenced by setInteractOnlyWithSelectedCSO().

◆ _sliceNormal

SbVec3f CSOBulgeAction::_sliceNormal
protected

Definition at line 74 of file CSOBulgeAction.h.


The documentation for this class was generated from the following file:
  • MeVisLab/Standard/Sources/Inventor/SoCSO/SoView2DCSOEditor/SoView2DCSOExtensibleEditor/CSOActions/CSOBulgeAction.h