Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: Frame

[26:7] extends: object

Surrounds its child with a decorative frame and an optional label. An example GtkFrame If present, the label is drawn inside the top edge of the frame. The horizontal position of the label can be controlled with [method@Gtk.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. # GtkFrame as GtkBuildable An example of a UI definition fragment with GtkFrame: xml <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> # CSS nodes 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. # Accessibility GtkFrame uses the [enum@Gtk.AccessibleRole.group] role.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • Frame (label = null)

    Creates a new GtkFrame, with optional label @label. If @label is %NULL, the label is omitted.

    • @p label is the text to use as the label of the frame.
  • toNativeHandle (Source)

    Normalizes a constructor argument into a raw pointer carrier. Accepts a raw NativeHandle, a raw NativeBuffer returned from fn.call(...), another generated wrapper exposing handle(), or null. Returns null when the argument carries no pointer.

    • @p Source is the raw handle, raw buffer, wrapper, or null.
    • @r A raw pointer carrier or null when no pointer is present.
  • getLib ()

    Returns the opened native library for this generated wrapper.

    • @r The opened native library.
  • handle ()

    Returns the wrapped NativeHandle.

    • @r The wrapped NativeHandle.
  • isNull ()

    Returns true when the wrapped handle is null.

    • @r A bool.
  • describe ()

    Returns a small string for debugging generated wrappers.

    • @r A string.
  • asWidget ()

    Wraps this handle as Widget.

    • @r A Widget object.
  • asAccessible ()

    Wraps this handle as Accessible.

    • @r A Accessible object.
  • asBuildable ()

    Wraps this handle as Buildable.

    • @r A Buildable object.
  • asConstraintTarget ()

    Wraps this handle as ConstraintTarget.

    • @r A ConstraintTarget object.
  • getProperty (string Name)

    Reads one generated property by name.

  • setProperty (string Name, Value)

    Writes one generated property by name.

  • setChild (object Value)

    The child widget.

    • @p Value is the new property value.
    • @r None.
  • setLabel (string Value)

    Text of the frame's label.

    • @p Value is the new property value.
    • @r None.
  • setLabelwidget (object Value)

    Widget to display in place of the usual frame label.

    • @p Value is the new property value.
    • @r None.
  • setLabelxalign (double Value)

    The horizontal alignment of the label.

    • @p Value is the new property value.
    • @r None.
  • get_child ()

    Gets the child widget of @frame.

  • get_label ()

    Returns the frame labels text. If the frame's label widget is not a GtkLabel, %NULL is returned.

  • get_label_align ()

    Retrieves the X alignment of the frame’s label.

  • get_label_widget ()

    Retrieves the label widget for the frame.

  • set_child (object child)

    Sets the child widget of @frame.

    • @p child is the child widget.
    • @r None.
  • set_label (string label)

    Creates a new GtkLabel with the @label and sets it as the frame's label widget.

    • @p label is the text to use as the label of the frame.
    • @r None.
  • set_label_align (double xalign)

    Sets the X alignment of the frame widget’s label. The default value for a newly created frame is 0.0.

    • @p xalign is 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..
    • @r None.
  • set_label_widget (object 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.

    • @p label_widget is the new label widget.
    • @r None.

class: FrameMeta

[296:14] static extends: object

Generated metadata helpers for Frame class surfaces.

Methods

  • properties ()

    Returns property metadata for Frame.

    • @r A list.