13#ifndef SO_VIEWER_ELEMENT_H
14#define SO_VIEWER_ELEMENT_H
21#include <ThirdPartyWarningsDisable.h>
22#include <Inventor/elements/SoSubElement.h>
23#include <ThirdPartyWarningsRestore.h>
34 void init(SoState *state)
override;
38 SbBool
matches(
const SoElement *elt)
const override;
51 static void setCursor (SoState *state,
int shapeID);
74#define SO_NODE_DEFINE_CURSOR_SHAPE_ENUM(enumType) { \
75 int _value_false= 0; \
77 SO__NODE_CHECK_CONSTRUCT(__FILE__); \
78 if (firstInstance) { \
79 for (int i=SoViewerProxy::UNDEFINED_CURSOR;i<SoViewerProxy::getPredefinedCursorCount();++i) { \
80 fieldData->addEnumValue(SO__QUOTE(enumType), \
81 SoViewerProxy::cursorShapeNames()[i+1], i); \
84 } while (_value_false); \
#define INVENTORWRAPPER_API
Library initialization and export macros for platform independecy of project.
Element that stores a proxy object to the currently active viewer.
void init(SoState *state) override
Initializes element.
static void set(SoState *state, SoViewerProxy *proxy)
Sets the proxy for the currently active viewer.
SoViewerProxy * _proxy
Pointer to the proxy for the active viewer.
SoElement * copyMatchInfo() const override
Create and return a copy of this element.
SbBool matches(const SoElement *elt) const override
Always returns TRUE, since this element should never be a criterion for cache invalidation.
static void setCursor(SoState *state, int shapeID)
Convenience method which calls the corresponding method of SoViewerProxy (or does nothing if the prox...
static void initClass()
Initializes the SoViewerElement class.
~SoViewerElement() override
static SoViewerProxy * get(SoState *state)
Returns the proxy for the currently active viewer (might be NULL!)
static void setViewerProxyCB(void *userData, SoAction *action)
this callback can be used with SoCallback nodes and simply sets the SoViewerProxy given as userData
This class gives access to state of a viewer during scene graph traversal.
static double getDevicePixelRatio(SoState *state)
Convenience method which calls the corresponding method of SoViewerProxy.