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.
31 #include <gtkmm/bin.h>
34 #ifndef DOXYGEN_SHOULD_SKIP_THIS
35 typedef struct _GtkFrame GtkFrame;
36 typedef struct _GtkFrameClass GtkFrameClass;
37 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
41 { class Frame_Class; } // namespace Gtk
45 /** A Gtk::Bin with a decorative frame and optional label.
47 * The Frame widget surrounds its single child with a decorative frame and
48 * an optional label. If present, the label is drawn in a gap in the top
49 * side of the frame. The position of the label can be controlled with
56 class Frame : public Bin
59 #ifndef DOXYGEN_SHOULD_SKIP_THIS
60 typedef Frame CppObjectType;
61 typedef Frame_Class CppClassType;
62 typedef GtkFrame BaseObjectType;
63 typedef GtkFrameClass BaseClassType;
64 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
68 #ifndef DOXYGEN_SHOULD_SKIP_THIS
71 friend class Frame_Class;
72 static CppClassType frame_class_;
76 Frame& operator=(const Frame&);
79 explicit Frame(const Glib::ConstructParams& construct_params);
80 explicit Frame(GtkFrame* castitem);
82 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
85 #ifndef DOXYGEN_SHOULD_SKIP_THIS
86 static GType get_type() G_GNUC_CONST;
87 static GType get_base_type() G_GNUC_CONST;
90 ///Provides access to the underlying C GtkObject.
91 GtkFrame* gobj() { return reinterpret_cast<GtkFrame*>(gobject_); }
93 ///Provides access to the underlying C GtkObject.
94 const GtkFrame* gobj() const { return reinterpret_cast<GtkFrame*>(gobject_); }
98 //C++ methods used to invoke GTK+ virtual functions:
99 #ifdef GLIBMM_VFUNCS_ENABLED
100 #endif //GLIBMM_VFUNCS_ENABLED
103 //GTK+ Virtual Functions (override these to change behaviour):
104 #ifdef GLIBMM_VFUNCS_ENABLED
105 #endif //GLIBMM_VFUNCS_ENABLED
107 //Default Signal Handlers::
108 #ifdef GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
109 #endif //GLIBMM_DEFAULT_SIGNAL_HANDLERS_ENABLED
117 explicit Frame(const Glib::ustring& label);
119 //TODO: Add a bool use_markup arg to set_label() as a convenience - it would have to use set_label_widget().
121 /** Set the label to appear in the top edge of the frame.
122 * Label alignment defaults to the upper left corner of the frame.
125 /** Sets the text of the label. If @a label is <tt>0</tt>,
126 * the current label is removed.
127 * @param label The text to use as the label of the frame.
129 void set_label(const Glib::ustring& label);
132 /** If the frame's label widget is a Gtk::Label, returns the
133 * text in the label widget. (The frame will have a Gtk::Label
134 * for the label widget if a non-<tt>0</tt> argument was passed
136 * @return The text in the label, or <tt>0</tt> if there
137 * was no label widget or the lable widget was not
138 * a Gtk::Label. This string is owned by GTK+ and
139 * must not be modified or freed.
141 Glib::ustring get_label() const;
144 /** Sets the label widget for the frame. This is the widget that
145 * will appear embedded in the top edge of the frame as a
147 * @param label_widget The new label widget.
149 void set_label_widget(Widget& label_widget);
151 /** Retrieves the label widget for the frame. See
152 * set_label_widget().
153 * @return The label widget, or <tt>0</tt> if there is none.
155 Widget* get_label_widget();
157 /** Retrieves the label widget for the frame. See
158 * set_label_widget().
159 * @return The label widget, or <tt>0</tt> if there is none.
161 const Widget* get_label_widget() const;
163 /** Set the alignment of the Frame's label.
164 * @param xalign The position of the label along the top edge of the widget.
165 * A value of 0.0 represents left alignment; 1.0 represents right alignment.
166 * The default value for a newly created Frame is 0.0.
167 * @param yalign The y alignment of the label. Currently ignored.
170 /** Sets the alignment of the frame widget's label. The
171 * default values for a newly created frame are 0.0 and 0.5.
172 * @param xalign The position of the label along the top edge
173 * of the widget. A value of 0.0 represents left alignment;
174 * 1.0 represents right alignment.
175 * @param yalign The y alignment of the label. A value of 0.0 aligns under
176 * the frame; 1.0 aligns above the frame. If the values are exactly
177 * 0.0 or 1.0 the gap in the frame won't be painted because the label
178 * will be completely above or below the frame.
180 void set_label_align(float xalign = 0.0, float yalign = 0.5);
182 /** Sets the alignment of the frame widget's label. The
183 * default values for a newly created frame are 0.0 and 0.5.
184 * @param xalign The position of the label along the top edge
185 * of the widget. A value of 0.0 represents left alignment;
186 * 1.0 represents right alignment.
187 * @param yalign The y alignment of the label. A value of 0.0 aligns under
188 * the frame; 1.0 aligns above the frame. If the values are exactly
189 * 0.0 or 1.0 the gap in the frame won't be painted because the label
190 * will be completely above or below the frame.
192 void set_label_align(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER);
195 /** Retrieves the X and Y alignment of the frame's label. See
197 * @param xalign Location to store X alignment of frame's label, or <tt>0</tt>.
198 * @param yalign Location to store X alignment of frame's label, or <tt>0</tt>.
200 void get_label_align(float& xalign, float& yalign) const;
202 /** Sets shadow type of the frame.
205 /** Sets the shadow type for @a frame .
206 * @param type The new Gtk::ShadowType.
208 void set_shadow_type(ShadowType type);
210 /** Retrieves the shadow type of the frame. See
212 * @return The current shadow type of the frame.
214 ShadowType get_shadow_type() const;
216 #ifdef GLIBMM_PROPERTIES_ENABLED
217 /** Text of the frame's label.
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<Glib::ustring> property_label() ;
224 #endif //#GLIBMM_PROPERTIES_ENABLED
226 #ifdef GLIBMM_PROPERTIES_ENABLED
227 /** Text of the frame's label.
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<Glib::ustring> property_label() const;
234 #endif //#GLIBMM_PROPERTIES_ENABLED
236 #ifdef GLIBMM_PROPERTIES_ENABLED
237 /** The horizontal alignment of the label.
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<double> property_label_xalign() ;
244 #endif //#GLIBMM_PROPERTIES_ENABLED
246 #ifdef GLIBMM_PROPERTIES_ENABLED
247 /** The horizontal alignment of the label.
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<double> property_label_xalign() const;
254 #endif //#GLIBMM_PROPERTIES_ENABLED
256 #ifdef GLIBMM_PROPERTIES_ENABLED
257 /** The vertical alignment of the label.
259 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
260 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
261 * the value of the property changes.
263 Glib::PropertyProxy<double> property_label_yalign() ;
264 #endif //#GLIBMM_PROPERTIES_ENABLED
266 #ifdef GLIBMM_PROPERTIES_ENABLED
267 /** The vertical alignment of the label.
269 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
270 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
271 * the value of the property changes.
273 Glib::PropertyProxy_ReadOnly<double> property_label_yalign() const;
274 #endif //#GLIBMM_PROPERTIES_ENABLED
276 #ifdef GLIBMM_PROPERTIES_ENABLED
277 /** Appearance of the frame border.
279 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
280 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
281 * the value of the property changes.
283 Glib::PropertyProxy<ShadowType> property_shadow_type() ;
284 #endif //#GLIBMM_PROPERTIES_ENABLED
286 #ifdef GLIBMM_PROPERTIES_ENABLED
287 /** Appearance of the frame border.
289 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
290 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
291 * the value of the property changes.
293 Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
294 #endif //#GLIBMM_PROPERTIES_ENABLED
296 #ifdef GLIBMM_PROPERTIES_ENABLED
297 /** A widget to display in place of the usual frame label.
299 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
300 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
301 * the value of the property changes.
303 Glib::PropertyProxy<Widget*> property_label_widget() ;
304 #endif //#GLIBMM_PROPERTIES_ENABLED
306 #ifdef GLIBMM_PROPERTIES_ENABLED
307 /** A widget to display in place of the usual frame label.
309 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
310 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
311 * the value of the property changes.
313 Glib::PropertyProxy_ReadOnly<Widget*> property_label_widget() const;
314 #endif //#GLIBMM_PROPERTIES_ENABLED
318 #ifdef GLIBMM_VFUNCS_ENABLED
319 virtual void compute_child_allocation_vfunc(Allocation& allocation);
320 #endif //GLIBMM_VFUNCS_ENABLED
330 /** A Glib::wrap() method for this object.
332 * @param object The C instance.
333 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
334 * @result A C++ instance that wraps this C instance.
336 * @relates Gtk::Frame
338 Gtk::Frame* wrap(GtkFrame* object, bool take_copy = false);
342 #endif /* _GTKMM_FRAME_H */