26 #ifndef _TGUI_CHECKBOX_INCLUDED_
27 #define _TGUI_CHECKBOX_INCLUDED_
46 Checkbox(
const Checkbox& copy);
58 Checkbox& operator= (
const Checkbox& right);
64 virtual void initialize();
70 virtual Checkbox* clone();
85 virtual bool load(
const std::string& pathname);
94 virtual void setSize(
float width,
float height);
100 virtual Vector2u getSize()
const;
106 virtual Vector2f getScaledSize()
const;
114 virtual std::string getLoadedPathname()
const;
120 virtual void check();
126 virtual void uncheck();
132 virtual bool isChecked()
const;
138 virtual void setText(
const sf::String& text);
144 virtual sf::String getText()
const;
153 virtual void setTextFont(
const sf::Font& font);
159 virtual const sf::Font* getTextFont()
const;
165 virtual void setTextColor(
const sf::Color& color);
171 virtual const sf::Color& getTextColor()
const;
179 virtual void setTextSize(
unsigned int size);
185 virtual unsigned int getTextSize()
const;
192 virtual bool mouseOnObject(
float x,
float y);
193 virtual void leftMousePressed(
float x,
float y);
194 virtual void leftMouseReleased(
float x,
float y);
195 virtual void mouseMoved(
float x,
float y);
196 virtual void keyPressed(sf::Keyboard::Key key);
197 virtual void objectFocused();
208 virtual void draw(sf::RenderTarget& target, sf::RenderStates states)
const;
227 unsigned int m_TextSize;
233 sf::Texture* m_TextureUnchecked;
234 sf::Texture* m_TextureChecked;
235 sf::Texture* m_TextureMouseHover;
236 sf::Texture* m_TextureFocused;
239 sf::Sprite m_SpriteUnchecked;
240 sf::Sprite m_SpriteChecked;
241 sf::Sprite m_SpriteMouseHover;
242 sf::Sprite m_SpriteFocused;
245 std::string m_LoadedPathname;
257 #endif //_TGUI_CHECKBOX_INCLUDED_
The parent struct for every object.
Definition: Objects.hpp:36
Definition: Checkbox.hpp:35
bool allowTextClick
When this boolean is true (default) then the checkbox will also be checked/unchecked by clicking on t...
Definition: Checkbox.hpp:215