gtk.aspect_frame
Module for [AspectFrame] class
Types 3
classAspectFrame : gtk.widget.Widget
gtk.aspect_frame.AspectFrame 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
gtk.aspect_frame.AspectFrame uses a CSS node with name frame.
Accessibility
Until GTK 4.10, gtk.aspect_frame.AspectFrame used the gtk.types.AccessibleRole.Group role.
Starting from GTK 4.12, gtk.aspect_frame.AspectFrame uses the gtk.types.AccessibleRole.Generic role.
Methods
AspectFrameGidBuilder builder() static nothrowGet builder for [gtk.aspect_frame.AspectFrame] Returns: New builder objectvoid child(gtk.widget.Widget propval) @property nothrowSet `child` property. Params: propval = The child widget.bool obeyChild() @property nothrowGet `obeyChild` property. Returns: Whether the [gtk.aspect_frame.AspectFrame] should use the aspect ratio of its child.void obeyChild(bool propval) @property nothrowSet `obeyChild` property. Params: propval = Whether the [gtk.aspect_frame.AspectFrame] should use the aspect ratio of its child.float ratio() @property nothrowGet `ratio` property. Returns: The aspect ratio to be used by the [gtk.aspect_frame.AspectFrame].void ratio(float propval) @property nothrowSet `ratio` property. Params: propval = The aspect ratio to be used by the [gtk.aspect_frame.AspectFrame].float xalign() @property nothrowGet `xalign` property. Returns: The horizontal alignment of the child.void xalign(float propval) @property nothrowSet `xalign` property. Params: propval = The horizontal alignment of the child.float yalign() @property nothrowGet `yalign` property. Returns: The vertical alignment of the child.void yalign(float propval) @property nothrowSet `yalign` property. Params: propval = The vertical alignment of the child.gtk.widget.Widget getChild() nothrowGets the child widget of self. Returns: the child widget of selfbool getObeyChild() nothrowReturns whether the child's size request should override the set aspect ratio of the [gtk.aspect_frame.AspectFrame]. Returns: whether to obey the child's size requestfloat getRatio() nothrowReturns the desired aspect ratio of the child. Returns: the desired aspect ratiofloat getXalign() nothrowReturns the horizontal alignment of the child within the allocation of the [gtk.aspect_frame.AspectFrame]. Returns: the horizontal alignmentfloat getYalign() nothrowReturns the vertical alignment of the child within the allocation of the [gtk.aspect_frame.AspectFrame]. Returns: the vertical alignmentvoid setObeyChild(bool obeyChild) nothrowSets whether the aspect ratio of the child's size request should override the set aspect ratio of the [gtk.aspect_frame.AspectFrame].void setXalign(float xalign) nothrowSets the horizontal alignment of the child within the allocation of the [gtk.aspect_frame.AspectFrame].void setYalign(float yalign) nothrowSets the vertical alignment of the child within the allocation of the [gtk.aspect_frame.AspectFrame].Fluent builder implementation template for gtk.aspect_frame.AspectFrame
Methods
T child(gtk.widget.Widget propval) nothrowSet `child` property. Params: propval = The child widget. Returns: Builder instance for fluent chainingT obeyChild(bool propval) nothrowSet `obeyChild` property. Params: propval = Whether the [gtk.aspect_frame.AspectFrame] should use the aspect ratio of its child. Returns: Builder instance for fluent chainingT ratio(float propval) nothrowSet `ratio` property. Params: propval = The aspect ratio to be used by the [gtk.aspect_frame.AspectFrame].T xalign(float propval) nothrowSet `xalign` property. Params: propval = The horizontal alignment of the child. Returns: Builder instance for fluent chainingT yalign(float propval) nothrowSet `yalign` property. Params: propval = The vertical alignment of the child. Returns: Builder instance for fluent chainingFluent builder for gtk.aspect_frame.AspectFrame
Methods