LGI  1.0
Lliurex Graphic Interface
application.hpp
Go to the documentation of this file.
1 
2 #ifndef _LGI_APPLICATION_
3 #define _LGI_APPLICATION_
4 
5 #include "window.hpp"
6 
7 #include <vector>
8 
9 namespace net
10 {
11  namespace lliurex
12  {
13  namespace lgi
14  {
16  {
17 
18 
19 
20 
21  protected:
22 
24  std::string name;
25  std::vector<BaseWindow *> windows;
27 
28 
36  virtual void OnMessage(BaseWindow * window,
37  Layer * layer, Widget * widget,
38  MessageEvent * event);
39 
48  virtual int CustomEventsDispatch();
49 
50  public:
51 
56  Application(std::string name);
57 
61  virtual ~Application();
62 
63 
68  static void Set(Application * app);
69 
74  static void Quit();
75 
80  static Application * Get();
81 
82 
87  void AddWindow(BaseWindow * window);
88 
89 
95  void Run(int mode=LGI_DISPATCH_EVENTS_FULL);
96 
97 
98 
99  };
100  }
101  }
102 }
103 
104 #endif
105 
bool quit_request
Definition: application.hpp:26
Application(std::string name)
Definition: layer.hpp:23
Definition: window.hpp:145
static Application * Get()
#define LGI_DISPATCH_EVENTS_FULL
Definition: window.hpp:16
Definition: application.hpp:9
std::vector< BaseWindow * > windows
Definition: application.hpp:25
virtual void OnMessage(BaseWindow *window, Layer *layer, Widget *widget, MessageEvent *event)
void Run(int mode=LGI_DISPATCH_EVENTS_FULL)
static void Set(Application *app)
std::string name
Definition: application.hpp:24
Definition: application.hpp:15
Definition: events.hpp:238
void AddWindow(BaseWindow *window)
static Application * instance
Definition: application.hpp:23
Definition: widget.hpp:18