The Battle for Wesnoth  1.13.4+dev
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
walker_widget.hpp
Go to the documentation of this file.
1 /*
2  Copyright (C) 2011 - 2016 by Mark de Wever <[email protected]>
3  Part of the Battle for Wesnoth Project http://www.wesnoth.org/
4 
5  This program is free software; you can redistribute it and/or modify
6  it under the terms of the GNU General Public License as published by
7  the Free Software Foundation; either version 2 of the License, or
8  (at your option) any later version.
9  This program is distributed in the hope that it will be useful,
10  but WITHOUT ANY WARRANTY.
11 
12  See the COPYING file for more details.
13 */
14 
15 #ifndef GUI_WIDGETS_AUXILIARY_ITERATOR_WALKER_WIDGET_HPP_INCLUDED
16 #define GUI_WIDGETS_AUXILIARY_ITERATOR_WALKER_WIDGET_HPP_INCLUDED
17 
19 
20 namespace gui2
21 {
22 
23 namespace iterator
24 {
25 
26 namespace walker
27 {
28 
29 /** A walker for a @ref gui2::tcontrol. */
30 class twidget : public twalker_
31 {
32 public:
33  /**
34  * Constructor.
35  *
36  * @param widget The control which the walker is attached to.
37  */
38  explicit twidget(gui2::twidget& widget);
39 
40  /** Inherited from @ref gui2::iterator::twalker_. */
41  virtual tstate next(const tlevel level);
42 
43  /** Inherited from @ref gui2::iterator::twalker_. */
44  virtual bool at_end(const tlevel level) const;
45 
46  /** Inherited from @ref gui2::iterator::twalker_. */
47  virtual gui2::twidget* get(const tlevel level);
48 
49 private:
50  /** The control which the walker is attached to. */
52 };
53 
54 } // namespace walker
55 
56 } // namespace iterator
57 
58 } // namespace gui2
59 
60 #endif
Visit the widget itself.
Definition: walker.hpp:37
GLint level
Definition: glew.h:1220
tstate
The state of the walker.
Definition: walker.hpp:51
A class inherited from ttext_box that displays its input as stars.
Definition: field-fwd.hpp:23
virtual tstate next(const tlevel level)
Inherited from gui2::iterator::twalker_.
A walker for a gui2::tcontrol.
twidget(gui2::twidget &widget)
Constructor.
tlevel
The level to walk at.
Definition: walker.hpp:35
Base class for all widgets.
Definition: widget.hpp:49
The walker abstract base class.
Definition: walker.hpp:27
std::string::const_iterator iterator
Definition: tokenizer.hpp:21
gui2::twidget * widget_
The control which the walker is attached to.
virtual bool at_end(const tlevel level) const
Inherited from gui2::iterator::twalker_.