TGUI
0.8.9
|
Renderer for the MenuBar widget. More...
#include <TGUI/Renderers/MenuBarRenderer.hpp>
Public Member Functions | |
void | setBackgroundColor (Color backgroundColor) |
Changes the background color of the menu bar. More... | |
Color | getBackgroundColor () const |
Returns the background color. More... | |
void | setSelectedBackgroundColor (Color backgroundColor) |
Changes the background color of the selected item. More... | |
Color | getSelectedBackgroundColor () const |
Returns the background color of the selected item. More... | |
void | setTextColor (Color textColor) |
Changes the color of the text. More... | |
Color | getTextColor () const |
Returns the color of the text. More... | |
void | setSelectedTextColor (Color textColor) |
Changes the color of the text from the selected item. More... | |
Color | getSelectedTextColor () const |
Returns the color of the text from the selected item. More... | |
void | setTextColorDisabled (Color textColor) |
Changes the color of the text when disabled. More... | |
Color | getTextColorDisabled () const |
Returns the color of the text when disabled. More... | |
void | setTextureBackground (const Texture &texture) |
Changes the image that is used to fill the entire menu bar. More... | |
Texture & | getTextureBackground () const |
Returns the image that is used to fill the entire menu bar. More... | |
void | setTextureItemBackground (const Texture &texture) |
Changes the image that is displayed when the menu item is not selected. More... | |
Texture & | getTextureItemBackground () const |
Returns the image that is displayed when the menu item is not selected. More... | |
void | setTextureSelectedItemBackground (const Texture &texture) |
Changes the image that is used as background of the selected menu item. More... | |
Texture & | getTextureSelectedItemBackground () const |
Returns the image that is used as background of the selected menu item. More... | |
void | setDistanceToSide (float distanceToSide) |
Changes the distance between the text and the side of the menu item. More... | |
float | getDistanceToSide () const |
Returns the distance between the text and the side of the menu item. More... | |
WidgetRenderer ()=default | |
Default constructor. | |
WidgetRenderer (const std::shared_ptr< RendererData > &data) | |
Construct the renderer from renderer data. More... | |
Public Member Functions inherited from tgui::WidgetRenderer | |
WidgetRenderer ()=default | |
Default constructor. | |
WidgetRenderer (const std::shared_ptr< RendererData > &data) | |
Construct the renderer from renderer data. More... | |
virtual | ~WidgetRenderer ()=default |
Virtual destructor. | |
void | setOpacity (float opacity) |
Changes the opacity of the widget. More... | |
float | getOpacity () const |
Returns the opacity of the widget. More... | |
void | setOpacityDisabled (float opacity) |
Changes the opacity of the widget when it is disabled. More... | |
float | getOpacityDisabled () const |
Returns the opacity of the widget when it is disabled. 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 | setTransparentTexture (bool ignoreTransparentParts) |
Sets whether mouse events should be ignored on transparent parts of the texture of the widget in normal state. More... | |
bool | getTransparentTexture () const |
Returns whether mouse events should be ignored on transparent parts of the texture of the widget. 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 (const void *id, const std::function< void(const std::string &property)> &function) |
Subscribes a callback function to changes in the renderer. More... | |
void | unsubscribe (const void *id) |
Subscribes a callback function to changes in the renderer. More... | |
std::shared_ptr< RendererData > | getData () const |
Returns the renderer data. More... | |
std::shared_ptr< RendererData > | clone () const |
Gets a clone of the renderer data. More... | |
Renderer for the MenuBar widget.
Color tgui::MenuBarRenderer::getBackgroundColor | ( | ) | const |
Returns the background color.
float tgui::MenuBarRenderer::getDistanceToSide | ( | ) | const |
Returns the distance between the text and the side of the menu item.
Color tgui::MenuBarRenderer::getSelectedBackgroundColor | ( | ) | const |
Returns the background color of the selected item.
Color tgui::MenuBarRenderer::getSelectedTextColor | ( | ) | const |
Returns the color of the text from the selected item.
Color tgui::MenuBarRenderer::getTextColor | ( | ) | const |
Returns the color of the text.
Color tgui::MenuBarRenderer::getTextColorDisabled | ( | ) | const |
Returns the color of the text when disabled.
Texture & tgui::MenuBarRenderer::getTextureBackground | ( | ) | const |
Returns the image that is used to fill the entire menu bar.
Texture & tgui::MenuBarRenderer::getTextureItemBackground | ( | ) | const |
Returns the image that is displayed when the menu item is not selected.
Texture & tgui::MenuBarRenderer::getTextureSelectedItemBackground | ( | ) | const |
Returns the image that is used as background of the selected menu item.
void tgui::MenuBarRenderer::setBackgroundColor | ( | Color | backgroundColor | ) |
Changes the background color of the menu bar.
backgroundColor | The new background color |
void tgui::MenuBarRenderer::setDistanceToSide | ( | float | distanceToSide | ) |
Changes the distance between the text and the side of the menu item.
distanceToSide | distance between the text and the side of the menu item |
void tgui::MenuBarRenderer::setSelectedBackgroundColor | ( | Color | backgroundColor | ) |
Changes the background color of the selected item.
backgroundColor | The new selected item background color |
void tgui::MenuBarRenderer::setSelectedTextColor | ( | Color | textColor | ) |
Changes the color of the text from the selected item.
textColor | The new selected text color |
void tgui::MenuBarRenderer::setTextColor | ( | Color | textColor | ) |
Changes the color of the text.
textColor | The new text color |
void tgui::MenuBarRenderer::setTextColorDisabled | ( | Color | textColor | ) |
Changes the color of the text when disabled.
textColor | The new text color |
void tgui::MenuBarRenderer::setTextureBackground | ( | const Texture & | texture | ) |
Changes the image that is used to fill the entire menu bar.
texture | The background texture |
When this image is set, the background color property will be ignored.
void tgui::MenuBarRenderer::setTextureItemBackground | ( | const Texture & | texture | ) |
Changes the image that is displayed when the menu item is not selected.
texture | New item background texture |
void tgui::MenuBarRenderer::setTextureSelectedItemBackground | ( | const Texture & | texture | ) |
Changes the image that is used as background of the selected menu item.
texture | New selected item background texture |
|
inline |
Construct the renderer from renderer data.
data | Renderer data to initialize the renderer with |