The walker abstract base class. More...
#include <walker.hpp>
Public Types | |
enum | level { self , internal , child } |
The level to walk at. More... | |
enum | state_t { valid , invalid , fail } |
The state of the walker. More... | |
Public Member Functions | |
virtual | ~walker_base () |
virtual state_t | next (const level level)=0 |
Make the next widget the current one. More... | |
virtual bool | at_end (const level level) const =0 |
Returns whether the current widget is valid. More... | |
virtual gui2::widget * | get (const level level)=0 |
Returns a pointer to the current widget. More... | |
The walker abstract base class.
Definition at line 27 of file walker.hpp.
The level to walk at.
Enumerator | |
---|---|
self | Visit the widget itself. |
internal | Visit its nested grid. |
child | Visit the children of its nested grid. |
Definition at line 35 of file walker.hpp.
The state of the walker.
The enum is used to return the state of next.
Definition at line 49 of file walker.hpp.
|
inlinevirtual |
Definition at line 30 of file walker.hpp.
|
pure virtual |
Returns whether the current widget is valid.
level | Determines on which level the test should be executed. |
Implemented in gui2::iteration::walker::widget, gui2::iteration::tree_node, gui2::iteration::scrollbar_container, gui2::iteration::grid, and gui2::iteration::container.
Referenced by gui2::iteration::policy::visit::visit_level< level >::at_end().
|
pure virtual |
Returns a pointer to the current widget.
level | Determines from which level should the current widget be returned. |
Implemented in gui2::iteration::walker::widget, gui2::iteration::tree_node, gui2::iteration::scrollbar_container, gui2::iteration::grid, and gui2::iteration::container.
Referenced by gui2::iteration::policy::visit::visit_level< level >::get().
Make the next widget the current one.
level | Determines on which level the next one should be selected. |
Implemented in gui2::iteration::walker::widget, gui2::iteration::tree_node, gui2::iteration::scrollbar_container, gui2::iteration::grid, and gui2::iteration::container.
Referenced by gui2::iteration::policy::visit::visit_level< level >::next().