26#ifndef TGUI_CHECK_BOX_HPP
27#define TGUI_CHECK_BOX_HPP
30#include <TGUI/Renderers/CheckBoxRenderer.hpp>
31#include <TGUI/Widgets/RadioButton.hpp>
44 typedef std::shared_ptr<CheckBox>
Ptr;
45 typedef std::shared_ptr<const CheckBox>
ConstPtr;
55 CheckBox(
const char* typeName =
"CheckBox",
bool initRenderer =
true);
132 void leftMouseReleased(
Vector2f pos)
override;
165 void updateTextureSizes()
override;
173 return std::make_shared<CheckBox>(*
this);
180 Texture m_textureUncheckedCached;
181 Texture m_textureCheckedCached;
Base class for render targets.
Definition BackendRenderTarget.hpp:48
Definition CheckBoxRenderer.hpp:37
CheckBox widget.
Definition CheckBox.hpp:41
Vector2f getWidgetOffset() const override
Returns the distance between the position where the widget is drawn and where the widget is placed.
std::shared_ptr< CheckBox > Ptr
Shared widget pointer.
Definition CheckBox.hpp:44
void setChecked(bool checked) override
Checks or unchecks the check box.
std::shared_ptr< const CheckBox > ConstPtr
Shared constant widget pointer.
Definition CheckBox.hpp:45
void draw(BackendRenderTargetBase &target, RenderStates states) const override
Draw the widget to a render target.
static CheckBox::Ptr copy(CheckBox::ConstPtr checkbox)
Makes a copy of another checkbox.
void rendererChanged(const String &property) override
Function called when one of the properties of the renderer is changed.
CheckBoxRenderer * getRenderer()
Returns the renderer, which gives access to functions that determine how the widget is displayed.
static CheckBox::Ptr create(String text="")
Creates a new check box widget.
Vector2f getFullSize() const override
Returns the full size of the radio button.
CheckBoxRenderer * getSharedRenderer()
Returns the renderer, which gives access to functions that determine how the widget is displayed.
Widget::Ptr clone() const override
Makes a copy of the widget if you don't know its exact type.
Definition CheckBox.hpp:171
Wrapper class to store strings.
Definition String.hpp:79
Definition Texture.hpp:49
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