Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / sizegroup.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_SIZEGROUP_H
4 #define _GTKMM_SIZEGROUP_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* box.h
11  *
12  * Copyright 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 <glibmm/object.h>
30 #include <gtkmm/widget.h>
31
32
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkSizeGroup GtkSizeGroup;
35 typedef struct _GtkSizeGroupClass GtkSizeGroupClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38
39 namespace Gtk
40 { class SizeGroup_Class; } // namespace Gtk
41 namespace Gtk
42 {
43
44
45 /** @addtogroup gtkmmEnums Enums and Flags */
46
47 /**
48  * @ingroup gtkmmEnums
49  */
50 enum SizeGroupMode
51 {
52   SIZE_GROUP_NONE,
53   SIZE_GROUP_HORIZONTAL,
54   SIZE_GROUP_VERTICAL,
55   SIZE_GROUP_BOTH
56 };
57
58 } // namespace Gtk
59
60
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
62 namespace Glib
63 {
64
65 template <>
66 class Value<Gtk::SizeGroupMode> : public Glib::Value_Enum<Gtk::SizeGroupMode>
67 {
68 public:
69   static GType value_type() G_GNUC_CONST;
70 };
71
72 } // namespace Glib
73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
74
75
76 namespace Gtk
77 {
78
79
80 class SizeGroup : public Glib::Object
81 {
82   
83 #ifndef DOXYGEN_SHOULD_SKIP_THIS
84
85 public:
86   typedef SizeGroup CppObjectType;
87   typedef SizeGroup_Class CppClassType;
88   typedef GtkSizeGroup BaseObjectType;
89   typedef GtkSizeGroupClass BaseClassType;
90
91 private:  friend class SizeGroup_Class;
92   static CppClassType sizegroup_class_;
93
94 private:
95   // noncopyable
96   SizeGroup(const SizeGroup&);
97   SizeGroup& operator=(const SizeGroup&);
98
99 protected:
100   explicit SizeGroup(const Glib::ConstructParams& construct_params);
101   explicit SizeGroup(GtkSizeGroup* castitem);
102
103 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
104
105 public:
106   virtual ~SizeGroup();
107
108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109   static GType get_type()      G_GNUC_CONST;
110   static GType get_base_type() G_GNUC_CONST;
111 #endif
112
113   ///Provides access to the underlying C GObject.
114   GtkSizeGroup*       gobj()       { return reinterpret_cast<GtkSizeGroup*>(gobject_); }
115
116   ///Provides access to the underlying C GObject.
117   const GtkSizeGroup* gobj() const { return reinterpret_cast<GtkSizeGroup*>(gobject_); }
118
119   ///Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.
120   GtkSizeGroup* gobj_copy();
121
122 private:
123
124 protected:
125   explicit SizeGroup(SizeGroupMode mode);
126
127 public:
128
129   
130   static Glib::RefPtr<SizeGroup> create(SizeGroupMode mode);
131
132
133   /** Sets the Gtk::SizeGroupMode of the size group. The mode of the size
134    * group determines whether the widgets in the size group should
135    * all have the same horizontal requisition (Gtk::SIZE_GROUP_MODE_HORIZONTAL)
136    * all have the same vertical requisition (Gtk::SIZE_GROUP_MODE_VERTICAL),
137    * or should all have the same requisition in both directions
138    * (Gtk::SIZE_GROUP_MODE_BOTH).
139    * @param mode The mode to set for the size group.
140    */
141   void set_mode(SizeGroupMode mode);
142   
143   /** Gets the current mode of the size group. See set_mode().
144    * @return The current mode of the size group.
145    */
146   SizeGroupMode get_mode() const;
147   
148   /** Adds a widget to a Gtk::SizeGroup. In the future, the requisition
149    * of the widget will be determined as the maximum of its requisition
150    * and the requisition of the other widgets in the size group.
151    * Whether this applies horizontally, vertically, or in both directions
152    * depends on the mode of the size group. See set_mode().
153    * @param widget The Gtk::Widget to add.
154    */
155   void add_widget(Widget& widget);
156   
157   /** Removes a widget from a Gtk::SizeGroup.
158    * @param widget The Gtk::Widget to remove.
159    */
160   void remove_widget(Widget& widget);
161
162   /** The directions in which the size group effects the requested sizes of its component widgets.
163    *
164    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
165    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
166    * the value of the property changes.
167    */
168   Glib::PropertyProxy<SizeGroupMode> property_mode() ;
169
170 /** The directions in which the size group effects the requested sizes of its component widgets.
171    *
172    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
173    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
174    * the value of the property changes.
175    */
176   Glib::PropertyProxy_ReadOnly<SizeGroupMode> property_mode() const;
177
178
179 public:
180
181 public:
182   //C++ methods used to invoke GTK+ virtual functions:
183
184 protected:
185   //GTK+ Virtual Functions (override these to change behaviour):
186
187   //Default Signal Handlers::
188
189
190 };
191
192 } /* namespace Gtk */
193
194
195 namespace Glib
196 {
197   /** @relates Gtk::SizeGroup
198    * @param object The C instance
199    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
200    * @result A C++ instance that wraps this C instance.
201    */
202   Glib::RefPtr<Gtk::SizeGroup> wrap(GtkSizeGroup* object, bool take_copy = false);
203 }
204
205
206 #endif /* _GTKMM_SIZEGROUP_H */
207