TGUI  v0.6.10
Public Types | Public Member Functions | List of all members
tgui::Checkbox Class Reference
Inheritance diagram for tgui::Checkbox:
tgui::RadioButton tgui::ClickableWidget tgui::Widget tgui::Transformable tgui::CallbackManager

Public Types

- Public Types inherited from tgui::RadioButton
- Public Types inherited from tgui::ClickableWidget
- Public Types inherited from tgui::Widget

Public Member Functions

 Checkbox ()
 Default constructor. More...
 
virtual bool load (const std::string &configFileFilename, const std::string &sectionName="Checkbox")
 Loads the widget. More...
 
void check ()
 Checks the checkbox. More...
 
void uncheck ()
 Unchecks the checkbox. More...
 
- Public Member Functions inherited from tgui::RadioButton
 RadioButton ()
 Default constructor. More...
 
 RadioButton (const RadioButton &copy)
 Copy constructor. More...
 
virtual ~RadioButton ()
 Destructor. More...
 
RadioButtonoperator= (const RadioButton &right)
 Overload of assignment operator. More...
 
const std::string & getLoadedConfigFile () const
 Returns the filename of the config file that was used to load the widget. More...
 
virtual void setPosition (float x, float y)
 Set the position of the widget. More...
 
virtual void setSize (float width, float height)
 Changes the size of the radio button. More...
 
virtual sf::Vector2f getSize () const
 Returns the size of the radio button. More...
 
virtual sf::Vector2f getFullSize () const
 Returns the full size of the radio button. More...
 
bool isChecked () const
 Returns whether the radio button is checked or not. More...
 
void setText (const sf::String &text)
 Changes the text of the radio button. More...
 
sf::String getText () const
 Returns the text of the radio button. More...
 
void setTextFont (const sf::Font &font)
 Changes the font of the text. More...
 
const sf::Font * getTextFont () const
 Returns the font of the text. More...
 
void setTextColor (const sf::Color &color)
 Changes the color of the text. More...
 
const sf::Color & getTextColor () const
 Returns the color of the text. More...
 
void setTextSize (unsigned int size)
 Changes the character size of the text. More...
 
unsigned int getTextSize () const
 Returns the character size of the text. More...
 
void allowTextClick (bool acceptTextClick=true)
 Allow (or disallow) the radio button to be checked/unchecked by clicking on the text next to the radio button. More...
 
virtual void setTransparency (unsigned char transparency)
 Changes the transparency of the widget. More...
 
- Public Member Functions inherited from tgui::ClickableWidget
 ClickableWidget ()
 Default constructor. More...
 
 ClickableWidget (const ClickableWidget &copy)
 Copy constructor. More...
 
virtual ~ClickableWidget ()
 Destructor. More...
 
ClickableWidgetoperator= (const ClickableWidget &right)
 Overload of assignment operator. More...
 
- Public Member Functions inherited from tgui::Widget
 Widget ()
 Default constructor. More...
 
 Widget (const Widget &copy)
 Copy constructor. More...
 
virtual ~Widget ()
 Destructor. More...
 
Widgetoperator= (const Widget &right)
 Overload of assignment operator. More...
 
virtual sf::Vector2f getAbsolutePosition () const
 Get the absolute position of the widget on the screen. More...
 
virtual void show ()
 Shows the widget. More...
 
virtual void hide ()
 Hides the widget. More...
 
bool isVisible () const
 Returns true when the widget is visible. More...
 
virtual void enable ()
 Enables the widget. More...
 
virtual void disable ()
 Disables the widget. More...
 
bool isEnabled () const
 Returns true when the widget is enabled. More...
 
bool isDisabled () const
 Returns true when the widget is disabled. More...
 
bool isLoaded () const
 Returns true when the widget is loaded successfully. More...
 
virtual void focus ()
 Focus the widget. More...
 
virtual void unfocus ()
 Unfocus the widget. More...
 
bool isFocused () const
 Returns true when the widget is focused and false otherwise. More...
 
WidgetTypes getWidgetType () const
 Returns the type of the widget. More...
 
ContainergetParent () const
 Returns a pointer to the parent widget. More...
 
unsigned char getTransparency () const
 Returns the transparency of the widget. More...
 
virtual void moveToFront ()
 Places the widget before all other widgets. More...
 
virtual void moveToBack ()
 Places the widget behind all other widgets. More...
 
void setCallbackId (unsigned int callbackId)
 Changes the callback id of the widget. More...
 
unsigned int getCallbackId ()
 Returns the callback id of the widget. More...
 
- Public Member Functions inherited from tgui::Transformable
 Transformable ()
 Default constructor. More...
 
virtual ~Transformable ()
 Destructor. More...
 
void setPosition (const sf::Vector2f &position)
 set the position of the widget More...
 
const sf::Vector2f & getPosition () const
 get the position of the widget More...
 
void move (float offsetX, float offsetY)
 Move the widget by a given offset. More...
 
void move (const sf::Vector2f &offset)
 Move the widget by a given offset. More...
 
void scale (float factorX, float factorY)
 Scale the widget. More...
 
void scale (const sf::Vector2f &factors)
 Scale the widget. More...
 
- Public Member Functions inherited from tgui::CallbackManager
void bindCallback (std::function< void()> func, unsigned int trigger)
 Bind a function to one or more specific callback trigger(s). More...
 
template<typename T >
void bindCallback (void(T::*func)(), T *const classPtr, unsigned int trigger)
 Bind a function to one or more specific callback trigger(s). More...
 
void bindCallbackEx (std::function< void(const Callback &)> func, unsigned int trigger)
 Bind a function to one or more specific callback trigger(s). More...
 
template<typename T >
void bindCallbackEx (void(T::*func)(const Callback &), T *const classPtr, unsigned int trigger)
 Bind a function to one or more specific callback trigger(s). More...
 
void bindCallback (unsigned int trigger)
 Bind one or more specific callback trigger(s) to the parent widget. More...
 
void unbindCallback (unsigned int trigger)
 Unbind all callback function bound to the given trigger. More...
 
void unbindAllCallback ()
 Unbind all callback functions bound to any callback. More...
 

Member Enumeration Documentation

Defines specific triggers to Checkbox.

Enumerator
AllCheckboxCallbacks 

All triggers defined in RadioButton and its base classes.

Constructor & Destructor Documentation

tgui::Checkbox::Checkbox ( )

Default constructor.

Member Function Documentation

void tgui::Checkbox::check ( )
virtual

Checks the checkbox.

Reimplemented from tgui::RadioButton.

virtual bool tgui::Checkbox::load ( const std::string &  configFileFilename,
const std::string &  sectionName = "Checkbox" 
)
virtual

Loads the widget.

Parameters
configFileFilenameFilename of the config file.
sectionNameName of the section in the file to load

The config file must contain a Checkbox section with the needed information.

Reimplemented from tgui::RadioButton.

void tgui::Checkbox::uncheck ( )
virtual

Unchecks the checkbox.

Reimplemented from tgui::RadioButton.


The documentation for this class was generated from the following file: