1
#ifndef _GTKMM_RADIOBUTTONGROUP_H
2
#define _GTKMM_RADIOBUTTONGROUP_H
7
* Copyright(C) 2001-2002 The gtkmm Development Team
9
* This library is free software; you can redistribute it and/or
10
* modify it under the terms of the GNU Lesser General Public
11
* License as published by the Free Software Foundation; either
12
* version 2.1 of the License, or(at your option) any later version.
14
* This library is distributed in the hope that it will be useful,
15
* but WITHOUT ANY WARRANTY; without even the implied warranty of
16
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
17
* Lesser General Public License for more details.
19
* You should have received a copy of the GNU Lesser General Public
20
* License along with this library; if not, write to the Free
21
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
24
#include <glibmm/object.h> //For RefPtr<> and size_t
26
#ifndef DOXYGEN_SHOULD_SKIP_THIS
29
typedef struct _GSList GSList;
31
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
39
class RadioToolButton;
41
/** RadioButtonGroup identifier for RadioButtons
42
* To set up this RadioButtonGroup, construct a RadioButtonGroup and then pass it
43
* to the constructor of all radio items. You do not need
44
* to keep the RadioButtonGroup beyond the initial construction.
45
* It should not be instantiated with new, and it will be invalid after the RadioButtons have been deleted.
47
class RadioButtonGroup
51
RadioButtonGroup(const RadioButtonGroup& src);
53
RadioButtonGroup& operator=(const RadioButtonGroup& src);
56
explicit RadioButtonGroup(GSList* group);
58
friend class Gtk::RadioButton;
59
friend class Gtk::RadioMenuItem;
60
friend class Gtk::RadioAction;
61
friend class Gtk::RadioToolButton;
64
//These all have similar interfaces.
65
//TODO: Add a common multiply-inherited base class, with set_group()=0?
66
// Would that anything useful other than being tidy? murrayc
67
void add(RadioButton& item);
68
void add(RadioMenuItem& item);
69
void add(const Glib::RefPtr<RadioAction>& item);
70
void add(RadioToolButton& item);
72
void* operator new(size_t); // not implemented
80
#endif /* _GTKMM_RADIOBUTTONGROUP_H */