#include <Wt/WPanel>
Public Member Functions | |
WPanel (WContainerWidget *parent=0) | |
Construct a panel. | |
void | setTitle (const WString &title) |
Set a title. | |
WString | title () const |
Get the title. | |
void | setTitleBar (bool enable) |
Show or hide a title bar for the panel. | |
bool | titleBar () const |
Returns if a title bar is set. | |
void | setCollapsible (bool on) |
Make the panel collapsible. | |
bool | isCollapsible () const |
Returns if the panel can be collapsed by the user. | |
void | setCollapsed (bool on) |
Set the panel expanded or collapsed. | |
bool | isCollapsed () const |
Returns if the panel is collapsed. | |
void | collapse () |
Collapse the panel. | |
void | expand () |
Collapse the panel. | |
void | setCentralWidget (WWidget *) |
Set the central widget. | |
WWidget * | centralWidget () const |
Return the central widget. | |
Public Attributes | |
Signal | collapsed |
Signal emitted when the panel is collapsed. | |
Signal | expanded |
Signal emitted when the panel is expanded. |
This widget is in development. It will provide features similar to the Ext::Panel.
Two panels: the top panel is collapsed, and the bottom panel expanded
void Wt::WPanel::setTitle | ( | const WString & | title | ) |
Set a title.
The panel title is set in the title bar. This method also makes the title bar visible by calling setTitleBar(true).
The default value is "" (no title).
WString Wt::WPanel::title | ( | ) | const |
void Wt::WPanel::setTitleBar | ( | bool | enable | ) |
Show or hide a title bar for the panel.
The title bar appears at the top of the panel.
The default value is false: the title bar is not shown unless a title is set or the panel is made collapsible.
bool Wt::WPanel::titleBar | ( | ) | const [inline] |
void Wt::WPanel::setCollapsible | ( | bool | on | ) |
Make the panel collapsible.
When on is true, a collapse/expand icon is added to the title bar. This also calls setTitleBar(true) to enable the title bar.
The default value is false.
bool Wt::WPanel::isCollapsible | ( | ) | const [inline] |
void Wt::WPanel::setCollapsed | ( | bool | on | ) |
Set the panel expanded or collapsed.
When on is true, equivalent to collapse(), otherwise to expand().
The default value is false.
bool Wt::WPanel::isCollapsed | ( | ) | const |
void Wt::WPanel::collapse | ( | ) |
Collapse the panel.
When isCollapsible() is true, the panel is collapsed to minimize screen real-estate.
void Wt::WPanel::expand | ( | ) |
Collapse the panel.
When isCollapsible() is true, the panel is expanded to its original state.
void Wt::WPanel::setCentralWidget | ( | WWidget * | w | ) |
Set the central widget.
Sets the widget that is the contents of the panel. When a widget was previously set, the old widget is deleted first.
The default value is 0 (no widget set).
WWidget* Wt::WPanel::centralWidget | ( | ) | const [inline] |
Signal emitted when the panel is collapsed.
Signal emitted when the panel is collapsed. The signal is only emitted when the panel is collapsed by the user using the collapse icon in the tible bar, not when calling setCollapsed(bool).
Signal emitted when the panel is expanded.
Signal emitted when the panel is expanded. The signal is only emitted when the panel is expanded by the user using the expand icon in the title bar, not when calling setCollapsed(bool).