MeVisLab Toolbox Reference
|
SoPointerPosition manages the current position of the mouse cursor. More...
#include <SoPointerPosition.h>
Public Member Functions | |
SoPointerPosition () | |
Default constructor. | |
SoPointerPosition (const int v[2]) | |
SoPointerPosition (int x, int y) | |
SoPointerPosition (const SoPointerPosition &other)=default | |
bool | isNull () const |
int | manhattanLength () const |
int | x () const |
int | y () const |
void | getValue (int &x, int &y) const |
SoPointerPosition & | setValue (const int v[2]) |
Sets the value of vector from array of two components. | |
SoPointerPosition & | setValue (int x, int y) |
Sets the value of vector from two individual components. | |
int | operator[] (int i) const |
Accesses indexed component of position vector. | |
SoPointerPosition & | operator= (const SoPointerPosition &u) |
Assignment operator. | |
SoHandleEventAction * | getAction () const |
SoState * | getState () const |
template<class T > | |
void | set (T *data) |
Sets pointer to additional position data, e.g., for SoView2D or SoDiagram2D. | |
template<class T > | |
T * | get () const |
Gets pointer to additional position data. | |
const View2DPosition * | getView2DPosition () const |
Friends | |
class | SoInteractionHandler |
Let only the SoInteractionHandler set the SoHandleEventAction on this position. | |
SOMANAGEDINTERACTION_API bool | operator== (const SoPointerPosition &v1, const SoPointerPosition &v2) |
Equality comparison operator. | |
SOMANAGEDINTERACTION_API bool | operator!= (const SoPointerPosition &v1, const SoPointerPosition &v2) |
Negated equality comparison operator. | |
SoPointerPosition manages the current position of the mouse cursor.
Definition at line 27 of file SoPointerPosition.h.
SoPointerPosition::SoPointerPosition | ( | ) |
Default constructor.
|
default |
Gets pointer to additional position data.
There is no safe-guard here, but since the type of the additional data is very context specific, there should be no ambiguities. E.g., for SoView2DExtension the data will always be View2DPosition.
Definition at line 93 of file SoPointerPosition.h.
References T.
|
inline |
Definition at line 80 of file SoPointerPosition.h.
Referenced by SoCSODrawOnSurfaceDrawAction::isInViewportRegion(), and SoCSODrawOnSurfaceDrawAction::isSensitiveAt().
SoState * SoPointerPosition::getState | ( | ) | const |
|
inline |
Definition at line 96 of file SoPointerPosition.h.
References mlrange_cast().
Referenced by CSOBulgeAction::isInViewportRegion().
bool SoPointerPosition::isNull | ( | ) | const |
int SoPointerPosition::manhattanLength | ( | ) | const |
SoPointerPosition & SoPointerPosition::operator= | ( | const SoPointerPosition & | u | ) |
Assignment operator.
Accesses indexed component of position vector.
Definition at line 68 of file SoPointerPosition.h.
References mlrange_cast().
Sets pointer to additional position data, e.g., for SoView2D or SoDiagram2D.
Definition at line 87 of file SoPointerPosition.h.
SoPointerPosition & SoPointerPosition::setValue | ( | const int | v[2] | ) |
Sets the value of vector from array of two components.
SoPointerPosition & SoPointerPosition::setValue | ( | int | x, |
int | y ) |
Sets the value of vector from two individual components.
|
inline |
Definition at line 54 of file SoPointerPosition.h.
|
inline |
Definition at line 56 of file SoPointerPosition.h.
|
friend |
Negated equality comparison operator.
Definition at line 76 of file SoPointerPosition.h.
|
friend |
Equality comparison operator.
|
friend |
Let only the SoInteractionHandler set the SoHandleEventAction on this position.
Definition at line 30 of file SoPointerPosition.h.