- Main Page
- Related Pages
- Namespaces
- Classes
- Files

# layeractionmanager.h

Go to the documentation of this file.

    00001 /* === S Y N F I G ========================================================= */
    00021 /* ========================================================================= */
    00022
    00023 /* === S T A R T =========================================================== */
    00024
    00025 #ifndef __SYNFIG_LAYER_ACTION_MANAGER_H
    00026 #define __SYNFIG_LAYER_ACTION_MANAGER_H
    00027
    00028 /* === H E A D E R S ======================================================= */
    00029
    00030 #include <gtkmm/uimanager.h>
    00031 #include <gtkmm/treeview.h>
    00032 #include <synfigapp/canvasinterface.h>
    00033
    00034 /* === M A C R O S ========================================================= */
    00035
    00036 /* === T Y P E D E F S ===================================================== */
    00037
    00038 /* === C L A S S E S & S T R U C T S ======================================= */
    00039
    00040 namespace studio {
    00041
    00042 class LayerTree;
    00043
    00044 class LayerActionManager
    00045 {
    00046     Glib::RefPtr<Gtk::UIManager> ui_manager_;
    00047     //Glib::RefPtr<Gtk::TreeSelection> tree_selection_;
    00048     LayerTree* layer_tree_;
    00049     etl::handle<synfigapp::CanvasInterface> canvas_interface_;
    00050
    00051     Glib::RefPtr<Gtk::ActionGroup>  action_group_;
    00052     Gtk::UIManager::ui_merge_id     popup_id_;
    00053
    00054
    00055     Glib::RefPtr<Gtk::ActionGroup> action_group_copy_paste;
    00056
    00057     Glib::RefPtr<Gtk::Action>   action_cut_;
    00058     Glib::RefPtr<Gtk::Action>   action_copy_;
    00059     Glib::RefPtr<Gtk::Action>   action_paste_;
    00060
    00061     Glib::RefPtr<Gtk::Action>   action_amount_inc_;
    00062     Glib::RefPtr<Gtk::Action>   action_amount_dec_;
    00063     Glib::RefPtr<Gtk::Action>   action_amount_;
    00064
    00065     Glib::RefPtr<Gtk::Action>   action_select_all_child_layers_;
    00066     sigc::connection            select_all_child_layers_connection;
    00067
    00068     std::list<synfig::Layer::Handle> clipboard_;
    00069
    00070     sigc::connection selection_changed_connection;
    00071
    00072     bool queued;
    00073     sigc::connection queue_refresh_connection;
    00074
    00075     std::list<sigc::connection> update_connection_list;
    00076
    00077     void cut();
    00078     void copy();
    00079     void paste();
    00080     void export_dup_nodes(synfig::Layer::Handle, synfig::Canvas::Handle, int &);
    00081
    00082     void amount_inc();
    00083     void amount_dec();
    00084
    00085 public:
    00086     void queue_refresh();
    00087
    00088     LayerActionManager();
    00089     ~LayerActionManager();
    00090
    00091     void set_ui_manager(const Glib::RefPtr<Gtk::UIManager> &x);
    00092     Glib::RefPtr<Gtk::UIManager> get_ui_manager()const { return ui_manager_; }
    00093
    00094     void set_layer_tree(LayerTree* x);
    00095     LayerTree* get_layer_tree()const { return layer_tree_; }
    00096
    00097     void set_canvas_interface(const etl::handle<synfigapp::CanvasInterface> &x);
    00098     etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const { return canvas_interface_; }
    00099
    00100     etl::loose_handle<synfigapp::Instance> get_instance()const { return canvas_interface_->get_instance(); }
    00101
    00102     void refresh();
    00103     void clear();
    00104
    00105     Glib::RefPtr<Gtk::Action> get_action_select_all_child_layers() { return action_select_all_child_layers_; }
    00106 }; // END of LayerActionManager
    00107
    00108 }; // END of namespace studio
    00109
    00110 /* === E N D =============================================================== */
    00111
    00112 #endif