TGUI  0.9-dev
tgui::BackendTextSFML Class Reference

Text implementation that makes use of SFML. More...

#include </home/texus/Documents/TGUI-0.9/include/TGUI/Backend/Renderer/SFML-Graphics/BackendTextSFML.hpp>

Inheritance diagram for tgui::BackendTextSFML:
tgui::BackendText

Public Member Functions

void setString (const String &string) override
 Changes the text. More...
 
void setCharacterSize (unsigned int characterSize) override
 Sets the size of the characters. More...
 
void setFillColor (const Color &color) override
 Changes the color of the text. More...
 
void setOutlineColor (const Color &color) override
 Changes the color of the text outline. More...
 
void setOutlineThickness (float thickness) override
 Changes the thickness of the text outline. More...
 
void setStyle (TextStyles style) override
 Changes the text style. More...
 
void setFont (const std::shared_ptr< BackendFont > &font) override
 Changes the font used by the text. More...
 
sf::Text & getInternalText ()
 Returns a reference to the internal SFML text. More...
 
const sf::Text & getInternalText () const
 Returns a const reference to the internal SFML text. More...
 
- Public Member Functions inherited from tgui::BackendText
virtual ~BackendText ()=default
 Virtual destructor.
 
virtual Vector2f getSize ()
 Returns the size of the text. More...
 
const StringgetString () const
 Returns the text. More...
 
unsigned int getCharacterSize () const
 Returns the character size of the text. More...
 
Color getFillColor () const
 Returns the text fill color. More...
 
Color getOutlineColor () const
 Returns the text outline color. More...
 
float getOutlineThickness () const
 Returns the text outline thickness. More...
 
TextStyles getStyle () const
 Returns the style of the text. More...
 
std::shared_ptr< BackendFontgetFont () const
 Returns the font of the text. More...
 
virtual Vector2f findCharacterPos (std::size_t index) const
 Returns the top-left position of the character at the provided index. More...
 
TextVertexData getVertexData ()
 Returns the information that is needed to render this text. More...
 

Additional Inherited Members

- Public Types inherited from tgui::BackendText
using TextVertexData = std::vector< std::pair< std::shared_ptr< BackendTexture >, std::shared_ptr< std::vector< Vertex > > > >
 Type of the data that is passed to BackendRenderTarget where the actual rendering happens.
 

Detailed Description

Text implementation that makes use of SFML.

Member Function Documentation

◆ getInternalText() [1/2]

sf::Text & tgui::BackendTextSFML::getInternalText ( )

Returns a reference to the internal SFML text.

Returns
Reference to internal text

◆ getInternalText() [2/2]

const sf::Text & tgui::BackendTextSFML::getInternalText ( ) const

Returns a const reference to the internal SFML text.

Returns
Const reference to internal text

◆ setCharacterSize()

void tgui::BackendTextSFML::setCharacterSize ( unsigned int  characterSize)
overridevirtual

Sets the size of the characters.

Parameters
characterSizeMaximum size available for characters above the baseline

Reimplemented from tgui::BackendText.

◆ setFillColor()

void tgui::BackendTextSFML::setFillColor ( const Color color)
overridevirtual

Changes the color of the text.

Parameters
colorText color

Reimplemented from tgui::BackendText.

◆ setFont()

void tgui::BackendTextSFML::setFont ( const std::shared_ptr< BackendFont > &  font)
overridevirtual

Changes the font used by the text.

Parameters
fontNew text font

Reimplemented from tgui::BackendText.

◆ setOutlineColor()

void tgui::BackendTextSFML::setOutlineColor ( const Color color)
overridevirtual

Changes the color of the text outline.

Parameters
colorOutline color

Reimplemented from tgui::BackendText.

◆ setOutlineThickness()

void tgui::BackendTextSFML::setOutlineThickness ( float  thickness)
overridevirtual

Changes the thickness of the text outline.

Parameters
thicknessOutline thickness

Reimplemented from tgui::BackendText.

◆ setString()

void tgui::BackendTextSFML::setString ( const String string)
overridevirtual

Changes the text.

Parameters
stringText that should be displayed

Reimplemented from tgui::BackendText.

◆ setStyle()

void tgui::BackendTextSFML::setStyle ( TextStyles  style)
overridevirtual

Changes the text style.

Parameters
styleNew text style

Reimplemented from tgui::BackendText.


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