2 // Generated by gtkmmproc -- DO NOT MODIFY!
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 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.
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.
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.
30 #include <gtkmm/widget.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkMisc GtkMisc;
35 typedef struct _GtkMiscClass GtkMiscClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class Misc_Class; } // namespace Gtk
44 /** A base class for widgets with alignments and padding.
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.
50 * Without a window, widgets of this type cannot capture events.
51 * To capture events place in Gtk::EventBox.
55 class Misc : public Widget
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 */
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70 friend class Misc_Class;
71 static CppClassType misc_class_;
75 Misc& operator=(const Misc&);
78 explicit Misc(const Glib::ConstructParams& construct_params);
79 explicit Misc(GtkMisc* castitem);
81 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
84 #ifndef DOXYGEN_SHOULD_SKIP_THIS
85 static GType get_type() G_GNUC_CONST;
86 static GType get_base_type() G_GNUC_CONST;
89 ///Provides access to the underlying C GtkObject.
90 GtkMisc* gobj() { return reinterpret_cast<GtkMisc*>(gobject_); }
92 ///Provides access to the underlying C GtkObject.
93 const GtkMisc* gobj() const { return reinterpret_cast<GtkMisc*>(gobject_); }
97 //C++ methods used to invoke GTK+ virtual functions:
98 #ifdef GLIBMM_VFUNCS_ENABLED
99 #endif //GLIBMM_VFUNCS_ENABLED
102 //GTK+ Virtual Functions (override these to change behaviour):
103 #ifdef GLIBMM_VFUNCS_ENABLED
104 #endif //GLIBMM_VFUNCS_ENABLED
106 //Default Signal Handlers::
107 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
108 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
118 void set_alignment(float xalign = 0.0, float yalign = 0.5);
120 void set_alignment(AlignmentEnum xalign = Gtk::ALIGN_LEFT, AlignmentEnum yalign = Gtk::ALIGN_CENTER);
123 /** Gets the X and Y alignment of the widget within its allocation. See
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>.
128 void get_alignment(float& xalign, float& yalign) const;
131 void set_padding(int xpad, int ypad);
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>.
137 void get_padding(int& xpad, int& ypad) const;
139 #ifdef GLIBMM_PROPERTIES_ENABLED
140 /** The horizontal alignment
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.
146 Glib::PropertyProxy<float> property_xalign() ;
147 #endif //#GLIBMM_PROPERTIES_ENABLED
149 #ifdef GLIBMM_PROPERTIES_ENABLED
150 /** The horizontal alignment
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.
156 Glib::PropertyProxy_ReadOnly<float> property_xalign() const;
157 #endif //#GLIBMM_PROPERTIES_ENABLED
159 #ifdef GLIBMM_PROPERTIES_ENABLED
160 /** The vertical alignment
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.
166 Glib::PropertyProxy<float> property_yalign() ;
167 #endif //#GLIBMM_PROPERTIES_ENABLED
169 #ifdef GLIBMM_PROPERTIES_ENABLED
170 /** The vertical alignment
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<float> property_yalign() const;
177 #endif //#GLIBMM_PROPERTIES_ENABLED
179 #ifdef GLIBMM_PROPERTIES_ENABLED
180 /** The amount of space to add on the left and right of the widget
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.
186 Glib::PropertyProxy<int> property_xpad() ;
187 #endif //#GLIBMM_PROPERTIES_ENABLED
189 #ifdef GLIBMM_PROPERTIES_ENABLED
190 /** The amount of space to add on the left and right of the widget
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.
196 Glib::PropertyProxy_ReadOnly<int> property_xpad() const;
197 #endif //#GLIBMM_PROPERTIES_ENABLED
199 #ifdef GLIBMM_PROPERTIES_ENABLED
200 /** The amount of space to add on the top and bottom of the widget
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.
206 Glib::PropertyProxy<int> property_ypad() ;
207 #endif //#GLIBMM_PROPERTIES_ENABLED
209 #ifdef GLIBMM_PROPERTIES_ENABLED
210 /** The amount of space to add on the top and bottom of the widget
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.
216 Glib::PropertyProxy_ReadOnly<int> property_ypad() const;
217 #endif //#GLIBMM_PROPERTIES_ENABLED
222 } /* namespace Gtk */
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.
232 Gtk::Misc* wrap(GtkMisc* object, bool take_copy = false);
236 #endif /* _GTKMM_MISC_H */