26#ifndef TGUI_RADIO_BUTTON_HPP
27#define TGUI_RADIO_BUTTON_HPP
30#include <TGUI/Renderers/RadioButtonRenderer.hpp>
31#include <TGUI/Widgets/ClickableWidget.hpp>
32#include <TGUI/Text.hpp>
45 typedef std::shared_ptr<RadioButton>
Ptr;
46 typedef std::shared_ptr<const RadioButton>
ConstPtr;
56 RadioButton(
const char* typeName =
"RadioButton",
bool initRenderer =
true);
102 using Widget::setSize;
212 void leftMouseReleased(
Vector2f pos)
override;
257 std::unique_ptr<DataIO::Node>
save(SavingRenderersMap& renderers)
const override;
263 void load(
const std::unique_ptr<DataIO::Node>& node,
const LoadingRenderersMap& renderers)
override;
287 const Color& getCurrentCheckColor()
const;
293 const Color& getCurrentBackgroundColor()
const;
299 const Color& getCurrentBorderColor()
const;
305 virtual void updateTextureSizes();
311 void updateTextColor();
319 return std::make_shared<RadioButton>(*
this);
335 bool m_checked =
false;
338 bool m_allowTextClick =
true;
345 Sprite m_spriteUncheckedHover;
346 Sprite m_spriteCheckedHover;
347 Sprite m_spriteUncheckedDisabled;
348 Sprite m_spriteCheckedDisabled;
349 Sprite m_spriteUncheckedFocused;
350 Sprite m_spriteCheckedFocused;
356 Color m_checkColorCached;
357 Color m_checkColorHoverCached;
358 Color m_checkColorDisabledCached;
359 Color m_borderColorCached;
360 Color m_borderColorHoverCached;
361 Color m_borderColorDisabledCached;
362 Color m_borderColorFocusedCached;
363 Color m_borderColorCheckedCached;
364 Color m_borderColorCheckedHoverCached;
365 Color m_borderColorCheckedDisabledCached;
366 Color m_borderColorCheckedFocusedCached;
367 Color m_backgroundColorCached;
368 Color m_backgroundColorHoverCached;
369 Color m_backgroundColorDisabledCached;
370 Color m_backgroundColorCheckedCached;
371 Color m_backgroundColorCheckedHoverCached;
372 Color m_backgroundColorCheckedDisabledCached;
373 float m_textDistanceRatioCached = 0.2f;
Base class for render targets.
Definition BackendRenderTarget.hpp:48
Wrapper for colors.
Definition Color.hpp:63
Class to store the position or size of a widget.
Definition Layout.hpp:262
Definition Outline.hpp:39
Signal to which the user can subscribe to get callbacks from.
Definition Signal.hpp:58
Wrapper class to store strings.
Definition String.hpp:79
Wrapper for text styles.
Definition TextStyle.hpp:58
Namespace that contains all TGUI functions and classes.
Definition AbsoluteOrRelativeValue.hpp:36
KeyPressed event parameters.
Definition Event.hpp:167
States used for drawing.
Definition RenderStates.hpp:39