2 // Generated by gtkmmproc -- DO NOT MODIFY!
12 * Copyright (C) 1998-2002 The gtkmm Development Team
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.
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.
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.
30 #include <gtkmm/bin.h>
33 #ifndef DOXYGEN_SHOULD_SKIP_THIS
34 typedef struct _GtkFrame GtkFrame;
35 typedef struct _GtkFrameClass GtkFrameClass;
36 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
40 { class Frame_Class; } // namespace Gtk
44 /** A Gtk::Bin with a decorative frame and optional label.
46 * The Frame widget surrounds its single child with a decorative frame and
47 * an optional label. If present, the label is drawn in a gap in the top
48 * side of the frame. The position of the label can be controlled with
55 class Frame : public Bin
58 #ifndef DOXYGEN_SHOULD_SKIP_THIS
59 typedef Frame CppObjectType;
60 typedef Frame_Class CppClassType;
61 typedef GtkFrame BaseObjectType;
62 typedef GtkFrameClass BaseClassType;
63 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
67 #ifndef DOXYGEN_SHOULD_SKIP_THIS
70 friend class Frame_Class;
71 static CppClassType frame_class_;
75 Frame& operator=(const Frame&);
78 explicit Frame(const Glib::ConstructParams& construct_params);
79 explicit Frame(GtkFrame* 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 GtkFrame* gobj() { return reinterpret_cast<GtkFrame*>(gobject_); }
92 ///Provides access to the underlying C GtkObject.
93 const GtkFrame* gobj() const { return reinterpret_cast<GtkFrame*>(gobject_); }
97 //C++ methods used to invoke GTK+ virtual functions:
100 //GTK+ Virtual Functions (override these to change behaviour):
102 //Default Signal Handlers::
110 explicit Frame(const Glib::ustring& label);
112 //TODO: Add a bool use_markup arg to set_label() as a convenience - it would have to use set_label_widget().
114 /** Set the label to appear in the top edge of the frame.
115 * Label alignment defaults to the upper left corner of the frame.
118 /** Sets the text of the label. If @a label is <tt>0</tt>,
119 * the current label is removed.
120 * @param label The text to use as the label of the frame.
122 void set_label(const Glib::ustring& label);
125 /** If the frame's label widget is a Gtk::Label, returns the
126 * text in the label widget. (The frame will have a Gtk::Label
127 * for the label widget if a non-<tt>0</tt> argument was passed
129 * @return The text in the label, or <tt>0</tt> if there
130 * was no label widget or the lable widget was not
131 * a Gtk::Label. This string is owned by GTK+ and
132 * must not be modified or freed.
134 Glib::ustring get_label() const;
137 /** Sets the label widget for the frame. This is the widget that
138 * will appear embedded in the top edge of the frame as a
140 * @param label_widget The new label widget.
142 void set_label_widget(Widget& label_widget);
144 /** Retrieves the label widget for the frame. See
145 * set_label_widget().
146 * @return The label widget, or <tt>0</tt> if there is none.
148 Widget* get_label_widget();
150 /** Retrieves the label widget for the frame. See
151 * set_label_widget().
152 * @return The label widget, or <tt>0</tt> if there is none.
154 const Widget* get_label_widget() const;
156 /** Set the alignment of the Frame's label.
157 * @param xalign The position of the label along the top edge of the widget.
158 * A value of 0.0 represents left alignment; 1.0 represents right alignment.
159 * The default value for a newly created Frame is 0.0.
160 * @param yalign The y alignment of the label. Currently ignored.
163 /** Sets the alignment of the frame widget's label. The
164 * default values for a newly created frame are 0.0 and 0.5.
165 * @param xalign The position of the label along the top edge
166 * of the widget. A value of 0.0 represents left alignment;
167 * 1.0 represents right alignment.
168 * @param yalign The y alignment of the label. A value of 0.0 aligns under
169 * the frame; 1.0 aligns above the frame.
171 void set_label_align(float xalign = 0.0, float yalign = 0.5);
173 /** Sets the alignment of the frame widget's label. The
174 * default values for a newly created frame are 0.0 and 0.5.
175 * @param xalign The position of the label along the top edge
176 * of the widget. A value of 0.0 represents left alignment;
177 * 1.0 represents right alignment.
178 * @param yalign The y alignment of the label. A value of 0.0 aligns under
179 * the frame; 1.0 aligns above the frame.
181 void set_label_align(AlignmentEnum xalign, AlignmentEnum yalign = Gtk::ALIGN_CENTER);
184 /** Retrieves the X and Y alignment of the frame's label. See
186 * @param xalign Location to store X alignment of frame's label, or <tt>0</tt>.
187 * @param yalign Location to store X alignment of frame's label, or <tt>0</tt>.
189 void get_label_align(float& xalign, float& yalign) const;
191 /** Sets shadow type of the frame.
194 /** Sets the shadow type for @a frame .
195 * @param type The new Gtk::ShadowType.
197 void set_shadow_type(ShadowType type);
199 /** Retrieves the shadow type of the frame. See
201 * @return The current shadow type of the frame.
203 ShadowType get_shadow_type() const;
205 /** Text of the frame's label.
207 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
208 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
209 * the value of the property changes.
211 Glib::PropertyProxy<Glib::ustring> property_label() ;
213 /** Text of the frame's label.
215 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
216 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
217 * the value of the property changes.
219 Glib::PropertyProxy_ReadOnly<Glib::ustring> property_label() const;
221 /** The horizontal alignment of the label.
223 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
224 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
225 * the value of the property changes.
227 Glib::PropertyProxy<double> property_label_xalign() ;
229 /** The horizontal alignment of the label.
231 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
232 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
233 * the value of the property changes.
235 Glib::PropertyProxy_ReadOnly<double> property_label_xalign() const;
237 /** The vertical 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_yalign() ;
245 /** The vertical alignment of the label.
247 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
248 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
249 * the value of the property changes.
251 Glib::PropertyProxy_ReadOnly<double> property_label_yalign() const;
253 /** Appearance of the frame border.
255 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
256 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
257 * the value of the property changes.
259 Glib::PropertyProxy<ShadowType> property_shadow_type() ;
261 /** Appearance of the frame border.
263 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
264 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
265 * the value of the property changes.
267 Glib::PropertyProxy_ReadOnly<ShadowType> property_shadow_type() const;
269 /** A widget to display in place of the usual frame label.
271 * You rarely need to use properties because there are get_ and set_ methods for almost all of them.
272 * @return A PropertyProxy that allows you to get or set the property of the value, or receive notification when
273 * the value of the property changes.
275 Glib::PropertyProxy<Widget*> property_label_widget() ;
277 /** A widget to display in place of the usual frame label.
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_ReadOnly<Widget*> property_label_widget() const;
287 virtual void compute_child_allocation_vfunc(Allocation& allocation);
297 /** @relates Gtk::Frame
298 * @param object The C instance
299 * @param take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
300 * @result A C++ instance that wraps this C instance.
302 Gtk::Frame* wrap(GtkFrame* object, bool take_copy = false);
304 #endif /* _GTKMM_FRAME_H */