Node to define miscellaneous text attributes (font name, line length,...). More...
#include <MeshViz/nodes/PoMiscTextAttr.h>
Public Types | |
enum | LineLength { LINE_LENGTH_MAX , LINE_LENGTH_MIN } |
Line length. More... | |
Public Member Functions | |
virtual SoType | getTypeId () const |
Returns the type identifier for this specific instance. | |
PoMiscTextAttr () | |
Constructor. | |
Public Member Functions inherited from SoNode | |
virtual void | setOverride (const SbBool state) |
Turns the override flag on or off. | |
virtual SbBool | isOverride () const |
Returns the state of the override flag. | |
virtual SoNode * | copy (SbBool copyConnections=FALSE) const |
Creates and returns an exact copy of the node. | |
virtual SbBool | affectsState () const |
Returns TRUE if a node has an effect on the state during traversal. | |
virtual void | touch () |
Marks an instance as modified, simulating a change to it. | |
Public Member Functions inherited from SoFieldContainer | |
void | setToDefaults () |
Sets all fields in this object to their default values. | |
SbBool | hasDefaultValues () const |
Returns TRUE if all of the object's fields have their default values. | |
SbBool | fieldsAreEqual (const SoFieldContainer *fc) const |
Returns TRUE if this object's fields are exactly equal to fc's fields. | |
void | copyFieldValues (const SoFieldContainer *fc, SbBool copyConnections=FALSE) |
Copies the contents of fc's fields into this object's fields. | |
SoNONUNICODE SbBool | set (const char *fieldDataString) |
Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
SbBool | set (const SbString &fieldDataString) |
Sets one or more fields in this object to the values specified in the given string, which should be a string in the Open Inventor file format. | |
void | get (SbString &fieldDataString) |
Returns the values of the fields of this object in the Open Inventor ASCII file format in the given string. | |
virtual int | getFields (SoFieldList &list) const |
Appends references to all of this object's fields to resultList, and returns the number of fields appended. | |
virtual int | getAllFields (SoFieldList &list) const |
Returns a list of fields, including the eventIn's and eventOut's. | |
virtual SoField * | getField (const SbName &fieldName) const |
Returns a the field of this object whose name is fieldName. | |
virtual SoField * | getEventIn (const SbName &fieldName) const |
Returns a the eventIn with the given name. | |
virtual SoField * | getEventOut (const SbName &fieldName) const |
Returns the eventOut with the given name. | |
SbBool | getFieldName (const SoField *field, SbName &fieldName) const |
Returns the name of the given field in the fieldName argument. | |
SbBool | enableNotify (SbBool flag) |
Notification at this Field Container is enabled (if flag == TRUE) or disabled (if flag == FALSE). | |
SbBool | isNotifyEnabled () const |
Notification is the process of telling interested objects that this object has changed. | |
virtual void | setUserData (void *data) |
Sets application data. | |
void * | getUserData (void) const |
Gets user application data. | |
Public Member Functions inherited from SoBase | |
virtual SbName | getName () const |
Returns the name of an instance. | |
virtual void | setName (const SbName &name) |
Sets the name of an instance. | |
void | setSynchronizable (const bool b) |
Sets this to be a ScaleViz synchronizable object. | |
bool | isSynchronizable () const |
Gets the ScaleViz synchronizable state of this object. | |
Public Member Functions inherited from SoRefCounter | |
void | ref () const |
Adds a reference to an instance. | |
void | unref () const |
Removes a reference from an instance. | |
void | unrefNoDelete () const |
unrefNoDelete() should be called when it is desired to decrement the reference count, but not delete the instance if this brings the reference count to zero. | |
int | getRefCount () const |
Returns current reference count. | |
void | lock () const |
lock this instance. | |
void | unlock () const |
unlock this instance. | |
Public Member Functions inherited from SoTypedObject | |
SbBool | isOfType (const SoType &type) const |
Returns TRUE if this object is of the type specified in type or is derived from that type. | |
template<typename TypedObjectClass > | |
SbBool | isOfType () const |
Returns TRUE if this object is of the type of class TypedObjectClass or is derived from that class. | |
Static Public Member Functions | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Static Public Member Functions inherited from PoNode | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Static Public Member Functions inherited from SoNode | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
static SoNode * | getByName (const SbName &name) |
A node's name can be set using SoBase::setName(). | |
static int | getByName (const SbName &name, SoNodeList &list) |
A node's name can be set using SoBase::setName(). | |
Static Public Member Functions inherited from SoFieldContainer | |
static SoType | getClassTypeId () |
Returns the type of this class. | |
Static Public Member Functions inherited from SoBase | |
static SoType | getClassTypeId () |
Returns type identifier for this class. | |
Static Public Member Functions inherited from SoTypedObject | |
static SoType | getClassTypeId () |
Returns the type identifier for this class. | |
Public Attributes | |
SoSFString | fontName |
Font name for text. | |
SoSFShort | lineLength |
Defines the max number of characters per line. | |
SoSFShort | endLineChar |
Defines the end line character. | |
SoSFBool | profileEnabled |
Enables/Disables the appearance of a profile for 3D Text. | |
SoSFBool | predefinedProfileEnabled |
Enables/Disables the use of a predefined profile for 3D text if they are activated (cf profileEnabled field). | |
SoSFBool | outliningEnabled |
Enables/Disables drawing of the outline of polygonal text (SoText3 and SoAnnoText3). | |
Node to define miscellaneous text attributes (font name, line length,...).
This node defines the current miscellaneous text attributes for all subsequent MeshViz representations which contain text. These attributes are the font name, the line length, the end line character.
fontName | "defaultFont" |
lineLength | LINE_LENGTH_MAX |
endLineChar | ' ' |
profileEnabled | FALSE |
predefinedProfileEnabled | TRUE |
outliningEnabled | TRUE |
Definition at line 61 of file PoMiscTextAttr.h.
Line length.
Enumerator | |
---|---|
LINE_LENGTH_MAX | The lines are not limited. |
LINE_LENGTH_MIN | The lines are limited to one word. |
Definition at line 71 of file PoMiscTextAttr.h.
PoMiscTextAttr::PoMiscTextAttr | ( | ) |
Constructor.
|
static |
Returns the type identifier for this class.
|
virtual |
Returns the type identifier for this specific instance.
Reimplemented from PoNode.
SoSFShort PoMiscTextAttr::endLineChar |
Defines the end line character.
Definition at line 114 of file PoMiscTextAttr.h.
SoSFString PoMiscTextAttr::fontName |
Font name for text.
Definition at line 87 of file PoMiscTextAttr.h.
SoSFShort PoMiscTextAttr::lineLength |
Defines the max number of characters per line.
If several endLineChar appear before the lineLength character, only the last endLineChar is taken into account. if lineLength = LINE_LENGTH_MAX, the lines length is not limited, and if lineLength = LINE_LENGTH_MIN, the lines are limited to one word.
Example of use with the string "United States of America" (24 characters) :
Be careful, words (consecutive characters delimited by endLineChar characters) are never truncated, so lines could exceed lineLength characters if the first word of the line contains more than lineLength characters.
Definition at line 109 of file PoMiscTextAttr.h.
SoSFBool PoMiscTextAttr::outliningEnabled |
Enables/Disables drawing of the outline of polygonal text (SoText3 and SoAnnoText3).
For filled text that is small relative to the viewer size, drawing the outline improves the appearance of the text. For larger text, the outline can be deactivated to improve performance and prevent the text having a bold appearance.
NOTE: field available since Open Inventor 4.0
Definition at line 143 of file PoMiscTextAttr.h.
SoSFBool PoMiscTextAttr::predefinedProfileEnabled |
Enables/Disables the use of a predefined profile for 3D text if they are activated (cf profileEnabled field).
If this field is set to FALSE, the current profile in the state is used (cf SoLinearProfile,...)
Definition at line 130 of file PoMiscTextAttr.h.
SoSFBool PoMiscTextAttr::profileEnabled |
Enables/Disables the appearance of a profile for 3D Text.
Only SoText3 text takes into account of this option (cf PoBase::setTextType()) to to select the type of text used).
Definition at line 122 of file PoMiscTextAttr.h.