rollback to 3428, before the mysterious removal of libs/* at 3431/3432
[ardour.git] / libs / gtkmm2 / gtk / gtkmm / misc.h
1 // -*- c++ -*-
2 // Generated by gtkmmproc -- DO NOT MODIFY!
3 #ifndef _GTKMM_MISC_H
4 #define _GTKMM_MISC_H
5
6
7 #include <glibmm.h>
8
9 /* $Id$ */
10
11 /* misc.h
12  * 
13  * Copyright (C) 1998-2002 The gtkmm Development Team
14  *
15  * This library is free software; you can redistribute it and/or
16  * modify it under the terms of the GNU Library General Public
17  * License as published by the Free Software Foundation; either
18  * version 2 of the License, or (at your option) any later version.
19  *
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  * Library General Public License for more details.
24  *
25  * You should have received a copy of the GNU Library 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.
28  */
29
30 #include <gtkmm/widget.h>
31
32
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkMisc GtkMisc;
35 typedef struct _GtkMiscClass GtkMiscClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
37
38
39 namespace Gtk
40 { class Misc_Class; } // namespace Gtk
41 namespace Gtk
42 {
43
44 /** A base class for widgets with alignments and padding.
45  *
46  * This is an abstract for a set of utility widgets
47  * that lack a physical window.  They do have
48  * alignment and padding within their defined space.
49  *
50  * Without a window, widgets of this type cannot capture events.
51  * To capture events place in Gtk::EventBox.
52  *
53  */
54
55 class Misc : public Widget
56 {
57   public:
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59   typedef Misc CppObjectType;
60   typedef Misc_Class CppClassType;
61   typedef GtkMisc BaseObjectType;
62   typedef GtkMiscClass BaseClassType;
63 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
64
65   virtual ~Misc();
66
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
68
69 private:
70   friend class Misc_Class;
71   static CppClassType misc_class_;
72
73   // noncopyable
74   Misc(const Misc&);
75   Misc& operator=(const Misc&);
76
77 protected:
78   explicit Misc(const Glib::ConstructParams& construct_params);
79   explicit Misc(GtkMisc* castitem);
80
81 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
82
83 public:
84 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85   static GType get_type()      G_GNUC_CONST;
86   static GType get_base_type() G_GNUC_CONST;
87 #endif
88
89   ///Provides access to the underlying C GtkObject.
90   GtkMisc*       gobj()       { return reinterpret_cast<GtkMisc*>(gobject_); }
91
92   ///Provides access to the underlying C GtkObject.
93   const GtkMisc* gobj() const { return reinterpret_cast<GtkMisc*>(gobject_); }
94
95
96 public:
97   //C++ methods used to invoke GTK+ virtual functions:
98 #ifdef GLIBMM_VFUNCS_ENABLED
99 #endif //GLIBMM_VFUNCS_ENABLED
100
101 protected:
102   //GTK+ Virtual Functions (override these to change behaviour):
103 #ifdef GLIBMM_VFUNCS_ENABLED
104 #endif //GLIBMM_VFUNCS_ENABLED
105
106   //Default Signal Handlers::
107 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
108 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
109
110
111 private:
112
113 protected:
114   Misc();
115 public:
116
117   
118   void set_alignment(float xalign = 0.0, float yalign = 0.5);
119   
120   void set_alignment(AlignmentEnum xalign = Gtk::ALIGN_LEFT, AlignmentEnum yalign = Gtk::ALIGN_CENTER);
121
122   
123   /** Gets the X and Y alignment of the widget within its allocation. 
124    * See set_alignment().
125    * @param xalign Location to store X alignment of @a misc , or <tt>0</tt>.
126    * @param yalign Location to store Y alignment of @a misc , or <tt>0</tt>.
127    */
128   void get_alignment(float& xalign, float& yalign) const;
129
130   
131   void set_padding(int xpad, int ypad);
132   
133   /** Gets the padding in the X and Y directions of the widget. 
134    * See set_padding().
135    * @param xpad Location to store padding in the X direction, or <tt>0</tt>.
136    * @param ypad Location to store padding in the Y direction, or <tt>0</tt>.
137    */
138   void get_padding(int& xpad, int& ypad) const;
139
140   #ifdef GLIBMM_PROPERTIES_ENABLED
141 /** The horizontal alignment
142    *
143    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
144    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
145    * the value of the property changes.
146    */
147   Glib::PropertyProxy<float> property_xalign() ;
148 #endif //#GLIBMM_PROPERTIES_ENABLED
149
150 #ifdef GLIBMM_PROPERTIES_ENABLED
151 /** The horizontal alignment
152    *
153    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
154    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
155    * the value of the property changes.
156    */
157   Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
158 #endif //#GLIBMM_PROPERTIES_ENABLED
159
160   #ifdef GLIBMM_PROPERTIES_ENABLED
161 /** The vertical alignment
162    *
163    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
164    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
165    * the value of the property changes.
166    */
167   Glib::PropertyProxy<float> property_yalign() ;
168 #endif //#GLIBMM_PROPERTIES_ENABLED
169
170 #ifdef GLIBMM_PROPERTIES_ENABLED
171 /** The vertical alignment
172    *
173    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
174    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
175    * the value of the property changes.
176    */
177   Glib::PropertyProxy_ReadOnly<float> property_yalign() const;
178 #endif //#GLIBMM_PROPERTIES_ENABLED
179
180   #ifdef GLIBMM_PROPERTIES_ENABLED
181 /** The amount of space to add on the left and right of the widget
182    *
183    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
184    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
185    * the value of the property changes.
186    */
187   Glib::PropertyProxy<int> property_xpad() ;
188 #endif //#GLIBMM_PROPERTIES_ENABLED
189
190 #ifdef GLIBMM_PROPERTIES_ENABLED
191 /** The amount of space to add on the left and right of the widget
192    *
193    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
194    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
195    * the value of the property changes.
196    */
197   Glib::PropertyProxy_ReadOnly<int> property_xpad() const;
198 #endif //#GLIBMM_PROPERTIES_ENABLED
199
200   #ifdef GLIBMM_PROPERTIES_ENABLED
201 /** The amount of space to add on the top and bottom of the widget
202    *
203    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
204    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
205    * the value of the property changes.
206    */
207   Glib::PropertyProxy<int> property_ypad() ;
208 #endif //#GLIBMM_PROPERTIES_ENABLED
209
210 #ifdef GLIBMM_PROPERTIES_ENABLED
211 /** The amount of space to add on the top and bottom of the widget
212    *
213    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
214    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
215    * the value of the property changes.
216    */
217   Glib::PropertyProxy_ReadOnly<int> property_ypad() const;
218 #endif //#GLIBMM_PROPERTIES_ENABLED
219
220
221 };
222
223 } /* namespace Gtk */
224
225
226 namespace Glib
227 {
228   /** A Glib::wrap() method for this object.
229    * 
230    * @param object The C instance.
231    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
232    * @result A C++ instance that wraps this C instance.
233    *
234    * @relates Gtk::Misc
235    */
236   Gtk::Misc* wrap(GtkMisc* object, bool take_copy = false);
237 } //namespace Glib
238
239
240 #endif /* _GTKMM_MISC_H */
241