TGUI 1.13
Loading...
Searching...
No Matches
ComboBoxRenderer.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_COMBO_BOX_RENDERER_HPP
26#define TGUI_COMBO_BOX_RENDERER_HPP
27
28#include <TGUI/Renderers/WidgetRenderer.hpp>
29
31
32namespace tgui
33{
34 class TGUI_API ComboBoxRenderer : public WidgetRenderer
35 {
36 public:
38
44 void setBorders(const Borders& borders);
45
51 [[nodiscard]] Borders getBorders() const;
52
58 void setPadding(const Padding& padding);
59
65 [[nodiscard]] Padding getPadding() const;
66
73
79 [[nodiscard]] TextStyles getTextStyle() const;
80
91
97 [[nodiscard]] TextStyles getDefaultTextStyle() const;
98
104 void setBackgroundColor(Color backgroundColor);
105
111 [[nodiscard]] Color getBackgroundColor() const;
112
118 void setBackgroundColorDisabled(Color backgroundColor);
119
125 [[nodiscard]] Color getBackgroundColorDisabled() const;
126
132 void setTextColor(Color textColor);
133
139 [[nodiscard]] Color getTextColor() const;
140
147
153 [[nodiscard]] Color getTextColorDisabled() const;
154
160 void setDefaultTextColor(Color defaultTextColor);
161
167 [[nodiscard]] Color getDefaultTextColor() const;
168
177
183 [[nodiscard]] Color getArrowBackgroundColor() const;
184
191
197 [[nodiscard]] Color getArrowBackgroundColorHover() const;
198
207
214
222 void setArrowColor(Color color);
223
229 [[nodiscard]] Color getArrowColor() const;
230
237
243 [[nodiscard]] Color getArrowColorHover() const;
244
251
257 [[nodiscard]] Color getArrowColorDisabled() const;
258
264 void setBorderColor(Color borderColor);
265
271 [[nodiscard]] Color getBorderColor() const;
272
280 void setTextureBackground(const Texture& texture);
281
287 [[nodiscard]] const Texture& getTextureBackground() const;
288
295
301 [[nodiscard]] const Texture& getTextureBackgroundDisabled() const;
302
310 void setTextureArrow(const Texture& texture);
311
317 [[nodiscard]] const Texture& getTextureArrow() const;
318
324 void setTextureArrowHover(const Texture& texture);
325
331 [[nodiscard]] const Texture& getTextureArrowHover() const;
332
338 void setTextureArrowDisabled(const Texture& texture);
339
345 [[nodiscard]] const Texture& getTextureArrowDisabled() const;
346
355 void setRoundedBorderRadius(float radius);
356
362 [[nodiscard]] float getRoundedBorderRadius() const;
363
369 void setListBox(std::shared_ptr<RendererData> rendererData);
370
381 [[nodiscard]] std::shared_ptr<RendererData> getListBox() const;
382 };
383} // namespace tgui
384
385#endif // TGUI_COMBO_BOX_RENDERER_HPP
Wrapper for colors.
Definition Color.hpp:63
Definition ComboBoxRenderer.hpp:35
const Texture & getTextureBackgroundDisabled() const
Returns the background image of the combo box when the combo box is disabled.
void setListBox(std::shared_ptr< RendererData > rendererData)
Sets the renderer data of the list box.
void setTextureBackground(const Texture &texture)
Changes the background image of the combo box.
void setBorderColor(Color borderColor)
Changes the color of the borders.
const Texture & getTextureBackground() const
Returns the background image of the combo box.
void setBackgroundColorDisabled(Color backgroundColor)
Changes the background color of the combo box when the combo box is disabled.
void setArrowColorHover(Color color)
Changes the color of the arrow in hover state (when the mouse is on top of it).
void setDefaultTextStyle(TextStyles style)
Changes the text style of the default text (the text drawn when no item is selected).
void setArrowColor(Color color)
Changes the color of the arrow.
void setArrowBackgroundColorHover(Color color)
Changes the color behind the arrow in hover state (when the mouse is on top of it).
Color getTextColorDisabled() const
Returns the color of the text when the combo box is disabled.
void setPadding(const Padding &padding)
Changes the padding of the combo box.
Color getBorderColor() const
Returns the color of the borders.
Color getDefaultTextColor() const
Returns the color of the default text that can optionally be displayed when no item is selected.
void setDefaultTextColor(Color defaultTextColor)
Sets the color of the default text that can optionally be displayed when no item is selected.
void setBorders(const Borders &borders)
Changes the size of the borders.
Borders getBorders() const
Returns the size of the borders.
void setBackgroundColor(Color backgroundColor)
Changes the background color of the combo box.
Padding getPadding() const
Returns the size of the padding.
Color getArrowBackgroundColorDisabled() const
Returns the color behind the arrow when the combo box is disabled.
void setTextureBackgroundDisabled(const Texture &texture)
Changes the background image of the combo box when the combo box is disabled.
const Texture & getTextureArrowHover() const
Returns the image of the arrow that is displayed when the mouse is on top of it.
void setTextStyle(TextStyles style)
Changes the text style.
void setArrowColorDisabled(Color color)
Changes the color of the arrow when the combo box is disabled.
void setTextColor(Color textColor)
Changes the color of the text.
void setTextureArrowDisabled(const Texture &texture)
Changes the image of the arrow that is displayed when the combo box is disabled.
Color getArrowBackgroundColorHover() const
Returns the color behind the arrow in hover state (when the mouse is on top of it).
Color getBackgroundColorDisabled() const
Returns the background color when the combo box is disabled.
Color getArrowColor() const
Returns the color of the arrow.
std::shared_ptr< RendererData > getListBox() const
Returns the renderer data of the list box.
Color getArrowBackgroundColor() const
Returns the color behind the arrow.
Color getBackgroundColor() const
Returns the background color.
TextStyles getTextStyle() const
Returns text style.
Color getArrowColorDisabled() const
Returns the color of the arrow when the combo box is disabled.
void setArrowBackgroundColor(Color color)
Changes the color behind the arrow.
Color getArrowColorHover() const
Returns the color of the arrow in hover state (when the mouse is on top of it).
WidgetRenderer()=default
Default constructor.
const Texture & getTextureArrowDisabled() const
Returns the image of the arrow that is displayed when the combo box is disabled.
void setTextColorDisabled(Color textColor)
Changes the color of the text when the combo box is disabled.
void setArrowBackgroundColorDisabled(Color color)
Changes the color behind the arrow when the combo box is disabled.
const Texture & getTextureArrow() const
Returns the image of the arrow.
void setTextureArrowHover(const Texture &texture)
Changes the image of the arrow that is displayed when the mouse is on top of it.
void setRoundedBorderRadius(float radius)
Changes the radius for the rounded corners if you want to draw a rounded rectangle as background.
Color getTextColor() const
Returns the color of the text.
TextStyles getDefaultTextStyle() const
Returns the text style of the default text (the text drawn when no item is selected).
float getRoundedBorderRadius() const
Returns the radius for the rounded corners if you want to draw a rounded rectangle as background.
void setTextureArrow(const Texture &texture)
Changes the image of the arrow.
Wrapper for text styles.
Definition TextStyle.hpp:55
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