TGUI 1.13
Loading...
Searching...
No Matches
MenuWidgetBaseRenderer.hpp
1
2//
3// TGUI - Texus' Graphical User Interface
4// Copyright (C) 2012-2026 Bruno Van de Velde (vdv_b@tgui.eu)
5//
6// This software is provided 'as-is', without any express or implied warranty.
7// In no event will the authors be held liable for any damages arising from the use of this software.
8//
9// Permission is granted to anyone to use this software for any purpose,
10// including commercial applications, and to alter it and redistribute it freely,
11// subject to the following restrictions:
12//
13// 1. The origin of this software must not be misrepresented;
14// you must not claim that you wrote the original software.
15// If you use this software in a product, an acknowledgment
16// in the product documentation would be appreciated but is not required.
17//
18// 2. Altered source versions must be plainly marked as such,
19// and must not be misrepresented as being the original software.
20//
21// 3. This notice may not be removed or altered from any source distribution.
22//
24
25#ifndef TGUI_MENU_WIDGET_BASE_RENDERER_HPP
26#define TGUI_MENU_WIDGET_BASE_RENDERER_HPP
27
28#include <TGUI/Renderers/WidgetRenderer.hpp>
29
31
32namespace tgui
33{
37 class TGUI_API MenuWidgetBaseRenderer : public WidgetRenderer
38 {
39 public:
41
47 void setBackgroundColor(Color backgroundColor);
48
54 [[nodiscard]] Color getBackgroundColor() const;
55
61 void setSelectedBackgroundColor(Color backgroundColor);
62
68 [[nodiscard]] Color getSelectedBackgroundColor() const;
69
75 void setTextColor(Color textColor);
76
82 [[nodiscard]] Color getTextColor() const;
83
89 void setSelectedTextColor(Color textColor);
90
96 [[nodiscard]] Color getSelectedTextColor() const;
97
103
108 [[nodiscard]] Color getTextColorDisabled() const;
109
114 void setSeparatorColor(Color separatorColor);
115
120 [[nodiscard]] Color getSeparatorColor() const;
121
127 void setTextureItemBackground(const Texture& texture);
128
134 [[nodiscard]] const Texture& getTextureItemBackground() const;
135
142
148 [[nodiscard]] const Texture& getTextureSelectedItemBackground() const;
149
155 void setDistanceToSide(float distanceToSide);
156
162 [[nodiscard]] float getDistanceToSide() const;
163
168 void setSeparatorThickness(float thickness);
169
174 [[nodiscard]] float getSeparatorThickness() const;
175
180 void setSeparatorVerticalPadding(float padding);
181
186 [[nodiscard]] float getSeparatorVerticalPadding() const;
187
192 void setSeparatorSidePadding(float padding);
193
198 [[nodiscard]] float getSeparatorSidePadding() const;
199 };
200} // namespace tgui
201
202#endif // TGUI_MENU_WIDGET_BASE_RENDERER_HPP
Wrapper for colors.
Definition Color.hpp:63
Renderer for the MenuBar widget.
Definition MenuWidgetBaseRenderer.hpp:38
void setTextColor(Color textColor)
Changes the color of the text.
const Texture & getTextureItemBackground() const
Returns the image that is displayed when the menu item is not selected.
Color getSelectedBackgroundColor() const
Returns the background color of the selected item.
void setBackgroundColor(Color backgroundColor)
Changes the background color.
Color getBackgroundColor() const
Returns the background color.
const Texture & getTextureSelectedItemBackground() const
Returns the image that is used as background of the selected menu item.
float getSeparatorThickness() const
Returns the height of the separators.
void setTextureSelectedItemBackground(const Texture &texture)
Changes the image that is used as background of the selected menu item.
void setSelectedBackgroundColor(Color backgroundColor)
Changes the background color of the selected item.
void setDistanceToSide(float distanceToSide)
Changes the distance between the text and the side of the menu item.
float getSeparatorVerticalPadding() const
Returns the distance between the separator and the menu items above and below it.
void setSelectedTextColor(Color textColor)
Changes the color of the text from the selected item.
Color getSelectedTextColor() const
Returns the color of the text from the selected item.
void setSeparatorThickness(float thickness)
Changes the height of the separators.
void setSeparatorColor(Color separatorColor)
Changes the color of the separators.
Color getTextColorDisabled() const
Returns the color of the text when disabled.
Color getSeparatorColor() const
Returns the color of the separators.
void setTextColorDisabled(Color textColor)
Changes the color of the text when disabled.
void setSeparatorVerticalPadding(float padding)
Changes the distance between the separator and the menu items above and below it.
void setTextureItemBackground(const Texture &texture)
Changes the image that is displayed when the menu item is not selected.
float getDistanceToSide() const
Returns the distance between the text and the side of the menu item.
Color getTextColor() const
Returns the color of the text.
WidgetRenderer()=default
Default constructor.
void setSeparatorSidePadding(float padding)
Changes the distance between the separator and the sides of the menu.
float getSeparatorSidePadding() const
Returns the distance between the separator and the sides of the menu.
Texture wrapper that internally reuses resources when multiple Texture objects are loaded from the sa...
Definition Texture.hpp:53
WidgetRenderer()=default
Default constructor.
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:37