It derives from <GtkWidget>.
Surrounds its child with a decorative frame and an optional label.
If present, the label is drawn inside the top edge of the frame. The
horizontal position of the label can be controlled with frame:set-label-align.
<GtkFrame> clips its child. You can use this to add
rounded corners to widgets, but be aware that it also cuts off shadows.
An example of a UI definition fragment with GtkFrame:
<object class="GtkFrame">
<property name="label-widget">
<object class="GtkLabel" id="frame_label"/>
</property>
<property name="child">
<object class="GtkEntry" id="frame_content"/>
</property>
</object>
frame ├── <label widget> ╰── <child>
<GtkFrame> has a main CSS node with name “frame”,
which is used to draw the visible border. You can set the appearance of
the border using CSS properties like “border-style” on this node.
<GtkFrame> uses the Gtk.AccessibleRole.group
role.
parent-instanceThe child widget.
Its value is a <GtkWidget>, or #f.
Set it with (set! (frame:child self) value).
Text of the frame’s label.
Its value is a string, or #f.
Set it with (set! (frame:label self) value).
Widget to display in place of the usual frame label.
Its value is a <GtkWidget>, or #f.
Set it with (set! (frame:label-widget self) value).
The horizontal alignment of the label.
Its value is a real number.
Set it with (set! (frame:label-xalign self) value).
Gets the child widget of self.
Passed: a <GtkFrame>.
Returned: a <GtkWidget>, or #f.
the child widget of self
Returns the frame labels text.
If the frame’s label widget is not a <GtkLabel>,
#f is returned.
Passed: a <GtkFrame>.
Returned: a string, or #f.
the text in the label, or #f if there was no label widget or the
label widget was not a <GtkLabel>. This string is
owned by GTK and must not be modified or freed.
Retrieves the X alignment of the frame’s label.
Passed: a <GtkFrame>.
Returned: a real number.
the frames X alignment
Retrieves the label widget for the frame.
Passed: a <GtkFrame>.
Returned: a <GtkWidget>, or #f.
the label widget
Creates a new <GtkFrame>, with optional label
label.
If label is #f, the label is omitted.
Passed, or left out: a string, or #f.
the text to use as the label of the frame
Returned: a <GtkWidget>.
a new <GtkFrame> widget
Sets the child widget of self.
Passed: a <GtkFrame>.
Passed, or left out: a <GtkWidget>, or #f.
the child widget
Creates a new <GtkLabel> with the label and
sets it as the frame’s label widget.
Passed: a <GtkFrame>.
Passed, or left out: a string, or #f.
the text to use as the label of the frame
Sets the X alignment of the frame widget’s label.
The default value for a newly created frame is 0.0.
Passed: a <GtkFrame>.
Passed: a real number.
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.
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.
Passed: a <GtkFrame>.
Passed, or left out: a <GtkWidget>, or #f.
the new label widget
To override it in a new class, give register-type #:vfuncs
`((compute-child-allocation . ,procedure)). The procedure is called
as (procedure self allocation).
Passed: the class whose implementation to call:
<GtkFrame>, or a class that derives from it, or its
GType number.
Passed: a <GtkFrame>.
Passed: a <GdkRectangle>.