adw.squeezer

Module for [Squeezer] class

Types 3

A best fit container.

squeezer-wide squeezer-narrow

The adw.squeezer.Squeezer widget is a container which only shows the first of its children that fits in the available size. It is convenient to offer different widgets to represent the same data with different levels of detail, making the widget seem to squeeze itself to fit in the available space.

Transitions between children can be animated as fades. This can be controlled with adw.squeezer.Squeezer.transitionType.

CSS nodes

adw.squeezer.Squeezer has a single CSS node with name squeezer.

Deprecated

Methods
GType _getGType() static nothrow
GType _gType() @property nothrow
Squeezer self() nothrowReturns `this`, for use in `with` statements.
SqueezerGidBuilder builder() static nothrowGet builder for [adw.squeezer.Squeezer] Returns: New builder object
bool allowNone() @property nothrowGet `allowNone` property. Returns: Whether to allow squeezing beyond the last child's minimum size.
void allowNone(bool propval) @property nothrowSet `allowNone` property. Params: propval = Whether to allow squeezing beyond the last child's minimum size.
bool homogeneous() @property nothrowGet `homogeneous` property. Returns: Whether all children have the same size for the opposite orientation.
void homogeneous(bool propval) @property nothrowSet `homogeneous` property. Params: propval = Whether all children have the same size for the opposite orientation.
bool interpolateSize() @property nothrowGet `interpolateSize` property. Returns: Whether the squeezer interpolates its size when changing the visible child.
void interpolateSize(bool propval) @property nothrowSet `interpolateSize` property. Params: propval = Whether the squeezer interpolates its size when changing the visible child.
gtk.selection_model.SelectionModel pages() @property nothrowGet `pages` property. Returns: A selection model with the squeezer's pages.
adw.types.FoldThresholdPolicy switchThresholdPolicy() @property nothrowGet `switchThresholdPolicy` property. Returns: The switch threshold policy.
void switchThresholdPolicy(adw.types.FoldThresholdPolicy propval) @property nothrowSet `switchThresholdPolicy` property. Params: propval = The switch threshold policy.
uint transitionDuration() @property nothrowGet `transitionDuration` property. Returns: The transition animation duration, in milliseconds.
void transitionDuration(uint propval) @property nothrowSet `transitionDuration` property. Params: propval = The transition animation duration, in milliseconds.
bool transitionRunning() @property nothrowGet `transitionRunning` property. Returns: Whether a transition is currently running.
adw.types.SqueezerTransitionType transitionType() @property nothrowGet `transitionType` property. Returns: The type of animation used for transitions between children.
void transitionType(adw.types.SqueezerTransitionType propval) @property nothrowSet `transitionType` property. Params: propval = The type of animation used for transitions between children.
gtk.widget.Widget visibleChild() @property nothrowGet `visibleChild` property. Returns: The currently visible child.
float xalign() @property nothrowGet `xalign` property. Returns: The horizontal alignment, from 0 (start) to 1 (end).
void xalign(float propval) @property nothrowSet `xalign` property. Params: propval = The horizontal alignment, from 0 (start) to 1 (end).
float yalign() @property nothrowGet `yalign` property. Returns: The vertical alignment, from 0 (top) to 1 (bottom).
void yalign(float propval) @property nothrowSet `yalign` property. Params: propval = The vertical alignment, from 0 (top) to 1 (bottom).
adw.squeezer_page.SqueezerPage add(gtk.widget.Widget child) nothrowAdds a child to self.
bool getAllowNone() nothrowGets whether to allow squeezing beyond the last child's minimum size. Returns: whether self allows squeezing beyond the last child
bool getHomogeneous() nothrowGets whether all children have the same size for the opposite orientation. Returns: whether self is homogeneous
bool getInterpolateSize() nothrowGets whether self interpolates its size when changing the visible child. Returns: whether the size is interpolated
adw.squeezer_page.SqueezerPage getPage(gtk.widget.Widget child) nothrowReturns the [adw.squeezer_page.SqueezerPage] object for child.
gtk.selection_model.SelectionModel getPages() nothrowReturns a [gio.list_model.ListModel] that contains the pages of self.
adw.types.FoldThresholdPolicy getSwitchThresholdPolicy() nothrowGets the switch threshold policy for self. Returns: the fold threshold policy
uint getTransitionDuration() nothrowGets the transition animation duration for self. Returns: the transition duration, in milliseconds
bool getTransitionRunning() nothrowGets whether a transition is currently running for self.
adw.types.SqueezerTransitionType getTransitionType() nothrowGets the type of animation used for transitions between children in self. Returns: the current transition type of self
gtk.widget.Widget getVisibleChild() nothrowGets the currently visible child of self. Returns: the visible child
float getXalign() nothrowGets the horizontal alignment, from 0 (start) to 1 (end). Returns: the alignment value
float getYalign() nothrowGets the vertical alignment, from 0 (top) to 1 (bottom). Returns: the alignment value
void remove(gtk.widget.Widget child) nothrowRemoves a child widget from self.
void setAllowNone(bool allowNone) nothrowSets whether to allow squeezing beyond the last child's minimum size.
void setHomogeneous(bool homogeneous) nothrowSets whether all children have the same size for the opposite orientation.
void setInterpolateSize(bool interpolateSize) nothrowSets whether self interpolates its size when changing the visible child.
void setSwitchThresholdPolicy(adw.types.FoldThresholdPolicy policy) nothrowSets the switch threshold policy for self.
void setTransitionDuration(uint duration) nothrowSets the transition animation duration for self.
void setTransitionType(adw.types.SqueezerTransitionType transition) nothrowSets the type of animation used for transitions between children in self.
void setXalign(float xalign) nothrowSets the horizontal alignment, from 0 (start) to 1 (end).
void setYalign(float yalign) nothrowSets the vertical alignment, from 0 (top) to 1 (bottom).
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a new [adw.squeezer.Squeezer]. Returns: the newly created [adw.squeezer.Squeezer]

Fluent builder implementation template for adw.squeezer.Squeezer

Methods
T allowNone(bool propval) nothrowSet `allowNone` property. Params: propval = Whether to allow squeezing beyond the last child's minimum size.
T homogeneous(bool propval) nothrowSet `homogeneous` property. Params: propval = Whether all children have the same size for the opposite orientation.
T interpolateSize(bool propval) nothrowSet `interpolateSize` property. Params: propval = Whether the squeezer interpolates its size when changing the visible child.
T switchThresholdPolicy(adw.types.FoldThresholdPolicy propval) nothrowSet `switchThresholdPolicy` property. Params: propval = The switch threshold policy.
T transitionDuration(uint propval) nothrowSet `transitionDuration` property. Params: propval = The transition animation duration, in milliseconds. Returns: Builder instance for fluent chaining
T transitionType(adw.types.SqueezerTransitionType propval) nothrowSet `transitionType` property. Params: propval = The type of animation used for transitions between children. Returns: Builder instance for fluent chaining
T xalign(float propval) nothrowSet `xalign` property. Params: propval = The horizontal alignment, from 0 (start) to 1 (end).
T yalign(float propval) nothrowSet `yalign` property. Params: propval = The vertical alignment, from 0 (top) to 1 (bottom).

Fluent builder for adw.squeezer.Squeezer

Methods
Squeezer build() nothrowCreate object from builder. Returns: New object