libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Groups
frame.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_FRAME_H
15 #define T3_WIDGET_FRAME_H
16 
17 #include <t3widget/widgets/widget.h>
18 
19 namespace t3_widget {
20 
26 class T3_WIDGET_API frame_t : public widget_t, public container_t {
27  public:
30  AROUND_ALL = 0,
31  COVER_BOTTOM = 1,
32  COVER_RIGHT = 2,
33  COVER_LEFT = 4,
34  COVER_TOP = 8
35  };
36 
46  frame_t(frame_dimension_t _dimension = AROUND_ALL);
48  void set_child(widget_t *_child);
49  virtual bool process_key(key_t key);
50  virtual void update_contents(void);
51  virtual void set_focus(focus_t focus);
52  virtual bool set_size(optint height, optint width);
53  virtual bool accepts_focus(void);
54  virtual bool is_hotkey(key_t key);
55  virtual void set_enabled(bool enable);
56  virtual void force_redraw(void);
57  virtual void set_child_focus(window_component_t *target);
58  virtual bool is_child(window_component_t *component);
59 
60  private:
61  frame_dimension_t dimension;
62  cleanup_ptr<widget_t>::t child;
63 };
64 
65 }; // namespace
66 #endif
frame_dimension_t
Constants defining bits determining which parts of the frame should be covered by the child widget...
Definition: frame.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
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
A widget showing a frame.
Definition: frame.h:26