MeVisLab Resolution Independence API
Toggle main menu visibility
Loading...
Searching...
No Matches
SoViewerElement.h
Go to the documentation of this file.
1
/*************************************************************************************
2
**
3
** Copyright 2007, MeVis Medical Solutions AG
4
**
5
** The user may use this file in accordance with the license agreement provided with
6
** the Software or, alternatively, in accordance with the terms contained in a
7
** written agreement between the user and MeVis Medical Solutions AG.
8
**
9
** For further information use the contact form at https://www.mevislab.de/contact
10
**
11
**************************************************************************************/
12
13
#ifndef SO_VIEWER_ELEMENT_H
14
#define SO_VIEWER_ELEMENT_H
15
17
18
#include "
InventorWrapperDllInit.h
"
19
#include "
SoViewerProxy.h
"
20
21
#include <ThirdPartyWarningsDisable.h>
22
#include <Inventor/elements/SoSubElement.h>
23
#include <ThirdPartyWarningsRestore.h>
24
25
class
SoAction;
26
28
class
INVENTORWRAPPER_API
SoViewerElement
:
public
SoElement
29
{
30
SO_ELEMENT_HEADER(
SoViewerElement
);
31
32
public
:
34
void
init
(SoState* state)
override
;
35
38
SbBool
matches
(
const
SoElement* elt)
const override
;
39
41
SoElement*
copyMatchInfo
()
const override
;
42
44
static
void
set
(SoState* state,
SoViewerProxy
* proxy);
45
47
static
SoViewerProxy
*
get
(SoState* state);
48
51
static
void
setCursor
(SoState* state,
int
shapeID);
52
55
static
double
getDevicePixelRatio
(SoState* state);
56
59
static
void
setViewerProxyCB
(
void
* userData, SoAction* action);
60
61
SoINTERNAL public :
63
static
void
initClass
();
64
65
protected
:
67
SoViewerProxy
*
_proxy
;
68
69
~SoViewerElement
()
override
;
70
};
71
74
#define SO_NODE_DEFINE_CURSOR_SHAPE_ENUM(enumType) \
75
{ \
76
int _value_false = 0; \
77
do { \
78
SO__NODE_CHECK_CONSTRUCT(__FILE__); \
79
if (firstInstance) { \
80
for (int i = SoViewerProxy::UNDEFINED_CURSOR; i < SoViewerProxy::getPredefinedCursorCount(); ++i) { \
81
fieldData->addEnumValue(SO__QUOTE(enumType), SoViewerProxy::cursorShapeNames()[i + 1], i); \
82
} \
83
} \
84
} while (_value_false); \
85
}
86
87
#endif
/* __SoViewerElement_H */
InventorWrapperDllInit.h
INVENTORWRAPPER_API
#define INVENTORWRAPPER_API
Library initialization and export macros for platform independecy of project.
Definition
InventorWrapperDllInit.h:21
SoViewerProxy.h
SoViewerElement
Element that stores a proxy object to the currently active viewer.
Definition
SoViewerElement.h:29
SoViewerElement::init
void init(SoState *state) override
Initializes this element.
SoViewerElement::set
static void set(SoState *state, SoViewerProxy *proxy)
Sets the proxy for the currently active viewer.
SoViewerElement::_proxy
SoViewerProxy * _proxy
Pointer to the proxy for the active viewer.
Definition
SoViewerElement.h:67
SoViewerElement::copyMatchInfo
SoElement * copyMatchInfo() const override
Creates and returns a copy of this element.
SoViewerElement::matches
SbBool matches(const SoElement *elt) const override
SoViewerElement::setCursor
static void setCursor(SoState *state, int shapeID)
SoViewerElement::initClass
static void initClass()
Initializes the SoViewerElement class.
SoViewerElement::~SoViewerElement
~SoViewerElement() override
SoViewerElement::get
static SoViewerProxy * get(SoState *state)
Returns the proxy for the currently active viewer, which might be NULL.
SoViewerElement::setViewerProxyCB
static void setViewerProxyCB(void *userData, SoAction *action)
SoViewerProxy
Definition
SoViewerProxy.h:30
SoViewerElement::getDevicePixelRatio
static double getDevicePixelRatio(SoState *state)
MeVis
Foundation
Sources
MLInventorBinding
SoViewerElement.h
Generated by
1.18.0