- Main Page
- Classes
- Directories
- Related Pages

- Class List
- Class Hierarchy
- Class Members

# TkCheckButton Class Reference

Represent "checkbutton" widget. More...

`#include <tk_checkbutton.h>`

Inheritance diagram for TkCheckButton:

List of all members.

## Public Member Functions

const Ptr< TkOptionDef > * | getOptionAll () const
| Returns array of all avaliable options valid for specific widget type.
const char * | getType () const
| Return type of class.
const char * | getTkClass () const
| Returns type of widget.
TObject * | clone ()
| Create deep-clone of object.
void | addValueListener (TclVarListener *listener)
void | setSelected (bool value)
bool | isSelected () const
void | setText (const string &text)
| Sets text of widget.
const string & | getText () const
| Gets content of widget in text form.
void | setVariable (TclBoolVar *var)
TclVar * | getDefaultVar ()
void | setEventsEnabled (bool value)
| Enables or disables events on widget.
void | setBackgroundColor (TkColorOption *color)
| Set background color.
Ptr< TkColorOption > & | getBackgroundColor () const
| Returns background color of widget.

## Detailed Description

Represent "checkbutton" widget.

TkCheckButton is bind to inner bool variable, via which can user set TkCheckButton checked/unchecked. TkCheckButton also contains some methods to retrieve/set this variable.

Date:
  01-12-2006

Author:
  Ondrej Svejdar

Todo:

Bug:

## Member Function Documentation

void TkCheckButton::addValueListener | ( | TclVarListener * | listener | ) |

| Add listener to inner variable (TclBoolVar)

Parameters:

  | listener | listener

TObject * TkCheckButton::clone | ( |  | ) | `[virtual]`

| Create deep-clone of object.

Returns:
  deep-clone of object

Implements TkBase.

Ptr< TkColorOption > & TkCheckButton::getBackgroundColor | ( |  | ) | const`[virtual]`

| Returns background color of widget.

Returns:
  background color

Implements TkBase.

TclVar * TkCheckButton::getDefaultVar | ( |  | ) | `[virtual]`

Returns:
  default inner variable

Implements IInnerVariable.

const Ptr< TkOptionDef > * TkCheckButton::getOptionAll | ( |  | ) | const`[virtual]`

| Returns array of all avaliable options valid for specific widget type.

Returns:
  array of options

Implements TkBase.

const string & TkCheckButton::getText | ( |  | ) | const`[virtual]`

| Gets content of widget in text form.

Returns:
  text content

Implements ITextable.

const char * TkCheckButton::getTkClass | ( |  | ) | const`[virtual]`

| Returns type of widget. Example values are "button","menu","entry" etc.

Returns:
  widget type

Implements TkBase.

const char * TkCheckButton::getType | ( |  | ) | const`[virtual]`

| Return type of class.

Returns:
  type of class

Reimplemented from TXmlObject.

bool TkCheckButton::isSelected | ( |  | ) | const

Returns:
  true if checkbutton is checked

void TkCheckButton::setBackgroundColor | ( | TkColorOption * | color | ) | `[virtual]`

| Set background color.

Parameters:

  | color | color value

Implements TkBase.

void TkCheckButton::setEventsEnabled | ( | bool | value | ) | `[inline, virtual]`

| Enables or disables events on widget.

Parameters:

  | value | if true events will be enabled

Reimplemented from TkBase.

void TkCheckButton::setSelected | ( | bool | value | ) |

| Force checkbutton to be checked/unchecked

Parameters:

  | value | if true, button will be checked

void TkCheckButton::setText | ( | const string & | text | ) | `[virtual]`

| Sets text of widget.

Parameters:

  | text | text to set

Implements ITextable.

void TkCheckButton::setVariable | ( | TclBoolVar * | var | ) |

| Replace default inner variable with user-defined one

Parameters:

  | var | variable to be set

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

- H:/projs/dotNET/eda/src/tk/gui/tk_checkbutton.h
- H:/projs/dotNET/eda/src/tk/gui/tk_checkbutton.cpp