DOSBox-X
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Defines
Public Member Functions | Protected Attributes
GUI::Checkbox Class Reference

A checkbox. More...

#include <gui_tk.h>

Inheritance diagram for GUI::Checkbox:
GUI::BorderedWindow GUI::ActionEventSource GUI::Window

List of all members.

Public Member Functions

 Checkbox (Window *parent, int x, int y, int w, int h)
 Create a checkbox with given position and size.
template<typename T >
 Checkbox (Window *parent, int x, int y, const T text, int w=-1, int h=-1)
 Create a checkbox with text label.
virtual void paint (Drawable &d) const
 Paint checkbox.
virtual void setChecked (bool checked)
 Change checkbox state.
virtual bool isChecked ()
 Get checkbox state.
virtual bool mouseDown (int x, int y, MouseButton button)
 Press checkbox.
virtual bool mouseUp (int x, int y, MouseButton button)
 Release checkbox.
virtual bool keyDown (const Key &key)
 Handle keyboard input.
virtual bool keyUp (const Key &key)
 Handle keyboard input.
virtual void execute ()
 Execute handlers.
template<typename STR >
 Checkbox (Window *parent, int x, int y, const STR text, int w, int h)

Protected Attributes

bool checked
 true, if checkbox is currently selected.

Detailed Description

A checkbox.

Checkboxes can have any child widget as content. There are convenience constructors for common forms of checkboxes.

Definition at line 2061 of file gui_tk.h.


Constructor & Destructor Documentation

template<typename T >
GUI::Checkbox::Checkbox ( Window parent,
int  x,
int  y,
const T  text,
int  w = -1,
int  h = -1 
)

Create a checkbox with text label.

If a size is specified, text is centered. Otherwise, checkbox size is adjusted for the text.


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