cwidget
0.5.16
|
Public Member Functions | |
bool | get_cursorvisible () |
point | get_cursorloc () |
int | width_request () |
int | height_request (int width) |
Calculate the desired height of the widget, given its width. | |
void | append_item (menu_item *newitem) |
void | remove_item (menu_item *item) |
void | move_selection_up () |
Move the selection up, as if Up had been pressed. | |
void | move_selection_down () |
Move the selection down, as if Down had been pressed. | |
void | move_selection_top () |
Move the selection to the top of the menu, as if Home had been pressed. | |
void | move_selection_bottom () |
Move the selection to the bottom of the menu, as if End had been pressed. | |
virtual bool | focus_me () |
virtual void | paint (const style &st) |
Display this widget. | |
virtual void | dispatch_mouse (short id, int x, int y, int z, mmask_t bstate) |
Static Public Member Functions | |
static util::ref_ptr< menu > | create () |
static util::ref_ptr< menu > | create (int x, int y, int w, menu_info *inf) |
static void | init_bindings () |
Public Attributes | |
sigc::signal1< void, menu_item * > | item_highlighted |
sigc::signal0< void > | menus_goaway |
Static Public Attributes | |
static config::keybindings * | bindings = NULL |
Protected Member Functions | |
virtual bool | handle_key (const config::key &k) |
Handles a keypress in this widget. | |
menu () | |
Create a blank menu. | |
menu (int x, int y, int w, menu_info *inf) |
cwidget::widgets::menu::menu | ( | ) | [protected] |
Create a blank menu.
bool cwidget::widgets::menu::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::key::ch, cwidget::config::keybindings::key_matches(), move_selection_bottom(), move_selection_down(), move_selection_top(), and move_selection_up().
int cwidget::widgets::menu::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.
Move the selection to the bottom of the menu, as if End had been pressed.
References cwidget::toplevel::update().
Referenced by handle_key().
Move the selection down, as if Down had been pressed.
References cwidget::toplevel::update().
Referenced by handle_key().
Move the selection to the top of the menu, as if Home had been pressed.
References cwidget::toplevel::update().
Referenced by handle_key().
Move the selection up, as if Up had been pressed.
References cwidget::toplevel::update().
Referenced by handle_key().
void cwidget::widgets::menu::paint | ( | const style & | st | ) | [virtual] |
Display this widget.
st | the style environment in which the widget is to be displayed. |
Implements cwidget::widgets::widget.
References cwidget::widgets::widget::apply_style(), cwidget::get_style(), cwidget::config::global_bindings, cwidget::config::keybindings::readable_keyname(), and cwidget::style_attrs_on().
int cwidget::widgets::menu::width_request | ( | ) | [virtual] |
Implements cwidget::widgets::widget.
References cwidget::config::global_bindings, cwidget::config::keyname(), and cwidget::config::keybindings::readable_keyname().