Changed the "tagrelease" and "tagstable" make targets to use subversion. Also increme...
[synfig.git] / synfig-studio / tags / stable / src / gtkmm / layeractionmanager.h
1 /* === S I N F G =========================================================== */
2 /*!     \file template.h
3 **      \brief Template Header
4 **
5 **      $Id: layeractionmanager.h,v 1.1.1.1 2005/01/07 03:34:36 darco Exp $
6 **
7 **      \legal
8 **      Copyright (c) 2002 Robert B. Quattlebaum Jr.
9 **
10 **      This software and associated documentation
11 **      are CONFIDENTIAL and PROPRIETARY property of
12 **      the above-mentioned copyright holder.
13 **
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.
18 **      \endlegal
19 */
20 /* ========================================================================= */
21
22 /* === S T A R T =========================================================== */
23
24 #ifndef __SINFG_LAYER_ACTION_MANAGER_H
25 #define __SINFG_LAYER_ACTION_MANAGER_H
26
27 /* === H E A D E R S ======================================================= */
28
29 #include <gtkmm/uimanager.h>
30 #include <gtkmm/treeview.h>
31 #include <sinfgapp/canvasinterface.h>
32
33 /* === M A C R O S ========================================================= */
34
35 /* === T Y P E D E F S ===================================================== */
36
37 /* === C L A S S E S & S T R U C T S ======================================= */
38
39 namespace studio {
40
41 class LayerTree;
42
43 class LayerActionManager
44 {
45         Glib::RefPtr<Gtk::UIManager> ui_manager_;
46         //Glib::RefPtr<Gtk::TreeSelection> tree_selection_;
47         LayerTree* layer_tree_;
48         etl::handle<sinfgapp::CanvasInterface> canvas_interface_;
49
50         Glib::RefPtr<Gtk::ActionGroup>  action_group_;
51         Gtk::UIManager::ui_merge_id     popup_id_;
52         
53
54         Glib::RefPtr<Gtk::ActionGroup> action_group_copy_paste;
55
56         Glib::RefPtr<Gtk::Action>       action_cut_;
57         Glib::RefPtr<Gtk::Action>       action_copy_;
58         Glib::RefPtr<Gtk::Action>       action_paste_;
59
60         Glib::RefPtr<Gtk::Action>       action_amount_inc_;
61         Glib::RefPtr<Gtk::Action>       action_amount_dec_;
62         Glib::RefPtr<Gtk::Action>       action_amount_;
63
64
65         std::list<sinfg::Layer::Handle> clipboard_;
66
67         
68         sigc::connection selection_changed_connection;
69
70         bool queued;
71         sigc::connection queue_refresh_connection;
72
73         std::list<sigc::connection> update_connection_list;
74
75         void cut();
76         void copy();
77         void paste();
78
79         void amount_inc();
80         void amount_dec();
81
82 public:
83         void queue_refresh();
84
85         LayerActionManager();
86         ~LayerActionManager();
87
88         void set_ui_manager(const Glib::RefPtr<Gtk::UIManager> &x);
89         Glib::RefPtr<Gtk::UIManager> get_ui_manager()const { return ui_manager_; }
90
91         void set_layer_tree(LayerTree* x);
92         LayerTree* get_layer_tree()const { return layer_tree_; }
93
94         void set_canvas_interface(const etl::handle<sinfgapp::CanvasInterface> &x);
95         etl::handle<sinfgapp::CanvasInterface> get_canvas_interface()const { return canvas_interface_; }
96
97         etl::loose_handle<sinfgapp::Instance> get_instance()const { return canvas_interface_->get_instance(); }
98
99         void refresh();
100         void clear();
101 }; // END of LayerActionManager
102
103 }; // END of namespace studio
104
105 /* === E N D =============================================================== */
106
107 #endif