bakery  2.6
AppInstanceManager.h
Go to the documentation of this file.
1 /*
2  * Copyright 2002 Murray Cumming
3  *
4  * This library is free software; you can redistribute it and/or
5  * modify it under the terms of the GNU Library General Public
6  * License as published by the Free Software Foundation; either
7  * version 2 of the License, or (at your option) any later version.
8  *
9  * This library is distributed in the hope that it will be useful,
10  * but WITHOUT ANY WARRANTY; without even the implied warranty of
11  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12  * Library General Public License for more details.
13  *
14  * You should have received a copy of the GNU Library General Public
15  * License along with this library; if not, write to the Free
16  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
17  */
18 
19 #ifndef BAKERY_APPINSTANCEMANAGER_H
20 #define BAKERY_APPINSTANCEMANAGER_H
21 
22 #include <sigc++/sigc++.h>
23 #include <list>
24 
25 namespace Bakery
26 {
27 
28 class App;
29 
36 class AppInstanceManager : public sigc::trackable
37 {
38 public:
40  virtual ~AppInstanceManager();
41 
42  virtual void add_app(App* pApp);
43  virtual void close_all();
44  virtual void cancel_close_all();
45 
46  virtual unsigned int get_app_count() const;
47 
48  typedef std::list<App*> type_listAppInstances;
49  virtual type_listAppInstances get_instances() const; //Used by App_WithDoc to get associated Documents.
50 
51 protected:
52  //Signal handler:
53  virtual void on_app_hide(App* pApp);
54 
55  //Instances:
56  type_listAppInstances m_listAppInstances;
57 
58  bool m_bExiting;
59 };
60 
61 } //namespace
62 
63 #endif //BAKERY_APPINSTANCEMANAGER_H
virtual void add_app(App *pApp)
std::list< App * > type_listAppInstances
Definition: AppInstanceManager.h:48
bool m_bExiting
Definition: AppInstanceManager.h:58
virtual void cancel_close_all()
Definition: App.h:29
Bakery's Main Window.
Definition: App.h:60
virtual void on_app_hide(App *pApp)
type_listAppInstances m_listAppInstances
Definition: AppInstanceManager.h:56
Contains a list of App instances.
Definition: AppInstanceManager.h:36
virtual unsigned int get_app_count() const
virtual type_listAppInstances get_instances() const