1 /* === S Y N F I G ========================================================= */
3 ** \brief Template Header
5 ** $Id: dockable.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
8 ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley
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.
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.
21 /* ========================================================================= */
23 /* === S T A R T =========================================================== */
25 #ifndef __SYNFIG_STUDIO_DOCKABLE_H
26 #define __SYNFIG_STUDIO_DOCKABLE_H
28 /* === H E A D E R S ======================================================= */
30 #include <gtkmm/stockid.h>
31 #include <gtkmm/button.h>
32 #include "dialogsettings.h"
33 #include <synfig/string.h>
34 #include <gtkmm/table.h>
35 #include <gtkmm/tooltips.h>
36 #include <gtkmm/label.h>
37 #include <gtkmm/frame.h>
38 #include <gtkmm/handlebox.h>
39 #include <gtkmm/box.h>
40 #include <gtkmm/scrolledwindow.h>
41 #include <gtkmm/toolbar.h>
42 #include <gtkmm/toolbutton.h>
44 /* === M A C R O S ========================================================= */
46 /* === T Y P E D E F S ===================================================== */
48 /* === C L A S S E S & S T R U C T S ======================================= */
55 class Dockable : public Gtk::Table
57 friend class DockManager;
58 friend class DockBook;
61 sigc::signal<void> signal_stock_id_changed_;
62 SigC::Connection prev_widget_delete_connection;
65 // DialogSettings dialog_settings;
70 Gtk::Toolbar *toolbar_;
73 synfig::String local_name_;
74 Gtk::Tooltips tooltips_;
76 Gtk::Label title_label_;
77 //Gtk::HBox button_box_;
78 Gtk::HBox header_box_;
81 //Gtk::HandleBox handle_box_;
82 Gtk::ScrolledWindow *scrolled_;
83 Gtk::Widget *prev_widget_;
87 Gtk::StockID stock_id_;
94 //Gtk::VBox* get_vbox() { return &vbox_; }
96 void set_toolbar(Gtk::Toolbar& toolbar);
98 void set_use_scrolled(bool x) { use_scrolled_=x; }
100 Dockable(const synfig::String& name,const synfig::String& local_name,Gtk::StockID stock_id_=Gtk::StockID(" "));
103 sigc::signal<void>& signal_stock_id_changed() { return signal_stock_id_changed_; }
105 const synfig::String& get_name()const { return name_; }
106 const synfig::String& get_local_name()const { return local_name_; }
108 const Gtk::StockID& get_stock_id()const { return stock_id_; }
109 void set_stock_id(Gtk::StockID x) { stock_id_=x; signal_stock_id_changed()(); }
111 void set_local_name(const synfig::String&);
115 Gtk::Tooltips& get_tooltips() { return tooltips_; }
117 //DialogSettings& settings() { return dialog_settings; }
118 //const DialogSettings& settings()const { return dialog_settings; }
120 void add(Gtk::Widget& x);
122 Gtk::ToolButton* add_button(const Gtk::StockID& stock_id, const synfig::String& tooltip=synfig::String());
128 void attach_dnd_to(Gtk::Widget& widget);
130 bool clear_previous();
131 virtual Gtk::Widget* create_tab_label();
135 void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, Gtk::SelectionData& selection_data, guint info, guint time);
136 void on_drag_end(const Glib::RefPtr<Gdk::DragContext>&context);
137 void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>&context);
138 void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
140 }; // END of studio::Dockable
142 }; // END of namespace studio
144 /* === E N D =============================================================== */