00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_STUDIO_DOCKBOOK_H
00026 #define __SYNFIG_STUDIO_DOCKBOOK_H
00027
00028
00029
00030 #include <gtkmm/notebook.h>
00031 #include <synfig/string.h>
00032 #include <gtkmm/tooltips.h>
00033
00034
00035
00036
00037
00038
00039
00040 namespace studio {
00041
00042 class DockManager;
00043 class Dockable;
00044
00045 class DockBook : public Gtk::Notebook
00046 {
00047 friend class DockManager;
00048 friend class Dockable;
00049
00050 sigc::signal<void> signal_empty_;
00051 sigc::signal<void> signal_changed_;
00052
00053 Gtk::Tooltips tooltips_;
00054
00055 bool deleting_;
00056
00057 protected:
00058 public:
00059 DockBook();
00060 ~DockBook();
00061
00062 sigc::signal<void>& signal_empty() { return signal_empty_; }
00063 sigc::signal<void>& signal_changed() { return signal_changed_; }
00064
00065 void add(Dockable& dockable, int position=-1);
00066 void remove(Dockable& dockable);
00067
00068 void present();
00069
00070 void clear();
00071
00072 synfig::String get_local_contents()const;
00073
00074 synfig::String get_contents()const;
00075 void set_contents(const synfig::String& x);
00076
00077 void refresh_tabs_headers();
00078
00079 void refresh_tab(Dockable*);
00080
00081 bool tab_button_pressed(GdkEventButton* event, Dockable* dockable);
00082 void on_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int, int, const Gtk::SelectionData& selection_data, guint, guint time);
00083 };
00084
00085 };
00086
00087
00088
00089 #endif