MeVisLab Toolbox Reference
|
This class gives access to state of a viewer during scene graph traversal. More...
#include <SoViewerProxy.h>
Public Member Functions | |
virtual | ~SoViewerProxy () |
Destructor. More... | |
virtual void | setCursor (int) |
Sets the cursor of a viewer to pre- or user-defined shape, invalid values will set cursor to default shape. More... | |
virtual bool | hasShape (int shapeID) |
Returns true if the cursor shape has already been defined. More... | |
virtual int | defineCursor (const char *, int=-1, int=-1, int=-1) |
Defines new cursor shape - successful operation is only guaranteed with PNG-Images with size 32x32, containing only black, white, and transparent pixels. More... | |
virtual bool | getCurrentCursorPosition (int &x, int &y) |
Gets current cursor position relative to the viewing window. More... | |
virtual bool | isInitialRendering () const |
Returns true if the viewer does the initial rendering after it became visible. More... | |
virtual bool | isHighQualityOffscreenRendering () const |
Returns true if high quality offscreen rendering (e.g., for OffscreenRenderer) is desired. More... | |
virtual bool | isUserInterationEventInQueue () const |
Returns whether a user interaction event is the the GUI event queue (or in a remote rendering scenario in the incoming message queue). More... | |
virtual SoMetaInformationMap * | getMetaInformationMap () |
Returns the current SoMetaInformationMap, which allows storing of the current meta information / render state as key/value pairs. More... | |
virtual double | getDevicePixelRatio () |
Returns the ratio between physical pixels and device-independent pixels for the viewer. More... | |
virtual void | setForceCursor (int shapeID) |
Enforces the setting of the cursor, even from mouse-over updates. More... | |
Static Public Member Functions | |
static const char *const * | cursorShapeNames () |
Returns a list of strings containing cursor shape names; this includes UNDEFINED_CURSOR, so you must add 1 when indexing this array. More... | |
static int | getPredefinedCursorCount () |
Returns number of predefined cursors from code (instead of requiring a re-compilation of all using libraries when using the value PREDEFINED_CURSOR_COUNT). More... | |
static const ml::EnumValues< cursorShapeEnum > & | getCursorShapeEnumValues () |
Returns enum values record for use with ml::TypedEnumField. More... | |
static int | getNextFreeShapeID () |
Returns the next free ID for defining custom cursor shape. More... | |
Protected Member Functions | |
SoViewerProxy () | |
Protected constructor. Class must be derived to be adapted to actual viewer. More... | |
This class gives access to state of a viewer during scene graph traversal.
Currently, the setting of cursor shapes and defining custom cursor shapes is implemented.
Definition at line 29 of file SoViewerProxy.h.
Pre-defined cursor shapes; note that you must adapt the list of names in SoViewerProxy.cpp if you change this list.
Definition at line 37 of file SoViewerProxy.h.
|
inlinevirtual |
Destructor.
Definition at line 33 of file SoViewerProxy.h.
|
inlineprotected |
Protected constructor. Class must be derived to be adapted to actual viewer.
Definition at line 229 of file SoViewerProxy.h.
|
static |
Returns a list of strings containing cursor shape names; this includes UNDEFINED_CURSOR, so you must add 1 when indexing this array.
|
inlinevirtual |
Defines new cursor shape - successful operation is only guaranteed with PNG-Images with size 32x32, containing only black, white, and transparent pixels.
If the operation failed, -1 is returned; otherwise, it returns the shape ID. The filename should be UTF-8 encoded.
[Remark: Since in principle viewers of different systems can be mixed, one should
true
and if not call defineCursor with the acquired cursor shape ID. But if you are sure that viewers are not mixed, simply call defineCursor with an ID of -1. Or stick to the pre-defined shapes. Also see below for code fragments.]N.B.: In MeVisLab, there is an easy way to override the pre-defined cursor shapes. Look into SoQtViewerProxy.h in MLInventorGUIBinding for instructions.
Definition at line 197 of file SoViewerProxy.h.
|
virtual |
Gets current cursor position relative to the viewing window.
Returns true
if the position is inside of the viewing window.
|
static |
Returns enum values record for use with ml::TypedEnumField.
|
inlinevirtual |
Returns the current SoMetaInformationMap, which allows storing of the current meta information / render state as key/value pairs.
You need to check for a NULL pointer, since a valid pointer is only available in special scenarios (e.g., in remote rendering).
Definition at line 217 of file SoViewerProxy.h.
|
static |
Returns the next free ID for defining custom cursor shape.
|
static |
Returns number of predefined cursors from code (instead of requiring a re-compilation of all using libraries when using the value PREDEFINED_CURSOR_COUNT).
|
virtual |
Returns true
if the cursor shape has already been defined.
|
inlinevirtual |
Returns true
if high quality offscreen rendering (e.g., for OffscreenRenderer) is desired.
Definition at line 208 of file SoViewerProxy.h.
|
inlinevirtual |
Returns true
if the viewer does the initial rendering after it became visible.
Definition at line 205 of file SoViewerProxy.h.
|
inlinevirtual |
Returns whether a user interaction event is the the GUI event queue (or in a remote rendering scenario in the incoming message queue).
Definition at line 212 of file SoViewerProxy.h.
|
inlinevirtual |
Sets the cursor of a viewer to pre- or user-defined shape, invalid values will set cursor to default shape.
This only works from event handling routines.
Definition at line 175 of file SoViewerProxy.h.
|
inlinevirtual |
Enforces the setting of the cursor, even from mouse-over updates.
This may lead to cursor flickering. You should probably not use this function!
Definition at line 225 of file SoViewerProxy.h.