26#ifndef TGUI_RADIO_BUTTON_HPP
27#define TGUI_RADIO_BUTTON_HPP
30#include <TGUI/Widgets/Label.hpp>
36 class RadioButtonRenderer;
57 typedef std::shared_ptr<RadioButton>
Ptr;
58 typedef std::shared_ptr<const RadioButton>
ConstPtr;
95 return std::static_pointer_cast<RadioButtonRenderer>(m_renderer);
192 return m_text.getText();
214 return m_text.getTextSize();
239 virtual bool mouseOnWidget(
float x,
float y)
const override;
244 virtual void leftMouseReleased(
float x,
float y)
override;
249 virtual void keyPressed(
const sf::Event::KeyEvent& event)
override;
254 virtual void widgetFocused()
override;
272 virtual void reload(
const std::string& primary =
"",
const std::string& secondary =
"",
bool force =
false)
override;
280 return std::make_shared<RadioButton>(*
this);
287 virtual void mouseEnteredWidget()
override;
293 virtual void mouseLeftWidget()
override;
299 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const override;
306 bool m_checked =
false;
309 bool m_allowTextClick =
true;
315 unsigned int m_textSize = 0;
348 virtual void setProperty(std::string property,
const std::string& value)
override;
611 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
620 virtual std::shared_ptr<WidgetRenderer> clone(
Widget* widget)
override;
630 Texture m_textureUncheckedHover;
634 sf::Color m_textColorNormal;
635 sf::Color m_textColorHover;
637 sf::Color m_backgroundColorNormal;
638 sf::Color m_backgroundColorHover;
640 sf::Color m_foregroundColorNormal;
641 sf::Color m_foregroundColorHover;
643 sf::Color m_checkColorNormal;
644 sf::Color m_checkColorHover;
Definition: CheckBox.hpp:137
Implicit converter for colors.
Definition: Color.hpp:40
Label widget.
Definition: Label.hpp:50
Class to store the position or size of a widget.
Definition: Layout.hpp:255
Implicit converter for settable properties.
Definition: ObjectConverter.hpp:43
Definition: Texture.hpp:45
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:34