moved 2.1-staging to trunk @ rev 1765
[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. See
124    * 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. See set_padding().
134    * @param xpad Location to store padding in the X direction, or <tt>0</tt>.
135    * @param ypad Location to store padding in the Y direction, or <tt>0</tt>.
136    */
137   void get_padding(int& xpad, int& ypad) const;
138
139   #ifdef GLIBMM_PROPERTIES_ENABLED
140 /** The horizontal alignment
141    *
142    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
143    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
144    * the value of the property changes.
145    */
146   Glib::PropertyProxy<float> property_xalign() ;
147 #endif //#GLIBMM_PROPERTIES_ENABLED
148
149 #ifdef GLIBMM_PROPERTIES_ENABLED
150 /** The horizontal alignment
151    *
152    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
153    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
154    * the value of the property changes.
155    */
156   Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
157 #endif //#GLIBMM_PROPERTIES_ENABLED
158
159   #ifdef GLIBMM_PROPERTIES_ENABLED
160 /** The vertical alignment
161    *
162    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
163    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
164    * the value of the property changes.
165    */
166   Glib::PropertyProxy<float> property_yalign() ;
167 #endif //#GLIBMM_PROPERTIES_ENABLED
168
169 #ifdef GLIBMM_PROPERTIES_ENABLED
170 /** The vertical alignment
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<float> property_yalign() const;
177 #endif //#GLIBMM_PROPERTIES_ENABLED
178
179   #ifdef GLIBMM_PROPERTIES_ENABLED
180 /** The amount of space to add on the left and right of the widget
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<int> property_xpad() ;
187 #endif //#GLIBMM_PROPERTIES_ENABLED
188
189 #ifdef GLIBMM_PROPERTIES_ENABLED
190 /** The amount of space to add on the left and right of the widget
191    *
192    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
193    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
194    * the value of the property changes.
195    */
196   Glib::PropertyProxy_ReadOnly<int> property_xpad() const;
197 #endif //#GLIBMM_PROPERTIES_ENABLED
198
199   #ifdef GLIBMM_PROPERTIES_ENABLED
200 /** The amount of space to add on the top and bottom of the widget
201    *
202    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
203    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
204    * the value of the property changes.
205    */
206   Glib::PropertyProxy<int> property_ypad() ;
207 #endif //#GLIBMM_PROPERTIES_ENABLED
208
209 #ifdef GLIBMM_PROPERTIES_ENABLED
210 /** The amount of space to add on the top and bottom of the widget
211    *
212    * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
213    * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
214    * the value of the property changes.
215    */
216   Glib::PropertyProxy_ReadOnly<int> property_ypad() const;
217 #endif //#GLIBMM_PROPERTIES_ENABLED
218
219
220 };
221
222 } /* namespace Gtk */
223
224
225 namespace Glib
226 {
227   /** @relates Gtk::Misc
228    * @param object The C instance
229    * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
230    * @result A C++ instance that wraps this C instance.
231    */
232   Gtk::Misc* wrap(GtkMisc* object, bool take_copy = false);
233 } //namespace Glib
234
235
236 #endif /* _GTKMM_MISC_H */
237