cwidget 0.5.16
|
This widget displays exactly one of its children at once. More...
#include <multiplex.h>
Classes | |
struct | child_info |
Public Member Functions | |
int | width_request () |
Returns the maximum width requested by any child. | |
int | height_request (int width) |
Returns the maximum height requested by any child. | |
void | destroy () |
Destroys the visible representation of this widget and disconnects it from any children that it may have. | |
void | layout_me () |
virtual widget_ref | get_focus () |
widget_ref | visible_widget () |
unsigned int | num_children () |
unsigned int | num_visible () |
virtual void | paint (const style &st) |
Display this widget. | |
void | dispatch_mouse (short id, int x, int y, int z, mmask_t bstate) |
void | show_all () |
Display this widget and all its subwidgets. | |
void | set_show_tabs (bool shown) |
void | add_widget (const widget_ref &widget) |
Add a title-less widget. | |
void | add_widget (const widget_ref &widget, const std::wstring &title) |
void | add_widget_bare (widget &widget, const std::wstring &title) |
void | add_widget_after (const widget_ref &widget, const widget_ref &after) |
void | add_widget_after_bare (cwidget::widgets::widget &widget, cwidget::widgets::widget &after) |
void | add_widget_after (const widget_ref &widget, const widget_ref &after, const std::wstring &title) |
void | add_widget_after_bare (cwidget::widgets::widget &widget, cwidget::widgets::widget &after, const std::wstring &title) |
void | rem_widget (const widget_ref &widget) |
void | cycle_forward () |
void | cycle_backward () |
Static Public Member Functions | |
static util::ref_ptr< multiplex > | create (bool show_tabs=false) |
Public Attributes | |
sigc::signal0< void > | cycled |
Emitted when the currently visible widget changes. | |
Protected Member Functions | |
bool | winavail () |
multiplex (bool _show_tabs) |
This widget displays exactly one of its children at once.
Hiding a child will prevent it from appearing; showing a child will add it to the list of visible children, and make it the currently visible child if it isn't already.
An optional "tab bar" listing the children of the multiplexer can be activated using set_show_tabs.
This widget requests enough space for its largest visible child.
void cwidget::widgets::multiplex::add_widget | ( | const widget_ref & | widget | ) | [virtual] |
Add a title-less widget.
Provided to implement a required function and for backwards compatibility; use of this routine is deprecated.
Implements cwidget::widgets::container.
int cwidget::widgets::multiplex::height_request | ( | int | width | ) | [virtual] |
Returns the maximum height requested by any child.
Implements cwidget::widgets::widget.
void cwidget::widgets::multiplex::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(), and cwidget::get_style().
void cwidget::widgets::multiplex::show_all | ( | ) | [virtual] |
Display this widget and all its subwidgets.
Implements cwidget::widgets::container.
int cwidget::widgets::multiplex::width_request | ( | ) | [virtual] |
Returns the maximum width requested by any child.
Implements cwidget::widgets::widget.
sigc::signal0<void> cwidget::widgets::multiplex::cycled |
Emitted when the currently visible widget changes.