2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_RADIOBUTTON_H
4 #define _GTKMM_RADIOBUTTON_H
12 * Copyright (C) 1998-2002 The gtkmm Development Team
14 * This library is free software; you can redistribute it and/or
15 * modify it under the terms of the GNU Library General Public
16 * License as published by the Free Software Foundation; either
17 * version 2 of the License, or (at your option) any later version.
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 * Library General Public License for more details.
24 * You should have received a copy of the GNU Library 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.
29 #include <gtkmm/checkbutton.h>
30 #include <gtkmm/radiobuttongroup.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkRadioButton GtkRadioButton;
35 typedef struct _GtkRadioButtonClass GtkRadioButtonClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class RadioButton_Class; } // namespace Gtk
44 /** A single radio button performs the same basic function as a Gtk::CheckButton, as its position in the object hierarchy reflects. It is only when multiple radio buttons are grouped together that they become a different user interface component in their own right.
45 * Every radio button is a member of some group of radio buttons. When one is selected, all other radio buttons in the same group are deselected. A Gtk::RadioButton gives the user a choice from many options.
46 * After constructing the first RadioButton in a group, use get_group() and provide this Group to the constructors ot the other RadioButtons in the same group.
47 * To remove a Gtk::RadioButton from one group and make it part of a new one, use set_group().
52 class RadioButton : public CheckButton
55 #ifndef DOXYGEN_SHOULD_SKIP_THIS
56 typedef RadioButton CppObjectType;
57 typedef RadioButton_Class CppClassType;
58 typedef GtkRadioButton BaseObjectType;
59 typedef GtkRadioButtonClass BaseClassType;
60 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
62 virtual ~RadioButton();
64 #ifndef DOXYGEN_SHOULD_SKIP_THIS
67 friend class RadioButton_Class;
68 static CppClassType radiobutton_class_;
71 RadioButton(const RadioButton&);
72 RadioButton& operator=(const RadioButton&);
75 explicit RadioButton(const Glib::ConstructParams& construct_params);
76 explicit RadioButton(GtkRadioButton* castitem);
78 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
81 #ifndef DOXYGEN_SHOULD_SKIP_THIS
82 static GType get_type() G_GNUC_CONST;
83 static GType get_base_type() G_GNUC_CONST;
86 ///Provides access to the underlying C GtkObject.
87 GtkRadioButton* gobj() { return reinterpret_cast<GtkRadioButton*>(gobject_); }
89 ///Provides access to the underlying C GtkObject.
90 const GtkRadioButton* gobj() const { return reinterpret_cast<GtkRadioButton*>(gobject_); }
94 //C++ methods used to invoke GTK+ virtual functions:
97 //GTK+ Virtual Functions (override these to change behaviour):
99 //Default Signal Handlers::
100 virtual void on_group_changed();
107 typedef RadioButtonGroup Group;
110 explicit RadioButton(const Glib::ustring& label, bool mnemonic = false);
112 /** Create an empty RadioButton belonging to the specified group,
113 * into which you can add() a widget.
114 * If you wish to add a Gtk::Label,
116 * use the Gtk::RadioButton(const Group& group, const Glib::ustring& label, bool mnemonic)
117 * constructor directly instead.
119 explicit RadioButton(Group& group);
121 /** Create a button belonging to the specified group, with a label inside.
122 * You won't be able to add a widget to this button
123 * since it already contains a Gtk::Label.
125 RadioButton(Group& group, const Glib::ustring& label, bool mnemonic = false);
129 void set_group(Group& group);
133 Glib::SignalProxy0< void > signal_group_changed();
138 } /* namespace Gtk */
143 /** @relates Gtk::RadioButton
144 * @param object The C instance
145 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
146 * @result A C++ instance that wraps this C instance.
148 Gtk::RadioButton* wrap(GtkRadioButton* object, bool take_copy = false);
150 #endif /* _GTKMM_RADIOBUTTON_H */