Merged revisions 6293,6296-6306,6308 via svnmerge from
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / radiomenuitem.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_RADIOMENUITEM_H
4 #define _GTKMM_RADIOMENUITEM_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* radiomenuitem.h
12  * 
13  * Copyright (C) 1998-2002 The gtkmm Development Team
14  *
15  * This library is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU Library General Public
17  * License as published by the Free Software Foundation; either
18  * version 2 of the License, or (at your option) any later version.
19  *
20  * This library is distributed in the hope that it will be useful,
21  * but WITHOUT ANY WARRANTY; without even the implied warranty of
22  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
23  * Library General Public License for more details.
24  *
25  * You should have received a copy of the GNU Library General Public
26  * License along with this library; if not, write to the Free
27  * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
28  */
29
30 #include <gtkmm/checkmenuitem.h>
31 #include <gtkmm/radiobutton.h>
32
33
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkRadioMenuItem GtkRadioMenuItem;
36 typedef struct _GtkRadioMenuItemClass GtkRadioMenuItemClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
38
39
40 namespace Gtk
41 { class RadioMenuItem_Class; } // namespace Gtk
42 namespace Gtk
43 {
44
45 class RadioMenuItem;
46
47 /** A CheckMenuItem that belongs to a group.
48  * At each instant exactly one of the menu items from a group is selected.
49  * @ingroup Menus
50  * @ingroup Widgets
51  */
52
53 class RadioMenuItem : public CheckMenuItem
54 {
55   public:
56 #ifndef DOXYGEN_SHOULD_SKIP_THIS
57   typedef RadioMenuItem CppObjectType;
58   typedef RadioMenuItem_Class CppClassType;
59   typedef GtkRadioMenuItem BaseObjectType;
60   typedef GtkRadioMenuItemClass BaseClassType;
61 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
62
63   virtual ~RadioMenuItem();
64
65 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66
67 private:
68   friend class RadioMenuItem_Class;
69   static CppClassType radiomenuitem_class_;
70
71   // noncopyable
72   RadioMenuItem(const RadioMenuItem&);
73   RadioMenuItem& operator=(const RadioMenuItem&);
74
75 protected:
76   explicit RadioMenuItem(const Glib::ConstructParams& construct_params);
77   explicit RadioMenuItem(GtkRadioMenuItem* castitem);
78
79 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
80
81 public:
82 #ifndef DOXYGEN_SHOULD_SKIP_THIS
83   static GType get_type()      G_GNUC_CONST;
84   static GType get_base_type() G_GNUC_CONST;
85 #endif
86
87   ///Provides access to the underlying C GtkObject.
88   GtkRadioMenuItem*       gobj()       { return reinterpret_cast<GtkRadioMenuItem*>(gobject_); }
89
90   ///Provides access to the underlying C GtkObject.
91   const GtkRadioMenuItem* gobj() const { return reinterpret_cast<GtkRadioMenuItem*>(gobject_); }
92
93
94 public:
95   //C++ methods used to invoke GTK+ virtual functions:
96 #ifdef GLIBMM_VFUNCS_ENABLED
97 #endif //GLIBMM_VFUNCS_ENABLED
98
99 protected:
100   //GTK+ Virtual Functions (override these to change behaviour):
101 #ifdef GLIBMM_VFUNCS_ENABLED
102 #endif //GLIBMM_VFUNCS_ENABLED
103
104   //Default Signal Handlers::
105 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
106   virtual void on_group_changed();
107 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
108
109
110 private:
111
112 public:
113   
114   typedef RadioButtonGroup Group;
115
116   RadioMenuItem(Group& groupx);
117   
118   RadioMenuItem(Group& groupx, const Glib::ustring& label, bool mnemonic = false);
119   
120
121   //We ignore the _new_*_from_widget() functions because they are just the same as calling get_group() and set_group() ourselves.
122   
123                     
124   Group get_group();
125   
126   void set_group(Group& group);
127   void reset_group();
128
129   /** Emitted when the group of radio menu items that a radio menu item belongs
130    * to changes. This is emitted when a radio menu item switches from
131    * being alone to being part of a group of 2 or more menu items, or
132    * vice-versa, and when a buttton is moved from one group of 2 or
133    * more menu items to a different one, but not when the composition
134    * of the group that a menu item belongs to changes.
135    *
136    * @par Prototype:
137    * <tt>void on_my_%group_changed()</tt>
138    */
139
140   Glib::SignalProxy0< void > signal_group_changed();
141
142
143 protected:
144   void constructor(const Group& group);
145
146
147 };
148
149 } /* namspace Gtk */
150
151
152 namespace Glib
153 {
154   /** A Glib::wrap() method for this object.
155    * 
156    * @param object The C instance.
157    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
158    * @result A C++ instance that wraps this C instance.
159    *
160    * @relates Gtk::RadioMenuItem
161    */
162   Gtk::RadioMenuItem* wrap(GtkRadioMenuItem* object, bool take_copy = false);
163 } //namespace Glib
164
165
166 #endif /* _GTKMM_RADIOMENUITEM_H */
167