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)
5  2008, Joel Holdsworth <joel@airwebreathe.org.uk>
6 
7   **Lumiera** is free software; you can redistribute it and/or modify it
8   under the terms of the GNU General Public License as published by the
9   Free Software Foundation; either version 2 of the License, or (at your
10   option) any later version. See the file COPYING for further details.
11 
12 */
13 
14 
26 #ifndef STAGE_CTRL_WINDOW_LOCATOR_H
27 #define STAGE_CTRL_WINDOW_LOCATOR_H
28 
29 #include "stage/gtk-base.hpp"
31 #include "lib/depend-inject.hpp"
32 #include "lib/nocopy.hpp"
33 
34 #include <memory>
35 #include <list>
36 
37 
38 namespace stage {
39 
40  namespace model { class Project; }
41  namespace controller { class Controller; }
42 
43 namespace workspace { class WorkspaceWindow; }
44 namespace model {
45  class ElementAccess;
46 }
47 namespace ctrl {
48 
49  class GlobalCtx;
50  class ElemAccessDir;
51  using std::list;
52 
53 
54 
60  {
63 
64  GlobalCtx& globalCtx_;
65  list<PWindow> windowList_;
66  PanelLocator panelLoc_;
67 
68  Service_ElementAccess elementAccess_;
69 
70 
71  public:
73  ~WindowLocator ();
74 
75  bool empty() const;
76 
77  void newWindow();
78  void closeWindow();
79 
80  workspace::WorkspaceWindow& findActiveWindow();
81  workspace::WorkspaceWindow& findFocusWindow();
82 
83  PanelLocator& locatePanel() { return panelLoc_; }
84 
85 
86  private:
87 
89  bool on_window_closed (GdkEventAny* event);
90 
91 
99  void updateCloseWindowInMenus();
100 
101 
102 
103  private:
104 
105  };
106 
107 
108 
109  inline bool
110  WindowLocator::empty() const
111  {
112  return windowList_.empty();
113  }
114 
115 
116 
117 }}// namespace stage::ctrl
118 #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:37
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:37
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:70
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...