FougTools  0.7.0dev-046fb6a
Handy tools for C++, Qt and OpenCascade
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Protected Member Functions | List of all members
occ::AIS_Text Class Reference

Interactive items specialized in text display. More...

#include <occtools/ais_text.h>

Inheritance diagram for occ::AIS_Text:

Public Member Functions

 AIS_Text ()
 Constructs a default AIS_Text. More...
 
 AIS_Text (const TCollection_ExtendedString &text, const gp_Pnt &pos)
 Constructs a fully initialized AIS_Text. More...
 
virtual ~AIS_Text ()
 Destructs the instance and free any allocated resources. More...
 
Handle_Prs3d_TextAspect presentationTextAspect (unsigned i=0) const
 
Handle_Graphic3d_AspectText3d graphicTextAspect (unsigned i=0) const
 
void setDefaultColor (const Quantity_Color &c)
 
void setDefaultFont (const char *fontName)
 
void setDefaultTextBackgroundColor (const Quantity_Color &c)
 
void setDefaultTextDisplayMode (Aspect_TypeOfDisplayText mode)
 
void setDefaultTextStyle (Aspect_TypeOfStyleText style)
 
gp_Pnt position (unsigned i=0) const
 Returns the position of the i-th text displayed. More...
 
void setPosition (const gp_Pnt &pos, unsigned i=0)
 Sets the position of the i-th displayed text to pos. More...
 
TCollection_ExtendedString text (unsigned i=0) const
 Returns the i-th text displayed. More...
 
void setText (const TCollection_ExtendedString &v, unsigned i=0)
 Sets the i-th displayed text to v. More...
 
bool isValidTextIndex (unsigned i) const
 Is i a valid index to query some text ? More...
 
void setTextBackgroundColor (const Quantity_Color &color, unsigned i=0)
 Sets the color of the i-th text background to color. More...
 
void setTextDisplayMode (Aspect_TypeOfDisplayText mode, unsigned i=0)
 
void setTextStyle (Aspect_TypeOfStyleText style, unsigned i=0)
 
unsigned textsCount () const
 Returns the count of texts displayed. More...
 
void addText (const TCollection_ExtendedString &text, const gp_Pnt &pos)
 Adds a new item text item to be displayed at position pos. More...
 

Protected Member Functions

void Compute (const Handle_PrsMgr_PresentationManager3d &pm, const Handle_Prs3d_Presentation &pres, const Standard_Integer mode) override
 – from PrsMgr_PresentableObject More...
 
void Compute (const Handle_Prs3d_Projector &proj, const Handle_Prs3d_Presentation &pres) override
 – from PrsMgr_PresentableObject More...
 
void ComputeSelection (const Handle_SelectMgr_Selection &sel, const Standard_Integer mode) override
 – from SelectMgr_SelectableObject More...
 

Detailed Description

Interactive items specialized in text display.

Constructor & Destructor Documentation

occ::AIS_Text::AIS_Text ( )

Constructs a default AIS_Text.

occ::AIS_Text::AIS_Text ( const TCollection_ExtendedString &  text,
const gp_Pnt &  pos 
)

Constructs a fully initialized AIS_Text.

occ::AIS_Text::~AIS_Text ( )
virtual

Destructs the instance and free any allocated resources.

Member Function Documentation

void occ::AIS_Text::addText ( const TCollection_ExtendedString &  text,
const gp_Pnt &  pos 
)

Adds a new item text item to be displayed at position pos.

Other text attributes are defaulted

void occ::AIS_Text::Compute ( const Handle_PrsMgr_PresentationManager3d &  pm,
const Handle_Prs3d_Presentation &  pres,
const Standard_Integer  mode 
)
overrideprotected

– from PrsMgr_PresentableObject

void occ::AIS_Text::Compute ( const Handle_Prs3d_Projector &  proj,
const Handle_Prs3d_Presentation &  pres 
)
overrideprotected

– from PrsMgr_PresentableObject

void occ::AIS_Text::ComputeSelection ( const Handle_SelectMgr_Selection &  sel,
const Standard_Integer  mode 
)
overrideprotected

– from SelectMgr_SelectableObject

Handle_Graphic3d_AspectText3d occ::AIS_Text::graphicTextAspect ( unsigned  i = 0) const
bool occ::AIS_Text::isValidTextIndex ( unsigned  i) const

Is i a valid index to query some text ?

gp_Pnt occ::AIS_Text::position ( unsigned  i = 0) const

Returns the position of the i-th text displayed.

Handle_Prs3d_TextAspect occ::AIS_Text::presentationTextAspect ( unsigned  i = 0) const
void occ::AIS_Text::setDefaultColor ( const Quantity_Color &  c)
void occ::AIS_Text::setDefaultFont ( const char *  fontName)
void occ::AIS_Text::setDefaultTextBackgroundColor ( const Quantity_Color &  c)
void occ::AIS_Text::setDefaultTextDisplayMode ( Aspect_TypeOfDisplayText  mode)
void occ::AIS_Text::setDefaultTextStyle ( Aspect_TypeOfStyleText  style)
void occ::AIS_Text::setPosition ( const gp_Pnt &  pos,
unsigned  i = 0 
)

Sets the position of the i-th displayed text to pos.

void occ::AIS_Text::setText ( const TCollection_ExtendedString &  v,
unsigned  i = 0 
)

Sets the i-th displayed text to v.

void occ::AIS_Text::setTextBackgroundColor ( const Quantity_Color &  color,
unsigned  i = 0 
)

Sets the color of the i-th text background to color.

Only works when the i-th text display mode is set to Aspect_TODT_SUBTITLE

void occ::AIS_Text::setTextDisplayMode ( Aspect_TypeOfDisplayText  mode,
unsigned  i = 0 
)
void occ::AIS_Text::setTextStyle ( Aspect_TypeOfStyleText  style,
unsigned  i = 0 
)
TCollection_ExtendedString occ::AIS_Text::text ( unsigned  i = 0) const

Returns the i-th text displayed.

unsigned occ::AIS_Text::textsCount ( ) const

Returns the count of texts displayed.


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