Ardour  9.0-pre0-582-g084a23a80d
toggleaction.h
Go to the documentation of this file.
1 // -*- c++ -*-
2 // Generated by gmmproc 2.45.3 -- DO NOT MODIFY!
3 #ifndef _GTKMM_TOGGLEACTION_H
4 #define _GTKMM_TOGGLEACTION_H
5 
6 
7 #include <glibmm/ustring.h>
8 #include <sigc++/sigc++.h>
9 
10 /* $Id: toggleaction.hg,v 1.5 2004/07/01 08:55:45 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/action.h>
30 
31 
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkToggleAction GtkToggleAction;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36 
37 
38 #ifndef DOXYGEN_SHOULD_SKIP_THIS
39 namespace Gtk
40 { class ToggleAction_Class; } // namespace Gtk
41 #endif //DOXYGEN_SHOULD_SKIP_THIS
42 
43 namespace Gtk
44 {
45 
53 class ToggleAction : public Gtk::Action
54 {
55 
56 #ifndef DOXYGEN_SHOULD_SKIP_THIS
57 
58 public:
59  typedef ToggleAction CppObjectType;
60  typedef ToggleAction_Class CppClassType;
61  typedef GtkToggleAction BaseObjectType;
62  typedef GtkToggleActionClass BaseClassType;
63 
64 private: friend class ToggleAction_Class;
65  static CppClassType toggleaction_class_;
66 
67 private:
68  // noncopyable
69  ToggleAction(const ToggleAction&);
70  ToggleAction& operator=(const ToggleAction&);
71 
72 protected:
73  explicit ToggleAction(const Glib::ConstructParams& construct_params);
74  explicit ToggleAction(GtkToggleAction* castitem);
75 
76 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
77 
78 public:
79  virtual ~ToggleAction();
80 
83  static GType get_type() G_GNUC_CONST;
84 
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86 
87 
88  static GType get_base_type() G_GNUC_CONST;
89 #endif
90 
92  GtkToggleAction* gobj() { return reinterpret_cast<GtkToggleAction*>(gobject_); }
93 
95  const GtkToggleAction* gobj() const { return reinterpret_cast<GtkToggleAction*>(gobject_); }
96 
99 
100 private:
101 
102 
103 protected:
106 
117  explicit ToggleAction(const Glib::ustring& name, const StockID& stock_id = StockID(), const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring(), bool is_active = false);
118 
130  explicit ToggleAction(const Glib::ustring& name, const Glib::ustring& icon_name, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring(), bool is_active = false);
131 
132 public:
133  //Note that gtk_toggle_action_new() does not allow name to be NULL, which suggests that we should not have a default constructor,
134  //but it's OK to set the name later:
135 
136  static Glib::RefPtr<ToggleAction> create();
137 
138 
148  static Glib::RefPtr<ToggleAction> create(const Glib::ustring& name, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring(), bool is_active = false);
149 
163  static Glib::RefPtr<ToggleAction> create(const Glib::ustring& name, const Gtk::StockID& stock_id, const Glib::ustring& label = Glib::ustring(), const Glib::ustring& tooltip = Glib::ustring(), bool is_active = false);
164 
178  static Glib::RefPtr<ToggleAction> create_with_icon_name(const Glib::ustring& name, const Glib::ustring& icon_name, const Glib::ustring& label, const Glib::ustring& tooltip, bool is_active = false);
179 
180 
183  void toggled();
184 
189  void set_active(bool is_active = true);
190 
195  bool get_active() const;
196 
202  void set_draw_as_radio(bool draw_as_radio = true);
203 
208  bool get_draw_as_radio() const;
209 
210 
217  Glib::SignalProxy0< void > signal_toggled();
218 
219 
225  Glib::PropertyProxy< bool > property_draw_as_radio() ;
226 
232  Glib::PropertyProxy_ReadOnly< bool > property_draw_as_radio() const;
233 
239  Glib::PropertyProxy< bool > property_active() ;
240 
246  Glib::PropertyProxy_ReadOnly< bool > property_active() const;
247 
248 
249 public:
250 
251 public:
252  //C++ methods used to invoke GTK+ virtual functions:
253 
254 protected:
255  //GTK+ Virtual Functions (override these to change behaviour):
256 
257  //Default Signal Handlers::
259  virtual void on_toggled();
260 
261 
262 };
263 
264 } // namespace Gtk
265 
266 
267 namespace Glib
268 {
277  Glib::RefPtr<Gtk::ToggleAction> wrap(GtkToggleAction* object, bool take_copy = false);
278 }
279 
280 
281 #endif /* _GTKMM_TOGGLEACTION_H */
282 
virtual ~ToggleAction()
GtkToggleAction * gobj()
Provides access to the underlying C GObject.
Definition: toggleaction.h:92
static Glib::RefPtr< ToggleAction > create(const Glib::ustring &name, const Gtk::StockID &stock_id, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
Glib::PropertyProxy_ReadOnly< bool > property_active() const
ToggleAction(const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
void set_draw_as_radio(bool draw_as_radio=true)
void set_active(bool is_active=true)
bool get_draw_as_radio() const
static Glib::RefPtr< ToggleAction > create(const Glib::ustring &name, const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
bool get_active() const
Glib::SignalProxy0< void > signal_toggled()
Glib::PropertyProxy< bool > property_draw_as_radio()
Glib::RefPtr< Gtk::ToggleAction > wrap(GtkToggleAction *object, bool take_copy=false)
Glib::PropertyProxy< bool > property_active()
Glib::PropertyProxy_ReadOnly< bool > property_draw_as_radio() const
static Glib::RefPtr< ToggleAction > create_with_icon_name(const Glib::ustring &name, const Glib::ustring &icon_name, const Glib::ustring &label, const Glib::ustring &tooltip, bool is_active=false)
virtual void on_toggled()
This is a default handler for the signal signal_toggled().
GtkToggleAction * gobj_copy()
Provides access to the underlying C instance. The caller is responsible for unrefing it....
const GtkToggleAction * gobj() const
Provides access to the underlying C GObject.
Definition: toggleaction.h:95
static GType get_type() G_GNUC_CONST
ToggleAction(const Glib::ustring &name, const StockID &stock_id=StockID(), const Glib::ustring &label=Glib::ustring(), const Glib::ustring &tooltip=Glib::ustring(), bool is_active=false)
static Glib::RefPtr< ToggleAction > create()
GtkImageIconNameData name
Definition: gtkimage.h:6
Definition: ardour_ui.h:188