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. | |
virtual void | setCursor (int) |
Set cursor of viewer to pre- or user-defined shape, invalid values will set cursor to default shape. | |
virtual bool | hasShape (int shapeID) |
return true if the cursor shape has already been defined | |
virtual int | defineCursor (const char *, int=-1, int=-1, int=-1) |
Define new cursor shape - successful operation is only guaranteed with PNG-Images with size 32x32, containing only black, white and transparent pixels. | |
virtual bool | getCurrentCursorPosition (int &x, int &y) |
Get current cursor position relative to the viewing window. | |
virtual bool | isInitialRendering () const |
returns true if the viewer does the initial rendering after it became visible | |
virtual bool | isHighQualityOffscreenRendering () const |
returns true if high quality offscreen rendering (e.g. for OffscreenRenderer) is desired | |
virtual bool | isUserInterationEventInQueue () const |
returns if a user interaction event is the the GUI event queue (or in a remote rendering scenario in the incoming message queue). | |
virtual SoMetaInformationMap * | getMetaInformationMap () |
returns the current SoMetaInformationMap, which allows storing of the current meta information / render state as key/value pairs. | |
virtual double | getDevicePixelRatio () |
Returns the ratio between physical pixels and device-independent pixels for the viewer. | |
virtual void | setForceCursor (int shapeID) |
Enforce setting the cursor, even from mouseOverUpdates. | |
Static Public Member Functions | |
static const char *const * | cursorShapeNames () |
return list of strings containing cursor shape names; this includes UNDEFINED_CURSOR, so you must add 1 when indexing this array | |
static int | getPredefinedCursorCount () |
get number of predefined cursors from code (instead of requiring a re-compilation of all using libraries when using the value PREDEFINED_CURSOR_COUNT) | |
static const ml::EnumValues< cursorShapeEnum > & | getCursorShapeEnumValues () |
get enum values record for use with ml::TypedEnumField | |
static int | getNextFreeShapeID () |
return the next free id for defining your own cursor shape | |
Protected Member Functions | |
SoViewerProxy () | |
Protected constructor. Class must be derived to be adapted to actual viewer. | |
This class gives access to state of a viewer during scene graph traversal.
Currently implemented is setting of cursor shapes and defining own cursor shapes.
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.
return list of strings containing cursor shape names; this includes UNDEFINED_CURSOR, so you must add 1 when indexing this array
|
inlinevirtual |
Define 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 the shape id. The filename should be UTF8 encoded.
[Remark: Since in principle viewers of different systems can be mixed, one should
(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.
Get current cursor position relative to the viewing window.
Returns true if the position is inside of the viewing window.
|
static |
get 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.
return the next free id for defining your own cursor shape
get number of predefined cursors from code (instead of requiring a re-compilation of all using libraries when using the value PREDEFINED_CURSOR_COUNT)
return true if the cursor shape has already been defined
returns true if high quality offscreen rendering (e.g. for OffscreenRenderer) is desired
Definition at line 208 of file SoViewerProxy.h.
returns true if the viewer does the initial rendering after it became visible
Definition at line 205 of file SoViewerProxy.h.
returns if 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.
Set cursor of 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.
Enforce setting the cursor, even from mouseOverUpdates.
This may lead to cursor flickering. You should probably not use this function!
Definition at line 225 of file SoViewerProxy.h.
References mlrange_cast().