TGUI  0.9-beta
tgui::BackendTextBase Class Referenceabstract

Base class for text implementations that depend on the backend. More...

#include <TGUI/BackendText.hpp>

Public Member Functions

virtual ~BackendTextBase ()=default
 Virtual destructor.
 
virtual Vector2f getSize ()=0
 Returns the size of the text. More...
 
virtual void setString (const String &string)=0
 Changes the text. More...
 
virtual void setCharacterSize (unsigned int characterSize)=0
 Sets the size of the characters. More...
 
virtual void setFillColor (const Color &color)=0
 Changes the color of the text. More...
 
virtual void setOutlineColor (const Color &color)=0
 Changes the color of the text outline. More...
 
virtual void setOutlineThickness (float thickness)=0
 Changes the thickness of the text outline. More...
 
virtual void setStyle (TextStyles style)=0
 Changes the text style. More...
 
virtual void setFont (const Font &font)=0
 Changes the font used by the text. More...
 
virtual Vector2f findCharacterPos (std::size_t index) const =0
 Returns the top-left position of the character at the provided index. More...
 

Detailed Description

Base class for text implementations that depend on the backend.

Member Function Documentation

◆ findCharacterPos()

virtual Vector2f tgui::BackendTextBase::findCharacterPos ( std::size_t  index) const
pure virtual

Returns the top-left position of the character at the provided index.

Parameters
indexIndex of the character for which the position should be returned

◆ getSize()

virtual Vector2f tgui::BackendTextBase::getSize ( )
pure virtual

Returns the size of the text.

Returns
Size of the bounding box around the text

◆ setCharacterSize()

virtual void tgui::BackendTextBase::setCharacterSize ( unsigned int  characterSize)
pure virtual

Sets the size of the characters.

Parameters
characterSizeMaximum size available for characters above the baseline

◆ setFillColor()

virtual void tgui::BackendTextBase::setFillColor ( const Color color)
pure virtual

Changes the color of the text.

Parameters
colorText color

◆ setFont()

virtual void tgui::BackendTextBase::setFont ( const Font font)
pure virtual

Changes the font used by the text.

Parameters
fontNew text font

◆ setOutlineColor()

virtual void tgui::BackendTextBase::setOutlineColor ( const Color color)
pure virtual

Changes the color of the text outline.

Parameters
colorOutline color

◆ setOutlineThickness()

virtual void tgui::BackendTextBase::setOutlineThickness ( float  thickness)
pure virtual

Changes the thickness of the text outline.

Parameters
thicknessOutline thickness

◆ setString()

virtual void tgui::BackendTextBase::setString ( const String string)
pure virtual

Changes the text.

Parameters
stringText that should be displayed

◆ setStyle()

virtual void tgui::BackendTextBase::setStyle ( TextStyles  style)
pure virtual

Changes the text style.

Parameters
styleNew text style

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