TGUI  0.8.8
ComboBoxRenderer.hpp
1 //
3 // TGUI - Texus' Graphical User Interface
4 // Copyright (C) 2012-2020 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 
34 namespace tgui
35 {
36  class TGUI_API ComboBoxRenderer : public WidgetRenderer
37  {
38  public:
39 
41 
42 
49  void setBorders(const Borders& borders);
50 
51 
59 
60 
67  void setPadding(const Padding& padding);
68 
69 
77 
78 
85  void setTextStyle(TextStyle style);
86 
87 
95 
96 
107 
108 
115 
116 
123  void setBackgroundColor(Color backgroundColor);
124 
125 
133 
134 
140  void setBackgroundColorDisabled(Color backgroundColor);
141 
142 
149 
150 
157  void setTextColor(Color textColor);
158 
159 
167 
168 
174  void setTextColorDisabled(Color textColor);
175 
176 
183 
184 
190  void setDefaultTextColor(Color defaultTextColor);
191 
192 
199 
200 
210 
211 
219 
220 
228 
229 
237 
238 
247 
248 
255 
256 
265  void setArrowColor(Color color);
266 
267 
275 
276 
284 
285 
293 
294 
301 
302 
309 
310 
317  void setBorderColor(Color borderColor);
318 
319 
327 
328 
337  void setTextureBackground(const Texture& texture);
338 
339 
347 
348 
354  void setTextureBackgroundDisabled(const Texture& texture);
355 
356 
363 
364 
372  void setTextureArrow(const Texture& texture);
373 
374 
382 
383 
390  void setTextureArrowHover(const Texture& texture);
391 
392 
400 
401 
407  void setTextureArrowDisabled(const Texture& texture);
408 
409 
416 
417 
424  void setListBox(std::shared_ptr<RendererData> rendererData);
425 
426 
433  std::shared_ptr<RendererData> getListBox() const;
434 
435 
437  };
438 
440 }
441 
443 
444 #endif // TGUI_COMBO_BOX_RENDERER_HPP
void setTextStyle(TextStyle style)
Changes the text style.
TextStyle getDefaultTextStyle() const
Returns the text style of the default text (the text drawn when no item is selected)
Color getBackgroundColor() const
Returns the background color.
void setTextureBackground(const Texture &texture)
Changes the background image of the combo box.
Texture & getTextureBackgroundDisabled() const
Returns the background image of the combo box when the combo box is disabled.
void setArrowBackgroundColorHover(Color color)
Changes the color behind the arrow in hover state (when the mouse is on top of it)
Base class for all renderer classes.
Definition: WidgetRenderer.hpp:81
Color getDefaultTextColor() const
Returns the color of the default text that can optionally be displayed when no item is selected.
void setListBox(std::shared_ptr< RendererData > rendererData)
Sets the renderer data of the list box.
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:37
void setArrowColor(Color color)
Changes the color of the arrow.
Borders getBorders() const
Returns the size of the borders.
void setBorderColor(Color borderColor)
Changes the color of the borders.
void setBorders(const Borders &borders)
Changes the size of the borders.
void setDefaultTextStyle(TextStyle style)
Changes the text style of the default text (the text drawn when no item is selected)
Wrapper for colors.
Definition: Color.hpp:49
Texture & getTextureArrowDisabled() const
Returns the image of the arrow that is displayed 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.
Texture & getTextureBackground() const
Returns the background image of the combo box.
Color getArrowBackgroundColor() const
Returns the color behind the arrow.
void setTextureArrowDisabled(const Texture &texture)
Changes the image of the arrow that is displayed when the combo box is disabled.
Color getArrowBackgroundColorDisabled() const
Returns the color behind the arrow when the combo box is disabled.
Color getTextColorDisabled() const
Returns the color of the text when the combo box is disabled.
void setTextColorDisabled(Color textColor)
Changes the color of the text when the combo box is disabled.
std::shared_ptr< RendererData > getListBox() const
Returns the renderer data of the list box.
void setTextureArrow(const Texture &texture)
Changes the image of the arrow.
TextStyle getTextStyle() const
Returns text style.
Definition: Texture.hpp:42
Color getBackgroundColorDisabled() const
Returns the background color when the combo box is disabled.
void setBackgroundColor(Color backgroundColor)
Changes the background color of the combo box.
void setArrowBackgroundColor(Color color)
Changes the color behind the arrow.
Definition: Outline.hpp:39
Texture & getTextureArrow() const
Returns the image of the arrow.
WidgetRenderer()=default
Default constructor.
Color getArrowColor() const
Returns the color of the arrow.
void setArrowColorDisabled(Color color)
Changes the color of the arrow when the combo box is disabled.
Color getTextColor() const
Returns the color of the text.
void setDefaultTextColor(Color defaultTextColor)
Sets the color of the default text that can optionally be displayed when no item is selected.
void setArrowBackgroundColorDisabled(Color color)
Changes the color behind the arrow when the combo box is disabled.
void setBackgroundColorDisabled(Color backgroundColor)
Changes the background color of the combo box when the combo box is disabled.
Color getBorderColor() const
Returns the color of the borders.
void setArrowColorHover(Color color)
Changes the color of the arrow in hover state (when the mouse is on top of it)
void setPadding(const Padding &padding)
Changes the padding of the combo box.
Color getArrowBackgroundColorHover() const
Returns the color behind the arrow in hover state (when the mouse is on top of it)
Padding getPadding() const
Returns the size of the padding.
void setTextColor(Color textColor)
Changes the color of the text.
void setTextureArrowHover(const Texture &texture)
Changes the image of the arrow that is displayed when the mouse is on top of it.
Texture & getTextureArrowHover() const
Returns the image of the arrow that is displayed when the mouse is on top of it.
Wrapper for text styles.
Definition: TextStyle.hpp:47
Color getArrowColorDisabled() const
Returns the color of the arrow when the combo box is disabled.
Color getArrowColorHover() const
Returns the color of the arrow in hover state (when the mouse is on top of it)
Definition: ComboBoxRenderer.hpp:37