Open Inventor Release 2024.2.1
 
Loading...
Searching...
No Matches
PbMiscTextAttr Class Reference

MeshViz Class to define a numeric display format. More...

#include <MeshViz/graph/PbMiscTextAttr.h>

+ Inheritance diagram for PbMiscTextAttr:

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()).
 
PbMiscTextAttroperator= (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.
 
PbBaseoperator= (const PbBase &base)
 Assignment operator.
 

Detailed Description

MeshViz Class to define a numeric display format.

This class is used to define miscellaneous text attributes.

Definition at line 39 of file PbMiscTextAttr.h.

Member Enumeration Documentation

◆ LineLength

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.

Constructor & Destructor Documentation

◆ PbMiscTextAttr() [1/2]

PbMiscTextAttr::PbMiscTextAttr ( )

◆ PbMiscTextAttr() [2/2]

PbMiscTextAttr::PbMiscTextAttr ( const PbMiscTextAttr miscTextAttr)

Member Function Documentation

◆ enablePredefinedProfile()

void PbMiscTextAttr::enablePredefinedProfile ( SbBool  flag)

◆ enableProfile()

void PbMiscTextAttr::enableProfile ( SbBool  flag)

◆ getFontName()

SbString PbMiscTextAttr::getFontName ( ) const
inline

Gets the font name for texts.

Definition at line 101 of file PbMiscTextAttr.h.

◆ getLineLength()

void PbMiscTextAttr::getLineLength ( char &  endLineChar,
int &  lineLength 
) const
inline

Gets line length attributes.

Definition at line 83 of file PbMiscTextAttr.h.

◆ isPredefinedProfileEnabled()

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.

Definition at line 124 of file PbMiscTextAttr.h.

◆ isProfileEnabled()

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.

Definition at line 112 of file PbMiscTextAttr.h.

◆ operator=()

PbMiscTextAttr & PbMiscTextAttr::operator= ( const PbMiscTextAttr miscTextAttr)

Assignment operator.

◆ setFontName() [1/2]

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.

◆ setFontName() [2/2]

void PbMiscTextAttr::setFontName ( const SbString name)

Sets the font name for texts.

The default font name is "defaultFont".

◆ setLineLength()

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) :

  • with endLineChar = ' ' and lineLength = 15, the string is cut into two lines: "United States" and "of America".
  • with endLineChar = ' ' and lineLength = 18, the string is cut into two lines: "United States of" and "America".

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.


The documentation for this class was generated from the following file: