#include <PanelList.h>
|
void | onExpand (bool notUndo, Wt::WPanel *panel) |
|
Definition at line 16 of file PanelList.h.
◆ PanelList()
Definition at line 13 of file PanelList.C.
14 : WContainerWidget()
15{ }
◆ addPanel()
void PanelList::addPanel |
( |
std::unique_ptr< Wt::WPanel > |
panel | ) |
|
Definition at line 30 of file PanelList.C.
31{
32 panel->setCollapsible(true);
33 panel->collapse();
34
35 panel->expandedSS().connect(std::bind(&
PanelList::onExpand,
this, std::placeholders::_1, panel.get()));
36
37 WContainerWidget::addWidget(std::move(panel));
38}
void onExpand(bool notUndo, Wt::WPanel *panel)
◆ addWidget()
WPanel * PanelList::addWidget |
( |
const Wt::WString & |
text, |
|
|
std::unique_ptr< Wt::WWidget > |
w |
|
) |
| |
Definition at line 17 of file PanelList.C.
18{
19 std::unique_ptr<WPanel> p
20 = std::make_unique<WPanel>();
21 WPanel *result = p.get();
22 p->setTitle(text);
23 p->setCentralWidget(std::move(w));
24
26
27 return result;
28}
void addPanel(std::unique_ptr< Wt::WPanel > panel)
◆ onExpand()
void PanelList::onExpand |
( |
bool |
notUndo, |
|
|
Wt::WPanel * |
panel |
|
) |
| |
|
private |
Definition at line 41 of file PanelList.C.
42{
43 if (notUndo) {
45
46 for (unsigned i = 0; i < children().size(); ++i) {
47 WPanel *p = dynamic_cast<WPanel *>(children()[i]);
48 if (p != panel) {
49 if (!p->isCollapsed())
51 p->collapse();
52 }
53 }
54 } else {
56 WPanel *p =
dynamic_cast<WPanel *
>(children()[
wasExpanded_]);
57 p->expand();
58 }
59 }
60}
◆ removePanel()
void PanelList::removePanel |
( |
Wt::WPanel * |
panel | ) |
|
◆ wasExpanded_
int PanelList::wasExpanded_ |
|
private |
The documentation for this class was generated from the following files:
- C:/M/mingw-w64-wt/src/wt-4.8.1/examples/charts/PanelList.h
- C:/M/mingw-w64-wt/src/wt-4.8.1/examples/charts/PanelList.C