Ardour  9.0-pre0-582-g084a23a80d
radiobuttongroup.h
Go to the documentation of this file.
1 #ifndef _GTKMM_RADIOBUTTONGROUP_H
2 #define _GTKMM_RADIOBUTTONGROUP_H
3 /* $Id$ */
4 
5 /* radiobuttongroup.h
6  *
7  * Copyright(C) 2001-2002 The gtkmm Development Team
8  *
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.
13  *
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.
18  *
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.
22  */
23 
24 #include <glibmm/object.h> //For RefPtr<> and size_t
25 
26 #ifndef DOXYGEN_SHOULD_SKIP_THIS
27 extern "C"
28 {
29  typedef struct _GSList GSList;
30 }
31 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
32 
33 namespace Gtk
34 {
35 
36 class RadioButton;
37 class RadioMenuItem;
38 class RadioAction;
39 class RadioToolButton;
40 
48 {
49 public:
52 
54 
55 protected:
56  explicit RadioButtonGroup(GSList* group);
57 
58  friend class Gtk::RadioButton;
59  friend class Gtk::RadioMenuItem;
60  friend class Gtk::RadioAction;
61  friend class Gtk::RadioToolButton;
62 
63 
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);
71 
72  void* operator new(size_t); // not implemented
73 
74  GSList* group_;
75 };
76 
77 } // namespace Gtk
78 
79 
80 #endif /* _GTKMM_RADIOBUTTONGROUP_H */
RadioButtonGroup & operator=(const RadioButtonGroup &src)
void add(const Glib::RefPtr< RadioAction > &item)
void add(RadioMenuItem &item)
RadioButtonGroup(const RadioButtonGroup &src)
RadioButtonGroup(GSList *group)
void add(RadioButton &item)
void add(RadioToolButton &item)
Definition: ardour_ui.h:188