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 Robert B. Quattlebaum Jr.
10 ** This software and associated documentation
11 ** are CONFIDENTIAL and PROPRIETARY property of
12 ** the above-mentioned copyright holder.
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.
20 /* ========================================================================= */
22 /* === S T A R T =========================================================== */
24 #ifndef __SYNFIG_STUDIO_DOCKABLE_H
25 #define __SYNFIG_STUDIO_DOCKABLE_H
27 /* === H E A D E R S ======================================================= */
29 #include <gtkmm/stockid.h>
30 #include <gtkmm/button.h>
31 #include "dialogsettings.h"
32 #include <synfig/string.h>
33 #include <gtkmm/table.h>
34 #include <gtkmm/tooltips.h>
35 #include <gtkmm/label.h>
36 #include <gtkmm/frame.h>
37 #include <gtkmm/handlebox.h>
38 #include <gtkmm/box.h>
39 #include <gtkmm/scrolledwindow.h>
40 #include <gtkmm/toolbar.h>
41 #include <gtkmm/toolbutton.h>
43 /* === M A C R O S ========================================================= */
45 /* === T Y P E D E F S ===================================================== */
47 /* === C L A S S E S & S T R U C T S ======================================= */
54 class Dockable : public Gtk::Table
56 friend class DockManager;
57 friend class DockBook;
60 sigc::signal<void> signal_stock_id_changed_;
61 SigC::Connection prev_widget_delete_connection;
64 // DialogSettings dialog_settings;
69 Gtk::Toolbar *toolbar_;
72 synfig::String local_name_;
73 Gtk::Tooltips tooltips_;
75 Gtk::Label title_label_;
76 //Gtk::HBox button_box_;
77 Gtk::HBox header_box_;
80 //Gtk::HandleBox handle_box_;
81 Gtk::ScrolledWindow *scrolled_;
82 Gtk::Widget *prev_widget_;
86 Gtk::StockID stock_id_;
93 //Gtk::VBox* get_vbox() { return &vbox_; }
95 void set_toolbar(Gtk::Toolbar& toolbar);
97 void set_use_scrolled(bool x) { use_scrolled_=x; }
99 Dockable(const synfig::String& name,const synfig::String& local_name,Gtk::StockID stock_id_=Gtk::StockID(" "));
102 sigc::signal<void>& signal_stock_id_changed() { return signal_stock_id_changed_; }
104 const synfig::String& get_name()const { return name_; }
105 const synfig::String& get_local_name()const { return local_name_; }
107 const Gtk::StockID& get_stock_id()const { return stock_id_; }
108 void set_stock_id(Gtk::StockID x) { stock_id_=x; signal_stock_id_changed()(); }
110 void set_local_name(const synfig::String&);
114 Gtk::Tooltips& get_tooltips() { return tooltips_; }
116 //DialogSettings& settings() { return dialog_settings; }
117 //const DialogSettings& settings()const { return dialog_settings; }
119 void add(Gtk::Widget& x);
121 Gtk::ToolButton* add_button(const Gtk::StockID& stock_id, const synfig::String& tooltip=synfig::String());
127 void attach_dnd_to(Gtk::Widget& widget);
129 bool clear_previous();
130 virtual Gtk::Widget* create_tab_label();
134 void on_drag_data_get(const Glib::RefPtr<Gdk::DragContext>&, Gtk::SelectionData& selection_data, guint info, guint time);
135 void on_drag_end(const Glib::RefPtr<Gdk::DragContext>&context);
136 void on_drag_begin(const Glib::RefPtr<Gdk::DragContext>&context);
137 void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
139 }; // END of studio::Dockable
141 }; // END of namespace studio
143 /* === E N D =============================================================== */