my log
[synfig.git] / synfig-studio / trunk / src / gtkmm / dockmanager.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file dockmanager.h
3 **      \brief Template Header
4 **
5 **      $Id: dockmanager.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
14 **      You may not copy, print, publish, or in any
15 **      other way distribute this software without
16 **      a prior written agreement with
17 **      the copyright holder.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === S T A R T =========================================================== */
23
24 #ifndef __SYNFIG_DOCKMANAGER_H
25 #define __SYNFIG_DOCKMANAGER_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <vector>
30 #include <list>
31 #include <synfig/string.h>
32 #include <sigc++/signal.h>
33 #include <sigc++/object.h>
34 #include <ETL/smart_ptr>
35
36 /* === M A C R O S ========================================================= */
37
38 /* === T Y P E D E F S ===================================================== */
39
40 /* === C L A S S E S & S T R U C T S ======================================= */
41
42 namespace studio {
43
44 class Dockable;
45 class DockDialog;
46 class DockSettings;
47         
48 class DockManager : public sigc::trackable
49 {
50         friend class Dockable;
51         friend class DockDialog;
52         friend class DockSettings;
53                 
54         std::list<Dockable*> dockable_list_;
55         std::list<DockDialog*> dock_dialog_list_;
56
57         sigc::signal<void,Dockable*> signal_dockable_registered_;
58         
59         etl::smart_ptr<DockSettings> dock_settings;
60
61 public:
62         DockManager();
63         ~DockManager();
64
65         DockDialog& find_dock_dialog(int id);
66         const DockDialog& find_dock_dialog(int id)const;
67
68         sigc::signal<void,Dockable*>& signal_dockable_registered() { return signal_dockable_registered_; }
69
70         void register_dockable(Dockable& x);
71         bool unregister_dockable(Dockable& x);
72         Dockable& find_dockable(const synfig::String& x);
73         void present(synfig::String x);
74         
75 }; // END of class DockManager
76
77 }; // END of namespace studio
78
79 /* === E N D =============================================================== */
80
81 #endif