TGUI  0.7.8
tgui::LabelRenderer Class Reference
Inheritance diagram for tgui::LabelRenderer:
tgui::WidgetRenderer tgui::WidgetBorders tgui::WidgetPadding

Public Member Functions

 LabelRenderer (Label *label)
 Constructor. More...
 
virtual void setProperty (std::string property, const std::string &value) override
 Change a property of the renderer. More...
 
virtual void setProperty (std::string property, ObjectConverter &&value) override
 Change a property of the renderer. More...
 
virtual ObjectConverter getProperty (std::string property) const override
 Retrieve the value of a certain property. More...
 
virtual std::map< std::string, ObjectConvertergetPropertyValuePairs () const override
 Get a map with all properties and their values. More...
 
void setPadding (const Padding &padding) override
 Changes the size of the padding. More...
 
void setTextColor (const Color &color)
 Changes the color of the text. More...
 
void setBackgroundColor (const Color &color)
 Changes the background color of the label. More...
 
void setBorderColor (const Color &color)
 Changes the color of the borders. More...
 
virtual void setPadding (const Padding &padding)
 Changes the size of the padding. More...
 
void setPadding (float leftPadding, float topPadding, float rightPadding, float bottomPadding)
 Changes the size of the padding. More...
 
void setPadding (float width, float height)
 Changes the size of the padding. More...
 
- Public Member Functions inherited from tgui::WidgetRenderer
virtual ~WidgetRenderer ()
 Virtual destructor.
 
- Public Member Functions inherited from tgui::WidgetBorders
virtual void setBorders (const Borders &borders)
 Changes the size of the borders. More...
 
void setBorders (float leftBorder, float topBorder, float rightBorder, float bottomBorder)
 Changes the size of the borders. More...
 
void setBorders (float width, float height)
 Changes the size of the borders. More...
 
virtual Borders getBorders () const
 Returns the size of the borders as a tgui::Borders. More...
 
- Public Member Functions inherited from tgui::WidgetPadding
void setPadding (float leftPadding, float topPadding, float rightPadding, float bottomPadding)
 Changes the size of the padding. More...
 
void setPadding (float width, float height)
 Changes the size of the padding. More...
 
virtual Padding getPadding () const
 Returns the size of the padding. More...
 

Constructor & Destructor Documentation

◆ LabelRenderer()

tgui::LabelRenderer::LabelRenderer ( Label label)
inline

Constructor.

Parameters
labelThe label that is connected to the renderer

Member Function Documentation

◆ getProperty()

virtual ObjectConverter tgui::LabelRenderer::getProperty ( std::string  property) const
overridevirtual

Retrieve the value of a certain property.

Parameters
propertyThe property that you would like to retrieve
Returns
The value inside a ObjectConverter object which you can extract with the correct get function or an ObjectConverter object with type ObjectConverter::Type::None when the property did not exist.

Reimplemented from tgui::WidgetRenderer.

◆ getPropertyValuePairs()

virtual std::map< std::string, ObjectConverter > tgui::LabelRenderer::getPropertyValuePairs ( ) const
overridevirtual

Get a map with all properties and their values.

Returns
Property-value pairs of the renderer

Reimplemented from tgui::WidgetRenderer.

◆ setBackgroundColor()

void tgui::LabelRenderer::setBackgroundColor ( const Color color)

Changes the background color of the label.

Parameters
colorNew background color

The background color is transparent by default.

When auto-size is enabled (default), then the background is just as big as the text. When a manual size is set, the background will fill this whole area.

◆ setBorderColor()

void tgui::LabelRenderer::setBorderColor ( const Color color)

Changes the color of the borders.

Parameters
colorNew border color

◆ setPadding() [1/4]

virtual void tgui::WidgetPadding::setPadding ( const Padding padding)
inlinevirtual

Changes the size of the padding.

Parameters
paddingSize of the padding

Reimplemented from tgui::WidgetPadding.

◆ setPadding() [2/4]

void tgui::LabelRenderer::setPadding ( const Padding padding)
overridevirtual

Changes the size of the padding.

Parameters
paddingSize of the padding

This is the distance between the side of the background and the text.

Reimplemented from tgui::WidgetPadding.

◆ setPadding() [3/4]

void tgui::WidgetPadding::setPadding ( float  leftPadding,
float  topPadding,
float  rightPadding,
float  bottomPadding 
)
inline

Changes the size of the padding.

Parameters
leftPaddingWidth of the left padding
topPaddingHeight of the top padding
rightPaddingWidth of the right padding
bottomPaddingHeight of the bottom padding

◆ setPadding() [4/4]

void tgui::WidgetPadding::setPadding ( float  width,
float  height 
)
inline

Changes the size of the padding.

Parameters
widthWidth of the left and right padding
heightHeight of the top and bottom padding

◆ setProperty() [1/2]

virtual void tgui::LabelRenderer::setProperty ( std::string  property,
const std::string &  value 
)
overridevirtual

Change a property of the renderer.

Parameters
propertyThe property that you would like to change
valueThe new serialized value that you like to assign to the property
Exceptions
Exceptionwhen deserialization fails or when the widget does not have this property.

Reimplemented from tgui::WidgetRenderer.

◆ setProperty() [2/2]

virtual void tgui::LabelRenderer::setProperty ( std::string  property,
ObjectConverter &&  value 
)
overridevirtual

Change a property of the renderer.

Parameters
propertyThe property that you would like to change
valueThe new value that you like to assign to the property. The ObjectConverter is implicitly constructed from the possible value types.
Exceptions
Exceptionfor unknown properties or when value was of a wrong type.

Reimplemented from tgui::WidgetRenderer.

◆ setTextColor()

void tgui::LabelRenderer::setTextColor ( const Color color)

Changes the color of the text.

Parameters
colorNew text color

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