Class to define a numeric display format. More...
#include <MeshViz/graph/PbMiscTextAttr.h>
Public Types | |
enum | LineLength { LINE_LENGTH_MAX , LINE_LENGTH_MIN } |
Public Member Functions | |
PbMiscTextAttr () | |
PbMiscTextAttr (const PbMiscTextAttr &miscTextAttr) | |
void | setLineLength (char endLineChar, int lineLength) |
Sets line length attributes. | |
void | getLineLength (char &endLineChar, int &lineLength) const |
Gets line length attributes. | |
SoNONUNICODE void | setFontName (const char *name) |
Sets the font name for texts. | |
void | setFontName (const SbString &name) |
Sets the font name for texts. | |
SbString | getFontName () const |
Gets the font name for texts. | |
void | enableProfile (SbBool flag) |
SbBool | isProfileEnabled () const |
Enables/Disables the appearance of a profile for 3D Text. | |
void | enablePredefinedProfile (SbBool flag) |
SbBool | isPredefinedProfileEnabled () const |
Enables/Disables the use of a predefined profile for 3D text if they are activated (cf enableProfile()). | |
PbMiscTextAttr & | operator= (const PbMiscTextAttr &miscTextAttr) |
Assignment operator. | |
Public Member Functions inherited from PbBase | |
void | enableConnection (SbBool flag) |
Activates/deactivates the mechanism of connection. | |
SbBool | isConnectionEnabled () const |
Returns TRUE if the connection mechanism is active, otherwise FALSE. | |
void | touch () |
Simulates the changing of an instance of this object, so all connected objects are informed of this change. | |
PbBase & | operator= (const PbBase &base) |
Assignment operator. | |
Class to define a numeric display format.
This class is used to define miscellaneous text attributes.
Definition at line 39 of file PbMiscTextAttr.h.
Enumerator | |
---|---|
LINE_LENGTH_MAX | The lines are not limited.
|
LINE_LENGTH_MIN | The lines are limited to one word. |
Definition at line 49 of file PbMiscTextAttr.h.
PbMiscTextAttr::PbMiscTextAttr | ( | ) |
PbMiscTextAttr::PbMiscTextAttr | ( | const PbMiscTextAttr & | miscTextAttr | ) |
void PbMiscTextAttr::enablePredefinedProfile | ( | SbBool | flag | ) |
void PbMiscTextAttr::enableProfile | ( | SbBool | flag | ) |
|
inline |
Gets the font name for texts.
Definition at line 101 of file PbMiscTextAttr.h.
|
inline |
Gets line length attributes.
Definition at line 83 of file PbMiscTextAttr.h.
|
inline |
Enables/Disables the use of a predefined profile for 3D text if they are activated (cf enableProfile()).
If this option is disabled, the current profile in the state is used (cf SoLinearProfile,...) This option is enabled by default.
Definition at line 124 of file PbMiscTextAttr.h.
|
inline |
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). This option is disabled by default.
Definition at line 112 of file PbMiscTextAttr.h.
PbMiscTextAttr & PbMiscTextAttr::operator= | ( | const PbMiscTextAttr & | miscTextAttr | ) |
Assignment operator.
SoNONUNICODE void PbMiscTextAttr::setFontName | ( | const char * | name | ) |
Sets the font name for texts.
The default font name is "defaultFont".
Non Unicode: This function should not be used in a Unicode application.
void PbMiscTextAttr::setFontName | ( | const SbString & | name | ) |
Sets the font name for texts.
The default font name is "defaultFont".
void PbMiscTextAttr::setLineLength | ( | char | endLineChar, |
int | lineLength | ||
) |
Sets line length attributes.
lineLength is 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. By default endLineChar is ' ' and lineLength is LINE_LENGTH_MAX.
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.