my log
[synfig.git] / synfig-studio / trunk / src / gtkmm / dockdialog.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file dockdialog.h
3 **      \brief Template Header
4 **
5 **      $Id: dockdialog.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_DOCK_DIALOG_H
25 #define __SYNFIG_STUDIO_DOCK_DIALOG_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <gtkmm/stockid.h>
30 #include <gtkmm/button.h>
31 #include "dialogsettings.h"
32 #include <synfig/string.h>
33 #include <gtkmm/dialog.h>
34 #include <gtkmm/tooltips.h>
35 #include <gtkmm/label.h>
36 #include <gtkmm/frame.h>
37 #include <gtkmm/handlebox.h>
38 #include <gtkmm/scrolledwindow.h>
39 #include <gtkmm/accelgroup.h>
40
41 /* === M A C R O S ========================================================= */
42
43 /* === T Y P E D E F S ===================================================== */
44
45 /* === C L A S S E S & S T R U C T S ======================================= */
46
47 namespace Gtk { class Box; class Paned;  };
48 namespace studio {
49         
50 class DockManager;
51 class DockBook;
52 class Dockable;
53 class Widget_CompSelect;
54 class CanvasView;
55         
56 class DockDialog : public Gtk::Window
57 {
58         friend class DockManager;
59         friend class DockBook;
60         friend class Dockable;
61         SigC::Connection empty_sig;
62
63         bool composition_selector_;
64         
65         bool is_deleting;
66         
67         bool is_horizontal;
68         
69 private:
70         std::list<DockBook*> dock_book_list;
71
72         std::vector<Gtk::Paned*>        pannels_;
73         std::vector<int>                        dock_book_sizes_;
74
75
76         DockBook* last_dock_book;
77
78         Widget_CompSelect* widget_comp_select;
79         Gtk::Box *box;
80
81         int id_;
82
83         void on_hide();
84
85         void refresh();
86
87         void refresh_title();
88
89         void set_id(int x) { id_=x; }
90
91         void refresh_accel_group();
92
93         void drop_on_append(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
94         void drop_on_prepend(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
95         
96 public:
97
98         const std::vector<int>& get_dock_book_sizes()const { return dock_book_sizes_;}
99         void set_dock_book_sizes(const std::vector<int>&);
100         void rebuild_sizes();
101         
102         bool close();
103         
104         int get_id()const { return id_; }
105         
106         DockBook* append_dock_book();
107         DockBook* prepend_dock_book();
108         void erase_dock_book(DockBook*);
109         
110         void set_composition_selector(bool x);
111         bool get_composition_selector()const { return composition_selector_; }
112         
113         DockDialog();
114         ~DockDialog();
115
116         DockBook& get_dock_book();
117         const DockBook& get_dock_book()const;
118
119         synfig::String get_contents()const;
120         void set_contents(const synfig::String& x);
121 }; // END of studio::DockDialog
122
123 }; // END of namespace studio
124
125 /* === E N D =============================================================== */
126
127 #endif