#include <OptionList.h>

Public Slots | |
| void | update () |
| Update the stateless implementations after an Option has been hidden or shown. | |
Public Member Functions | |
| OptionList (WContainerWidget *parent=0) | |
| Create an OptionList. | |
| void | add (Option *option) |
| Add an Option to the list. | |
Private Member Functions | |
| void | optionVisibilityChanged (Option *opt, bool hidden) |
| An option changed visibility: possibly update the separators inbetween. | |
Private Attributes | |
| std::vector< Option * > | options_ |
| The list of options. | |
| Option * | optionNeedReset_ |
| The option that needs its stateless code updated. | |
Friends | |
| class | Option |
This widget is part of the Wt composer example.
An OptionList displays a list of Option widgets, which are separated by a '|' separator.
For example, Foo | Bar | Huu
When Options are hidden, the separators are adjusted so that there is no separator after the last visible option. However, this requires a call of update() each time an option is hidden or shown. This is because the removing of separators is optimized in stateless implementations, and thus in client-side JavaScript code. Since the behaviour is not entirely stateless, the update() method resets stateless implementations if necessary.
Definition at line 40 of file OptionList.h.
| OptionList::OptionList | ( | WContainerWidget * | parent = 0 |
) |
| void OptionList::add | ( | Option * | option | ) |
| void OptionList::update | ( | ) | [slot] |
Update the stateless implementations after an Option has been hidden or shown.
Definition at line 30 of file OptionList.C.
| void OptionList::optionVisibilityChanged | ( | Option * | opt, | |
| bool | hidden | |||
| ) | [private] |
An option changed visibility: possibly update the separators inbetween.
Definition at line 38 of file OptionList.C.
friend class Option [friend] |
Definition at line 67 of file OptionList.h.
std::vector<Option *> OptionList::options_ [private] |
Option* OptionList::optionNeedReset_ [private] |
1.5.6