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