Lumiera  0.pre.03
»edit your freedom«
window-locator.hpp
Go to the documentation of this file.
1 /*
2  WINDOW-LOCATOR.hpp - manage all top level windows
3 
4  Copyright (C) Lumiera.org
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6 
7  This program is free software; you can redistribute it and/or
8  modify it under the terms of the GNU General Public License as
9  published by the Free Software Foundation; either version 2 of
10  the License, or (at your option) any later version.
11 
12  This program is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with this program; if not, write to the Free Software
19  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 
21 */
22 
23 
35 #ifndef STAGE_CTRL_WINDOW_LOCATOR_H
36 #define STAGE_CTRL_WINDOW_LOCATOR_H
37 
38 #include "stage/gtk-base.hpp"
40 #include "lib/depend-inject.hpp"
41 #include "lib/nocopy.hpp"
42 
43 #include <memory>
44 #include <list>
45 
46 
47 namespace stage {
48 
49  namespace model { class Project; }
50  namespace controller { class Controller; }
51 
52 namespace workspace { class WorkspaceWindow; }
53 namespace model {
54  class ElementAccess;
55 }
56 namespace ctrl {
57 
58  class GlobalCtx;
59  class ElemAccessDir;
60  using std::list;
61 
62 
63 
69  {
72 
73  GlobalCtx& globalCtx_;
74  list<PWindow> windowList_;
75  PanelLocator panelLoc_;
76 
77  Service_ElementAccess elementAccess_;
78 
79 
80  public:
82  ~WindowLocator ();
83 
84  bool empty() const;
85 
86  void newWindow();
87  void closeWindow();
88 
89  workspace::WorkspaceWindow& findActiveWindow();
90  workspace::WorkspaceWindow& findFocusWindow();
91 
92  PanelLocator& locatePanel() { return panelLoc_; }
93 
94 
95  private:
96 
98  bool on_window_closed (GdkEventAny* event);
99 
100 
108  void updateCloseWindowInMenus();
109 
110 
111 
112  private:
113 
114  };
115 
116 
117 
118  inline bool
119  WindowLocator::empty() const
120  {
121  return windowList_.empty();
122  }
123 
124 
125 
126 }}// namespace stage::ctrl
127 #endif /*STAGE_CTRL_WINDOW_LOCATOR_H*/
Configuration handle to expose a service implementation through the Depend<SRV> front-end.
Any copy and copy construction prohibited.
Definition: nocopy.hpp:46
Per type specific configuration of instances created as service dependencies.
Mix-Ins to allow or prohibit various degrees of copying and cloning.
Lumiera GTK UI implementation root.
Definition: guifacade.cpp:46
Access and query front-end to locate, access and place docking panels.
The main Lumiera workspace window.
A centralised manager of all top level application windows.
A global circle of top-level UI management facilities.
Definition: global-ctx.hpp:79
A set of basic GTK includes for the UI.
Low-level service to navigate the internals of the Lumiera GTK UI.
Service to access, locate or place panels within top-level windows Access- and query front-end to the...