Ardour  9.0-pre0-582-g084a23a80d
actiongroup.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_ACTIONGROUP_H
4 #define _GTKMM_ACTIONGROUP_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: actiongroup.hg,v 1.17 2006/04/12 11:11:25 murrayc Exp $ */
11 
12 /* Copyright (C) 2003 The gtkmm Development Team
13  *
14  * This library is free software; you can redistribute it and/or
15  * modify it under the terms of the GNU Lesser General Public
16  * License as published by the Free Software Foundation; either
17  * version 2.1 of the License, or (at your option) any later version.
18  *
19  * This library is distributed in the hope that it will be useful,
20  * but WITHOUT ANY WARRANTY; without even the implied warranty of
21  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
22  * Lesser General Public License for more details.
23  *
24  * You should have received a copy of the GNU Lesser General Public
25  * License along with this library; if not, write to the Free
26  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
27  */
28 
29 #include <gtkmm/widget.h>
30 #include <gtkmm/action.h>
31 #include <gtkmm/accelkey.h>
32 
33 
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkActionGroup GtkActionGroup;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38 
39 
40 #ifndef DOXYGEN_SHOULD_SKIP_THIS
41 namespace Gtk
42 { class ActionGroup_Class; } // namespace Gtk
43 #endif //DOXYGEN_SHOULD_SKIP_THIS
44 
45 namespace Gtk
46 {
47 
48 
49 class ActionGroup : public Glib::Object
50 {
51 
52 #ifndef DOXYGEN_SHOULD_SKIP_THIS
53 
54 public:
55  typedef ActionGroup CppObjectType;
56  typedef ActionGroup_Class CppClassType;
57  typedef GtkActionGroup BaseObjectType;
58  typedef GtkActionGroupClass BaseClassType;
59 
60 private: friend class ActionGroup_Class;
61  static CppClassType actiongroup_class_;
62 
63 private:
64  // noncopyable
65  ActionGroup(const ActionGroup&);
66  ActionGroup& operator=(const ActionGroup&);
67 
68 protected:
69  explicit ActionGroup(const Glib::ConstructParams& construct_params);
70  explicit ActionGroup(GtkActionGroup* castitem);
71 
72 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
73 
74 public:
75  virtual ~ActionGroup();
76 
79  static GType get_type() G_GNUC_CONST;
80 
81 #ifndef DOXYGEN_SHOULD_SKIP_THIS
82 
83 
84  static GType get_base_type() G_GNUC_CONST;
85 #endif
86 
88  GtkActionGroup* gobj() { return reinterpret_cast<GtkActionGroup*>(gobject_); }
89 
91  const GtkActionGroup* gobj() const { return reinterpret_cast<GtkActionGroup*>(gobject_); }
92 
95 
96 private:
97 
98 
99 protected:
100  explicit ActionGroup(const Glib::ustring& name = Glib::ustring());
101 
102 
103 public:
104 
105  static Glib::RefPtr<ActionGroup> create(const Glib::ustring& name = Glib::ustring());
106 
107 
112  Glib::ustring get_name() const;
113 
114 
122  bool get_sensitive() const;
123 
128  void set_sensitive(bool sensitive = true);
129 
137  bool get_visible() const;
138 
143  void set_visible(bool visible = true);
144 
145 
151  Glib::RefPtr<Action> get_action(const Glib::ustring& action_name);
152 
158  Glib::RefPtr<const Action> get_action(const Glib::ustring& action_name) const;
159 
160 
165  Glib::ListHandle< Glib::RefPtr<Action> > get_actions();
166 
171  Glib::ListHandle< Glib::RefPtr<const Action> > get_actions() const;
172 
173  void add(const Glib::RefPtr<Action>& action);
174 
175  //We want it to always try to use the stock accelerator,
176  //so we use gtk_action_group_add_action_with_accel(), instead of gtk_action_group_add_action(),
177  //passing null for the accelerator.
178 
179  void add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key);
180 
181  //We need to duplicate the gtk_action_group_add_action_with_accel() implementation, because we want to
182  //use AccelKey, not just the accelerator string format that is _one_ of the ways to create an AccelKey.
183 
184  //TODO: Could this whole class have an STL-style interface?
185  void add(const Glib::RefPtr<Action>& action, const Action::SlotActivate& slot);
186  void add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key, const Action::SlotActivate& slot);
187 
192  void remove(const Glib::RefPtr<Action>& action);
193 
194  //TODO: We probably need to use this in our add_actions() implementation:
195 
202  Glib::ustring translate_string(const Glib::ustring& str) const;
203 
204 
205  //These are just C convenience methods:
206 
207  //These are also just C convenience methods that are useless unless you are using the other convenience methods:
208 
209 
230  Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_connect_proxy();
231 
232 
248  Glib::SignalProxy2< void,const Glib::RefPtr<Action>&,Widget* > signal_disconnect_proxy();
249 
250 
264  Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_pre_activate();
265 
266 
280  Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_post_activate();
281 
282 
288  Glib::PropertyProxy_ReadOnly< Glib::ustring > property_name() const;
289 
290 
296  Glib::PropertyProxy< bool > property_sensitive() ;
297 
303  Glib::PropertyProxy_ReadOnly< bool > property_sensitive() const;
304 
310  Glib::PropertyProxy< bool > property_visible() ;
311 
317  Glib::PropertyProxy_ReadOnly< bool > property_visible() const;
318 
319 
320 public:
321 
322 public:
323  //C++ methods used to invoke GTK+ virtual functions:
324 
325 protected:
326  //GTK+ Virtual Functions (override these to change behaviour):
327 
328  //Default Signal Handlers::
329 
330 
331 };
332 
333 } // namespace Gtk
334 
335 
336 namespace Glib
337 {
346  Glib::RefPtr<Gtk::ActionGroup> wrap(GtkActionGroup* object, bool take_copy = false);
347 }
348 
349 
350 #endif /* _GTKMM_ACTIONGROUP_H */
351 
Glib::PropertyProxy< bool > property_visible()
Glib::ustring get_name() const
void set_visible(bool visible=true)
ActionGroup(const Glib::ustring &name=Glib::ustring())
Glib::SignalProxy1< void, const Glib::RefPtr< Action > & > signal_pre_activate()
Glib::SignalProxy1< void, const Glib::RefPtr< Action > & > signal_post_activate()
void set_sensitive(bool sensitive=true)
GtkActionGroup * gobj()
Provides access to the underlying C GObject.
Definition: actiongroup.h:88
bool get_visible() const
Glib::ustring translate_string(const Glib::ustring &str) const
virtual ~ActionGroup()
static GType get_type() G_GNUC_CONST
Glib::PropertyProxy_ReadOnly< bool > property_visible() const
Glib::SignalProxy2< void, const Glib::RefPtr< Action > &, Widget * > signal_connect_proxy()
Glib::PropertyProxy_ReadOnly< bool > property_sensitive() const
Glib::PropertyProxy< bool > property_sensitive()
static Glib::RefPtr< ActionGroup > create(const Glib::ustring &name=Glib::ustring())
void remove(const Glib::RefPtr< Action > &action)
Glib::RefPtr< Gtk::ActionGroup > wrap(GtkActionGroup *object, bool take_copy=false)
Glib::RefPtr< Action > get_action(const Glib::ustring &action_name)
GtkActionGroup * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
Glib::ListHandle< Glib::RefPtr< Action > > get_actions()
void add(const Glib::RefPtr< Action > &action)
Glib::RefPtr< const Action > get_action(const Glib::ustring &action_name) const
void add(const Glib::RefPtr< Action > &action, const Action::SlotActivate &slot)
const GtkActionGroup * gobj() const
Provides access to the underlying C GObject.
Definition: actiongroup.h:91
void add(const Glib::RefPtr< Action > &action, const AccelKey &accel_key, const Action::SlotActivate &slot)
void add(const Glib::RefPtr< Action > &action, const AccelKey &accel_key)
Glib::ListHandle< Glib::RefPtr< const Action > > get_actions() const
Glib::SignalProxy2< void, const Glib::RefPtr< Action > &, Widget * > signal_disconnect_proxy()
Glib::PropertyProxy_ReadOnly< Glib::ustring > property_name() const
bool get_sensitive() const
sigc::slot< void > SlotActivate
For instance, void on_activate();.
Definition: action.h:375
GtkImageIconNameData name
Definition: gtkimage.h:6
Definition: ardour_ui.h:188