Fix bugs in previous commit that caused FTBFS in synfig and ETL FTBFS with older...
[synfig.git] / synfig-studio / tags / synfigstudio_0_61_06 / src / gtkmm / dockmanager.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file dockmanager.h
3 **      \brief Template Header
4 **
5 **      $Id$
6 **
7 **      \legal
8 **      Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
9 **
10 **      This package is free software; you can redistribute it and/or
11 **      modify it under the terms of the GNU General Public License as
12 **      published by the Free Software Foundation; either version 2 of
13 **      the License, or (at your option) any later version.
14 **
15 **      This package is distributed in the hope that it will be useful,
16 **      but WITHOUT ANY WARRANTY; without even the implied warranty of
17 **      MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
18 **      General Public License for more details.
19 **      \endlegal
20 */
21 /* ========================================================================= */
22
23 /* === S T A R T =========================================================== */
24
25 #ifndef __SYNFIG_DOCKMANAGER_H
26 #define __SYNFIG_DOCKMANAGER_H
27
28 /* === H E A D E R S ======================================================= */
29
30 #include <vector>
31 #include <list>
32 #include <synfig/string.h>
33 #include <sigc++/signal.h>
34 #include <sigc++/object.h>
35 #include <ETL/smart_ptr>
36
37 /* === M A C R O S ========================================================= */
38
39 /* === T Y P E D E F S ===================================================== */
40
41 /* === C L A S S E S & S T R U C T S ======================================= */
42
43 namespace studio {
44
45 class Dockable;
46 class DockDialog;
47 class DockSettings;
48
49 class DockManager : public sigc::trackable
50 {
51         friend class Dockable;
52         friend class DockDialog;
53         friend class DockSettings;
54
55         std::list<Dockable*> dockable_list_;
56         std::list<DockDialog*> dock_dialog_list_;
57
58         sigc::signal<void,Dockable*> signal_dockable_registered_;
59
60         etl::smart_ptr<DockSettings> dock_settings;
61
62 public:
63         DockManager();
64         ~DockManager();
65
66         DockDialog& find_dock_dialog(int id);
67         const DockDialog& find_dock_dialog(int id)const;
68
69         sigc::signal<void,Dockable*>& signal_dockable_registered() { return signal_dockable_registered_; }
70
71         void register_dockable(Dockable& x);
72         bool unregister_dockable(Dockable& x);
73         Dockable& find_dockable(const synfig::String& x);
74         void present(synfig::String x);
75
76 }; // END of class DockManager
77
78 }; // END of namespace studio
79
80 /* === E N D =============================================================== */
81
82 #endif