2
// Generated by gtkmmproc -- DO NOT MODIFY!
3
#ifndef _GTKMM_ALIGNMENT_H
4
#define _GTKMM_ALIGNMENT_H
9
/* $Id: alignment.hg,v 1.5 2004/04/29 19:58:02 murrayc Exp $ */
13
* Copyright (C) 1998-2002 The gtkmm Development Team
15
* This library is free software; you can redistribute it and/or
16
* modify it under the terms of the GNU Lesser General Public
17
* License as published by the Free Software Foundation; either
18
* version 2.1 of the License, or (at your option) any later version.
20
* This library is distributed in the hope that it will be useful,
21
* but WITHOUT ANY WARRANTY; without even the implied warranty of
22
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
23
* Lesser General Public License for more details.
25
* You should have received a copy of the GNU Lesser General Public
26
* License along with this library; if not, write to the Free
27
* Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30
#include <gtkmm/bin.h>
33
#ifndef DOXYGEN_SHOULD_SKIP_THIS
34
typedef struct _GtkAlignment GtkAlignment;
35
typedef struct _GtkAlignmentClass GtkAlignmentClass;
36
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
40
{ class Alignment_Class; } // namespace Gtk
44
/** A widget which controls the alignment and size of its child.
46
* Normally, a widget is allocated at least as much size as it requests, and,
47
* most widgets expand to fill any extra allocated space, but sometimes
48
* this behavior is not desired. The alignment widget allows the
49
* programmer to specify how a widget should expand and position itself
50
* to fill the area it is allocated.
52
* It has four settings: xscale, yscale, xalign, and yalign:
53
* The scale settings specify how much the child widget should expand to fill the space allocated to the Gtk::Alignment. The values can range from 0 (meaning the child doesn't expand at all) to 1 (meaning the child expands to fill all of the available space).
54
* The align settings place the child widget within the available area. The values range from 0 (top or left) to 1 (bottom or right). Of course, if the scale settings are both set to 1, the alignment settings have no effect.
60
class Alignment : public Bin
63
#ifndef DOXYGEN_SHOULD_SKIP_THIS
64
typedef Alignment CppObjectType;
65
typedef Alignment_Class CppClassType;
66
typedef GtkAlignment BaseObjectType;
67
typedef GtkAlignmentClass BaseClassType;
68
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
72
#ifndef DOXYGEN_SHOULD_SKIP_THIS
75
friend class Alignment_Class;
76
static CppClassType alignment_class_;
79
Alignment(const Alignment&);
80
Alignment& operator=(const Alignment&);
83
explicit Alignment(const Glib::ConstructParams& construct_params);
84
explicit Alignment(GtkAlignment* castitem);
86
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
89
#ifndef DOXYGEN_SHOULD_SKIP_THIS
90
static GType get_type() G_GNUC_CONST;
93
static GType get_base_type() G_GNUC_CONST;
96
///Provides access to the underlying C GtkObject.
97
GtkAlignment* gobj() { return reinterpret_cast<GtkAlignment*>(gobject_); }
99
///Provides access to the underlying C GtkObject.
100
const GtkAlignment* gobj() const { return reinterpret_cast<GtkAlignment*>(gobject_); }
104
//C++ methods used to invoke GTK+ virtual functions:
107
//GTK+ Virtual Functions (override these to change behaviour):
109
//Default Signal Handlers::
116
/** Constructor to create an Alignment object.
117
* @param xalign The initial horizontal alignment of the child.
118
* @param yalign The initial vertical alignment of the child.
119
* @param xscale The initial amount that the child expands horizontally to fill up unused space.
120
* @param yscale The initial amount that the child expands vertically to fill up unused space.
122
explicit Alignment(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale = 1.0);
125
/** Constructor to create an Alignment object.
126
* @param xalign A Gtk::AlignmentEnum describing the initial horizontal alignment of the child.
127
* @param yalign A Gtk::AlignmentEnum describing the initial vertical alignment of the child.
128
* @param xscale The initial amount that the child expands horizontally to fill up unused space.
129
* @param yscale The initial amount that the child expands vertically to fill up unused space.
131
explicit Alignment(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale = 1.0);
134
/** Sets the Alignment values.
135
* @param xalign The horizontal alignment of the child of this Alignment, from 0 (left) to 1 (right).
136
* @param yalign The vertical alignment of the child of this Alignment, from 0 (top) to 1 (bottom).
137
* @param xscale The amount that the child expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all the space allocated for the Alignment.
138
* @param yscale The amount that the child widget expands vertically to fill up unused space from 0 to 1. The values are similar to @a xscale.
140
void set(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale = 1.0);
142
/** Sets the Alignment values.
143
* @param xalign The horizontal alignment of the child of this Alignment, from 0 (left) to 1 (right).
144
* @param yalign The vertical alignment of the child of this Alignment, from 0 (top) to 1 (bottom).
145
* @param xscale The amount that the child expands horizontally to fill up unused space, from 0 to 1. A value of 0 indicates that the child widget should never expand. A value of 1 indicates that the child widget will expand to fill all the space allocated for the Alignment.
146
* @param yscale The amount that the child widget expands vertically to fill up unused space from 0 to 1. The values are similar to @a xscale.
148
void set(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale = 1.0);
152
/** Sets the padding on the different sides of the widget.
153
* The padding adds blank space to the sides of the widget. For instance,
154
* this can be used to indent the child widget towards the right by adding
155
* padding on the left.
158
* @param padding_top The padding at the top of the widget.
159
* @param padding_bottom The padding at the bottom of the widget.
160
* @param padding_left The padding at the left of the widget.
161
* @param padding_right The padding at the right of the widget.
163
void set_padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right);
165
/** Gets the padding on the different sides of the widget.
169
* @param padding_top Location to store the padding for the top of the widget, or <tt>0</tt>.
170
* @param padding_bottom Location to store the padding for the bottom of the widget, or <tt>0</tt>.
171
* @param padding_left Location to store the padding for the left of the widget, or <tt>0</tt>.
172
* @param padding_right Location to store the padding for the right of the widget, or <tt>0</tt>.
174
void get_padding(guint& padding_top, guint& padding_bottom, guint& padding_left, guint& padding_right);
176
#ifdef GLIBMM_PROPERTIES_ENABLED
177
/** Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned.
179
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
180
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
181
* the value of the property changes.
183
Glib::PropertyProxy<float> property_xalign() ;
184
#endif //#GLIBMM_PROPERTIES_ENABLED
186
#ifdef GLIBMM_PROPERTIES_ENABLED
187
/** Horizontal position of child in available space. 0.0 is left aligned, 1.0 is right aligned.
189
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
190
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
191
* the value of the property changes.
193
Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
194
#endif //#GLIBMM_PROPERTIES_ENABLED
196
#ifdef GLIBMM_PROPERTIES_ENABLED
197
/** Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned.
199
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
200
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
201
* the value of the property changes.
203
Glib::PropertyProxy<float> property_yalign() ;
204
#endif //#GLIBMM_PROPERTIES_ENABLED
206
#ifdef GLIBMM_PROPERTIES_ENABLED
207
/** Vertical position of child in available space. 0.0 is top aligned, 1.0 is bottom aligned.
209
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
210
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
211
* the value of the property changes.
213
Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
214
#endif //#GLIBMM_PROPERTIES_ENABLED
216
#ifdef GLIBMM_PROPERTIES_ENABLED
217
/** If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all.
219
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
220
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
221
* the value of the property changes.
223
Glib::PropertyProxy<float> property_xscale() ;
224
#endif //#GLIBMM_PROPERTIES_ENABLED
226
#ifdef GLIBMM_PROPERTIES_ENABLED
227
/** If available horizontal space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all.
229
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
230
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
231
* the value of the property changes.
233
Glib::PropertyProxy_ReadOnly<float> property_xscale() const;
234
#endif //#GLIBMM_PROPERTIES_ENABLED
236
#ifdef GLIBMM_PROPERTIES_ENABLED
237
/** If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all.
239
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
240
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
241
* the value of the property changes.
243
Glib::PropertyProxy<float> property_yscale() ;
244
#endif //#GLIBMM_PROPERTIES_ENABLED
246
#ifdef GLIBMM_PROPERTIES_ENABLED
247
/** If available vertical space is bigger than needed for the child, how much of it to use for the child. 0.0 means none, 1.0 means all.
249
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
250
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
251
* the value of the property changes.
253
Glib::PropertyProxy_ReadOnly<float> property_yscale() const;
254
#endif //#GLIBMM_PROPERTIES_ENABLED
258
#ifdef GLIBMM_PROPERTIES_ENABLED
259
/** The padding to insert at the top of the widget.
261
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
262
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
263
* the value of the property changes.
265
Glib::PropertyProxy<guint> property_top_padding() ;
266
#endif //#GLIBMM_PROPERTIES_ENABLED
268
#ifdef GLIBMM_PROPERTIES_ENABLED
269
/** The padding to insert at the top of the widget.
271
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
272
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
273
* the value of the property changes.
275
Glib::PropertyProxy_ReadOnly<guint> property_top_padding() const;
276
#endif //#GLIBMM_PROPERTIES_ENABLED
278
#ifdef GLIBMM_PROPERTIES_ENABLED
279
/** The padding to insert at the bottom of the widget.
281
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
282
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
283
* the value of the property changes.
285
Glib::PropertyProxy<guint> property_bottom_padding() ;
286
#endif //#GLIBMM_PROPERTIES_ENABLED
288
#ifdef GLIBMM_PROPERTIES_ENABLED
289
/** The padding to insert at the bottom of the widget.
291
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
292
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
293
* the value of the property changes.
295
Glib::PropertyProxy_ReadOnly<guint> property_bottom_padding() const;
296
#endif //#GLIBMM_PROPERTIES_ENABLED
298
#ifdef GLIBMM_PROPERTIES_ENABLED
299
/** The padding to insert at the left of the widget.
301
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
302
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
303
* the value of the property changes.
305
Glib::PropertyProxy<guint> property_left_padding() ;
306
#endif //#GLIBMM_PROPERTIES_ENABLED
308
#ifdef GLIBMM_PROPERTIES_ENABLED
309
/** The padding to insert at the left of the widget.
311
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
312
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
313
* the value of the property changes.
315
Glib::PropertyProxy_ReadOnly<guint> property_left_padding() const;
316
#endif //#GLIBMM_PROPERTIES_ENABLED
318
#ifdef GLIBMM_PROPERTIES_ENABLED
319
/** The padding to insert at the right of the widget.
321
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
322
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
323
* the value of the property changes.
325
Glib::PropertyProxy<guint> property_right_padding() ;
326
#endif //#GLIBMM_PROPERTIES_ENABLED
328
#ifdef GLIBMM_PROPERTIES_ENABLED
329
/** The padding to insert at the right of the widget.
331
* You rarely need to use properties because there are get_ and set_ methods for almost all of them.
332
* @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
333
* the value of the property changes.
335
Glib::PropertyProxy_ReadOnly<guint> property_right_padding() const;
336
#endif //#GLIBMM_PROPERTIES_ENABLED
341
} /* namespace Gtk */
346
/** A Glib::wrap() method for this object.
348
* @param object The C instance.
349
* @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
350
* @result A C++ instance that wraps this C instance.
352
* @relates Gtk::Alignment
354
Gtk::Alignment* wrap(GtkAlignment* object, bool take_copy = false);
358
#endif /* _GTKMM_ALIGNMENT_H */