Basics
Guides
API Reference
Basics
Guides
API Reference
[330:14] static extends: object
Generated metadata helpers for AspectFrame class surfaces.
properties ()
Returns property metadata for
AspectFrame.
A list.[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.
AspectFrame (xalign = null, yalign = null, ratio = null, obey_child = null)
Create a new
GtkAspectFrame.
xalign is Horizontal alignment of the child within the parent. Ranges from 0.0 (left aligned) to 1.0 (right aligned).yalign is Vertical alignment of the child within the parent. Ranges from 0.0 (top aligned) to 1.0 (bottom aligned).ratio is The desired aspect ratio..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 exposinghandle(), or null. Returns null when the argument carries no pointer.
Source is the raw handle, raw buffer, wrapper, or null.A raw pointer carrier or null when no pointer is present.getLib ()
Returns the opened native library for this generated wrapper.
The opened native library.handle ()
Returns the wrapped NativeHandle.
The wrapped NativeHandle.isNull ()
Returns true when the wrapped handle is null.
A bool.describe ()
Returns a small string for debugging generated wrappers.
A string.asWidget ()
Wraps this handle as
Widget.
A Widget object.asAccessible ()
Wraps this handle as
Accessible.
A Accessible object.asBuildable ()
Wraps this handle as
Buildable.
A Buildable object.asConstraintTarget ()
Wraps this handle as
ConstraintTarget.
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.
Value is the new property value.None.setObeychild (bool Value)
Whether the
GtkAspectFrameshould use the aspect ratio of its child.
Value is the new property value.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.
Value is the new property value.None.setXalign (double Value)
The horizontal alignment of the child.
Value is the new property value.None.setYalign (double Value)
The vertical alignment of the child.
Value is the new property value.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.
child is the child widget.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.
obey_child is If %TRUE, @ratio is ignored, and the aspect ratio is taken from the requisition of the child..None.set_ratio (double ratio)
Sets the desired aspect ratio of the child.
ratio is aspect ratio of the child.None.set_xalign (double xalign)
Sets the horizontal alignment of the child within the allocation of the
GtkAspectFrame.
xalign is horizontal alignment, from 0.0 (left aligned) to 1.0 (right aligned).None.set_yalign (double yalign)
Sets the vertical alignment of the child within the allocation of the
GtkAspectFrame.
yalign is horizontal alignment, from 0.0 (top aligned) to 1.0 (bottom aligned).None.
Aussom
Write once. Embed everywhere.
Copyright 2026 Austin Lehman. All rights reserved.