00001
00025
00026
00027 #ifndef __SYNFIG_GTKMM_TOOLBOX_H
00028 #define __SYNFIG_GTKMM_TOOLBOX_H
00029
00030
00031
00032 #include <gtkmm/window.h>
00033 #include <gtkmm/tooltips.h>
00034 #include <gtkmm/button.h>
00035 #include <gtkmm/togglebutton.h>
00036 #include <gtkmm/menu.h>
00037 #include <gtkmm/table.h>
00038 #include <synfig/string.h>
00039 #include "smach.h"
00040 #include <map>
00041 #include "dialogsettings.h"
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054 namespace studio {
00055
00056 class Dockable;
00057 class StateManager;
00058
00059 class Toolbox : public Gtk::Window
00060 {
00061 friend class studio::StateManager;
00062
00063 DialogSettings dialog_settings;
00064
00065 Gtk::Tooltips tooltips;
00066 Gtk::Button *button_undo;
00067 Gtk::Button *button_redo;
00068
00069 Gtk::Table *tool_table;
00070
00071 std::map<synfig::String,Gtk::ToggleButton *> state_button_map;
00072
00073 Gtk::Menu *recent_files_menu;
00074
00075 Gtk::Menu *dock_dialogs;
00076
00077 bool changing_state_;
00078
00079 void on_recent_files_changed();
00080 void on_drop_drag_data_received(const Glib::RefPtr<Gdk::DragContext>& context, int x, int y, const Gtk::SelectionData& selection_data, guint info, guint time);
00081
00082 void change_state_(const Smach::state_base *state);
00083
00084 public:
00085
00086 void change_state(const synfig::String& statename);
00087
00088 void update_undo_redo();
00089
00090 void refresh() { update_undo_redo(); }
00091
00092 void set_active_state(const synfig::String& statename);
00093
00094 void add_state(const Smach::state_base *state);
00095
00096
00097 void dockable_registered(Dockable* x);
00098
00099 Toolbox();
00100 virtual ~Toolbox();
00101
00102 };
00103
00104 };
00105
00106
00107
00108 #endif