TGUI  1.5
Loading...
Searching...
No Matches
RadioButtonRenderer.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_RADIO_BUTTON_RENDERER_HPP
26#define TGUI_RADIO_BUTTON_RENDERER_HPP
27
28#include <TGUI/Renderers/WidgetRenderer.hpp>
29
31
32TGUI_MODULE_EXPORT namespace tgui
33{
34 class TGUI_API RadioButtonRenderer : 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
62 void setTextDistanceRatio(float ratio);
63
71 TGUI_NODISCARD float getTextDistanceRatio() const;
72
78 void setTextColor(Color color);
79
85 TGUI_NODISCARD Color getTextColor() const;
86
93
99 TGUI_NODISCARD Color getTextColorHover() const;
100
107
113 TGUI_NODISCARD Color getTextColorDisabled() const;
114
121
127 TGUI_NODISCARD Color getTextColorChecked() const;
128
135
141 TGUI_NODISCARD Color getTextColorCheckedHover() const;
142
149
155 TGUI_NODISCARD Color getTextColorCheckedDisabled() const;
156
165
171 TGUI_NODISCARD Color getBackgroundColor() const;
172
179
185 TGUI_NODISCARD Color getBackgroundColorHover() const;
186
193
199 TGUI_NODISCARD Color getBackgroundColorDisabled() const;
200
207
213 TGUI_NODISCARD Color getBackgroundColorChecked() const;
214
221
227 TGUI_NODISCARD Color getBackgroundColorCheckedHover() const;
228
235
242
249
255 TGUI_NODISCARD Color getBorderColor() const;
256
263
269 TGUI_NODISCARD Color getBorderColorHover() const;
270
277
283 TGUI_NODISCARD Color getBorderColorDisabled() const;
284
290
295 TGUI_NODISCARD Color getBorderColorFocused() const;
296
303
309 TGUI_NODISCARD Color getBorderColorChecked() const;
310
317
323 TGUI_NODISCARD Color getBorderColorCheckedHover() const;
324
331
337 TGUI_NODISCARD Color getBorderColorCheckedDisabled() const;
338
344
349 TGUI_NODISCARD Color getBorderColorCheckedFocused() const;
350
358 void setCheckColor(Color color);
359
365 TGUI_NODISCARD Color getCheckColor() const;
366
373
379 TGUI_NODISCARD Color getCheckColorHover() const;
380
387
393 TGUI_NODISCARD Color getCheckColorDisabled() const;
394
402 void setTextureUnchecked(const Texture& texture);
403
409 TGUI_NODISCARD const Texture& getTextureUnchecked() const;
410
418 void setTextureChecked(const Texture& texture);
419
425 TGUI_NODISCARD const Texture& getTextureChecked() const;
426
434 void setTextureUncheckedHover(const Texture& texture);
435
441 TGUI_NODISCARD const Texture& getTextureUncheckedHover() const;
442
450 void setTextureCheckedHover(const Texture& texture);
451
457 TGUI_NODISCARD const Texture& getTextureCheckedHover() const;
458
467
473 TGUI_NODISCARD const Texture& getTextureUncheckedDisabled() const;
474
482 void setTextureCheckedDisabled(const Texture& texture);
483
489 TGUI_NODISCARD const Texture& getTextureCheckedDisabled() const;
490
499
504 TGUI_NODISCARD const Texture& getTextureUncheckedFocused() const;
505
513 void setTextureCheckedFocused(const Texture& texture);
514
519 TGUI_NODISCARD const Texture& getTextureCheckedFocused() const;
520
527
533 TGUI_NODISCARD TextStyles getTextStyle() const;
534
541
547 TGUI_NODISCARD TextStyles getTextStyleChecked() const;
548
550 };
551
553}
554
556
557#endif // TGUI_RADIO_BUTTON_RENDERER_HPP
Wrapper for colors.
Definition Color.hpp:73
Definition Outline.hpp:38
Definition RadioButtonRenderer.hpp:35
TGUI_NODISCARD Color getTextColorHover() const
Returns the text color in the hover state (mouse on radio button)
void setTextColorHover(Color color)
Changes the color of the text in hover state (mouse is standing on top of the radio button)
TGUI_NODISCARD 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.
void setBorderColorChecked(Color color)
Changes the border color used when the radio button is checked.
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...
void setBackgroundColorCheckedHover(Color color)
Changes the background color in hover state used when the radio button is checked.
void setCheckColorDisabled(Color color)
Changes the color that is used to fill the radio button when the radio button is disabled.
TGUI_NODISCARD Color getBorderColorChecked() const
Returns the border color used when the radio button is checked.
TGUI_NODISCARD const Texture & getTextureChecked() const
Returns the image that is displayed when the checkbox is checked.
TGUI_NODISCARD Color getBorderColorHover() const
Returns the border color in the hover state (mouse on radio button)
TGUI_NODISCARD const Texture & getTextureUncheckedFocused() const
Returns the image that is displayed on top of the checkbox when it is unchecked and focused.
TGUI_NODISCARD Color getBorderColorCheckedDisabled() const
Returns the border color when the radio button is checked and disabled.
TGUI_NODISCARD Color getCheckColorHover() const
Returns the check color used to fill the radio button when the mouse is on top of it.
TGUI_NODISCARD Color getBorderColor() const
Returns the border color.
TGUI_NODISCARD const Texture & getTextureUnchecked() const
Returns the image that is displayed when the checkbox is not checked.
TGUI_NODISCARD Color getBackgroundColor() const
Returns the background color.
TGUI_NODISCARD const Texture & getTextureUncheckedDisabled() const
Returns the image that is displayed when the checkbox is not checked and the checkbox is disabled.
void setBackgroundColorDisabled(Color color)
Changes the background color when the radio button is disabled.
void setTextColorCheckedDisabled(Color color)
Changes the color of the text when the radio button is checked and disabled.
void setTextColorDisabled(Color color)
Changes the color of the text when the radio button 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.
TGUI_NODISCARD TextStyles getTextStyleChecked() const
Returns text style in the checked state.
TGUI_NODISCARD Color getTextColorCheckedDisabled() const
Returns the text color when the radio button is checked and disabled.
TGUI_NODISCARD Color getBackgroundColorCheckedHover() const
Returns the background color in the hover state used when the radio button is checked.
void setTextDistanceRatio(float ratio)
Changes the relative distance between the radio button and the text next to it.
void setTextureChecked(const Texture &texture)
Changes the image that is displayed when the checkbox is checked.
void setTextureUnchecked(const Texture &texture)
Changes the image that is displayed when the checkbox is not checked.
TGUI_NODISCARD TextStyles getTextStyle() const
Returns text style.
void setBorderColorCheckedFocused(Color color)
Changes the color of the borders that is used when the radio button is checked and focused (while not...
void setTextureCheckedDisabled(const Texture &texture)
Changes the image that is displayed when the checkbox is checked and the checkbox is disabled.
void setTextureCheckedFocused(const Texture &texture)
Changes the image that is displayed on top of the checkbox when it is checked and focused.
void setBorders(const Borders &borders)
Changes the size of the borders.
TGUI_NODISCARD Color getBackgroundColorHover() const
Returns the background color in the hover state (mouse on radio button)
TGUI_NODISCARD Color getBorderColorCheckedFocused() const
Returns the color of the borders that is used when the radio button is checked and focused.
TGUI_NODISCARD const Texture & getTextureUncheckedHover() const
Returns the image that is displayed when the checkbox is not checked and the mouse is on top of the c...
TGUI_NODISCARD const Texture & getTextureCheckedDisabled() const
Returns the image that is displayed when the checkbox is checked and the checkbox is disabled.
void setTextStyleChecked(TextStyles style)
Changes the text style in the checked state.
TGUI_NODISCARD Color getBackgroundColorDisabled() const
Returns the background color when the radio button is disabled.
TGUI_NODISCARD Color getCheckColor() const
Returns the check color.
void setBackgroundColorChecked(Color color)
Changes the background color used when the radio button is checked.
void setBackgroundColorHover(Color color)
Changes the background color in hover state (mouse is standing on top of the radio button)
TGUI_NODISCARD Color getBorderColorCheckedHover() const
Returns the border color in the hover state used when the radio button is checked.
TGUI_NODISCARD Color getBackgroundColorCheckedDisabled() const
Returns the background color when the radio button is checked and disabled.
TGUI_NODISCARD Color getTextColorChecked() const
Returns the text color when the radio button is checked.
TGUI_NODISCARD Color getBorderColorDisabled() const
Returns the border color when the radio button is disabled.
void setTextureUncheckedFocused(const Texture &texture)
Changes the image that is displayed on top of the checkbox when it is unchecked and focused.
void setTextStyle(TextStyles style)
Changes the text style.
void setTextureUncheckedDisabled(const Texture &texture)
Changes the image that is displayed when the checkbox is not checked and the checkbox is disabled.
void setBorderColorFocused(Color color)
Changes the color of the borders that is used when the radio button is focused (while not hovered)
TGUI_NODISCARD Color getTextColorCheckedHover() const
Returns the text color in the hover state when the radio button is checked.
TGUI_NODISCARD Color getCheckColorDisabled() const
Returns the check color used to fill the radio button when the radio button is disabled.
TGUI_NODISCARD Color getBackgroundColorChecked() const
Returns the background color used when the radio button is checked.
void setBorderColorCheckedDisabled(Color color)
Changes the border color when the radio button is checked and disabled.
void setTextColorChecked(Color color)
Changes the color of the text when the radio button is checked.
void setTextColor(Color color)
Changes the color of the text.
void setBorderColor(Color color)
Changes the border color.
void setBorderColorDisabled(Color color)
Changes the border color when the radio button is disabled.
TGUI_NODISCARD Color getBorderColorFocused() const
Returns the color of the borders that is used when the radio button is focused.
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 setBorderColorCheckedHover(Color color)
Changes the border color in hover state used when the radio button is checked.
TGUI_NODISCARD const Texture & getTextureCheckedHover() const
Returns the image that is displayed when the checkbox is checked and the mouse is on top of the check...
TGUI_NODISCARD const Texture & getTextureCheckedFocused() const
Returns the image that is displayed on top of the checkbox when it is checked and focused.
void setTextColorCheckedHover(Color color)
Changes the color of the text in hover state when the radio button is checked.
TGUI_NODISCARD Borders getBorders() const
Returns the size of the borders.
void setBorderColorHover(Color color)
Changes the border color in hover state (mouse is standing on top of the radio button)
TGUI_NODISCARD Color getTextColorDisabled() const
Returns the text color when the radio button is disabled.
TGUI_NODISCARD float getTextDistanceRatio() const
The relative distance between the radio button and the text next to it.
void setCheckColorHover(Color color)
Changes the color that is used to fill the radio button when the mouse is on top of it.
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