#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) |
cwidget::widgets::button::button | ( | const std::wstring & | _label | ) | [protected] |
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.
References cwidget::config::global_bindings, and cwidget::widgets::widget::handle_key().
static util::ref_ptr<button> cwidget::widgets::button::create | ( | const std::string & | label | ) | [inline, static] |
void cwidget::widgets::button::paint | ( | const style & | st | ) | [virtual] |
Display this widget.
Implements cwidget::widgets::widget.
References cwidget::widgets::widget::apply_style(), cwidget::fragment_contents::size(), and cwidget::style_attrs_flip().
int cwidget::widgets::button::width_request | ( | ) | [virtual] |
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.