2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_SIZEGROUP_H
4 #define _GTKMM_SIZEGROUP_H
12 * Copyright 2002 The gtkmm Development Team
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.
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.
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.
29 #include <glibmm/object.h>
30 #include <gtkmm/widget.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkSizeGroup GtkSizeGroup;
35 typedef struct _GtkSizeGroupClass GtkSizeGroupClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class SizeGroup_Class; } // namespace Gtk
45 /** @addtogroup gtkmmEnums Enums and Flags */
53 SIZE_GROUP_HORIZONTAL,
61 #ifndef DOXYGEN_SHOULD_SKIP_THIS
66 class Value<Gtk::SizeGroupMode> : public Glib::Value_Enum<Gtk::SizeGroupMode>
69 static GType value_type() G_GNUC_CONST;
73 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
80 class SizeGroup : public Glib::Object
83 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86 typedef SizeGroup CppObjectType;
87 typedef SizeGroup_Class CppClassType;
88 typedef GtkSizeGroup BaseObjectType;
89 typedef GtkSizeGroupClass BaseClassType;
91 private: friend class SizeGroup_Class;
92 static CppClassType sizegroup_class_;
96 SizeGroup(const SizeGroup&);
97 SizeGroup& operator=(const SizeGroup&);
100 explicit SizeGroup(const Glib::ConstructParams& construct_params);
101 explicit SizeGroup(GtkSizeGroup* castitem);
103 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
106 virtual ~SizeGroup();
108 #ifndef DOXYGEN_SHOULD_SKIP_THIS
109 static GType get_type() G_GNUC_CONST;
110 static GType get_base_type() G_GNUC_CONST;
113 ///Provides access to the underlying C GObject.
114 GtkSizeGroup* gobj() { return reinterpret_cast<GtkSizeGroup*>(gobject_); }
116 ///Provides access to the underlying C GObject.
117 const GtkSizeGroup* gobj() const { return reinterpret_cast<GtkSizeGroup*>(gobject_); }
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();
125 explicit SizeGroup(SizeGroupMode mode);
130 static Glib::RefPtr<SizeGroup> create(SizeGroupMode mode);
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.
141 void set_mode(SizeGroupMode mode);
143 /** Gets the current mode of the size group. See set_mode().
144 * @return The current mode of the size group.
146 SizeGroupMode get_mode() const;
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.
155 void add_widget(Widget& widget);
157 /** Removes a widget from a Gtk::SizeGroup.
158 * @param widget The Gtk::Widget to remove.
160 void remove_widget(Widget& widget);
162 /** The directions in which the size group effects the requested sizes of its component widgets.
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.
168 Glib::PropertyProxy<SizeGroupMode> property_mode() ;
170 /** The directions in which the size group effects the requested sizes of its component widgets.
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.
176 Glib::PropertyProxy_ReadOnly<SizeGroupMode> property_mode() const;
182 //C++ methods used to invoke GTK+ virtual functions:
185 //GTK+ Virtual Functions (override these to change behaviour):
187 //Default Signal Handlers::
192 } /* namespace Gtk */
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.
202 Glib::RefPtr<Gtk::SizeGroup> wrap(GtkSizeGroup* object, bool take_copy = false);
206 #endif /* _GTKMM_SIZEGROUP_H */