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

Public Member Functions

 ComboBoxRenderer (ComboBox *comboBox)
 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 setBackgroundColor (const Color &backgroundColor)
 Set the background color that will be used inside the combo box. More...
 
void setArrowBackgroundColor (const Color &color)
 Set the background color of the arrow that will be used inside the combo box. More...
 
void setArrowBackgroundColorNormal (const Color &color)
 Set the background color of the arrow when the mouse is not on top of the combo box. More...
 
void setArrowBackgroundColorHover (const Color &color)
 Set the background color of the arrow when the mouse is standing on top of the combo box. More...
 
void setArrowColor (const Color &color)
 Set the color of the arrow that will be used inside the combo box. More...
 
void setArrowColorNormal (const Color &color)
 Set the color of the arrow when the mouse is not on top of the combo box. More...
 
void setArrowColorHover (const Color &color)
 Set the color of the arrow when the mouse is standing on top of the combo box. More...
 
void setTextColor (const Color &textColor)
 Set the text color that will be used inside the combo box. More...
 
void setBorderColor (const Color &borderColor)
 Set the border color text that will be used inside the combo box. More...
 
void setBackgroundTexture (const Texture &texture)
 Changes the background image. More...
 
void setArrowUpTexture (const Texture &texture)
 Changes the arrow up image. More...
 
void setArrowDownTexture (const Texture &texture)
 Changes the arrow down image. More...
 
void setArrowUpHoverTexture (const Texture &texture)
 Changes the arrow up image when the mouse is on top of the arrow. More...
 
void setArrowDownHoverTexture (const Texture &texture)
 Changes the arrow down image when the mouse is on top of the arrow. More...
 
virtual void setBorders (const Borders &borders) override
 Changes the size of the borders. More...
 
virtual void setPadding (const Padding &padding) override
 Changes the padding of the list box. More...
 
std::shared_ptr< ListBoxRenderergetListBox () const
 Returns the renderer of the list box. More...
 
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 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
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

◆ ComboBoxRenderer()

tgui::ComboBoxRenderer::ComboBoxRenderer ( ComboBox comboBox)
inline

Constructor.

Parameters
comboBoxThe combo box that is connected to the renderer

Member Function Documentation

◆ getListBox()

std::shared_ptr< ListBoxRenderer > tgui::ComboBoxRenderer::getListBox ( ) const

Returns the renderer of the list box.

Returns
The list box used to display all the items

◆ getProperty()

virtual ObjectConverter tgui::ComboBoxRenderer::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::ComboBoxRenderer::getPropertyValuePairs ( ) const
overridevirtual

Get a map with all properties and their values.

Returns
Property-value pairs of the renderer

Reimplemented from tgui::WidgetRenderer.

◆ setArrowBackgroundColor()

void tgui::ComboBoxRenderer::setArrowBackgroundColor ( const Color color)

Set the background color of the arrow that will be used inside the combo box.

Parameters
colorThe color of the arrow background of the combo box

This will overwrite the color in both normal and hover states.

This color will be ignored when a up and down image were loaded for the normal state.

See also
setArrowBackgroundColorNormal
setArrowBackgroundColorHover

◆ setArrowBackgroundColorHover()

void tgui::ComboBoxRenderer::setArrowBackgroundColorHover ( const Color color)

Set the background color of the arrow when the mouse is standing on top of the combo box.

Parameters
colorThe color of the arrow background in hover state

This color will be ignored when a up and down image were loaded for the normal state.

◆ setArrowBackgroundColorNormal()

void tgui::ComboBoxRenderer::setArrowBackgroundColorNormal ( const Color color)

Set the background color of the arrow when the mouse is not on top of the combo box.

Parameters
colorThe color of the arrow background in normal state

This color will be ignored when a up and down image were loaded for the normal state.

◆ setArrowColor()

void tgui::ComboBoxRenderer::setArrowColor ( const Color color)

Set the color of the arrow that will be used inside the combo box.

Parameters
colorThe color of the arrow of the combo box

This will overwrite the color in both normal and hover states.

This color will be ignored when a up and down image were loaded for the normal state.

See also
setArrowColorNormal
setArrowColorHover

◆ setArrowColorHover()

void tgui::ComboBoxRenderer::setArrowColorHover ( const Color color)

Set the color of the arrow when the mouse is standing on top of the combo box.

Parameters
colorThe color of the arrow in hover state

This color will be ignored when a up and down image were loaded for the normal state.

◆ setArrowColorNormal()

void tgui::ComboBoxRenderer::setArrowColorNormal ( const Color color)

Set the color of the arrow when the mouse is not on top of the combo box.

Parameters
colorThe color of the arrow in normal state

This color will be ignored when a up and down image were loaded for the normal state.

◆ setArrowDownHoverTexture()

void tgui::ComboBoxRenderer::setArrowDownHoverTexture ( const Texture texture)

Changes the arrow down image when the mouse is on top of the arrow.

Parameters
textureNew arrow down hover texture

Pass an empty string to unset the image.

◆ setArrowDownTexture()

void tgui::ComboBoxRenderer::setArrowDownTexture ( const Texture texture)

Changes the arrow down image.

Parameters
textureNew arrow down texture

When this image and the up image are set, the arrow color properties will be ignored. Pass an empty string to unset the image.

◆ setArrowUpHoverTexture()

void tgui::ComboBoxRenderer::setArrowUpHoverTexture ( const Texture texture)

Changes the arrow up image when the mouse is on top of the arrow.

Parameters
textureNew arrow up hover texture

Pass an empty string to unset the image.

◆ setArrowUpTexture()

void tgui::ComboBoxRenderer::setArrowUpTexture ( const Texture texture)

Changes the arrow up image.

Parameters
textureNew arrow up texture

When this image and the down image are set, the arrow color properties will be ignored. Pass an empty string to unset the image.

◆ setBackgroundColor()

void tgui::ComboBoxRenderer::setBackgroundColor ( const Color backgroundColor)

Set the background color that will be used inside the combo box.

Parameters
backgroundColorThe color of the background of the combo box

This color will be ignored when a background image was set.

◆ setBackgroundTexture()

void tgui::ComboBoxRenderer::setBackgroundTexture ( const Texture texture)

Changes the background image.

Parameters
textureNew background texture

When this image is set, the background color property will be ignored. Pass an empty string to unset the image, in this case the background color property will be used again.

◆ setBorderColor()

void tgui::ComboBoxRenderer::setBorderColor ( const Color borderColor)

Set the border color text that will be used inside the combo box.

Parameters
borderColorThe color of the borders

◆ setBorders() [1/4]

virtual void tgui::WidgetBorders::setBorders ( const Borders borders)
inlinevirtual

Changes the size of the borders.

Parameters
bordersSize of the borders

Reimplemented from tgui::WidgetBorders.

◆ setBorders() [2/4]

virtual void tgui::ComboBoxRenderer::setBorders ( const Borders borders)
overridevirtual

Changes the size of the borders.

Parameters
bordersThe size of the borders

Reimplemented from tgui::WidgetBorders.

◆ setBorders() [3/4]

void tgui::WidgetBorders::setBorders ( float  leftBorder,
float  topBorder,
float  rightBorder,
float  bottomBorder 
)
inline

Changes the size of the borders.

Parameters
leftBorderWidth of the left border
topBorderHeight of the top border
rightBorderWidth of the right border
bottomBorderHeight of the bottom border

◆ setBorders() [4/4]

void tgui::WidgetBorders::setBorders ( float  width,
float  height 
)
inline

Changes the size of the borders.

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

◆ 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]

virtual void tgui::ComboBoxRenderer::setPadding ( const Padding padding)
overridevirtual

Changes the padding of the list box.

This padding will be scaled together with the background image. If there is no background image, or when 9-slice scaling is used, the padding will be exactly what you pass here.

Parameters
paddingThe padding width and height

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::ComboBoxRenderer::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.
Exceptionwhen loading scrollbar fails with the theme connected to the list box

Reimplemented from tgui::WidgetRenderer.

◆ setProperty() [2/2]

virtual void tgui::ComboBoxRenderer::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.
Exceptionwhen loading scrollbar fails with the theme connected to the list box

Reimplemented from tgui::WidgetRenderer.

◆ setTextColor()

void tgui::ComboBoxRenderer::setTextColor ( const Color textColor)

Set the text color that will be used inside the combo box.

Parameters
textColorThe color of the text

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