TGUI  0.8.8
RadioButtonRenderer.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_RADIO_BUTTON_RENDERER_HPP
27 #define TGUI_RADIO_BUTTON_RENDERER_HPP
28 
29 
30 #include <TGUI/Renderers/WidgetRenderer.hpp>
31 
33 
34 namespace tgui
35 {
36  class TGUI_API RadioButtonRenderer : public WidgetRenderer
37  {
38  public:
39 
41 
42 
49  void setBorders(const Borders& borders);
50 
51 
59 
60 
70  void setTextDistanceRatio(float ratio);
71 
72 
81  float getTextDistanceRatio() const;
82 
83 
90  void setTextColor(Color color);
91 
92 
100 
101 
109 
110 
118 
119 
127 
128 
136 
137 
145 
146 
154 
155 
163 
164 
172 
173 
181 
182 
190 
191 
201 
202 
210 
211 
219 
220 
228 
229 
237 
238 
246 
247 
255 
256 
264 
265 
273 
274 
282 
283 
291 
292 
300 
301 
308  void setBorderColor(Color color);
309 
310 
318 
319 
327 
328 
336 
337 
345 
346 
354 
355 
361 
362 
368 
369 
377 
378 
386 
387 
395 
396 
404 
405 
413 
414 
422 
423 
429 
430 
436 
437 
446  void setCheckColor(Color color);
447 
448 
456 
457 
465 
466 
474 
475 
483 
484 
492 
493 
502  void setTextureUnchecked(const Texture& texture);
503 
504 
512 
513 
522  void setTextureChecked(const Texture& texture);
523 
524 
532 
533 
542  void setTextureUncheckedHover(const Texture& texture);
543 
544 
552 
553 
562  void setTextureCheckedHover(const Texture& texture);
563 
564 
572 
573 
582  void setTextureUncheckedDisabled(const Texture& texture);
583 
584 
592 
593 
602  void setTextureCheckedDisabled(const Texture& texture);
603 
604 
612 
613 
621  void setTextureUncheckedFocused(const Texture& texture);
622 
623 
629 
630 
638  void setTextureCheckedFocused(const Texture& texture);
639 
640 
646 
647 
654  void setTextStyle(TextStyle style);
655 
656 
664 
665 
673 
674 
682 
683 
685  };
686 
688 }
689 
691 
692 #endif // TGUI_RADIO_BUTTON_RENDERER_HPP
Color getBackgroundColorCheckedHover() const
Returns the background color in the hover state used when the radio button is checked.
void setTextureCheckedFocused(const Texture &texture)
Changes the image that is displayed on top of the checkbox when it is checked and focused.
Color getTextColorHover() const
Returns the text color in the hover state (mouse on radio button)
Color getTextColorDisabled() const
Returns the text color when the radio button is disabled.
void setBorders(const Borders &borders)
Changes the size of the borders.
void setTextureCheckedDisabled(const Texture &texture)
Changes the image that is displayed when the checkbox is checked and the checkbox is disabled.
TextStyle getTextStyleChecked() const
Returns text style in the checked state.
void setCheckColorDisabled(Color color)
Changes the color that is used to fill the radio button when the radio button is disabled.
void setTextureChecked(const Texture &texture)
Changes the image that is displayed when the checkbox is checked.
Color getTextColor() const
Returns the text color.
void setCheckColor(Color color)
Changes the color that is used to fill the radio button when it is checked.
Color getBackgroundColorChecked() const
Returns the background color used when the radio button is checked.
Color getBackgroundColor() const
Returns the background color.
void setTextureUnchecked(const Texture &texture)
Changes the image that is displayed when the checkbox is not checked.
void setBackgroundColorChecked(Color color)
Changes the background color used when the radio button is checked.
TextStyle getTextStyle() const
Returns text style.
void setBorderColorCheckedHover(Color color)
Changes the border color in hover state used when the radio button is checked.
void setBorderColorChecked(Color color)
Changes the border color used when the radio button is checked.
void setBackgroundColorCheckedHover(Color color)
Changes the background color in hover state used when the radio button is checked.
Base class for all renderer classes.
Definition: WidgetRenderer.hpp:81
Texture & getTextureUncheckedFocused() const
Returns the image that is displayed on top of the checkbox when it is unchecked and focused.
float getTextDistanceRatio() const
The relative distance between the radio button and the text next to it.
void setTextStyleChecked(TextStyle style)
Changes the text style in the checked state.
Namespace that contains all TGUI functions and classes.
Definition: AbsoluteOrRelativeValue.hpp:37
void setTextColor(Color color)
Changes the color of the text.
void setBorderColorDisabled(Color color)
Changes the border color when the radio button is disabled.
Texture & getTextureCheckedHover() const
Returns the image that is displayed when the checkbox is checked and the mouse is on top of the check...
Texture & getTextureUncheckedHover() const
Returns the image that is displayed when the checkbox is not checked and the mouse is on top of the c...
Color getCheckColor() const
Returns the check color.
void setTextureUncheckedHover(const Texture &texture)
Changes the image that is displayed when the checkbox is not checked and the mouse is on top of the c...
void setCheckColorHover(Color color)
Changes the color that is used to fill the radio button when the mouse is on top of it.
void setTextureCheckedHover(const Texture &texture)
Changes the image that is displayed when the checkbox is checked and the mouse is on top of the check...
Color getBorderColorCheckedHover() const
Returns the border color in the hover state used when the radio button is checked.
void setTextColorCheckedHover(Color color)
Changes the color of the text in hover state when the radio button is checked.
Wrapper for colors.
Definition: Color.hpp:49
void setBorderColorCheckedDisabled(Color color)
Changes the border color when the radio button is checked and disabled.
Color getBackgroundColorDisabled() const
Returns the background color when the radio button is disabled.
Color getBorderColorCheckedDisabled() const
Returns the border color when the radio button is checked and disabled.
void setBackgroundColorDisabled(Color color)
Changes the background color when the radio button is disabled.
void setTextDistanceRatio(float ratio)
Changes the relative distance between the radio button and the text next to it.
Texture & getTextureUncheckedDisabled() const
Returns the image that is displayed when the checkbox is not checked and the checkbox is disabled.
void setBackgroundColor(Color color)
Changes the background color.
void setBackgroundColorCheckedDisabled(Color color)
Changes the background color when the radio button is checked and disabled.
Color getBackgroundColorHover() const
Returns the background color in the hover state (mouse on radio button)
void setTextColorCheckedDisabled(Color color)
Changes the color of the text when the radio button is checked and disabled.
Color getBorderColorHover() const
Returns the border color in the hover state (mouse on radio button)
Definition: Texture.hpp:42
Texture & getTextureCheckedDisabled() const
Returns the image that is displayed when the checkbox is checked and the checkbox is disabled.
Definition: RadioButtonRenderer.hpp:37
Color getTextColorCheckedDisabled() const
Returns the text color when the radio button is checked and disabled.
Color getBorderColorDisabled() const
Returns the border color when the radio button is disabled.
Color getTextColorChecked() const
Returns the text color when the radio button is checked.
Color getBackgroundColorCheckedDisabled() const
Returns the background color when the radio button is checked and disabled.
void setTextColorHover(Color color)
Changes the color of the text in hover state (mouse is standing on top of the radio button)
Color getBorderColorChecked() const
Returns the border color used when the radio button is checked.
void setTextureUncheckedFocused(const Texture &texture)
Changes the image that is displayed on top of the checkbox when it is unchecked and focused.
Definition: Outline.hpp:39
Color getCheckColorDisabled() const
Returns the check color used to fill the radio button when the radio button is disabled.
void setBorderColorHover(Color color)
Changes the border color in hover state (mouse is standing on top of the radio button)
Borders getBorders() const
Returns the size of the borders.
Texture & getTextureUnchecked() const
Returns the image that is displayed when the checkbox is not checked.
WidgetRenderer()=default
Default constructor.
void setBorderColor(Color color)
Changes the border color.
void setBorderColorCheckedFocused(Color color)
Changes the color of the borders that is used when the radio button is checked and focused (while not...
void setBackgroundColorHover(Color color)
Changes the background color in hover state (mouse is standing on top of the radio button)
void setTextColorChecked(Color color)
Changes the color of the text when the radio button is checked.
Texture & getTextureCheckedFocused() const
Returns the image that is displayed on top of the checkbox when it is checked and focused.
void setTextStyle(TextStyle style)
Changes the text style.
Texture & getTextureChecked() const
Returns the image that is displayed when the checkbox is checked.
void setBorderColorFocused(Color color)
Changes the color of the borders that is used when the radio button is focused (while not hovered)
Color getBorderColorCheckedFocused() const
Returns the color of the borders that is used when the radio button is checked and focused.
Color getBorderColorFocused() const
Returns the color of the borders that is used when the radio button is focused.
Color getTextColorCheckedHover() const
Returns the text color in the hover state when the radio button is checked.
void setTextureUncheckedDisabled(const Texture &texture)
Changes the image that is displayed when the checkbox is not checked and the checkbox is disabled.
Color getCheckColorHover() const
Returns the check color used to fill the radio button when the mouse is on top of it.
Wrapper for text styles.
Definition: TextStyle.hpp:47
Color getBorderColor() const
Returns the border color.
void setTextColorDisabled(Color color)
Changes the color of the text when the radio button is disabled.