TGUI  0.8-dev
tgui::RadioButtonRenderer Class Reference
Inheritance diagram for tgui::RadioButtonRenderer:
tgui::WidgetRenderer

Public Member Functions

 RadioButtonRenderer ()=default
 Default constructor.
 
 RadioButtonRenderer (std::shared_ptr< RendererData > data)
 Construct the renderer from renderer data. More...
 
void setBorders (const Borders &borders)
 Changes the size of the borders. More...
 
Borders getBorders () const
 Returns the size of the borders. More...
 
void setTextDistanceRatio (float ratio)
 Changes the relative distance between the radio button and the text next to it. More...
 
float getTextDistanceRatio () const
 The relative distance between the radio button and the text next to it. More...
 
void setTextColor (Color color)
 Changes the color of the text. More...
 
Color getTextColor () const
 Returns the text color. More...
 
void setTextColorHover (Color color)
 Changes the color of the text in hover state (mouse is standing on top of the radio button) More...
 
Color getTextColorHover () const
 Returns the text color in the hover state (mouse on radio button) More...
 
void setTextColorDisabled (Color color)
 Changes the color of the text when the radio button is disabled. More...
 
Color getTextColorDisabled () const
 Returns the text color when the radio button is disabled. More...
 
void setTextColorChecked (Color color)
 Changes the color of the text when the radio button is checked. More...
 
Color getTextColorChecked () const
 Returns the text color when the radio button is checked. More...
 
void setTextColorCheckedHover (Color color)
 Changes the color of the text in hover state when the radio button is checked. More...
 
Color getTextColorCheckedHover () const
 Returns the text color in the hover state when the radio button is checked. More...
 
void setTextColorCheckedDisabled (Color color)
 Changes the color of the text when the radio button is checked and disabled. More...
 
Color getTextColorCheckedDisabled () const
 Returns the text color when the radio button is checked and disabled. More...
 
void setBackgroundColor (Color color)
 Changes the background color. More...
 
Color getBackgroundColor () const
 Returns the background color. More...
 
void setBackgroundColorHover (Color color)
 Changes the background color in hover state (mouse is standing on top of the radio button) More...
 
Color getBackgroundColorHover () const
 Returns the background color in the hover state (mouse on radio button) More...
 
void setBackgroundColorDisabled (Color color)
 Changes the background color when the radio button is disabled. More...
 
Color getBackgroundColorDisabled () const
 Returns the background color when the radio button is disabled. More...
 
void setBackgroundColorChecked (Color color)
 Changes the background color used when the radio button is checked. More...
 
Color getBackgroundColorChecked () const
 Returns the background color used when the radio button is checked. More...
 
void setBackgroundColorCheckedHover (Color color)
 Changes the background color in hover state used when the radio button is checked. More...
 
Color getBackgroundColorCheckedHover () const
 Returns the background color in the hover state used when the radio button is checked. More...
 
void setBackgroundColorCheckedDisabled (Color color)
 Changes the background color when the radio button is checked and disabled. More...
 
Color getBackgroundColorCheckedDisabled () const
 Returns the background color when the radio button is checked and disabled. More...
 
void setBorderColor (Color color)
 Changes the border color. More...
 
Color getBorderColor () const
 Returns the border color. More...
 
void setBorderColorHover (Color color)
 Changes the border color in hover state (mouse is standing on top of the radio button) More...
 
Color getBorderColorHover () const
 Returns the border color in the hover state (mouse on radio button) More...
 
void setBorderColorDisabled (Color color)
 Changes the border color when the radio button is disabled. More...
 
Color getBorderColorDisabled () const
 Returns the border color when the radio button is disabled. More...
 
void setBorderColorChecked (Color color)
 Changes the border color used when the radio button is checked. More...
 
Color getBorderColorChecked () const
 Returns the border color used when the radio button is checked. More...
 
void setBorderColorCheckedHover (Color color)
 Changes the border color in hover state used when the radio button is checked. More...
 
Color getBorderColorCheckedHover () const
 Returns the border color in the hover state used when the radio button is checked. More...
 
void setBorderColorCheckedDisabled (Color color)
 Changes the border color when the radio button is checked and disabled. More...
 
Color getBorderColorCheckedDisabled () const
 Returns the border color when the radio button is checked and disabled. More...
 
void setCheckColor (Color color)
 Changes the color that is used to fill the radio button when it is checked. More...
 
Color getCheckColor () const
 Returns the check color. More...
 
void setCheckColorHover (Color color)
 Changes the color that is used to fill the radio button when the mouse is on top of it. More...
 
Color getCheckColorHover () const
 Returns the check color used to fill the radio button when the mouse is on top of it. More...
 
void setCheckColorDisabled (Color color)
 Changes the color that is used to fill the radio button when the radio button is disabled. More...
 
Color getCheckColorDisabled () const
 Returns the check color used to fill the radio button when the radio button is disabled. More...
 
void setTextureUnchecked (const Texture &texture)
 Changes the image that is displayed when the checkbox is not checked. More...
 
TexturegetTextureUnchecked () const
 Returns the image that is displayed when the checkbox is not checked. More...
 
void setTextureChecked (const Texture &texture)
 Changes the image that is displayed when the checkbox is checked. More...
 
TexturegetTextureChecked () const
 Returns the image that is displayed when the checkbox is checked. More...
 
void setTextureUncheckedHover (const Texture &texture)
 Changes the image that is displayed when the checkbox is not checked and the mouse is on top of the checkbox. More...
 
TexturegetTextureUncheckedHover () const
 Returns the image that is displayed when the checkbox is not checked and the mouse is on top of the checkbox. More...
 
void setTextureCheckedHover (const Texture &texture)
 Changes the image that is displayed when the checkbox is checked and the mouse is on top of the checkbox. More...
 
TexturegetTextureCheckedHover () const
 Returns the image that is displayed when the checkbox is checked and the mouse is on top of the checkbox. More...
 
void setTextureUncheckedDisabled (const Texture &texture)
 Changes the image that is displayed when the checkbox is not checked and the checkbox is disabled. More...
 
TexturegetTextureUncheckedDisabled () const
 Returns the image that is displayed when the checkbox is not checked and the checkbox is disabled. More...
 
void setTextureCheckedDisabled (const Texture &texture)
 Changes the image that is displayed when the checkbox is checked and the checkbox is disabled. More...
 
TexturegetTextureCheckedDisabled () const
 Returns the image that is displayed when the checkbox is checked and the checkbox is disabled. More...
 
void setTextureFocused (const Texture &texture)
 Changes the image that is displayed on top of the checkbox when it is focused. More...
 
TexturegetTextureFocused () const
 Returns the image that is displayed on top of the checkbox when it is focused. More...
 
void setTextStyle (TextStyle style)
 Changes the text style. More...
 
TextStyle getTextStyle () const
 Returns text style. More...
 
void setTextStyleChecked (TextStyle style)
 Changes the text style in the checked state. More...
 
TextStyle getTextStyleChecked () const
 Returns text style in the checked state. More...
 
- Public Member Functions inherited from tgui::WidgetRenderer
 WidgetRenderer ()=default
 Default constructor.
 
 WidgetRenderer (std::shared_ptr< RendererData > data)
 Construct the renderer from renderer data. More...
 
virtual ~WidgetRenderer ()
 Virtual destructor.
 
void setOpacity (float opacity)
 Changes the opacity of the widget. More...
 
float getOpacity () const
 Returns the opacity of the widget. More...
 
void setFont (Font font)
 Changes the font used for the text in the widget. More...
 
Font getFont () const
 Returns the font associated with the widget (if any) More...
 
void setProperty (const std::string &property, const std::string &value)
 Changes a property of the renderer. More...
 
void setProperty (const std::string &property, ObjectConverter &&value)
 Changes a property of the renderer. More...
 
ObjectConverter getProperty (const std::string &property) const
 Retrieves the value of a certain property. More...
 
const std::map< std::string, ObjectConverter > & getPropertyValuePairs () const
 Gets a map with all properties and their values. More...
 
void subscribe (void *id, const std::function< void(const std::string &property)> &function)
 Subscribes a callback function to changes in the renderer. More...
 
void unsubscribe (void *id)
 Subscribes a callback function to changes in the renderer. More...
 
std::shared_ptr< RendererDatagetData () const
 Returns the renderer data. More...
 
std::shared_ptr< RendererDataclone () const
 Gets a clone of the renderer data. More...
 

Constructor & Destructor Documentation

§ RadioButtonRenderer()

tgui::RadioButtonRenderer::RadioButtonRenderer ( std::shared_ptr< RendererData data)
inline

Construct the renderer from renderer data.

Parameters
dataRenderer data to initialize the renderer with

Member Function Documentation

§ getBackgroundColor()

Color tgui::RadioButtonRenderer::getBackgroundColor ( ) const

Returns the background color.

Returns
background color

§ getBackgroundColorChecked()

Color tgui::RadioButtonRenderer::getBackgroundColorChecked ( ) const

Returns the background color used when the radio button is checked.

Returns
background color

§ getBackgroundColorCheckedDisabled()

Color tgui::RadioButtonRenderer::getBackgroundColorCheckedDisabled ( ) const

Returns the background color when the radio button is checked and disabled.

Returns
background color

§ getBackgroundColorCheckedHover()

Color tgui::RadioButtonRenderer::getBackgroundColorCheckedHover ( ) const

Returns the background color in the hover state used when the radio button is checked.

Returns
background color

§ getBackgroundColorDisabled()

Color tgui::RadioButtonRenderer::getBackgroundColorDisabled ( ) const

Returns the background color when the radio button is disabled.

Returns
background color

§ getBackgroundColorHover()

Color tgui::RadioButtonRenderer::getBackgroundColorHover ( ) const

Returns the background color in the hover state (mouse on radio button)

Returns
background color

§ getBorderColor()

Color tgui::RadioButtonRenderer::getBorderColor ( ) const

Returns the border color.

Returns
border color

§ getBorderColorChecked()

Color tgui::RadioButtonRenderer::getBorderColorChecked ( ) const

Returns the border color used when the radio button is checked.

Returns
border color

§ getBorderColorCheckedDisabled()

Color tgui::RadioButtonRenderer::getBorderColorCheckedDisabled ( ) const

Returns the border color when the radio button is checked and disabled.

Returns
border color

§ getBorderColorCheckedHover()

Color tgui::RadioButtonRenderer::getBorderColorCheckedHover ( ) const

Returns the border color in the hover state used when the radio button is checked.

Returns
border color

§ getBorderColorDisabled()

Color tgui::RadioButtonRenderer::getBorderColorDisabled ( ) const

Returns the border color when the radio button is disabled.

Returns
border color

§ getBorderColorHover()

Color tgui::RadioButtonRenderer::getBorderColorHover ( ) const

Returns the border color in the hover state (mouse on radio button)

Returns
border color

§ getBorders()

Borders tgui::RadioButtonRenderer::getBorders ( ) const

Returns the size of the borders.

Returns
border size

§ getCheckColor()

Color tgui::RadioButtonRenderer::getCheckColor ( ) const

Returns the check color.

Returns
check color

§ getCheckColorDisabled()

Color tgui::RadioButtonRenderer::getCheckColorDisabled ( ) const

Returns the check color used to fill the radio button when the radio button is disabled.

Returns
check color

§ getCheckColorHover()

Color tgui::RadioButtonRenderer::getCheckColorHover ( ) const

Returns the check color used to fill the radio button when the mouse is on top of it.

Returns
check color

§ getTextColor()

Color tgui::RadioButtonRenderer::getTextColor ( ) const

Returns the text color.

Returns
text color

§ getTextColorChecked()

Color tgui::RadioButtonRenderer::getTextColorChecked ( ) const

Returns the text color when the radio button is checked.

Returns
text color

§ getTextColorCheckedDisabled()

Color tgui::RadioButtonRenderer::getTextColorCheckedDisabled ( ) const

Returns the text color when the radio button is checked and disabled.

Returns
text color

§ getTextColorCheckedHover()

Color tgui::RadioButtonRenderer::getTextColorCheckedHover ( ) const

Returns the text color in the hover state when the radio button is checked.

Returns
text color

§ getTextColorDisabled()

Color tgui::RadioButtonRenderer::getTextColorDisabled ( ) const

Returns the text color when the radio button is disabled.

Returns
text color

§ getTextColorHover()

Color tgui::RadioButtonRenderer::getTextColorHover ( ) const

Returns the text color in the hover state (mouse on radio button)

Returns
text color

§ getTextDistanceRatio()

float tgui::RadioButtonRenderer::getTextDistanceRatio ( ) const

The relative distance between the radio button and the text next to it.

Returns
The ratio of the distance based on the width of the radio button
See also
setTextDistanceRatio

§ getTextStyle()

TextStyle tgui::RadioButtonRenderer::getTextStyle ( ) const

Returns text style.

Returns
Style of the text

§ getTextStyleChecked()

TextStyle tgui::RadioButtonRenderer::getTextStyleChecked ( ) const

Returns text style in the checked state.

Returns
Style of the text

§ getTextureChecked()

Texture& tgui::RadioButtonRenderer::getTextureChecked ( ) const

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

Returns
checked texture

§ getTextureCheckedDisabled()

Texture& tgui::RadioButtonRenderer::getTextureCheckedDisabled ( ) const

Returns the image that is displayed when the checkbox is checked and the checkbox is disabled.

Returns
checked disabled texture

§ getTextureCheckedHover()

Texture& tgui::RadioButtonRenderer::getTextureCheckedHover ( ) const

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

Returns
checked hover texture

§ getTextureFocused()

Texture& tgui::RadioButtonRenderer::getTextureFocused ( ) const

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

Returns
focused texture

§ getTextureUnchecked()

Texture& tgui::RadioButtonRenderer::getTextureUnchecked ( ) const

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

Returns
unchecked texture

§ getTextureUncheckedDisabled()

Texture& tgui::RadioButtonRenderer::getTextureUncheckedDisabled ( ) const

Returns the image that is displayed when the checkbox is not checked and the checkbox is disabled.

Returns
unchecked disabled texture

§ getTextureUncheckedHover()

Texture& tgui::RadioButtonRenderer::getTextureUncheckedHover ( ) const

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

Returns
unchecked hover texture

§ setBackgroundColor()

void tgui::RadioButtonRenderer::setBackgroundColor ( Color  color)

Changes the background color.

Parameters
colorNew background color

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

§ setBackgroundColorChecked()

void tgui::RadioButtonRenderer::setBackgroundColorChecked ( Color  color)

Changes the background color used when the radio button is checked.

Parameters
colorNew background color

§ setBackgroundColorCheckedDisabled()

void tgui::RadioButtonRenderer::setBackgroundColorCheckedDisabled ( Color  color)

Changes the background color when the radio button is checked and disabled.

Parameters
colorNew background color

§ setBackgroundColorCheckedHover()

void tgui::RadioButtonRenderer::setBackgroundColorCheckedHover ( Color  color)

Changes the background color in hover state used when the radio button is checked.

Parameters
colorNew background color

§ setBackgroundColorDisabled()

void tgui::RadioButtonRenderer::setBackgroundColorDisabled ( Color  color)

Changes the background color when the radio button is disabled.

Parameters
colorNew background color

§ setBackgroundColorHover()

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

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

Parameters
colorNew background color

§ setBorderColor()

void tgui::RadioButtonRenderer::setBorderColor ( Color  color)

Changes the border color.

Parameters
colorNew border color

§ setBorderColorChecked()

void tgui::RadioButtonRenderer::setBorderColorChecked ( Color  color)

Changes the border color used when the radio button is checked.

Parameters
colorNew border color

§ setBorderColorCheckedDisabled()

void tgui::RadioButtonRenderer::setBorderColorCheckedDisabled ( Color  color)

Changes the border color when the radio button is checked and disabled.

Parameters
colorNew border color

§ setBorderColorCheckedHover()

void tgui::RadioButtonRenderer::setBorderColorCheckedHover ( Color  color)

Changes the border color in hover state used when the radio button is checked.

Parameters
colorNew border color

§ setBorderColorDisabled()

void tgui::RadioButtonRenderer::setBorderColorDisabled ( Color  color)

Changes the border color when the radio button is disabled.

Parameters
colorNew border color

§ setBorderColorHover()

void tgui::RadioButtonRenderer::setBorderColorHover ( Color  color)

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

Parameters
colorNew border color

§ setBorders()

void tgui::RadioButtonRenderer::setBorders ( const Borders borders)

Changes the size of the borders.

Parameters
bordersSize of the borders

§ setCheckColor()

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

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

Parameters
colorNew check color

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

§ setCheckColorDisabled()

void tgui::RadioButtonRenderer::setCheckColorDisabled ( Color  color)

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

Parameters
colorNew check color

§ setCheckColorHover()

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

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

Parameters
colorNew check color

§ setTextColor()

void tgui::RadioButtonRenderer::setTextColor ( Color  color)

Changes the color of the text.

Parameters
colorNew text color

§ setTextColorChecked()

void tgui::RadioButtonRenderer::setTextColorChecked ( Color  color)

Changes the color of the text when the radio button is checked.

Parameters
colorNew text color

§ setTextColorCheckedDisabled()

void tgui::RadioButtonRenderer::setTextColorCheckedDisabled ( Color  color)

Changes the color of the text when the radio button is checked and disabled.

Parameters
colorNew text color

§ setTextColorCheckedHover()

void tgui::RadioButtonRenderer::setTextColorCheckedHover ( Color  color)

Changes the color of the text in hover state when the radio button is checked.

Parameters
colorNew text color

§ setTextColorDisabled()

void tgui::RadioButtonRenderer::setTextColorDisabled ( Color  color)

Changes the color of the text when the radio button is disabled.

Parameters
colorNew text color

§ setTextColorHover()

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

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

Parameters
colorNew text color

§ setTextDistanceRatio()

void tgui::RadioButtonRenderer::setTextDistanceRatio ( float  ratio)

Changes the relative distance between the radio button and the text next to it.

Parameters
ratioThe ratio of the distance based on the width of the radio button

The default value is 0.2 which means that if the width of the radio button would be 50 pixels then the gap between the radio button and the text will be 10 pixels.

§ setTextStyle()

void tgui::RadioButtonRenderer::setTextStyle ( TextStyle  style)

Changes the text style.

Parameters
styleNew text style

§ setTextStyleChecked()

void tgui::RadioButtonRenderer::setTextStyleChecked ( TextStyle  style)

Changes the text style in the checked state.

Parameters
styleNew text style

§ setTextureChecked()

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

Changes 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 check color properties will be ignored.

§ setTextureCheckedDisabled()

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

Changes the image that is displayed when the checkbox is checked and the checkbox is disabled.

Parameters
textureThe new checked disabled texture

This only has effect when the normal checked and unchecked images are also set.

§ setTextureCheckedHover()

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

Changes 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.

§ setTextureFocused()

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

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

Parameters
textureThe new focused texture

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

§ setTextureUnchecked()

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

Changes 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 check color properties will be ignored.

§ setTextureUncheckedDisabled()

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

Changes the image that is displayed when the checkbox is not checked and the checkbox is disabled.

Parameters
textureThe new unchecked disabled texture

This only has effect when the normal checked and unchecked images are also set.

§ setTextureUncheckedHover()

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

Changes 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.


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