TGUI  0.7.8
tgui::MenuBarRenderer Class Reference
Inheritance diagram for tgui::MenuBarRenderer:
tgui::WidgetRenderer

Public Member Functions

 MenuBarRenderer (MenuBar *menuBar)
 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 menu bar. More...
 
void setTextColor (const Color &textColor)
 Set the text color that will be used inside the menu bar. More...
 
void setSelectedBackgroundColor (const Color &selectedBackgroundColor)
 Set the background color of the selected text that will be used inside the menu bar. More...
 
void setSelectedTextColor (const Color &selectedTextColor)
 Set the text color of the selected text that will be used inside the menu bar. More...
 
void setDistanceToSide (float distanceToSide)
 Changes the distance between the text and the side of the menu item. More...
 
void setBackgroundTexture (const Texture &texture)
 Change the image that is used to fill the entire menu bar. More...
 
void setItemBackgroundTexture (const Texture &texture)
 Change the image that is displayed when the tab is not selected. More...
 
void setSelectedItemBackgroundTexture (const Texture &texture)
 Change the image that is used as background of the selected menu item. More...
 
- Public Member Functions inherited from tgui::WidgetRenderer
virtual ~WidgetRenderer ()
 Virtual destructor.
 

Constructor & Destructor Documentation

◆ MenuBarRenderer()

tgui::MenuBarRenderer::MenuBarRenderer ( MenuBar menuBar)
inline

Constructor.

Parameters
menuBarThe menu bar that is connected to the renderer

Member Function Documentation

◆ getProperty()

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

Set the background color that will be used inside the menu bar.

Parameters
backgroundColorThe color of the background of the menu bar

◆ setBackgroundTexture()

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

Change the image that is used to fill the entire menu bar.

Parameters
textureNew item background texture

Pass an empty string to unset the image.

◆ setDistanceToSide()

void tgui::MenuBarRenderer::setDistanceToSide ( float  distanceToSide)

Changes the distance between the text and the side of the menu item.

Parameters
distanceToSidedistance between the text and the side of the menu item

◆ setItemBackgroundTexture()

void tgui::MenuBarRenderer::setItemBackgroundTexture ( const Texture texture)

Change the image that is displayed when the tab is not selected.

Parameters
textureNew item background texture

Pass an empty string to unset the image.

◆ setProperty() [1/2]

virtual void tgui::MenuBarRenderer::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::MenuBarRenderer::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.

◆ setSelectedBackgroundColor()

void tgui::MenuBarRenderer::setSelectedBackgroundColor ( const Color selectedBackgroundColor)

Set the background color of the selected text that will be used inside the menu bar.

Parameters
selectedBackgroundColorThe color of the background of the selected item

◆ setSelectedItemBackgroundTexture()

void tgui::MenuBarRenderer::setSelectedItemBackgroundTexture ( const Texture texture)

Change the image that is used as background of the selected menu item.

Parameters
textureNew selected item background texture

Pass an empty string to unset the image.

◆ setSelectedTextColor()

void tgui::MenuBarRenderer::setSelectedTextColor ( const Color selectedTextColor)

Set the text color of the selected text that will be used inside the menu bar.

Parameters
selectedTextColorThe color of the text when it is selected

◆ setTextColor()

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

Set the text color that will be used inside the menu bar.

Parameters
textColorThe color of the text

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