Synopsis
#include <gtk/gtk.h>
GtkFrame;
GtkWidget* gtk_frame_new (const gchar *label);
void gtk_frame_set_label (GtkFrame *frame,
const gchar *label);
void gtk_frame_set_label_widget (GtkFrame *frame,
GtkWidget *label_widget);
void gtk_frame_set_label_align (GtkFrame *frame,
gfloat xalign,
gfloat yalign);
void gtk_frame_set_shadow_type (GtkFrame *frame,
GtkShadowType type);
const gchar* gtk_frame_get_label (GtkFrame *frame);
void gtk_frame_get_label_align (GtkFrame *frame,
gfloat *xalign,
gfloat *yalign);
GtkWidget* gtk_frame_get_label_widget (GtkFrame *frame);
GtkShadowType gtk_frame_get_shadow_type (GtkFrame *frame);
Object Hierarchy
GObject
+----GInitiallyUnowned
+----GtkObject
+----GtkWidget
+----GtkContainer
+----GtkBin
+----GtkFrame
+----GtkAspectFrame
Properties"label" gchar* : Read / Write "label-widget" GtkWidget* : Read / Write "label-xalign" gfloat : Read / Write "label-yalign" gfloat : Read / Write "shadow" GtkShadowType : Read / Write "shadow-type" GtkShadowType : Read / Write Description
The frame widget is a Bin that surrounds its child
with a decorative frame and an optional label.
If present, the label is drawn in a gap in the
top side of the frame. The position of the
label can be controlled with GtkFrame as GtkBuildableThe GtkFrame implementation of the GtkBuildable interface supports placing a child in the label position by specifying "label" as the "type" attribute of a <child> element. A normal content child can be specified without specifying a <child> type attribute. Example 40. A UI definition fragment with GtkFrame
<object class="GtkFrame">
<child type="label">
<object class="GtkLabel" id="frame-label"/>
</child>
<child>
<object class="GtkEntry" id="frame-content"/>
</child>
</object>
Detailsgtk_frame_new ()GtkWidget* gtk_frame_new (const gchar *label);
Creates a new GtkFrame, with optional label
gtk_frame_set_label ()void gtk_frame_set_label (GtkFrame *frame, const gchar *label);
Sets the text of the label. If
gtk_frame_set_label_widget ()void gtk_frame_set_label_widget (GtkFrame *frame, GtkWidget *label_widget); Sets the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.
gtk_frame_set_label_align ()void gtk_frame_set_label_align (GtkFrame *frame, gfloat xalign, gfloat yalign); Sets the alignment of the frame widget's label. The default values for a newly created frame are 0.0 and 0.5.
gtk_frame_set_shadow_type ()void gtk_frame_set_shadow_type (GtkFrame *frame, GtkShadowType type);
Sets the shadow type for
gtk_frame_get_label ()const gchar* gtk_frame_get_label (GtkFrame *frame);
If the frame's label widget is a GtkLabel, returns the
text in the label widget. (The frame will have a GtkLabel
for the label widget if a non-
gtk_frame_get_label_align ()void gtk_frame_get_label_align (GtkFrame *frame, gfloat *xalign, gfloat *yalign);
Retrieves the X and Y alignment of the frame's label. See
gtk_frame_get_label_widget ()GtkWidget* gtk_frame_get_label_widget (GtkFrame *frame);
Retrieves the label widget for the frame. See
gtk_frame_get_shadow_type ()GtkShadowType gtk_frame_get_shadow_type (GtkFrame *frame);
Retrieves the shadow type of the frame. See
Property DetailsThe
| ||||||||||||||||||||||||||||||||||||||||||||||