cwidget 0.5.16
Classes | Public Member Functions | Static Public Member Functions | Static Public Attributes | Protected Member Functions
cwidget::widgets::menubar Class Reference
Inheritance diagram for cwidget::widgets::menubar:
cwidget::widgets::container cwidget::widgets::widget trackable

List of all members.

Classes

struct  item

Public Member Functions

widget_ref get_active_widget ()
 The 'active' widget of a menubar is always its subwidget.
void destroy ()
 Destroys the visible representation of this widget and disconnects it from any children that it may have.
int width_request ()
int height_request (int w)
 Calculate the desired height of the widget, given its width.
void layout_me ()
void set_subwidget (const widget_ref &w)
void append_item (const std::wstring &title, const menu_ref &menu)
void append_item (const std::wstring &title, menu &menu)
void show_all ()
 Display this widget and all its subwidgets.
void add_widget (const widget_ref &w)
 Add a widget as the new subwidget, like a bin.
void rem_widget (const widget_ref &w)
 Remove the subwidget OR a menu.
virtual void paint (const style &st)
 Display this widget.
virtual bool focus_me ()
virtual void dispatch_mouse (short id, int x, int y, int z, mmask_t bmask)
bool get_cursorvisible ()
point get_cursorloc ()
bool get_always_visible ()
void set_always_visible (bool _always_visible)

Static Public Member Functions

static util::ref_ptr< menubarcreate (bool always_visible=true)
static void init_bindings ()

Static Public Attributes

static config::keybindingsbindings = NULL

Protected Member Functions

virtual bool handle_key (const config::key &k)
 Handles a keypress in this widget.
 menubar (bool _always_visible)

Member Function Documentation

void cwidget::widgets::menubar::add_widget ( const widget_ref w) [virtual]

Add a widget as the new subwidget, like a bin.

Implements cwidget::widgets::container.

widget_ref cwidget::widgets::menubar::get_active_widget ( ) [virtual]

The 'active' widget of a menubar is always its subwidget.

Implements cwidget::widgets::container.

bool cwidget::widgets::menubar::handle_key ( const config::key k) [protected, virtual]

Handles a keypress in this widget.

Parameters:
kthe key that was pressed (see keybindings.h).
Returns:
true if the key was consumed; if false is returned, further processing of the key will be performed.

Reimplemented from cwidget::widgets::widget.

References cwidget::config::keybindings::key_matches(), and cwidget::toplevel::update().

int cwidget::widgets::menubar::height_request ( int  width) [virtual]

Calculate the desired height of the widget, given its width.

Parameters:
widththe width of this widget
Returns:
the desired height

Implements cwidget::widgets::widget.

void cwidget::widgets::menubar::paint ( const style st) [virtual]

Display this widget.

Parameters:
stthe style environment in which the widget is to be displayed.

Implements cwidget::widgets::widget.

References cwidget::widgets::widget::apply_style(), and cwidget::get_style().

void cwidget::widgets::menubar::rem_widget ( const widget_ref w) [virtual]

Remove the subwidget OR a menu.

Implements cwidget::widgets::container.

References cwidget::util::ref_ptr< T >::unsafe_get_ref().

void cwidget::widgets::menubar::show_all ( ) [virtual]

Display this widget and all its subwidgets.

Implements cwidget::widgets::container.

int cwidget::widgets::menubar::width_request ( ) [virtual]
Returns:
the desired width of the widget.

Implements cwidget::widgets::widget.


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