Install ardour as a binary, a script and a set of shared
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / alignment.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_ALIGNMENT_H
4 #define _GTKMM_ALIGNMENT_H
5
6 #include <glibmm.h>
7
8 /* $Id$ */
9
10 /* alignment.h
11  * 
12  * Copyright (C) 1998-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 <gtkmm/bin.h>
30
31
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 typedef struct _GtkAlignment GtkAlignment;
34 typedef struct _GtkAlignmentClass GtkAlignmentClass;
35 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
36
37
38 namespace Gtk
39 { class Alignment_Class; } // namespace Gtk
40 namespace Gtk
41 {
42
43 /** A widget which controls the alignment and size of its child.
44  *
45  * Normally, a widget is allocated at least as much size as it requests, and,
46  * most widgets expand to fill any extra allocated space, but sometimes
47  * this behavior is not desired. The alignment widget allows the
48  * programmer to specify how a widget should expand and position itself
49  * to fill the area it is allocated.
50  *
51  * It has four settings: xscale, yscale, xalign, and yalign:
52  * 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).
53  * 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.
54  *
55  * @ingroup Widgets
56  * @ingroup Containers
57  */
58
59 class Alignment : public Bin
60 {
61   public:
62 #ifndef DOXYGEN_SHOULD_SKIP_THIS
63   typedef Alignment CppObjectType;
64   typedef Alignment_Class CppClassType;
65   typedef GtkAlignment BaseObjectType;
66   typedef GtkAlignmentClass BaseClassType;
67 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68
69   virtual ~Alignment();
70
71 #ifndef DOXYGEN_SHOULD_SKIP_THIS
72
73 private:
74   friend class Alignment_Class;
75   static CppClassType alignment_class_;
76
77   // noncopyable
78   Alignment(const Alignment&);
79   Alignment& operator=(const Alignment&);
80
81 protected:
82   explicit Alignment(const Glib::ConstructParams& construct_params);
83   explicit Alignment(GtkAlignment* castitem);
84
85 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
86
87 public:
88 #ifndef DOXYGEN_SHOULD_SKIP_THIS
89   static GType get_type()      G_GNUC_CONST;
90   static GType get_base_type() G_GNUC_CONST;
91 #endif
92
93   ///Provides access to the underlying C GtkObject.
94   GtkAlignment*       gobj()       { return reinterpret_cast<GtkAlignment*>(gobject_); }
95
96   ///Provides access to the underlying C GtkObject.
97   const GtkAlignment* gobj() const { return reinterpret_cast<GtkAlignment*>(gobject_); }
98
99
100 public:
101   //C++ methods used to invoke GTK+ virtual functions:
102
103 protected:
104   //GTK+ Virtual Functions (override these to change behaviour):
105
106   //Default Signal Handlers::
107
108
109 private:
110
111 public:
112
113   /** Constructor to create an Alignment object.
114    * @param xalign The initial horizontal alignment of the child.
115    * @param yalign The initial vertical alignment of the child.
116    * @param xscale The initial amount that the child expands horizontally to fill up unused space.
117    * @param yscale The initial amount that the child expands vertically to fill up unused space.
118    */
119   explicit Alignment(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale = 1.0);
120
121   /** Constructor to create an Alignment object.
122    * @param xalign A Gtk::AlignmentEnum describing the initial horizontal alignment of the child.
123    * @param yalign A Gtk::AlignmentEnum describing the initial vertical alignment of the child.
124    * @param xscale The initial amount that the child expands horizontally to fill up unused space.
125    * @param yscale The initial amount that the child expands vertically to fill up unused space.
126    */
127   explicit Alignment(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale = 1.0);
128
129   
130   /** Sets the Alignment values.
131    * @param xalign The horizontal alignment of the child of this Alignment, from 0 (left) to 1 (right).
132    * @param yalign The vertical alignment of the child of this Alignment, from 0 (top) to 1 (bottom).
133    * @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.
134    * @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 .
135    */
136   void set(float xalign = 0.5, float yalign = 0.5, float xscale = 1.0, float yscale=  1.0);
137   
138   /** Sets the Alignment values.
139    * @param xalign The horizontal alignment of the child of this Alignment, from 0 (left) to 1 (right).
140    * @param yalign The vertical alignment of the child of this Alignment, from 0 (top) to 1 (bottom).
141    * @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.
142    * @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 .
143    */
144   void set(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER, float xscale = 1.0, float yscale=  1.0);
145
146   //New in GTK+ 2.4
147   
148   /** Sets the padding on the different sides of the widget.
149    * The padding adds blank space to the sides of the widget. For instance,
150    * this can be used to indent the child widget towards the right by adding
151    * padding on the left.
152    * 
153    * Since: 2.4
154    * @param padding_top The padding at the top of the widget.
155    * @param padding_bottom The padding at the bottom of the widget.
156    * @param padding_left The padding at the left of the widget.
157    * @param padding_right The padding at the right of the widget.
158    */
159   void set_padding(guint padding_top, guint padding_bottom, guint padding_left, guint padding_right);
160   
161   /** Gets the padding on the different sides of the widget.
162    * See set_padding().
163    * 
164    * Since: 2.4
165    * @param padding_top Location to store the padding for the top of the widget, or <tt>0</tt>.
166    * @param padding_bottom Location to store the padding for the bottom of the widget, or <tt>0</tt>.
167    * @param padding_left Location to store the padding for the left of the widget, or <tt>0</tt>.
168    * @param padding_right Location to store the padding for the right of the widget, or <tt>0</tt>.
169    */
170   void get_padding(guint& padding_top, guint& padding_bottom, guint& padding_left, guint& padding_right);
171               
172   /** Horizontal position of child in available space. 0.0 is left aligned
173    *
174    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
175    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
176    * the value of the property changes.
177    */
178   Glib::PropertyProxy<float> property_xalign() ;
179
180 /** Horizontal position of child in available space. 0.0 is left aligned
181    *
182    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
183    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
184    * the value of the property changes.
185    */
186   Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
187
188   /** Vertical position of child in available space. 0.0 is top aligned
189    *
190    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
191    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
192    * the value of the property changes.
193    */
194   Glib::PropertyProxy<float> property_yalign() ;
195
196 /** Vertical position of child in available space. 0.0 is top aligned
197    *
198    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
199    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
200    * the value of the property changes.
201    */
202   Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
203
204   /** If available horizontal space is bigger than needed for the child
205    *
206    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
207    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
208    * the value of the property changes.
209    */
210   Glib::PropertyProxy<float> property_xscale() ;
211
212 /** If available horizontal space is bigger than needed for the child
213    *
214    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
215    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
216    * the value of the property changes.
217    */
218   Glib::PropertyProxy_ReadOnly<float> property_xscale() const;
219
220   /** If available vertical space is bigger than needed for the child
221    *
222    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
223    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
224    * the value of the property changes.
225    */
226   Glib::PropertyProxy<float> property_yscale() ;
227
228 /** If available vertical space is bigger than needed for the child
229    *
230    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
231    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
232    * the value of the property changes.
233    */
234   Glib::PropertyProxy_ReadOnly<float> property_yscale() const;
235
236
237   //New in GTK+ 2.4
238   /** The padding to insert at the top of the widget.
239    *
240    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
241    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
242    * the value of the property changes.
243    */
244   Glib::PropertyProxy<guint> property_top_padding() ;
245
246 /** The padding to insert at the top of the widget.
247    *
248    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
249    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
250    * the value of the property changes.
251    */
252   Glib::PropertyProxy_ReadOnly<guint> property_top_padding() const;
253
254   /** The padding to insert at the bottom of the widget.
255    *
256    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
257    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
258    * the value of the property changes.
259    */
260   Glib::PropertyProxy<guint> property_bottom_padding() ;
261
262 /** The padding to insert at the bottom of the widget.
263    *
264    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
265    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
266    * the value of the property changes.
267    */
268   Glib::PropertyProxy_ReadOnly<guint> property_bottom_padding() const;
269
270   /** The padding to insert at the left of the widget.
271    *
272    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
273    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
274    * the value of the property changes.
275    */
276   Glib::PropertyProxy<guint> property_left_padding() ;
277
278 /** The padding to insert at the left of the widget.
279    *
280    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
281    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
282    * the value of the property changes.
283    */
284   Glib::PropertyProxy_ReadOnly<guint> property_left_padding() const;
285
286   /** The padding to insert at the right of the widget.
287    *
288    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
289    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
290    * the value of the property changes.
291    */
292   Glib::PropertyProxy<guint> property_right_padding() ;
293
294 /** The padding to insert at the right of the widget.
295    *
296    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
297    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
298    * the value of the property changes.
299    */
300   Glib::PropertyProxy_ReadOnly<guint> property_right_padding() const;
301
302
303 };
304
305 } /* namespace Gtk */
306
307
308 namespace Glib
309 {
310   /** @relates Gtk::Alignment
311    * @param object The C instance
312    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
313    * @result A C++ instance that wraps this C instance.
314    */
315   Gtk::Alignment* wrap(GtkAlignment* object, bool take_copy = false);
316 }
317 #endif /* _GTKMM_ALIGNMENT_H */
318