my log
[synfig.git] / synfig-studio / trunk / src / gtkmm / groupactionmanager.h
1 /* === S Y N F I G ========================================================= */
2 /*!     \file template.h
3 **      \brief Template Header
4 **
5 **      $Id: groupactionmanager.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 __SYNFIG_GROUP_ACTION_MANAGER_H
25 #define __SYNFIG_GROUP_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 <synfigapp/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 LayerGroupTree;
42
43 class GroupActionManager
44 {
45         Glib::RefPtr<Gtk::UIManager> ui_manager_;
46         LayerGroupTree* group_tree_;
47         etl::handle<synfigapp::CanvasInterface> canvas_interface_;
48
49         Glib::RefPtr<Gtk::ActionGroup>  action_group_;
50         Gtk::UIManager::ui_merge_id     popup_id_;
51         
52         sigc::connection selection_changed_connection;
53
54         bool queued;
55         sigc::connection queue_refresh_connection;
56
57 private:
58         
59         void on_action_add();
60
61 public:
62         void queue_refresh();
63
64         GroupActionManager();
65         ~GroupActionManager();
66
67         void set_ui_manager(const Glib::RefPtr<Gtk::UIManager> &x);
68         Glib::RefPtr<Gtk::UIManager> get_ui_manager()const { return ui_manager_; }
69
70         void set_group_tree(LayerGroupTree* x);
71         LayerGroupTree* get_group_tree()const { return group_tree_; }
72
73         void set_canvas_interface(const etl::handle<synfigapp::CanvasInterface> &x);
74         etl::handle<synfigapp::CanvasInterface> get_canvas_interface()const { return canvas_interface_; }
75
76         void refresh();
77         void clear();
78 }; // END of GroupActionManager
79
80 }; // END of namespace studio
81
82 /* === E N D =============================================================== */
83
84 #endif