TGUI  0.9.5
Loading...
Searching...
No Matches
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.
 
virtual void setString (const String &string)=0
 Changes the text.
 
virtual void setCharacterSize (unsigned int characterSize)=0
 Sets the size of the characters.
 
virtual void setFillColor (const Color &color)=0
 Changes the color of the text.
 
virtual void setOutlineColor (const Color &color)=0
 Changes the color of the text outline.
 
virtual void setOutlineThickness (float thickness)=0
 Changes the thickness of the text outline.
 
virtual void setStyle (TextStyles style)=0
 Changes the text style.
 
virtual void setFont (const Font &font)=0
 Changes the font used by the text.
 
virtual Vector2f findCharacterPos (std::size_t index) const =0
 Returns the top-left position of the character at the provided index.
 

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: