26 #ifndef TGUI_CHECKBOX_HPP 27 #define TGUI_CHECKBOX_HPP 30 #include <TGUI/Widgets/RadioButton.hpp> 36 class CheckBoxRenderer;
49 typedef std::shared_ptr<CheckBox>
Ptr;
50 typedef std::shared_ptr<const CheckBox>
ConstPtr;
97 void check()
override;
104 void uncheck()
override;
110 virtual void leftMouseReleased(
float x,
float y)
override;
115 virtual void keyPressed(
const sf::Event::KeyEvent& event)
override;
126 return std::make_shared<CheckBox>(*this);
152 void draw(sf::RenderTarget& target, sf::RenderStates states)
const override;
161 virtual std::shared_ptr<WidgetRenderer> clone(Widget* widget)
override;
164 friend class CheckBox;
175 #endif // TGUI_CHECKBOX_HPP Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:33
virtual Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
Definition: CheckBox.hpp:124
CheckBox widget.
Definition: CheckBox.hpp:45
Definition: CheckBox.hpp:136
std::shared_ptr< CheckBoxRenderer > getRenderer() const
Returns the renderer, which gives access to functions that determine how the widget is displayed...
Definition: CheckBox.hpp:87
CheckBoxRenderer(CheckBox *checkbox)
Constructor.
Definition: CheckBox.hpp:146
std::shared_ptr< const CheckBox > ConstPtr
Shared constant widget pointer.
Definition: CheckBox.hpp:50
std::shared_ptr< CheckBox > Ptr
Shared widget pointer.
Definition: CheckBox.hpp:49