19#include <Medical/InventorMedical.h>
21#include <Inventor/nodes/SoAnnotation.h>
22#include <Inventor/nodes/SoTextProperty.h>
24#include <Inventor/fields/SoSFBool.h>
25#include <Inventor/fields/SoSFColor.h>
26#include <Inventor/fields/SoSFEnum.h>
27#include <Inventor/fields/SoSFFloat.h>
28#include <Inventor/fields/SoSFInt32.h>
29#include <Inventor/fields/SoSFString.h>
30#include <Inventor/fields/SoSFVec3f.h>
31#include <Inventor/SbViewportRegion.h>
34#include <Inventor/nodes/SoBBox.h>
35#include <Inventor/nodes/SoFont.h>
36#include <Inventor/nodes/SoLineSet.h>
37#include <Inventor/nodes/SoSwitch.h>
38#include <Inventor/nodes/SoText2.h>
39#include <Inventor/nodes/SoTranslation.h>
210 static void nodeSensorCB(
void* data,
SoSensor* sensor );
212 static void callbackNodeCB(
void* data,
SoAction* action );
214 void updatePosAndGeom(
SoState* state = NULL );
Class for smart character strings.
Class for representing a viewport.
Abstract base class for all actions.
Node that defines font name, size, and type for text.
Sensor class that can be attached to Open Inventor nodes.
Smart pointer for any class inheriting SoRefCounter.
Field containing a single Boolean value.
Field containing an RGB color.
Field containing an enumerated value.
Field containing a floating-point value.
Field containing a string.
Field containing a three-dimensional vector.
Abstract base class for Open Inventor sensors.
Screen-aligned 2D text shape node.
@ BOTTOM
Bottom edges of all strings are aligned.
@ TOP
Top edges of all strings are aligned.
@ HALF
Vertical centers of all strings are aligned.
@ LEFT
Left edges of all strings are aligned.
@ CENTER
Horizontal centers of all strings are aligned.
@ RIGHT
Right edges of all strings are aligned.
<a href="IconLegend.html"><img src="extTGS.gif" alt="VSG extension" border="0"></a> (Preview feature...
static void initClass()
Initialize the class.
void deleteLines(int startLine, int numToDelete=1)
Delete one or more lines of text.
SoSFString fontName
Specify the font name (default is "Arial:Bold").
SoSFColor borderColor
Border color (default is 1,1,1).
AlignmentV
Vertical alignment values.
void setLine(const SbString &text, int line=0)
Set the contents of the specified line of text (convenience method).
SoSFEnum textAlignH
Horizontal alignment of the text inside the box (default is LEFT).
SoSFEnum alignmentV
Vertical alignment of the text box (default is TOP).
SoSFFloat fontSize
Specify the font size in pixels (default is 15).
SoFont * getFontNode()
Get the internal font node (allows to modify font parameters directly).
AlignmentH
Horizontal alignment values.
int getNumLines() const
Get number of lines of text currently in the box.
SoSFBool border
Enable drawing a border around the text box (default is FALSE).
SoSFEnum alignmentH
Horizontal alignment of the text box (default is LEFT).
void addLine(const SbString &text)
Add a line of text at the bottom of the box.
void deleteAll()
Delete all lines of text.
static void exitClass()
Finish using the class.
SoSFVec3f position
Position of the text box in normalized screen coordinates (-1 to 1).
const SbString & getLine(int line)
Get the contents of the specified line of text.
SoText2 * getTextNode()
Get the internal text node (allows to modify line spacing directly).