~inkscape.dev/inkscape-devlibs/devlibs-gtk3

« back to all changes in this revision

Viewing changes to include/gtkmm-2.4/gtkmm/radiobuttongroup.h

  • Committer: JazzyNico
  • Date: 2013-01-21 10:11:05 UTC
  • Revision ID: nicoduf@yahoo.fr-20130121101105-i8d8slkq9ng4olx8
Adding gtk2 libraries.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
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
 
 
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.
 
46
 */
 
47
class RadioButtonGroup
 
48
{
 
49
public:
 
50
  RadioButtonGroup();
 
51
  RadioButtonGroup(const RadioButtonGroup& src);
 
52
 
 
53
  RadioButtonGroup& operator=(const RadioButtonGroup& src);
 
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 */