TGUI  1.3-dev
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
26#ifndef TGUI_COMBO_BOX_RENDERER_HPP
27#define TGUI_COMBO_BOX_RENDERER_HPP
28
29
30#include <TGUI/Renderers/WidgetRenderer.hpp>
31
33
34TGUI_MODULE_EXPORT namespace tgui
35{
36 class TGUI_API ComboBoxRenderer : public WidgetRenderer
37 {
38 public:
39
40 using WidgetRenderer::WidgetRenderer;
41
42
49 void setBorders(const Borders& borders);
50
51
58 TGUI_NODISCARD Borders getBorders() const;
59
60
67 void setPadding(const Padding& padding);
68
69
76 TGUI_NODISCARD Padding getPadding() const;
77
78
86
87
94 TGUI_NODISCARD TextStyles getTextStyle() const;
95
96
107
108
114 TGUI_NODISCARD TextStyles getDefaultTextStyle() const;
115
116
123 void setBackgroundColor(Color backgroundColor);
124
125
132 TGUI_NODISCARD Color getBackgroundColor() const;
133
134
140 void setBackgroundColorDisabled(Color backgroundColor);
141
142
148 TGUI_NODISCARD Color getBackgroundColorDisabled() const;
149
150
157 void setTextColor(Color textColor);
158
159
166 TGUI_NODISCARD Color getTextColor() const;
167
168
175
176
182 TGUI_NODISCARD Color getTextColorDisabled() const;
183
184
190 void setDefaultTextColor(Color defaultTextColor);
191
192
198 TGUI_NODISCARD Color getDefaultTextColor() const;
199
200
210
211
218 TGUI_NODISCARD Color getArrowBackgroundColor() const;
219
220
228
229
236 TGUI_NODISCARD Color getArrowBackgroundColorHover() const;
237
238
247
248
255
256
265 void setArrowColor(Color color);
266
267
274 TGUI_NODISCARD Color getArrowColor() const;
275
276
284
285
292 TGUI_NODISCARD Color getArrowColorHover() const;
293
294
301
302
308 TGUI_NODISCARD Color getArrowColorDisabled() const;
309
310
317 void setBorderColor(Color borderColor);
318
319
326 TGUI_NODISCARD Color getBorderColor() const;
327
328
337 void setTextureBackground(const Texture& texture);
338
339
346 TGUI_NODISCARD const Texture& getTextureBackground() const;
347
348
355
356
362 TGUI_NODISCARD const Texture& getTextureBackgroundDisabled() const;
363
364
372 void setTextureArrow(const Texture& texture);
373
374
381 TGUI_NODISCARD const Texture& getTextureArrow() const;
382
383
390 void setTextureArrowHover(const Texture& texture);
391
392
399 TGUI_NODISCARD const Texture& getTextureArrowHover() const;
400
401
407 void setTextureArrowDisabled(const Texture& texture);
408
409
415 TGUI_NODISCARD const Texture& getTextureArrowDisabled() const;
416
417
424 void setListBox(std::shared_ptr<RendererData> rendererData);
425
426
433 TGUI_NODISCARD std::shared_ptr<RendererData> getListBox() const;
434
435
437 };
438
440}
441
443
444#endif // TGUI_COMBO_BOX_RENDERER_HPP
Wrapper for colors.
Definition Color.hpp:72
Definition ComboBoxRenderer.hpp:37
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.
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)
TGUI_NODISCARD Color getArrowColor() const
Returns the color of the arrow.
TGUI_NODISCARD Color getTextColorDisabled() const
Returns the color of the text when the combo box is disabled.
TGUI_NODISCARD Color getArrowColorDisabled() const
Returns the color of the arrow when the combo box is disabled.
TGUI_NODISCARD const Texture & getTextureBackground() const
Returns the background image of the combo box.
TGUI_NODISCARD Color getArrowBackgroundColorDisabled() const
Returns the color behind the arrow when the combo box is disabled.
void setPadding(const Padding &padding)
Changes the padding of the combo box.
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.
void setBackgroundColor(Color backgroundColor)
Changes the background color of the combo box.
TGUI_NODISCARD Color getArrowColorHover() const
Returns the color of the arrow in hover state (when the mouse is on top of it)
void setTextureBackgroundDisabled(const Texture &texture)
Changes the background image of the combo box when the combo box is disabled.
TGUI_NODISCARD const Texture & getTextureArrowHover() const
Returns the image of the arrow that is displayed when the mouse is on top of it.
TGUI_NODISCARD Color getBackgroundColorDisabled() const
Returns the background color when the combo box is disabled.
TGUI_NODISCARD TextStyles getDefaultTextStyle() const
Returns the text style of the default text (the text drawn when no item is selected)
TGUI_NODISCARD const Texture & getTextureArrowDisabled() const
Returns the image of the arrow that is displayed when the combo box is disabled.
TGUI_NODISCARD TextStyles getTextStyle() const
Returns text style.
void setTextStyle(TextStyles style)
Changes the text style.
TGUI_NODISCARD Color getDefaultTextColor() const
Returns the color of the default text that can optionally be displayed when no item is selected.
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.
TGUI_NODISCARD Padding getPadding() const
Returns the size of the padding.
void setTextureArrowDisabled(const Texture &texture)
Changes the image of the arrow that is displayed when the combo box is disabled.
TGUI_NODISCARD Borders getBorders() const
Returns the size of the borders.
TGUI_NODISCARD std::shared_ptr< RendererData > getListBox() const
Returns the renderer data of the list box.
TGUI_NODISCARD const Texture & getTextureArrow() const
Returns the image of the arrow.
TGUI_NODISCARD Color getTextColor() const
Returns the color of the text.
void setArrowBackgroundColor(Color color)
Changes the color behind the arrow.
void setTextColorDisabled(Color textColor)
Changes the color of the text when the combo box is disabled.
TGUI_NODISCARD Color getBackgroundColor() const
Returns the background color.
void setArrowBackgroundColorDisabled(Color color)
Changes the color behind the arrow when the combo box is disabled.
void setTextureArrowHover(const Texture &texture)
Changes the image of the arrow that is displayed when the mouse is on top of it.
TGUI_NODISCARD Color getArrowBackgroundColor() const
Returns the color behind the arrow.
TGUI_NODISCARD Color getArrowBackgroundColorHover() const
Returns the color behind the arrow in hover state (when the mouse is on top of it)
TGUI_NODISCARD Color getBorderColor() const
Returns the color of the borders.
TGUI_NODISCARD const Texture & getTextureBackgroundDisabled() const
Returns the background image of the combo box when the combo box is disabled.
void setTextureArrow(const Texture &texture)
Changes the image of the arrow.
Definition Outline.hpp:39
Wrapper for text styles.
Definition TextStyle.hpp:57
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:72
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:39