TGUI 1.13
Loading...
Searching...
No Matches
RadioButtonRenderer.hpp
1
2//
3// TGUI - Texus' Graphical User Interface
4// Copyright (C) 2012-2026 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
32namespace tgui
33{
34 class TGUI_API RadioButtonRenderer : public WidgetRenderer
35 {
36 public:
38
44 void setBorders(const Borders& borders);
45
51 [[nodiscard]] Borders getBorders() const;
52
61 void setTextDistanceRatio(float ratio);
62
70 [[nodiscard]] float getTextDistanceRatio() const;
71
77 void setTextColor(Color color);
78
84 [[nodiscard]] Color getTextColor() const;
85
92
98 [[nodiscard]] Color getTextColorHover() const;
99
106
112 [[nodiscard]] Color getTextColorDisabled() const;
113
120
126 [[nodiscard]] Color getTextColorChecked() const;
127
134
140 [[nodiscard]] Color getTextColorCheckedHover() const;
141
148
154 [[nodiscard]] Color getTextColorCheckedDisabled() const;
155
164
170 [[nodiscard]] Color getBackgroundColor() const;
171
178
184 [[nodiscard]] Color getBackgroundColorHover() const;
185
192
198 [[nodiscard]] Color getBackgroundColorDisabled() const;
199
206
212 [[nodiscard]] Color getBackgroundColorChecked() const;
213
220
227
234
241
248
254 [[nodiscard]] Color getBorderColor() const;
255
262
268 [[nodiscard]] Color getBorderColorHover() const;
269
276
282 [[nodiscard]] Color getBorderColorDisabled() const;
283
289
294 [[nodiscard]] Color getBorderColorFocused() const;
295
302
308 [[nodiscard]] Color getBorderColorChecked() const;
309
316
322 [[nodiscard]] Color getBorderColorCheckedHover() const;
323
330
337
343
348 [[nodiscard]] Color getBorderColorCheckedFocused() const;
349
357 void setCheckColor(Color color);
358
364 [[nodiscard]] Color getCheckColor() const;
365
372
378 [[nodiscard]] Color getCheckColorHover() const;
379
386
392 [[nodiscard]] Color getCheckColorDisabled() const;
393
401 void setTextureUnchecked(const Texture& texture);
402
408 [[nodiscard]] const Texture& getTextureUnchecked() const;
409
417 void setTextureChecked(const Texture& texture);
418
424 [[nodiscard]] const Texture& getTextureChecked() const;
425
433 void setTextureUncheckedHover(const Texture& texture);
434
440 [[nodiscard]] const Texture& getTextureUncheckedHover() const;
441
449 void setTextureCheckedHover(const Texture& texture);
450
456 [[nodiscard]] const Texture& getTextureCheckedHover() const;
457
466
472 [[nodiscard]] const Texture& getTextureUncheckedDisabled() const;
473
481 void setTextureCheckedDisabled(const Texture& texture);
482
488 [[nodiscard]] const Texture& getTextureCheckedDisabled() const;
489
498
503 [[nodiscard]] const Texture& getTextureUncheckedFocused() const;
504
512 void setTextureCheckedFocused(const Texture& texture);
513
518 [[nodiscard]] const Texture& getTextureCheckedFocused() const;
519
526
532 [[nodiscard]] TextStyles getTextStyle() const;
533
540
546 [[nodiscard]] TextStyles getTextStyleChecked() const;
547 };
548} // namespace tgui
549
550#endif // TGUI_RADIO_BUTTON_RENDERER_HPP
Wrapper for colors.
Definition Color.hpp:63
Definition RadioButtonRenderer.hpp:35
Color getCheckColor() const
Returns the check color.
void setTextColorHover(Color color)
Changes the color of the text in hover state (mouse is standing on top of the radio button).
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.
Color getCheckColorDisabled() const
Returns the check color used to fill the radio button when the radio button is disabled.
Color getTextColorHover() const
Returns the text color in the hover state (mouse on radio button).
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 setBackgroundColorDisabled(Color color)
Changes the background color when the radio button is disabled.
Color getBackgroundColorHover() const
Returns the background color in the hover state (mouse on radio button).
Color getTextColorCheckedDisabled() const
Returns the text color when the radio button is checked and 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.
Color getTextColorCheckedHover() const
Returns the text color in the hover state when the radio button is checked.
Color getBorderColorCheckedFocused() const
Returns the color of the borders that is used when the radio button is checked and focused.
Color getBorderColorDisabled() const
Returns the border 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.
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.
const 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 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.
Color getTextColor() const
Returns the text color.
void setTextureCheckedFocused(const Texture &texture)
Changes the image that is displayed on top of the checkbox when it is checked and focused.
Color getBorderColorHover() const
Returns the border color in the hover state (mouse on radio button).
void setBorders(const Borders &borders)
Changes the size of the borders.
Color getBorderColorCheckedDisabled() const
Returns the border color when the radio button is checked and disabled.
TextStyles getTextStyle() const
Returns text style.
const Texture & getTextureCheckedHover() const
Returns the image that is displayed when the checkbox is checked and the mouse is on top of the check...
Color getBorderColorFocused() const
Returns the color of the borders that is used when the radio button is focused.
void setTextStyleChecked(TextStyles style)
Changes the text style in the checked state.
const Texture & getTextureChecked() const
Returns the image that is displayed when the checkbox is checked.
Color getBorderColor() const
Returns the border 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).
const Texture & getTextureCheckedFocused() const
Returns the image that is displayed on top of the checkbox when it is checked and focused.
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.
const Texture & getTextureCheckedDisabled() const
Returns the image that is displayed when the checkbox is checked and the checkbox is disabled.
Color getBackgroundColorDisabled() const
Returns the background color when the radio button is disabled.
void setTextureUncheckedDisabled(const Texture &texture)
Changes the image that is displayed when the checkbox is not checked and the checkbox is disabled.
const Texture & getTextureUncheckedDisabled() const
Returns the image that is displayed when the checkbox is not checked and the checkbox is disabled.
Color getBorderColorChecked() const
Returns the border color used when the radio button is checked.
void setBorderColorFocused(Color color)
Changes the color of the borders that is used when the radio button is focused (while not hovered).
void setBorderColorCheckedDisabled(Color color)
Changes the border color when the radio button is checked and disabled.
Color getBackgroundColor() const
Returns the background color.
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.
const Texture & getTextureUnchecked() const
Returns the image that is displayed when the checkbox is not checked.
void setBorderColor(Color color)
Changes the border color.
void setBorderColorDisabled(Color color)
Changes the border color when the radio button is disabled.
Color getTextColorDisabled() const
Returns the text color when the radio button is disabled.
WidgetRenderer()=default
Default constructor.
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...
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.
Color getBackgroundColorChecked() const
Returns the background color used when the radio button is checked.
Color getCheckColorHover() const
Returns the check color used to fill the radio button when the mouse is on top of it.
void setTextColorCheckedHover(Color color)
Changes the color of the text in hover state when the radio button is checked.
void setBorderColorHover(Color color)
Changes the border color in hover state (mouse is standing on top of the radio button).
Color getBorderColorCheckedHover() const
Returns the border color in the hover state used when the radio button is checked.
Borders getBorders() const
Returns the size of the borders.
TextStyles getTextStyleChecked() const
Returns text style in the checked state.
Color getBackgroundColorCheckedHover() const
Returns the background color in the hover state used when the radio button is checked.
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:53
WidgetRenderer()=default
Default constructor.
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:37