~ubuntu-branches/ubuntu/quantal/gtkmm3.0/quantal

« back to all changes in this revision

Viewing changes to gtk/gtkmm/actiongroup.h

  • Committer: Package Import Robot
  • Author(s): Robert Ancell
  • Date: 2012-09-28 09:25:06 UTC
  • mfrom: (1.1.14)
  • Revision ID: package-import@ubuntu.com-20120928092506-9h63ais5o750a8sk
Tags: 3.5.13-0ubuntu1
* New upstream release
* debian/control:
  - Bump build-depends on libglibmm-2.4-dev, libgtk-3-dev

Show diffs side-by-side

added added

removed removed

Lines of Context:
7
7
#include <glibmm/ustring.h>
8
8
#include <sigc++/sigc++.h>
9
9
 
10
 
/* $Id: actiongroup.hg,v 1.17 2006/04/12 11:11:25 murrayc Exp $ */
11
 
 
12
10
/* Copyright (C) 2003 The gtkmm Development Team
13
11
 *
14
12
 * This library is free software; you can redistribute it and/or
31
29
#include <gtkmm/widget.h>
32
30
#include <gtkmm/action.h>
33
31
#include <gtkmm/accelkey.h>
34
 
 
 
32
 
35
33
 
36
34
#ifndef DOXYGEN_SHOULD_SKIP_THIS
37
35
typedef struct _GtkActionGroup GtkActionGroup;
43
41
{ class ActionGroup_Class; } // namespace Gtk
44
42
namespace Gtk
45
43
{
46
 
  
 
44
 
47
45
 
48
46
class ActionGroup
49
47
  : public Glib::Object,
105
103
  
106
104
  static Glib::RefPtr<ActionGroup> create(const Glib::ustring& name =  Glib::ustring());
107
105
 
108
 
  
 
106
 
109
107
  /** Gets the name of the action group.
110
108
   * 
111
109
   * @newin{2,4}
147
145
   * @param visible New visiblity.
148
146
   */
149
147
  void set_visible(bool visible =  true);
150
 
                                      
 
148
 
151
149
  
152
150
  /** Looks up an action in the action group by name.
153
151
   * 
180
178
   * @return An allocated list of the action objects in the action group.
181
179
   */
182
180
  std::vector< Glib::RefPtr<const Action> > get_actions() const;
183
 
    
 
181
 
184
182
  void add(const Glib::RefPtr<Action>& action);
185
183
  
186
184
  //We want it to always try to use the stock accelerator,
191
189
  
192
190
  //We need to duplicate the gtk_action_group_add_action_with_accel() implementation, because we want to
193
191
  //use AccelKey, not just the accelerator string format that is _one_ of the ways to create an AccelKey.
194
 
   
 
192
 
195
193
  //TODO: Could this whole class have an STL-style interface?
196
194
  void add(const Glib::RefPtr<Action>& action, const Action::SlotActivate& slot);
197
195
  void add(const Glib::RefPtr<Action>& action, const AccelKey& accel_key, const Action::SlotActivate& slot);
202
200
   * @param action An action.
203
201
   */
204
202
  void remove(const Glib::RefPtr<Action>& action);
205
 
  
 
203
 
206
204
   //TODO: We probably need to use this in our add_actions() implementation:
207
205
  
208
206
  /** Translates a string using the function set with 
214
212
   * @return The translation of @a string.
215
213
   */
216
214
  Glib::ustring translate_string(const Glib::ustring& str) const;
217
 
  
 
215
 
218
216
 
219
217
  //These are just C convenience methods:
220
218
  
297
295
 
298
296
  Glib::SignalProxy1< void,const Glib::RefPtr<Action>& > signal_post_activate();
299
297
 
300
 
  
 
298
 
301
299
  #ifdef GLIBMM_PROPERTIES_ENABLED
302
300
/** A name for the action group.
303
301
   *