libt3widget
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends Modules
dialog.h
1 /* Copyright (C) 2011-2013 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_DIALOGS_H
15 #define T3_WIDGET_DIALOGS_H
16 
17 #include <t3widget/dialogs/dialogbase.h>
18 #include <t3widget/dialogs/popup.h>
19 
20 namespace t3_widget {
21 
22 class dialog_t;
23 typedef std::list<dialog_t *> dialogs_t;
24 class complex_error_t;
25 
27 class T3_WIDGET_API dialog_t : public dialog_base_t {
28  private:
29  friend void iterate(void);
30  friend bool mouse_target_t::handle_mouse_event(mouse_event_t event);
31  // main_window_base_t should be allowed to call dialog_t(), but no others should
32  friend class main_window_base_t;
33  friend class popup_t;
34 
35  static dialogs_t active_dialogs;
36  static popup_t *active_popup;
37  static int dialog_depth;
39  static void set_active_popup(popup_t *popup);
40  static void update_dialogs(void);
41 
42  void activate_dialog(void);
43  void deactivate_dialog(void);
45  bool active;
48  dialog_t(void);
49 
50  protected:
51  const char *title;
54  dialog_t(int height, int width, const char *_title);
58  virtual void close(void);
59 
60  virtual bool is_child(window_component_t *widget);
61  virtual void set_child_focus(window_component_t *target);
62 
63  public:
64  virtual bool process_key(key_t key);
65  virtual void update_contents(void);
66  virtual void show(void);
67  virtual void hide(void);
68 
69 
74  T3_WIDGET_SIGNAL(closed, void);
75 };
76 
77 } // namespace
78 #endif
The t3_widget namespace is contains all classes, functions and global variables in the libt3widget li...
Definition: autocompleter.cc:18
Abstract base class for all items displayed on screen.
Definition: interfaces.h:28
void iterate(void)
Perform a single iteration of the main loop.
Definition: main.cc:321
Definition: dialogbase.h:29
long key_t
Integer type holding a single key symbol.
Definition: key.h:24
const char * title
The title of this dialog.
Definition: dialog.h:51
Base class for the application's main window.
Definition: mainwindow.h:30
Base class for dialogs.
Definition: popup.h:22
Base class for dialogs.
Definition: dialog.h:27
Structure holding the relevant elements of a mouse event.
Definition: mouse.h:23