1 /* GTK - The GIMP Toolkit
2 * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2 of the License, or (at your option) any later version.
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the
16 * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
17 * Boston, MA 02111-1307, USA.
21 * Modified by the GTK+ Team and others 1997-2000. See the AUTHORS
22 * file for a list of people on the GTK+ Team. See the ChangeLog
23 * files for a list of changes. These files are distributed with
24 * GTK+ at ftp://ftp.gtk.org/pub/gtk/.
31 #include "gtkprivate.h"
33 #include "gtkbuildable.h"
34 #include "gtksizerequest.h"
37 #define LABEL_SIDE_PAD 2
39 struct _GtkFramePrivate
42 GtkWidget *label_widget;
49 GtkAllocation child_allocation;
50 GtkAllocation label_allocation;
62 static void gtk_frame_set_property (GObject *object,
66 static void gtk_frame_get_property (GObject *object,
70 static gboolean gtk_frame_draw (GtkWidget *widget,
72 static void gtk_frame_size_allocate (GtkWidget *widget,
73 GtkAllocation *allocation);
74 static void gtk_frame_remove (GtkContainer *container,
76 static void gtk_frame_forall (GtkContainer *container,
77 gboolean include_internals,
79 gpointer callback_data);
81 static void gtk_frame_compute_child_allocation (GtkFrame *frame,
82 GtkAllocation *child_allocation);
83 static void gtk_frame_real_compute_child_allocation (GtkFrame *frame,
84 GtkAllocation *child_allocation);
87 static void gtk_frame_buildable_init (GtkBuildableIface *iface);
88 static void gtk_frame_buildable_add_child (GtkBuildable *buildable,
93 static void gtk_frame_size_request_init (GtkSizeRequestIface *iface);
94 static void gtk_frame_get_width (GtkSizeRequest *widget,
97 static void gtk_frame_get_height (GtkSizeRequest *widget,
100 static void gtk_frame_get_height_for_width (GtkSizeRequest *layout,
102 gint *minimum_height,
103 gint *natural_height);
104 static void gtk_frame_get_width_for_height (GtkSizeRequest *layout,
106 gint *minimum_height,
107 gint *natural_height);
110 G_DEFINE_TYPE_WITH_CODE (GtkFrame, gtk_frame, GTK_TYPE_BIN,
111 G_IMPLEMENT_INTERFACE (GTK_TYPE_BUILDABLE,
112 gtk_frame_buildable_init)
113 G_IMPLEMENT_INTERFACE (GTK_TYPE_SIZE_REQUEST,
114 gtk_frame_size_request_init))
117 gtk_frame_class_init (GtkFrameClass *class)
119 GObjectClass *gobject_class;
120 GtkWidgetClass *widget_class;
121 GtkContainerClass *container_class;
123 gobject_class = (GObjectClass*) class;
124 widget_class = GTK_WIDGET_CLASS (class);
125 container_class = GTK_CONTAINER_CLASS (class);
127 gobject_class->set_property = gtk_frame_set_property;
128 gobject_class->get_property = gtk_frame_get_property;
130 g_object_class_install_property (gobject_class,
132 g_param_spec_string ("label",
134 P_("Text of the frame's label"),
137 GTK_PARAM_WRITABLE));
138 g_object_class_install_property (gobject_class,
140 g_param_spec_float ("label-xalign",
142 P_("The horizontal alignment of the label"),
146 GTK_PARAM_READWRITE));
147 g_object_class_install_property (gobject_class,
149 g_param_spec_float ("label-yalign",
151 P_("The vertical alignment of the label"),
155 GTK_PARAM_READWRITE));
156 g_object_class_install_property (gobject_class,
158 g_param_spec_enum ("shadow-type",
160 P_("Appearance of the frame border"),
161 GTK_TYPE_SHADOW_TYPE,
162 GTK_SHADOW_ETCHED_IN,
163 GTK_PARAM_READWRITE));
165 g_object_class_install_property (gobject_class,
167 g_param_spec_object ("label-widget",
169 P_("A widget to display in place of the usual frame label"),
171 GTK_PARAM_READWRITE));
173 widget_class->draw = gtk_frame_draw;
174 widget_class->size_allocate = gtk_frame_size_allocate;
176 container_class->remove = gtk_frame_remove;
177 container_class->forall = gtk_frame_forall;
179 class->compute_child_allocation = gtk_frame_real_compute_child_allocation;
181 g_type_class_add_private (class, sizeof (GtkFramePrivate));
185 gtk_frame_buildable_init (GtkBuildableIface *iface)
187 iface->add_child = gtk_frame_buildable_add_child;
191 gtk_frame_buildable_add_child (GtkBuildable *buildable,
196 if (type && strcmp (type, "label") == 0)
197 gtk_frame_set_label_widget (GTK_FRAME (buildable), GTK_WIDGET (child));
199 gtk_container_add (GTK_CONTAINER (buildable), GTK_WIDGET (child));
201 GTK_BUILDER_WARN_INVALID_CHILD_TYPE (GTK_FRAME (buildable), type);
205 gtk_frame_init (GtkFrame *frame)
207 GtkFramePrivate *priv;
209 frame->priv = G_TYPE_INSTANCE_GET_PRIVATE (frame,
214 priv->label_widget = NULL;
215 priv->shadow_type = GTK_SHADOW_ETCHED_IN;
216 priv->label_xalign = 0.0;
217 priv->label_yalign = 0.5;
221 gtk_frame_set_property (GObject *object,
226 GtkFrame *frame = GTK_FRAME (object);
227 GtkFramePrivate *priv = frame->priv;
232 gtk_frame_set_label (frame, g_value_get_string (value));
234 case PROP_LABEL_XALIGN:
235 gtk_frame_set_label_align (frame, g_value_get_float (value),
238 case PROP_LABEL_YALIGN:
239 gtk_frame_set_label_align (frame, priv->label_xalign,
240 g_value_get_float (value));
242 case PROP_SHADOW_TYPE:
243 gtk_frame_set_shadow_type (frame, g_value_get_enum (value));
245 case PROP_LABEL_WIDGET:
246 gtk_frame_set_label_widget (frame, g_value_get_object (value));
249 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
255 gtk_frame_get_property (GObject *object,
260 GtkFrame *frame = GTK_FRAME (object);
261 GtkFramePrivate *priv = frame->priv;
266 g_value_set_string (value, gtk_frame_get_label (frame));
268 case PROP_LABEL_XALIGN:
269 g_value_set_float (value, priv->label_xalign);
271 case PROP_LABEL_YALIGN:
272 g_value_set_float (value, priv->label_yalign);
274 case PROP_SHADOW_TYPE:
275 g_value_set_enum (value, priv->shadow_type);
277 case PROP_LABEL_WIDGET:
278 g_value_set_object (value,
280 G_OBJECT (priv->label_widget) : NULL);
283 G_OBJECT_WARN_INVALID_PROPERTY_ID (object, prop_id, pspec);
290 * @label: the text to use as the label of the frame
292 * Creates a new #GtkFrame, with optional label @label.
293 * If @label is %NULL, the label is omitted.
295 * Return value: a new #GtkFrame widget
298 gtk_frame_new (const gchar *label)
300 return g_object_new (GTK_TYPE_FRAME, "label", label, NULL);
304 gtk_frame_remove (GtkContainer *container,
307 GtkFrame *frame = GTK_FRAME (container);
308 GtkFramePrivate *priv = frame->priv;
310 if (priv->label_widget == child)
311 gtk_frame_set_label_widget (frame, NULL);
313 GTK_CONTAINER_CLASS (gtk_frame_parent_class)->remove (container, child);
317 gtk_frame_forall (GtkContainer *container,
318 gboolean include_internals,
319 GtkCallback callback,
320 gpointer callback_data)
322 GtkBin *bin = GTK_BIN (container);
323 GtkFrame *frame = GTK_FRAME (container);
324 GtkFramePrivate *priv = frame->priv;
327 child = gtk_bin_get_child (bin);
329 (* callback) (child, callback_data);
331 if (priv->label_widget)
332 (* callback) (priv->label_widget, callback_data);
336 * gtk_frame_set_label:
337 * @frame: a #GtkFrame
338 * @label: (allow-none): the text to use as the label of the frame
340 * Sets the text of the label. If @label is %NULL,
341 * the current label is removed.
344 gtk_frame_set_label (GtkFrame *frame,
347 g_return_if_fail (GTK_IS_FRAME (frame));
351 gtk_frame_set_label_widget (frame, NULL);
355 GtkWidget *child = gtk_label_new (label);
356 gtk_widget_show (child);
358 gtk_frame_set_label_widget (frame, child);
363 * gtk_frame_get_label:
364 * @frame: a #GtkFrame
366 * If the frame's label widget is a #GtkLabel, returns the
367 * text in the label widget. (The frame will have a #GtkLabel
368 * for the label widget if a non-%NULL argument was passed
369 * to gtk_frame_new().)
371 * Return value: the text in the label, or %NULL if there
372 * was no label widget or the lable widget was not
373 * a #GtkLabel. This string is owned by GTK+ and
374 * must not be modified or freed.
376 G_CONST_RETURN gchar *
377 gtk_frame_get_label (GtkFrame *frame)
379 GtkFramePrivate *priv;
381 g_return_val_if_fail (GTK_IS_FRAME (frame), NULL);
385 if (GTK_IS_LABEL (priv->label_widget))
386 return gtk_label_get_text (GTK_LABEL (priv->label_widget));
392 * gtk_frame_set_label_widget:
393 * @frame: a #GtkFrame
394 * @label_widget: the new label widget
396 * Sets the label widget for the frame. This is the widget that
397 * will appear embedded in the top edge of the frame as a
401 gtk_frame_set_label_widget (GtkFrame *frame,
402 GtkWidget *label_widget)
404 GtkFramePrivate *priv;
405 gboolean need_resize = FALSE;
407 g_return_if_fail (GTK_IS_FRAME (frame));
408 g_return_if_fail (label_widget == NULL || GTK_IS_WIDGET (label_widget));
409 g_return_if_fail (label_widget == NULL || gtk_widget_get_parent (label_widget) == NULL);
413 if (priv->label_widget == label_widget)
416 if (priv->label_widget)
418 need_resize = gtk_widget_get_visible (priv->label_widget);
419 gtk_widget_unparent (priv->label_widget);
422 priv->label_widget = label_widget;
426 priv->label_widget = label_widget;
427 gtk_widget_set_parent (label_widget, GTK_WIDGET (frame));
428 need_resize |= gtk_widget_get_visible (label_widget);
431 if (gtk_widget_get_visible (GTK_WIDGET (frame)) && need_resize)
432 gtk_widget_queue_resize (GTK_WIDGET (frame));
434 g_object_freeze_notify (G_OBJECT (frame));
435 g_object_notify (G_OBJECT (frame), "label-widget");
436 g_object_notify (G_OBJECT (frame), "label");
437 g_object_thaw_notify (G_OBJECT (frame));
441 * gtk_frame_get_label_widget:
442 * @frame: a #GtkFrame
444 * Retrieves the label widget for the frame. See
445 * gtk_frame_set_label_widget().
447 * Return value: (transfer none): the label widget, or %NULL if there is none.
450 gtk_frame_get_label_widget (GtkFrame *frame)
452 g_return_val_if_fail (GTK_IS_FRAME (frame), NULL);
454 return frame->priv->label_widget;
458 * gtk_frame_set_label_align:
459 * @frame: a #GtkFrame
460 * @xalign: The position of the label along the top edge
461 * of the widget. A value of 0.0 represents left alignment;
462 * 1.0 represents right alignment.
463 * @yalign: The y alignment of the label. A value of 0.0 aligns under
464 * the frame; 1.0 aligns above the frame. If the values are exactly
465 * 0.0 or 1.0 the gap in the frame won't be painted because the label
466 * will be completely above or below the frame.
468 * Sets the alignment of the frame widget's label. The
469 * default values for a newly created frame are 0.0 and 0.5.
472 gtk_frame_set_label_align (GtkFrame *frame,
476 GtkFramePrivate *priv;
478 g_return_if_fail (GTK_IS_FRAME (frame));
482 xalign = CLAMP (xalign, 0.0, 1.0);
483 yalign = CLAMP (yalign, 0.0, 1.0);
485 g_object_freeze_notify (G_OBJECT (frame));
486 if (xalign != priv->label_xalign)
488 priv->label_xalign = xalign;
489 g_object_notify (G_OBJECT (frame), "label-xalign");
492 if (yalign != priv->label_yalign)
494 priv->label_yalign = yalign;
495 g_object_notify (G_OBJECT (frame), "label-yalign");
498 g_object_thaw_notify (G_OBJECT (frame));
499 gtk_widget_queue_resize (GTK_WIDGET (frame));
503 * gtk_frame_get_label_align:
504 * @frame: a #GtkFrame
505 * @xalign: (allow-none): location to store X alignment of frame's label, or %NULL
506 * @yalign: (allow-none): location to store X alignment of frame's label, or %NULL
508 * Retrieves the X and Y alignment of the frame's label. See
509 * gtk_frame_set_label_align().
512 gtk_frame_get_label_align (GtkFrame *frame,
516 GtkFramePrivate *priv;
518 g_return_if_fail (GTK_IS_FRAME (frame));
523 *xalign = priv->label_xalign;
525 *yalign = priv->label_yalign;
529 * gtk_frame_set_shadow_type:
530 * @frame: a #GtkFrame
531 * @type: the new #GtkShadowType
533 * Sets the shadow type for @frame.
536 gtk_frame_set_shadow_type (GtkFrame *frame,
539 GtkFramePrivate *priv;
542 g_return_if_fail (GTK_IS_FRAME (frame));
546 if ((GtkShadowType) priv->shadow_type != type)
548 widget = GTK_WIDGET (frame);
549 priv->shadow_type = type;
550 g_object_notify (G_OBJECT (frame), "shadow-type");
552 if (gtk_widget_is_drawable (widget))
554 gtk_widget_queue_draw (widget);
557 gtk_widget_queue_resize (widget);
562 * gtk_frame_get_shadow_type:
563 * @frame: a #GtkFrame
565 * Retrieves the shadow type of the frame. See
566 * gtk_frame_set_shadow_type().
568 * Return value: the current shadow type of the frame.
571 gtk_frame_get_shadow_type (GtkFrame *frame)
573 g_return_val_if_fail (GTK_IS_FRAME (frame), GTK_SHADOW_ETCHED_IN);
575 return frame->priv->shadow_type;
579 gtk_frame_draw (GtkWidget *widget,
583 GtkFramePrivate *priv;
586 gint x, y, width, height;
587 GtkAllocation allocation;
589 frame = GTK_FRAME (widget);
592 style = gtk_widget_get_style (widget);
593 state = gtk_widget_get_state (widget);
594 gtk_widget_get_allocation (widget, &allocation);
596 x = priv->child_allocation.x - allocation.x - style->xthickness;
597 y = priv->child_allocation.y - allocation.y - style->ythickness;
598 width = priv->child_allocation.width + 2 * style->xthickness;
599 height = priv->child_allocation.height + 2 * style->ythickness;
601 if (priv->label_widget)
607 if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
608 xalign = priv->label_xalign;
610 xalign = 1 - priv->label_xalign;
612 height_extra = MAX (0, priv->label_allocation.height - style->ythickness)
613 - priv->label_yalign * priv->label_allocation.height;
615 height += height_extra;
617 x2 = style->xthickness + (priv->child_allocation.width - priv->label_allocation.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_SIDE_PAD;
618 /* If the label is completely over or under the frame we can omit the gap */
619 if (priv->label_yalign == 0.0 || priv->label_yalign == 1.0)
620 gtk_paint_shadow (style, cr,
621 state, priv->shadow_type,
623 x, y, width, height);
625 gtk_paint_shadow_gap (style, cr,
626 state, priv->shadow_type,
630 x2, priv->label_allocation.width + 2 * LABEL_PAD);
633 gtk_paint_shadow (style, cr,
634 state, priv->shadow_type,
636 x, y, width, height);
638 GTK_WIDGET_CLASS (gtk_frame_parent_class)->draw (widget, cr);
644 gtk_frame_size_allocate (GtkWidget *widget,
645 GtkAllocation *allocation)
647 GtkFrame *frame = GTK_FRAME (widget);
648 GtkFramePrivate *priv = frame->priv;
649 GtkBin *bin = GTK_BIN (widget);
650 GtkAllocation new_allocation;
653 gtk_widget_set_allocation (widget, allocation);
655 gtk_frame_compute_child_allocation (frame, &new_allocation);
657 /* If the child allocation changed, that means that the frame is drawn
658 * in a new place, so we must redraw the entire widget.
660 if (gtk_widget_get_mapped (widget))
662 gdk_window_invalidate_rect (gtk_widget_get_window (widget), allocation, FALSE);
665 child = gtk_bin_get_child (bin);
666 if (child && gtk_widget_get_visible (child))
667 gtk_widget_size_allocate (child, &new_allocation);
669 priv->child_allocation = new_allocation;
671 if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
674 gint nat_width, width, height;
677 style = gtk_widget_get_style (widget);
679 if (gtk_widget_get_direction (widget) == GTK_TEXT_DIR_LTR)
680 xalign = priv->label_xalign;
682 xalign = 1 - priv->label_xalign;
684 gtk_size_request_get_width (GTK_SIZE_REQUEST (priv->label_widget), NULL, &nat_width);
685 width = new_allocation.width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD;
686 width = MIN (width, nat_width);
688 gtk_size_request_get_height_for_width (GTK_SIZE_REQUEST (priv->label_widget), width,
692 priv->label_allocation.x = priv->child_allocation.x + LABEL_SIDE_PAD +
693 (new_allocation.width - width - 2 * LABEL_PAD - 2 * LABEL_SIDE_PAD) * xalign + LABEL_PAD;
695 priv->label_allocation.width = width;
697 priv->label_allocation.y = priv->child_allocation.y - MAX (height, style->ythickness);
698 priv->label_allocation.height = height;
700 gtk_widget_size_allocate (priv->label_widget, &priv->label_allocation);
705 gtk_frame_compute_child_allocation (GtkFrame *frame,
706 GtkAllocation *child_allocation)
708 g_return_if_fail (GTK_IS_FRAME (frame));
709 g_return_if_fail (child_allocation != NULL);
711 GTK_FRAME_GET_CLASS (frame)->compute_child_allocation (frame, child_allocation);
715 gtk_frame_real_compute_child_allocation (GtkFrame *frame,
716 GtkAllocation *child_allocation)
718 GtkFramePrivate *priv = frame->priv;
719 GtkWidget *widget = GTK_WIDGET (frame);
720 GtkAllocation allocation;
725 style = gtk_widget_get_style (widget);
727 gtk_widget_get_allocation (widget, &allocation);
729 border_width = gtk_container_get_border_width (GTK_CONTAINER (frame));
731 if (priv->label_widget)
733 gint nat_width, width, height;
735 gtk_size_request_get_width (GTK_SIZE_REQUEST (priv->label_widget), NULL, &nat_width);
737 width = allocation.width;
738 width -= 2 * LABEL_PAD + 2 * LABEL_SIDE_PAD;
739 width -= (border_width + style->xthickness) * 2;
741 width = MIN (width, nat_width);
743 gtk_size_request_get_height_for_width (GTK_SIZE_REQUEST (priv->label_widget), width,
746 top_margin = MAX (height, style->ythickness);
749 top_margin = style->ythickness;
751 child_allocation->x = border_width + style->xthickness;
752 child_allocation->y = border_width + top_margin;
753 child_allocation->width = MAX (1, (gint) allocation.width - child_allocation->x * 2);
754 child_allocation->height = MAX (1, ((gint) allocation.height - child_allocation->y -
755 border_width - (gint) style->ythickness));
757 child_allocation->x += allocation.x;
758 child_allocation->y += allocation.y;
762 gtk_frame_get_size (GtkSizeRequest *request,
763 GtkOrientation orientation,
767 GtkFrame *frame = GTK_FRAME (request);
768 GtkFramePrivate *priv = frame->priv;
770 GtkWidget *widget = GTK_WIDGET (request);
772 GtkBin *bin = GTK_BIN (widget);
773 gint child_min, child_nat;
774 gint minimum, natural;
777 style = gtk_widget_get_style (widget);
779 if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
781 if (orientation == GTK_ORIENTATION_HORIZONTAL)
783 gtk_size_request_get_width (GTK_SIZE_REQUEST (priv->label_widget),
784 &child_min, &child_nat);
785 minimum = child_min + 2 * LABEL_PAD + 2 * LABEL_SIDE_PAD;
786 natural = child_nat + 2 * LABEL_PAD + 2 * LABEL_SIDE_PAD;
790 gtk_size_request_get_height (GTK_SIZE_REQUEST (priv->label_widget),
791 &child_min, &child_nat);
792 minimum = MAX (0, child_min - style->ythickness);
793 natural = MAX (0, child_nat - style->ythickness);
802 child = gtk_bin_get_child (bin);
803 if (child && gtk_widget_get_visible (child))
805 if (orientation == GTK_ORIENTATION_HORIZONTAL)
807 gtk_size_request_get_width (GTK_SIZE_REQUEST (child),
808 &child_min, &child_nat);
809 minimum = MAX (minimum, child_min);
810 natural = MAX (natural, child_nat);
814 gtk_size_request_get_height (GTK_SIZE_REQUEST (child),
815 &child_min, &child_nat);
816 minimum += child_min;
817 natural += child_nat;
821 border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
823 if (orientation == GTK_ORIENTATION_HORIZONTAL)
825 minimum += (border_width + style->xthickness) * 2;
826 natural += (border_width + style->xthickness) * 2;
830 minimum += (border_width + style->ythickness) * 2;
831 natural += (border_width + style->ythickness) * 2;
835 *minimum_size = minimum;
838 *natural_size = natural;
842 gtk_frame_get_width (GtkSizeRequest *widget,
846 gtk_frame_get_size (widget, GTK_ORIENTATION_HORIZONTAL, minimum_size, natural_size);
850 gtk_frame_get_height (GtkSizeRequest *widget,
854 gtk_frame_get_size (widget, GTK_ORIENTATION_VERTICAL, minimum_size, natural_size);
859 gtk_frame_get_height_for_width (GtkSizeRequest *request,
861 gint *minimum_height,
862 gint *natural_height)
864 GtkWidget *widget = GTK_WIDGET (request);
866 GtkFrame *frame = GTK_FRAME (widget);
867 GtkFramePrivate *priv = frame->priv;
868 GtkBin *bin = GTK_BIN (widget);
870 gint child_min, child_nat, label_width;
871 gint minimum, natural;
874 style = gtk_widget_get_style (widget);
876 border_width = gtk_container_get_border_width (GTK_CONTAINER (widget));
877 minimum = (border_width + style->ythickness) * 2;
878 natural = (border_width + style->ythickness) * 2;
880 width -= (border_width + style->xthickness) * 2;
881 label_width = width - 2 * LABEL_PAD + 2 * LABEL_SIDE_PAD;
883 if (priv->label_widget && gtk_widget_get_visible (priv->label_widget))
885 gtk_size_request_get_height_for_width (GTK_SIZE_REQUEST (priv->label_widget),
886 label_width, &child_min, &child_nat);
887 minimum += child_min;
888 natural += child_nat;
891 child = gtk_bin_get_child (bin);
892 if (child && gtk_widget_get_visible (child))
894 gtk_size_request_get_height_for_width (GTK_SIZE_REQUEST (child),
895 width, &child_min, &child_nat);
896 minimum += child_min;
897 natural += child_nat;
901 *minimum_height = minimum;
904 *natural_height = natural;
908 gtk_frame_get_width_for_height (GtkSizeRequest *widget,
913 GTK_SIZE_REQUEST_GET_IFACE (widget)->get_width (widget, minimum_width, natural_width);
917 gtk_frame_size_request_init (GtkSizeRequestIface *iface)
919 iface->get_width = gtk_frame_get_width;
920 iface->get_height = gtk_frame_get_height;
921 iface->get_height_for_width = gtk_frame_get_height_for_width;
922 iface->get_width_for_height = gtk_frame_get_width_for_height;