3 /* Copyright(C) 2003 The gtkmm Development Team
5 * This library is free software; you can redistribute it and/or
6 * modify it under the terms of the GNU Library General Public
7 * License as published by the Free Software Foundation; either
8 * version 2 of the License, or(at your option) any later version.
10 * This library is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
13 * Library General Public License for more details.
15 * You should have received a copy of the GNU Library General Public
16 * License along with this library; if not, write to the Free
17 * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
20 #include <gtkmm/radiobuttongroup.h>
22 #include <gtkmm/radiobutton.h>
23 #include <gtkmm/radiomenuitem.h>
24 #include <gtkmm/radioaction.h>
25 #include <gtkmm/radiotoolbutton.h>
26 #include <gtk/gtkradiobutton.h>
27 #include <gtk/gtkradioaction.h>
28 #include <gtk/gtkradiomenuitem.h>
29 #include <gtk/gtkradiotoolbutton.h>
34 RadioButtonGroup::RadioButtonGroup()
38 RadioButtonGroup::RadioButtonGroup(GSList* group)
43 RadioButtonGroup::RadioButtonGroup(const RadioButtonGroup& src)
48 RadioButtonGroup& RadioButtonGroup::operator=(const RadioButtonGroup& src)
54 void RadioButtonGroup::add(RadioButton& item)
56 item.set_group(*this);
58 //probably not necessary:
59 group_ = gtk_radio_button_get_group(item.gobj());
62 void RadioButtonGroup::add(RadioMenuItem& item)
64 item.set_group(*this);
66 //probably not necessary:
67 group_ = item.gobj()->group;
70 void RadioButtonGroup::add(const Glib::RefPtr<RadioAction>& item)
72 item->set_group(*this);
74 //probably not necessary:
75 group_ = gtk_radio_action_get_group(item->gobj());
78 void RadioButtonGroup::add(RadioToolButton& item)
80 item.set_group(*this);
82 //probably not necessary:
83 group_ = gtk_radio_tool_button_get_group(item.gobj());