my log
[synfig.git] / synfig-studio / trunk / src / gtkmm / dockbook.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file dockbook.h
3 **      \brief Template Header
4 **
5 **      $Id: dockbook.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_STUDIO_DOCKBOOK_H
25 #define __SYNFIG_STUDIO_DOCKBOOK_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <gtkmm/notebook.h>
30 #include <synfig/string.h>
31 #include <gtkmm/tooltips.h>
32
33 /* === M A C R O S ========================================================= */
34
35 /* === T Y P E D E F S ===================================================== */
36
37 /* === C L A S S E S & S T R U C T S ======================================= */
38
39 namespace studio {
40         
41 class DockManager;
42 class Dockable;
43         
44 class DockBook : public Gtk::Notebook
45 {
46         friend class DockManager;
47         friend class Dockable;
48
49         sigc::signal<void> signal_empty_;
50         sigc::signal<void> signal_changed_;
51         
52         Gtk::Tooltips tooltips_;        
53         
54         bool deleting_;
55         
56 protected:
57 public:
58         DockBook();
59         ~DockBook();
60
61         sigc::signal<void>& signal_empty() { return signal_empty_; }
62         sigc::signal<void>& signal_changed() { return signal_changed_; }
63
64         void add(Dockable& dockable, int position=-1);
65         void remove(Dockable& dockable);
66
67         void present();
68
69         void clear();
70
71         synfig::String get_local_contents()const;
72         
73         synfig::String get_contents()const;
74         void set_contents(const synfig::String& x);
75
76         void refresh_tabs_headers();
77         
78         void refresh_tab(Dockable*);
79
80         bool tab_button_pressed(GdkEventButton* event, Dockable* dockable);
81         void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
82 }; // END of studio::DockBook
83
84 }; // END of namespace studio
85
86 /* === E N D =============================================================== */
87
88 #endif