![]() | ![]() | ![]() | GTK+ Reference Manual | ![]() |
---|
GtkFrame — A bin with a decorative frame and optional label.
#include <gtk/gtk.h> struct 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); G_CONST_RETURN 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);
GObject +----GtkObject +----GtkWidget +----GtkContainer +----GtkBin +----GtkFrame
GtkFrame implements AtkImplementorIface.
"label" gchararray : 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
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 gtk_frame_set_label_align().
GtkWidget* gtk_frame_new (const gchar *label);
Create a new Frame, with optional label label. If label is NULL, the label is omitted.
label : | |
Returns : |
void gtk_frame_set_label (GtkFrame *frame, const gchar *label);
Set the text of the label. If label is NULL, the current label, if any, is removed.
frame : | |
label : |
void gtk_frame_set_label_widget (GtkFrame *frame, GtkWidget *label_widget);
Set the label widget for the frame. This is the widget that will appear embedded in the top edge of the frame as a title.
frame : | a GtkFrame |
label_widget : | the new label widget |
void gtk_frame_set_label_align (GtkFrame *frame, gfloat xalign, gfloat yalign);
Set the alignment of the Frame widget's label. The default value for a newly created Frame is 0.0.
frame : | The Frame widget. |
xalign : | The position of the label along the top edge of the widget. A value of 0.0 represents left alignment; 1.0 represents right alignment. |
yalign : | The y alignment of the label. Currently ignored. |
void gtk_frame_set_shadow_type (GtkFrame *frame, GtkShadowType type);
Set the shadow type for the Frame widget.
frame : | The Frame widget. |
type : | New shadow type. |
G_CONST_RETURN gchar* gtk_frame_get_label (GtkFrame *frame);
If the frame's label widget is a GtkLabel, return the text in the label widget. (The frame will have a GtkLabel for the label widget if a non-NULL argument was passed to gtk_frame_new().)
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_set_label_align().
frame : | a GtkFrame |
xalign : | location to store X alignment of frame's label, or NULL |
yalign : | location to store X alignment of frame's label, or NULL |
GtkWidget* gtk_frame_get_label_widget (GtkFrame *frame);
Retrieves the label widget for the frame. See gtk_frame_set_label_widget().
frame : | a GtkFrame |
Returns : | the label widget, or NULL if there is none. |
GtkShadowType gtk_frame_get_shadow_type (GtkFrame *frame);
Retrieves the shadow type of the frame. See gtk_frame_set_shadow_type().
frame : | a GtkFrame |
Returns : | the current shadow type of the frame. |
"label" (gchararray : 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) |
|
<< Ornaments | GtkHSeparator >> |