This class represents a push-button. More...
#include <button.h>
Public Member Functions | |
| void | paint (const style &st) |
| Display this widget. | |
| bool | get_cursorvisible () |
| point | get_cursorloc () |
| bool | focus_me () |
| int | width_request () |
| int | height_request (int width) |
| Calculate the desired height of the widget, given its width. | |
| void | dispatch_mouse (short id, int x, int y, int z, mmask_t bmask) |
| void | set_label (const fragment *_label) |
Static Public Member Functions | |
| static util::ref_ptr< button > | create (const std::wstring &label) |
| static util::ref_ptr< button > | create (fragment *label) |
| Instantiate a button. | |
| static util::ref_ptr< button > | create (const std::string &label) |
| Instantiate a button. | |
Public Attributes | |
| sigc::signal0< void > | pressed |
Protected Member Functions | |
| bool | handle_key (const config::key &k) |
| Handles a keypress in this widget. | |
| fragment_cache * | get_label () const |
| button (const std::wstring &_label) | |
| Instantiate a button. | |
| button (fragment *_label) | |
| button (const std::string &_label) | |
This class represents a push-button.
| cwidget::widgets::button::button | ( | const std::wstring & | _label | ) | [protected] |
Instantiate a button.
| _label | the new label of this button; it will be placed inside a simple text_fragment. |
Referenced by create().
| static util::ref_ptr<button> cwidget::widgets::button::create | ( | const std::string & | label | ) | [inline, static] |
Instantiate a button.
| _label | the new label of this button; it will be placed inside a simple text_fragment. |
References button().
| static util::ref_ptr<button> cwidget::widgets::button::create | ( | fragment * | label | ) | [inline, static] |
Instantiate a button.
| _label | the new label of this button; the button is responsible for deleting it. |
References button().
| bool cwidget::widgets::button::handle_key | ( | const config::key & | k | ) | [protected, virtual] |
Handles a keypress in this widget.
| k | the key that was pressed (see keybindings.h). |
Reimplemented from cwidget::widgets::widget.
| int cwidget::widgets::button::height_request | ( | int | width | ) | [virtual] |
Calculate the desired height of the widget, given its width.
| width | the width of this widget |
Implements cwidget::widgets::widget.
| void cwidget::widgets::button::paint | ( | const style & | st | ) | [virtual] |
Display this widget.
| st | the style environment in which the widget is to be displayed. |
Implements cwidget::widgets::widget.
Reimplemented in cwidget::widgets::togglebutton.
| int cwidget::widgets::button::width_request | ( | ) | [virtual] |
Implements cwidget::widgets::widget.
1.6.2