00001
00021
00022
00023
00024
00025 #ifndef __SYNFIG_STUDIO_DIALOG_HISTORY_H
00026 #define __SYNFIG_STUDIO_DIALOG_HISTORY_H
00027
00028
00029
00030 #include "dockable.h"
00031 #include <gtkmm/treeview.h>
00032 #include "instance.h"
00033 #include <gtkmm/actiongroup.h>
00034 #include "dock_canvasspecific.h"
00035
00036
00037
00038
00039
00040
00041
00042 namespace studio {
00043
00044 class Dock_History : public Dock_CanvasSpecific
00045 {
00046 Glib::RefPtr<Gtk::ActionGroup> action_group;
00047 Gtk::TreeView *action_tree;
00048
00049 etl::loose_handle<studio::Instance> selected_instance;
00050
00051 sigc::connection on_undo_tree_changed_connection;
00052
00053 void on_undo_tree_changed();
00054
00055 void set_selected_instance_(etl::handle<studio::Instance> x);
00056
00057
00058 void set_selected_instance(etl::loose_handle<studio::Instance> x);
00059
00060 void set_selected_instance_signal(etl::handle<studio::Instance> x);
00061
00062 void delete_instance(etl::handle<studio::Instance> x);
00063
00064 Gtk::Widget* create_action_tree();
00065
00066 public:
00067
00068 etl::loose_handle<studio::Instance> get_selected_instance() { return selected_instance; }
00069
00070 void clear_undo();
00071 void clear_redo();
00072 void clear_undo_and_redo();
00073
00074 bool on_action_event(GdkEvent *event);
00075 void on_action_toggle(const Glib::ustring& path);
00076
00077 void update_undo_redo();
00078
00079 Dock_History();
00080 ~Dock_History();
00081 protected:
00082 virtual void init_instance_vfunc(etl::loose_handle<Instance> instance);
00083
00084 };
00085
00086 };
00087
00088
00089
00090 #endif