TGUI  0.7.8
tgui::RadioButtonRenderer Class Reference
Inheritance diagram for tgui::RadioButtonRenderer:
tgui::WidgetRenderer tgui::WidgetPadding tgui::CheckBoxRenderer

Public Member Functions

 RadioButtonRenderer (RadioButton *radioButton)
 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 setTextColor (const Color &color)
 Changes the color of the text. More...
 
void setTextColorNormal (const Color &color)
 Changes the color of the text in normal state (mouse not on top of the radio button). More...
 
void setTextColorHover (const Color &color)
 Changes the color of the text in hover state (mouse is standing on top of the radio button). More...
 
void setBackgroundColor (const Color &color)
 Changes the background color. More...
 
void setBackgroundColorNormal (const Color &color)
 Changes the background color in normal state (mouse is not on top of the radio button). More...
 
void setBackgroundColorHover (const Color &color)
 Changes the background color in hover state (mouse is standing on top of the radio button). More...
 
void setForegroundColor (const Color &color)
 Changes the foreground color. More...
 
void setForegroundColorNormal (const Color &color)
 Changes the foreground color in normal state (mouse is not on top of the radio button). More...
 
void setForegroundColorHover (const Color &color)
 Changes the foreground color in hover state (mouse is standing on top of the radio button). More...
 
void setCheckColor (const Color &color)
 Changes the color that is used to fill the radio button when it is checked. More...
 
void setCheckColorNormal (const Color &color)
 Changes the color that is used to fill the radio button when it is checked (mouse is not on radio button). More...
 
void setCheckColorHover (const Color &color)
 Changes the color that is used to fill the radio button when it is checked (mouse is on top of radio button). More...
 
void setUncheckedTexture (const Texture &texture)
 Change the image that is displayed when the checkbox is not checked. More...
 
void setCheckedTexture (const Texture &texture)
 Change the image that is displayed when the checkbox is checked. More...
 
void setUncheckedHoverTexture (const Texture &texture)
 Change the image that is displayed when the checkbox is not checked and the mouse is on top of the checkbox. More...
 
void setCheckedHoverTexture (const Texture &texture)
 Change the image that is displayed when the checkbox is checked and the mouse is on top of the checkbox. More...
 
void setFocusedTexture (const Texture &texture)
 Change the image that is displayed on top of the checkbox when it is focused. More...
 
- Public Member Functions inherited from tgui::WidgetRenderer
virtual ~WidgetRenderer ()
 Virtual destructor.
 
- Public Member Functions inherited from tgui::WidgetPadding
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...
 
virtual Padding getPadding () const
 Returns the size of the padding. More...
 

Constructor & Destructor Documentation

◆ RadioButtonRenderer()

tgui::RadioButtonRenderer::RadioButtonRenderer ( RadioButton radioButton)
inline

Constructor.

Parameters
radioButtonThe radio button that is connected to the renderer

Member Function Documentation

◆ getProperty()

virtual ObjectConverter tgui::RadioButtonRenderer::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::RadioButtonRenderer::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::RadioButtonRenderer::setBackgroundColor ( const Color color)

Changes the background color.

This color is ignored when checked and unchecked images are set.

Parameters
colorNew background color

This color can be seen as the border color. It is only visible when there is some padding.

This color will overwrite the color for both the normal and hover state.

See also
setBackgroundColorNormal
setBackgroundColorHover

◆ setBackgroundColorHover()

void tgui::RadioButtonRenderer::setBackgroundColorHover ( const Color color)

Changes the background color in hover state (mouse is standing on top of the radio button).

This color is ignored when checked and unchecked images are set.

Parameters
colorNew background color

This color can be seen as the border color. It is only visible when there is some padding.

◆ setBackgroundColorNormal()

void tgui::RadioButtonRenderer::setBackgroundColorNormal ( const Color color)

Changes the background color in normal state (mouse is not on top of the radio button).

This color is ignored when checked and unchecked images are set.

Parameters
colorNew background color

This color can be seen as the border color. It is only visible when there is some padding.

◆ setCheckColor()

void tgui::RadioButtonRenderer::setCheckColor ( const Color color)

Changes the color that is used to fill the radio button when it is checked.

This color is ignored when checked and unchecked images are set.

Parameters
colorNew check color

This color will overwrite the color for both the normal and hover state.

See also
setCheckColorNormal
setCheckColorHover

◆ setCheckColorHover()

void tgui::RadioButtonRenderer::setCheckColorHover ( const Color color)

Changes the color that is used to fill the radio button when it is checked (mouse is on top of radio button).

This color is ignored when checked and unchecked images are set.

Parameters
colorNew check color

◆ setCheckColorNormal()

void tgui::RadioButtonRenderer::setCheckColorNormal ( const Color color)

Changes the color that is used to fill the radio button when it is checked (mouse is not on radio button).

This color is ignored when checked and unchecked images are set.

Parameters
colorNew check color

◆ setCheckedHoverTexture()

void tgui::RadioButtonRenderer::setCheckedHoverTexture ( const Texture texture)

Change the image that is displayed when the checkbox is checked and the mouse is on top of the checkbox.

Parameters
textureThe new checked hover texture

This only has effect when the normal checked and unchecked images are also set. Pass an empty string to unset the image.

◆ setCheckedTexture()

void tgui::RadioButtonRenderer::setCheckedTexture ( const Texture texture)

Change the image that is displayed when the checkbox is checked.

Parameters
textureThe new checked texture

When checked and unchecked images are set, the background and foreground color properties will be ignored. Pass an empty string to unset the image.

◆ setFocusedTexture()

void tgui::RadioButtonRenderer::setFocusedTexture ( const Texture texture)

Change the image that is displayed on top of the checkbox when it is focused.

Parameters
textureThe new checked hover texture

This only has effect when the normal checked and unchecked images are also set. Pass an empty string to unset the image.

◆ setForegroundColor()

void tgui::RadioButtonRenderer::setForegroundColor ( const Color color)

Changes the foreground color.

This color is ignored when checked and unchecked images are set.

Parameters
colorNew foreground color

This color is drawn on top of the background color, but it does not overdraw it completely when padding is set. When there is padding, the background color will thus serve as the border color.

This color will overwrite the color for both the normal and hover state.

See also
setForegroundColorNormal
setForegroundColorHover

◆ setForegroundColorHover()

void tgui::RadioButtonRenderer::setForegroundColorHover ( const Color color)

Changes the foreground color in hover state (mouse is standing on top of the radio button).

This color is ignored when checked and unchecked images are set.

Parameters
colorNew foreground color

This color is drawn on top of the background color, but it does not overdraw it completely when padding is set. When there is padding, the background color will thus serve as the border color.

◆ setForegroundColorNormal()

void tgui::RadioButtonRenderer::setForegroundColorNormal ( const Color color)

Changes the foreground color in normal state (mouse is not on top of the radio button).

This color is ignored when checked and unchecked images are set.

Parameters
colorNew foreground color

This color is drawn on top of the background color, but it does not overdraw it completely when padding is set. When there is padding, the background color will thus serve as the border color.

This color will overwrite the color for both the normal and hover state.

◆ setProperty() [1/2]

virtual void tgui::RadioButtonRenderer::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::RadioButtonRenderer::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::RadioButtonRenderer::setTextColor ( const Color color)

Changes the color of the text.

Parameters
colorNew text color

This color will overwrite the color for both the normal and hover state.

See also
setTextColorNormal
setTextColorHover

◆ setTextColorHover()

void tgui::RadioButtonRenderer::setTextColorHover ( const Color color)

Changes the color of the text in hover state (mouse is standing on top of the radio button).

Parameters
colorNew text color

◆ setTextColorNormal()

void tgui::RadioButtonRenderer::setTextColorNormal ( const Color color)

Changes the color of the text in normal state (mouse not on top of the radio button).

Parameters
colorNew text color

◆ setUncheckedHoverTexture()

void tgui::RadioButtonRenderer::setUncheckedHoverTexture ( const Texture texture)

Change the image that is displayed when the checkbox is not checked and the mouse is on top of the checkbox.

Parameters
textureThe new unchecked hover texture

This only has effect when the normal checked and unchecked images are also set. Pass an empty string to unset the image.

◆ setUncheckedTexture()

void tgui::RadioButtonRenderer::setUncheckedTexture ( const Texture texture)

Change the image that is displayed when the checkbox is not checked.

Parameters
textureThe new unchecked texture

When checked and unchecked images are set, the background and foreground color properties will be ignored. Pass an empty string to unset the image.


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