Wtx ~ Wt Extension Library
WtxLib
Public Member Functions | Friends | List of all members
OptionList Class Reference

A list of options, separated by '|'. More...

#include <OptionList.h>

+ Inheritance diagram for OptionList:

Public Member Functions

 OptionList ()
 Create an OptionList.
 
void add (std::unique_ptr< Option > option)
 Add an Option to the list.
 
void update ()
 Updates the stateless implementations after an Option has been hidden or shown.
 

Friends

class Option
 

Detailed Description

A list of options, separated by '|'.

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.

See also
OptionList

Definition at line 40 of file OptionList.h.


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