more fixes on the long road to compiling
[ardour.git] / gtk2_ardour / actions.h
1 #ifndef __ardour_gtk_actions_h__
2 #define __ardour_gtk_actions_h__
3
4 #include <vector>
5 #include <gtkmm/action.h>
6 #include <gtkmm/radioaction.h>
7 #include <gtkmm/toggleaction.h>
8 #include <gtkmm/actiongroup.h>
9
10 namespace Gtk {
11         class UIManager;
12 }
13
14 namespace ActionManager
15 {
16         extern std::vector<Glib::RefPtr<Gtk::Action> > session_sensitive_actions;
17         extern std::vector<Glib::RefPtr<Gtk::Action> > region_list_selection_sensitive_actions;
18         extern std::vector<Glib::RefPtr<Gtk::Action> > region_selection_sensitive_actions;
19         extern std::vector<Glib::RefPtr<Gtk::Action> > track_selection_sensitive_actions;
20         extern std::vector<Glib::RefPtr<Gtk::Action> > plugin_selection_sensitive_actions;
21         extern std::vector<Glib::RefPtr<Gtk::Action> > range_sensitive_actions;
22         extern std::vector<Glib::RefPtr<Gtk::Action> > jack_sensitive_actions;
23
24         extern std::string unbound_string;  /* the key string returned if an action is not bound */
25
26         void register_ui_manager (Glib::RefPtr<Gtk::UIManager>);
27
28         Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
29                                                    std::string name, std::string label);
30         Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
31                                                    std::string name, std::string label, sigc::slot<void> sl, 
32                                                    guint key, Gdk::ModifierType mods);
33         Glib::RefPtr<Gtk::Action> register_action (Glib::RefPtr<Gtk::ActionGroup> group, 
34                                                    std::string name, std::string label, sigc::slot<void> sl);
35         
36         Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group, 
37                                                          std::string name, std::string label, sigc::slot<void> sl, 
38                                                          guint key, Gdk::ModifierType mods);
39         Glib::RefPtr<Gtk::Action> register_radio_action (Glib::RefPtr<Gtk::ActionGroup> group, Gtk::RadioAction::Group, 
40                                                          std::string name, std::string label, sigc::slot<void> sl);
41         
42         Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, 
43                                                           std::string name, std::string label, sigc::slot<void> sl, 
44                                                           guint key, Gdk::ModifierType mods);
45         Glib::RefPtr<Gtk::Action> register_toggle_action (Glib::RefPtr<Gtk::ActionGroup> group, 
46                                                           std::string name, std::string label, sigc::slot<void> sl);
47
48         void merge_actions (Glib::RefPtr<Gtk::ActionGroup> dst, const Glib::RefPtr<Gtk::ActionGroup> src);
49
50 };
51
52 #endif /* __ardour_gtk_actions_h__ */