The Battle for Wesnoth  1.19.7+dev
Public Member Functions | Private Attributes | List of all members
gui2::iteration::container Class Reference

A walker for a gui2::container_base. More...

#include <walker_container.hpp>

Inheritance diagram for gui2::iteration::container:

Public Member Functions

 container (gui2::container_base &container)
 Constructor. More...
 
virtual state_t next (const level level)
 Inherited from gui2::iteration::walker_base. More...
 
virtual bool at_end (const level level) const
 Inherited from gui2::iteration::walker_base. More...
 
virtual gui2::widgetget (const level level)
 Inherited from gui2::iteration::walker_base. More...
 
- Public Member Functions inherited from gui2::iteration::walker_base
virtual ~walker_base ()
 

Private Attributes

gui2::container_basecontainer_
 The container which the walker is attached to. More...
 
gui2::widgetwidget_
 The widget which the walker is attached to. More...
 
bool entered_grid = false
 Whether the grid has been yielded. More...
 
bool in_grid = false
 
gui2::grid::iterator itor_
 The iterator to the children of container_. More...
 

Additional Inherited Members

- Public Types inherited from gui2::iteration::walker_base
enum  level { self , internal , child }
 The level to walk at. More...
 
enum  state_t { valid , invalid , fail }
 The state of the walker. More...
 

Detailed Description

A walker for a gui2::container_base.

Definition at line 26 of file walker_container.hpp.

Constructor & Destructor Documentation

◆ container()

gui2::iteration::container::container ( gui2::container_base container)
explicit

Constructor.

Parameters
containerThe grid which the walker is attached to.

Definition at line 25 of file walker_container.cpp.

Member Function Documentation

◆ at_end()

bool gui2::iteration::container::at_end ( const level  level) const
virtual

◆ get()

gui2::widget * gui2::iteration::container::get ( const level  level)
virtual

◆ next()

walker_base::state_t gui2::iteration::container::next ( const level  level)
virtual

Member Data Documentation

◆ container_

gui2::container_base& gui2::iteration::container::container_
private

The container which the walker is attached to.

Definition at line 47 of file walker_container.hpp.

Referenced by at_end(), get(), and next().

◆ entered_grid

bool gui2::iteration::container::entered_grid = false
private

Whether the grid has been yielded.

This variable is used to track whether the gui2::iteration::walker_base::internal level has been visited.

Definition at line 63 of file walker_container.hpp.

Referenced by at_end(), and next().

◆ in_grid

bool gui2::iteration::container::in_grid = false
private

Definition at line 63 of file walker_container.hpp.

Referenced by at_end(), and next().

◆ itor_

gui2::grid::iterator gui2::iteration::container::itor_
private

The iterator to the children of container_.

This variable is used to track where the gui2::iteration::walker_base::child level visiting is.

Definition at line 71 of file walker_container.hpp.

Referenced by at_end(), get(), and next().

◆ widget_

gui2::widget* gui2::iteration::container::widget_
private

The widget which the walker is attached to.

This variable is used to track whether the gui2::iteration::walker_base::widget level has been visited.

Definition at line 55 of file walker_container.hpp.

Referenced by at_end(), get(), and next().


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