Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / radiobutton.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_RADIOBUTTON_H
4 #define _GTKMM_RADIOBUTTON_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* radiobutton.h
11  * 
12  * Copyright (C) 1998-2002 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 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.
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  * Library General Public License for more details.
23  *
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.
27  */
28
29 #include <gtkmm/checkbutton.h>
30 #include <gtkmm/radiobuttongroup.h>
31
32
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkRadioButton GtkRadioButton;
35 typedef struct _GtkRadioButtonClass GtkRadioButtonClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38
39 namespace Gtk
40 { class RadioButton_Class; } // namespace Gtk
41 namespace Gtk
42 {
43
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().
48  *
49  * @ingroup Widgets
50  */
51
52 class RadioButton : public CheckButton
53 {
54   public:
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 */
61
62   virtual ~RadioButton();
63
64 #ifndef DOXYGEN_SHOULD_SKIP_THIS
65
66 private:
67   friend class RadioButton_Class;
68   static CppClassType radiobutton_class_;
69
70   // noncopyable
71   RadioButton(const RadioButton&);
72   RadioButton& operator=(const RadioButton&);
73
74 protected:
75   explicit RadioButton(const Glib::ConstructParams& construct_params);
76   explicit RadioButton(GtkRadioButton* castitem);
77
78 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
79
80 public:
81 #ifndef DOXYGEN_SHOULD_SKIP_THIS
82   static GType get_type()      G_GNUC_CONST;
83   static GType get_base_type() G_GNUC_CONST;
84 #endif
85
86   ///Provides access to the underlying C GtkObject.
87   GtkRadioButton*       gobj()       { return reinterpret_cast<GtkRadioButton*>(gobject_); }
88
89   ///Provides access to the underlying C GtkObject.
90   const GtkRadioButton* gobj() const { return reinterpret_cast<GtkRadioButton*>(gobject_); }
91
92
93 public:
94   //C++ methods used to invoke GTK+ virtual functions:
95
96 protected:
97   //GTK+ Virtual Functions (override these to change behaviour):
98
99   //Default Signal Handlers::
100   virtual void on_group_changed();
101
102
103 private:
104
105   
106 public:
107   typedef RadioButtonGroup Group;
108
109   RadioButton();
110   explicit RadioButton(const Glib::ustring& label, bool mnemonic = false);
111
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,
115    * you may want to
116    * use the Gtk::RadioButton(const Group& group, const Glib::ustring& label, bool mnemonic)
117    * constructor directly instead.
118    */
119   explicit RadioButton(Group& group);
120
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.
124    */
125   RadioButton(Group& group, const Glib::ustring& label, bool mnemonic = false);
126   
127
128   Group get_group();
129   void set_group(Group& group);
130   void reset_group();
131   
132
133   Glib::SignalProxy0< void > signal_group_changed();
134
135
136 };
137
138 } /* namespace Gtk */
139
140
141 namespace Glib
142 {
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.
147    */
148   Gtk::RadioButton* wrap(GtkRadioButton* object, bool take_copy = false);
149 }
150 #endif /* _GTKMM_RADIOBUTTON_H */
151