Public Member Functions | List of all members
sf::ui::IText Class Referenceabstract

An interface that allow component to have a text. More...

#include <IText.hpp>

Inheritance diagram for sf::ui::IText:
sf::ui::Button sf::ui::CheckBox sf::ui::KeyField sf::ui::Label sf::ui::TextField sf::ui::FormattedTextField sf::ui::PasswordField

Public Member Functions

virtual const sf::String & getText () const =0
 
virtual void setText (sf::String const &text)=0
 Sets the text's string of the component Don't forget to set the font. More...
 
virtual const sf::Font * getFont () const =0
 
virtual void setFont (sf::Font const &font)=0
 Sets the font of the component's text. More...
 
virtual unsigned int getFontSize () const =0
 
virtual void setFontSize (unsigned int size)=0
 Set the font's size of the component. More...
 
virtual sf::Color getFontColor () const =0
 
virtual void setFontColor (sf::Color color)=0
 Sets the color's font of the text. More...
 

Detailed Description

An interface that allow component to have a text.

Implement it in your component to make faster components that use text.

Definition at line 28 of file IText.hpp.

Member Function Documentation

virtual const sf::Font* sf::ui::IText::getFont ( ) const
pure virtual
Returns
the font of the component, if any returns null

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::KeyField, sf::ui::CheckBox, and sf::ui::Label.

virtual sf::Color sf::ui::IText::getFontColor ( ) const
pure virtual
Returns
the font's color of the text

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::KeyField, sf::ui::CheckBox, and sf::ui::Label.

virtual unsigned int sf::ui::IText::getFontSize ( ) const
pure virtual
Returns
the font's size of the component

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::KeyField, sf::ui::CheckBox, and sf::ui::Label.

virtual const sf::String& sf::ui::IText::getText ( ) const
pure virtual
Returns
the text's string

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::KeyField, sf::ui::CheckBox, and sf::ui::Label.

virtual void sf::ui::IText::setFont ( sf::Font const &  font)
pure virtual

Sets the font of the component's text.

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::KeyField, sf::ui::CheckBox, and sf::ui::Label.

virtual void sf::ui::IText::setFontColor ( sf::Color  color)
pure virtual

Sets the color's font of the text.

Parameters
colorthe text's color

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::KeyField, sf::ui::CheckBox, and sf::ui::Label.

virtual void sf::ui::IText::setFontSize ( unsigned int  size)
pure virtual

Set the font's size of the component.

Parameters
sizethe font's size

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::KeyField, sf::ui::CheckBox, and sf::ui::Label.

virtual void sf::ui::IText::setText ( sf::String const &  text)
pure virtual

Sets the text's string of the component Don't forget to set the font.

Parameters
textthe new string of the component

Implemented in sf::ui::Button, sf::ui::TextField, sf::ui::CheckBox, and sf::ui::Label.


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