MeVisLab Toolbox Reference
SoExtText2.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 
16 
19 
20 #pragma once
21 
22 #include "SoView2DSystem.h"
23 
24 #include <Inventor/nodes/SoSubNode.h>
25 #include <Inventor/nodes/SoShape.h>
26 #include <Inventor/fields/SoSFString.h>
27 #include <Inventor/fields/SoSFFloat.h>
28 #include <Inventor/fields/SoSFEnum.h>
29 #include <Inventor/fields/SoSFUInt32.h>
30 #include <Inventor/fields/SoSFBool.h>
31 #include <Inventor/fields/SoSFColor.h>
32 #include <Inventor/fields/SoSFVec2f.h>
33 #include <Inventor/fields/SoSFVec2s.h>
34 
37 
38 class SOVIEW2D_API SoExtText2 : public SoShape
39 {
40  typedef SoShape inherited;
41 
42  SO_NODE_HEADER(SoExtText2);
43 
44 public:
45  static void initClass(void);
46  SoExtText2(void);
47 
50  LEFT = 1,
52  CENTER
53  };
54 
55  enum TextPosition {
58  };
59 
60  SoSFTypedEnum<TextPosition> position;
61  SoSFVec2f relativePosition;
62  SoSFVec2s boxMargin;
63  SoSFVec2s boxPadding;
64 
65  SoSFFloat lineSpacing;
66 
68  SoSFString string;
70  SoSFEnum justification;
72  SoSFColor color;
74  SoSFBool shadow;
76  SoSFColor shadowColor;
78  SoSFBool alwaysOnTop;
79 
81  SoSFUInt32 fontSize;
82 
85 
87  SoSFBool background;
89  SoSFColor backgroundColor;
91  SoSFFloat backgroundAlpha;
92 
94  void GLRender(SoGLRenderAction * action) override;
96  void rayPick(SoRayPickAction * action) override;
97 
98 protected:
99  ~SoExtText2() override;
100 
102  void generatePrimitives(SoAction * action) override;
104  void computeBBox(SoAction * action, SbBox3f & box, SbVec3f & center) override;
105 };
#define SOVIEW2D_API
File to resolve system dependencies in View2D library.
Implements a node similar to SoText2, but by using the GLUT font and some extra features (shadow,...
Definition: SoExtText2.h:39
Justification
Justification modes.
Definition: SoExtText2.h:49
void GLRender(SoGLRenderAction *action) override
reimplemented inventor method
SoSFBool background
draw a background rectangle
Definition: SoExtText2.h:87
SoSFColor color
text color
Definition: SoExtText2.h:72
SoSFTypedEnum< TextPosition > position
Definition: SoExtText2.h:60
@ RelativeToViewer
Definition: SoExtText2.h:57
@ Current3DPosition
Definition: SoExtText2.h:56
SoExtText2(void)
void rayPick(SoRayPickAction *action) override
reimplemented inventor method
SoSFBool applyClippingPlanes
apply clipping planes. Default is true (= clipping is enabled)
Definition: SoExtText2.h:84
SoSFVec2f relativePosition
Definition: SoExtText2.h:61
SoSFColor shadowColor
shadow color (if shadow is enabled)
Definition: SoExtText2.h:76
static void initClass(void)
SoSFVec2s boxMargin
Definition: SoExtText2.h:62
SoSFFloat lineSpacing
Definition: SoExtText2.h:65
SoSFColor backgroundColor
color of rectangle
Definition: SoExtText2.h:89
void generatePrimitives(SoAction *action) override
reimplemented inventor method
SoSFBool shadow
draw shadow
Definition: SoExtText2.h:74
SoSFEnum justification
justification of text
Definition: SoExtText2.h:70
SoSFUInt32 fontSize
size of the font in pixels
Definition: SoExtText2.h:81
void computeBBox(SoAction *action, SbBox3f &box, SbVec3f &center) override
reimplemented inventor method
~SoExtText2() override
SoSFVec2s boxPadding
Definition: SoExtText2.h:63
SoSFBool alwaysOnTop
draw on top (without depth buffer)
Definition: SoExtText2.h:78
SoSFString string
text to draw
Definition: SoExtText2.h:68
SoSFFloat backgroundAlpha
blending of rectangle
Definition: SoExtText2.h:91