Open Inventor Release 2024.1.2
 
Loading...
Searching...
No Matches
SoTextProperty.h
1/*=======================================================================
2 *** THE CONTENT OF THIS WORK IS PROPRIETARY TO FEI S.A.S, (FEI S.A.S.), ***
3 *** AND IS DISTRIBUTED UNDER A LICENSE AGREEMENT. ***
4 *** ***
5 *** REPRODUCTION, DISCLOSURE, OR USE, IN WHOLE OR IN PART, OTHER THAN AS ***
6 *** SPECIFIED IN THE LICENSE ARE NOT TO BE UNDERTAKEN EXCEPT WITH PRIOR ***
7 *** WRITTEN AUTHORIZATION OF FEI S.A.S. ***
8 *** ***
9 *** RESTRICTED RIGHTS LEGEND ***
10 *** USE, DUPLICATION, OR DISCLOSURE BY THE GOVERNMENT OF THE CONTENT OF THIS ***
11 *** WORK OR RELATED DOCUMENTATION IS SUBJECT TO RESTRICTIONS AS SET FORTH IN ***
12 *** SUBPARAGRAPH (C)(1) OF THE COMMERCIAL COMPUTER SOFTWARE RESTRICTED RIGHT ***
13 *** CLAUSE AT FAR 52.227-19 OR SUBPARAGRAPH (C)(1)(II) OF THE RIGHTS IN ***
14 *** TECHNICAL DATA AND COMPUTER SOFTWARE CLAUSE AT DFARS 52.227-7013. ***
15 *** ***
16 *** COPYRIGHT (C) 1996-2019 BY FEI S.A.S, ***
17 *** BORDEAUX, FRANCE ***
18 *** ALL RIGHTS RESERVED ***
19**=======================================================================*/
20/*=======================================================================
21** Author : Nicolas DAGUISE (Nov 2004)
22**=======================================================================*/
23
24
25
26#ifndef _SO_TEXT_PROPERTY_
27#define _SO_TEXT_PROPERTY_
28
29#include <Inventor/nodes/SoNode.h>
30#include <Inventor/fields/SoSFEnum.h>
31#include <Inventor/fields/SoSFBool.h>
32#include <Inventor/fields/SoSFVec2i32.h>
33#include <Inventor/fields/SoSFBitMask.h>
34#include <Inventor/fields/SoSFFloat.h>
35#include <Inventor/fields/SoMFColorRGBA.h>
36#include <Inventor/fields/SoMFBool.h>
37#include <Inventor/elements/SoTextStyleElement.h>
38
134class SoTextProperty : public SoNode {
135
136 SO_NODE_HEADER(SoTextProperty) ;
137
138 public:
143
148 inline virtual void setOverride(const SbBool state)
149 { override.setValue(state); }
150
154 inline virtual SbBool isOverride() const
155 { return override.getValue(); }
156
176
182 LEFT = 0x01,
183
187 CENTER = 0x03,
188
192 RIGHT = 0x02
193 };
194
208
214 TOP = 0x01,
215
219 HALF = 0x03,
220
224 BASE = 0x04,
225
229 BOTTOM = 0x05
230 };
231
243
253
261
268
273
278
282 BOTTOM_TO_TOP = 0x04
283 };
284
291
303
322
333
354
384
394
405
416
417private:
418 virtual void doAction(SoAction *action);
419 virtual void GLRender(SoGLRenderAction *action);
420 virtual void callback(SoCallbackAction *action);
421 virtual void pick(SoPickAction *action);
422 virtual void getBoundingBox(SoGetBoundingBoxAction *action);
423 virtual void getPrimitiveCount(SoGetPrimitiveCountAction *action);
424
425private:
426 // Init the class
427 static void initClass();
428 static void exitClass();
429
430 SoSFBool override;
431
432private:
433 virtual ~SoTextProperty();
434} ;
435
436/*----------------------------------------------------------------------------*/
437
438#endif // _SO_TEXT_PROPERTY_
439
440
441
442
Abstract base class for all actions.
Definition SoAction.h:132
Performs a generic traversal of a scene graph or path.
Renders a scene graph using Open Inventor's Render Engine.
Computes bounding box of a scene.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Counts number of...
Multiple-value field containing any number of Boolean values.
Definition SoMFBool.h:90
Multiple-value field containing any number of RGBA colors stored as four floats.
Abstract base class for all database nodes.
Definition SoNode.h:145
Abstract base class for picking objects in a scene.
Single-value field containing a set of bit flags.
Field containing a single Boolean value.
Definition SoSFBool.h:79
Field containing an enumerated value.
Definition SoSFEnum.h:89
Field containing a floating-point value.
Definition SoSFFloat.h:78
Field containing a two-dimensional vector.
Definition SoSFVec2i32.h:52
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> Text property no...
SoSFEnum alignmentV
Indicates vertical placement and alignment of strings.
StyleColor
Index values for setting colors in the styleColors field.
@ OVERLINE_COLOR
OVERLINE_COLOR.
@ BACK_FRAME_LINE_COLOR
BACK_FRAME_LINE_COLOR.
@ UNDERLINE_COLOR
UNDERLINE_COLOR.
@ DOUBLE_STRIKETHROUGH_COLOR
DOUBLE_STRIKETHROUGH_COLOR.
@ BACK_FRAME_COLOR
BACK_FRAME_COLOR.
@ NUM_EFFECTS_COLORS
NUM_EFFECTS_COLORS.
@ STRIKETHROUGH_COLOR
STRIKETHROUGH_COLOR.
SoSFFloat characterSpacing
This field specifies the spacing between individual characters.
SoSFFloat backFrameLineWidth
Defines the width of the line when BACK_FRAME_LINE has been enabled for the current style.
SoSFBitMask style
Specifies zero or more styles to be applied to text.
SoTextProperty()
Text property constructor.
AlignmentV
Possible vertical alignment values.
@ BOTTOM
Bottom edges of all strings are aligned.
@ TOP
Top edges of all strings are aligned.
@ HALF
Vertical centers of all strings are aligned.
@ BASE
All strings are aligned on their baseline.
SoSFFloat aliasingFactor
Defines the anti-aliasing factor to apply to the textured text rendering.
SoMFColorRGBA styleColors
Specifies the color to use for each style.
AlignmentH
Possible horizontal alignment values.
@ LEFT
Left edges of all strings are aligned.
@ CENTER
Horizontal centers of all strings are aligned.
@ RIGHT
Right edges of all strings are aligned.
Orientation
Possible text orientation values.
@ TOP_TO_BOTTOM
Text string is top to bottom oriented.
@ RIGHT_TO_LEFT
Text string is right to left oriented.
@ BOTTOM_TO_TOP
Text string is bottom to top oriented.
@ LEFT_TO_RIGHT
Text string is left to right oriented.
SoSFFloat margin
Set a margin (extra space) to apply around the text string for the BACK_FRAME and BACK_FRAME_LINE sty...
Style
TextProperty style values.
@ DOUBLE_STRIKETHROUGH
DOUBLE_STRIKETHROUGH.
@ UNDERLINE
UNDERLINE.
@ STRIKETHROUGH
STRIKETHROUGH.
@ BACK_FRAME
BACK_FRAME.
@ NONE
No effects.
@ BACK_FRAME_LINE
BACK_FRAME_LINE.
@ OVERLINE
OVERLINE.
virtual SbBool isOverride() const
Returns the state of the override field.
SoSFBool kerning
Set this field to TRUE to apply kerning on text rendering.
SoSFEnum orientation
Specifies the text rendering orientation.
SoSFEnum alignmentH
Indicates horizontal placement and alignment of strings.
virtual void setOverride(const SbBool state)
Set the state of the override field.
SoMFBool styleColorsUseCurrentMaterial
This field allows to use the current SoMaterial instead of the value specified by styleColors for eac...
SoSFVec2i32 textureQualityRange
Defines a quality range of values taken into account during textured text texture computation.
@ STRIKETHROUGH
STRIKETHROUGH.
@ DOUBLE_STRIKETHROUGH
DOUBLE_STRIKETHROUGH.
@ BACK_FRAME_LINE
BACK_FRAME_LINE.
int SbBool
Boolean type.
Definition SbBase.h:87