TGUI  1.6.1
Loading...
Searching...
No Matches
ComboBoxRenderer.hpp
1
2//
3// TGUI - Texus' Graphical User Interface
4// Copyright (C) 2012-2024 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
32TGUI_MODULE_EXPORT namespace tgui
33{
34 class TGUI_API ComboBoxRenderer : public WidgetRenderer
35 {
36 public:
37
38 using WidgetRenderer::WidgetRenderer;
39
45 void setBorders(const Borders& borders);
46
52 TGUI_NODISCARD Borders getBorders() const;
53
59 void setPadding(const Padding& padding);
60
66 TGUI_NODISCARD Padding getPadding() const;
67
74
80 TGUI_NODISCARD TextStyles getTextStyle() const;
81
92
98 TGUI_NODISCARD TextStyles getDefaultTextStyle() const;
99
105 void setBackgroundColor(Color backgroundColor);
106
112 TGUI_NODISCARD Color getBackgroundColor() const;
113
119 void setBackgroundColorDisabled(Color backgroundColor);
120
126 TGUI_NODISCARD Color getBackgroundColorDisabled() const;
127
133 void setTextColor(Color textColor);
134
140 TGUI_NODISCARD Color getTextColor() const;
141
148
154 TGUI_NODISCARD Color getTextColorDisabled() const;
155
161 void setDefaultTextColor(Color defaultTextColor);
162
168 TGUI_NODISCARD Color getDefaultTextColor() const;
169
178
184 TGUI_NODISCARD Color getArrowBackgroundColor() const;
185
192
198 TGUI_NODISCARD Color getArrowBackgroundColorHover() const;
199
208
215
223 void setArrowColor(Color color);
224
230 TGUI_NODISCARD Color getArrowColor() const;
231
238
244 TGUI_NODISCARD Color getArrowColorHover() const;
245
252
258 TGUI_NODISCARD Color getArrowColorDisabled() const;
259
265 void setBorderColor(Color borderColor);
266
272 TGUI_NODISCARD Color getBorderColor() const;
273
281 void setTextureBackground(const Texture& texture);
282
288 TGUI_NODISCARD const Texture& getTextureBackground() const;
289
296
302 TGUI_NODISCARD const Texture& getTextureBackgroundDisabled() const;
303
311 void setTextureArrow(const Texture& texture);
312
318 TGUI_NODISCARD const Texture& getTextureArrow() const;
319
325 void setTextureArrowHover(const Texture& texture);
326
332 TGUI_NODISCARD const Texture& getTextureArrowHover() const;
333
339 void setTextureArrowDisabled(const Texture& texture);
340
346 TGUI_NODISCARD const Texture& getTextureArrowDisabled() const;
347
353 void setListBox(std::shared_ptr<RendererData> rendererData);
354
360 TGUI_NODISCARD std::shared_ptr<RendererData> getListBox() const;
361
363 };
364
366}
367
369
370#endif // TGUI_COMBO_BOX_RENDERER_HPP
Wrapper for colors.
Definition Color.hpp:73
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)
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.
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)
void setTextureArrow(const Texture &texture)
Changes the image of the arrow.
Definition Outline.hpp:38
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:57
Base class for all renderer classes.
Definition WidgetRenderer.hpp:69
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:38