Basics

Guides

API Reference

Menu

Basics

Guides

API Reference

class: AspectFrameMeta

[330:14] static extends: object

Generated metadata helpers for AspectFrame class surfaces.

Methods

  • properties ()

    Returns property metadata for AspectFrame.

    • @r A list.

class: AspectFrame

[17:7] extends: object

Preserves the aspect ratio of its child. The frame can respect the aspect ratio of the child widget, or use its own aspect ratio. # CSS nodes GtkAspectFrame uses a CSS node with name aspectframe. # Accessibility Until GTK 4.10, GtkAspectFrame used the [enum@Gtk.AccessibleRole.group] role. Starting from GTK 4.12, GtkAspectFrame uses the [enum@Gtk.AccessibleRole.generic] role.

Members

  • handleObj
  • lib
  • retainedCallbacks
  • signalHandlerNames
  • signalSetterHandlers

Methods

  • AspectFrame (xalign = null, yalign = null, ratio = null, obey_child = null)

    Create a new GtkAspectFrame.

    • @p xalign is Horizontal alignment of the child within the parent. Ranges from 0.0 (left aligned) to 1.0 (right aligned).
    • @p yalign is Vertical alignment of the child within the parent. Ranges from 0.0 (top aligned) to 1.0 (bottom aligned).
    • @p ratio is The desired aspect ratio..
    • @p obey_child is If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requistion of the child..
  • 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.
  • setObeychild (bool Value)

    Whether the GtkAspectFrame should use the aspect ratio of its child.

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

    The aspect ratio to be used by the GtkAspectFrame. This property is only used if [property@Gtk.AspectFrame:obey-child] is set to %FALSE.

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

    The horizontal alignment of the child.

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

    The vertical alignment of the child.

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

    Gets the child widget of @self.

  • get_obey_child ()

    Returns whether the child's size request should override the set aspect ratio of the GtkAspectFrame.

  • get_ratio ()

    Returns the desired aspect ratio of the child.

  • get_xalign ()

    Returns the horizontal alignment of the child within the allocation of the GtkAspectFrame.

  • get_yalign ()

    Returns the vertical alignment of the child within the allocation of the GtkAspectFrame.

  • set_child (object child)

    Sets the child widget of @self.

    • @p child is the child widget.
    • @r None.
  • set_obey_child (bool obey_child)

    Sets whether the aspect ratio of the child's size request should override the set aspect ratio of the GtkAspectFrame.

    • @p obey_child is If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requisition of the child..
    • @r None.
  • set_ratio (double ratio)

    Sets the desired aspect ratio of the child.

    • @p ratio is aspect ratio of the child.
    • @r None.
  • set_xalign (double xalign)

    Sets the horizontal alignment of the child within the allocation of the GtkAspectFrame.

    • @p xalign is horizontal alignment, from 0.0 (left aligned) to 1.0 (right aligned).
    • @r None.
  • set_yalign (double yalign)

    Sets the vertical alignment of the child within the allocation of the GtkAspectFrame.

    • @p yalign is horizontal alignment, from 0.0 (top aligned) to 1.0 (bottom aligned).
    • @r None.