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) |
void | getLineLength (char &endLineChar, int &lineLength) const |
SoNONUNICODE void | setFontName (const char *name) |
void | setFontName (const SbString &name) |
SbString | getFontName () const |
void | enableProfile (SbBool flag) |
SbBool | isProfileEnabled () const |
void | enablePredefinedProfile (SbBool flag) |
SbBool | isPredefinedProfileEnabled () const |
PbMiscTextAttr & | operator= (const PbMiscTextAttr &miscTextAttr) |
This class is used to define miscellaneous text attributes.
PbMiscTextAttr::PbMiscTextAttr | ( | ) |
PbMiscTextAttr::PbMiscTextAttr | ( | const PbMiscTextAttr & | miscTextAttr | ) |
void PbMiscTextAttr::enablePredefinedProfile | ( | SbBool | flag | ) |
void PbMiscTextAttr::enableProfile | ( | SbBool | flag | ) |
SbString PbMiscTextAttr::getFontName | ( | ) | const [inline] |
Gets the font name for texts.
void PbMiscTextAttr::getLineLength | ( | char & | endLineChar, | |
int & | lineLength | |||
) | const [inline] |
Gets line length attributes.
SbBool PbMiscTextAttr::isPredefinedProfileEnabled | ( | ) | const [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.
SbBool PbMiscTextAttr::isProfileEnabled | ( | ) | const [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.
PbMiscTextAttr& PbMiscTextAttr::operator= | ( | const PbMiscTextAttr & | miscTextAttr | ) |
Assignment operator.
Reimplemented from PbBase.
void PbMiscTextAttr::setFontName | ( | const SbString & | name | ) |
Sets the font name for texts.
The default font name is "defaultFont".
SoNONUNICODE void PbMiscTextAttr::setFontName | ( | const char * | 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.