libt3widget
split.h
1 /* Copyright (C) 2011-2012 G.P. Halkes
2  This program is free software: you can redistribute it and/or modify
3  it under the terms of the GNU General Public License version 3, as
4  published by the Free Software Foundation.
5 
6  This program is distributed in the hope that it will be useful,
7  but WITHOUT ANY WARRANTY; without even the implied warranty of
8  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
9  GNU General Public License for more details.
10 
11  You should have received a copy of the GNU General Public License
12  along with this program. If not, see <http://www.gnu.org/licenses/>.
13 */
14 #ifndef T3_WIDGET_SPLIT_H
15 #define T3_WIDGET_SPLIT_H
16 
17 #include <t3widget/widgets/widget.h>
18 
19 namespace t3_widget {
20 
29 class T3_WIDGET_API split_t : public widget_t, public container_t {
30  protected:
31  widgets_t widgets;
32  widgets_t::iterator current;
33  bool horizontal,
34  focus;
43  bool next_recurse(void);
47  bool previous_recurse(void);
49  void set_to_begin(void);
51  void set_to_end(void);
59  bool unsplit(widget_t **widget);
60 
61  public:
63  split_t(widget_t *widget);
67  virtual ~split_t(void);
68  virtual bool process_key(key_t key);
69  virtual bool set_size(optint height, optint width);
70  virtual void update_contents(void);
71  virtual void set_focus(focus_t focus);
72  virtual void force_redraw(void);
73  virtual void set_child_focus(window_component_t *target);
74  virtual bool is_child(window_component_t *component);
75 
85  void split(widget_t *widget, bool _horizontal);
89  widget_t *unsplit(void);
91  void next(void);
93  void previous(void);
95  widget_t *get_current(void);
96 };
97 
98 }; // namespace
99 #endif
The t3_widget namespace is contains all classes, functions and global variables in the libt3widget li...
Definition: autocompleter.cc:18
widgets_t::iterator current
The currently active widget.
Definition: split.h:32
A widget that can contain multiple other widgets.
Definition: split.h:29
Abstract base class for all items displayed on screen.
Definition: interfaces.h:28
long key_t
Integer type holding a single key symbol.
Definition: key.h:24
Base class for widgets.
Definition: widget.h:24
bool horizontal
Boolean indicating whether to divide the space horizontally or vertically.
Definition: split.h:33
Base class for window_component_t's that are the parents of other window_component_t's.
Definition: interfaces.h:86
Class defining values with a separate validity check.
Definition: util.h:29
widgets_t widgets
The list of widgets contained by this split_t.
Definition: split.h:31