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;
89 return std::static_pointer_cast<CheckBoxRenderer>(m_renderer);
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;
Definition: CheckBox.hpp:137
CheckBoxRenderer(CheckBox *checkbox)
Constructor.
Definition: CheckBox.hpp:146
CheckBox widget.
Definition: CheckBox.hpp:46
void uncheck() override
Unchecks the checkbox.
std::shared_ptr< CheckBox > Ptr
Shared widget pointer.
Definition: CheckBox.hpp:49
std::shared_ptr< const CheckBox > ConstPtr
Shared constant widget pointer.
Definition: CheckBox.hpp:50
static CheckBox::Ptr copy(CheckBox::ConstPtr checkbox)
Makes a copy of another checkbox.
virtual Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
Definition: CheckBox.hpp:124
static CheckBox::Ptr create(sf::String text="")
Creates a new check box widget.
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
void check() override
Checks the checkbox.
Namespace that contains all TGUI functions and classes.
Definition: Animation.hpp:34