PbMiscTextAttr Class Reference

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

#include <MeshViz/graph/PbMiscTextAttr.h>

Inheritance diagram for PbMiscTextAttr:

List of all members.

Public Types

enum  LineLength {

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
PbMiscTextAttroperator= (const PbMiscTextAttr &miscTextAttr)

Detailed Description

MeshViz Class to define a numeric display format.

This class is used to define miscellaneous text attributes.

Member Enumeration Documentation


The lines are not limited.


The lines are limited to one word.

Constructor & Destructor Documentation

PbMiscTextAttr::PbMiscTextAttr (  ) 
PbMiscTextAttr::PbMiscTextAttr ( const PbMiscTextAttr miscTextAttr  ) 

Member Function Documentation

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() and PoBase::setVRML2Mode()) 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".

Non Unicode List:
This function should not be used in a Unicode application.
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:

Open Inventor Toolkit reference manual, generated on 16 Jul 2020
Copyright © Thermo Fisher Scientific All rights reserved.