:right-sidebar: True Squeezer =================================================================== .. currentmodule:: gi.repository.Adw .. deprecated:: 1.4 See `the migration guide `_ .. class:: Squeezer(**properties: ~typing.Any) :no-contents-entry: Superclasses: :class:`~gi.repository.Gtk.Widget`, :class:`~gi.repository.GObject.InitiallyUnowned`, :class:`~gi.repository.GObject.Object` Implemented Interfaces: :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Orientable` :Constructors: :: Squeezer(**properties) new() -> Gtk.Widget Constructors ------------ .. rst-class:: interim-class .. class:: Squeezer :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwSqueezer``. .. deprecated:: 1.4 See `the migration guide `_ Methods ------- .. rst-class:: interim-class .. class:: Squeezer :no-index: .. method:: add(child: ~gi.repository.Gtk.Widget) -> ~gi.repository.Adw.SqueezerPage Adds a child to ``self``. .. deprecated:: 1.4 See `the migration guide `_ :param child: the widget to add .. method:: get_allow_none() -> bool Gets whether to allow squeezing beyond the last child's minimum size. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_homogeneous() -> bool Gets whether all children have the same size for the opposite orientation. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_interpolate_size() -> bool Gets whether ``self`` interpolates its size when changing the visible child. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_page(child: ~gi.repository.Gtk.Widget) -> ~gi.repository.Adw.SqueezerPage Returns the :obj:`~gi.repository.Adw.SqueezerPage` object for ``child``. .. deprecated:: 1.4 See `the migration guide `_ :param child: a child of ``self`` .. method:: get_pages() -> ~gi.repository.Gtk.SelectionModel Returns a :obj:`~gi.repository.Gio.ListModel` that contains the pages of ``self``. This can be used to keep an up-to-date view. The model also implements :obj:`~gi.repository.Gtk.SelectionModel` and can be used to track the visible page. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_switch_threshold_policy() -> ~gi.repository.Adw.FoldThresholdPolicy Gets the switch threshold policy for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_transition_duration() -> int Gets the transition animation duration for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_transition_running() -> bool Gets whether a transition is currently running for ``self``. If a transition is impossible, the property value will be set to ``TRUE`` and then immediately to ``FALSE``, so it's possible to rely on its notifications to know that a transition has happened. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_transition_type() -> ~gi.repository.Adw.SqueezerTransitionType Gets the type of animation used for transitions between children in ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_visible_child() -> ~gi.repository.Gtk.Widget | None Gets the currently visible child of ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_xalign() -> float Gets the horizontal alignment, from 0 (start) to 1 (end). .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_yalign() -> float Gets the vertical alignment, from 0 (top) to 1 (bottom). .. deprecated:: 1.4 See `the migration guide `_ .. method:: remove(child: ~gi.repository.Gtk.Widget) -> None Removes a child widget from ``self``. .. deprecated:: 1.4 See `the migration guide `_ :param child: the child to remove .. method:: set_allow_none(allow_none: bool) -> None Sets whether to allow squeezing beyond the last child's minimum size. If set to ``TRUE``, the squeezer can shrink to the point where no child can be shown. This is functionally equivalent to appending a widget with 0×0 minimum size. .. deprecated:: 1.4 See `the migration guide `_ :param allow_none: whether ``self`` allows squeezing beyond the last child .. method:: set_homogeneous(homogeneous: bool) -> None Sets whether all children have the same size for the opposite orientation. For example, if a squeezer is horizontal and is homogeneous, it will request the same height for all its children. If it isn't, the squeezer may change size when a different child becomes visible. .. deprecated:: 1.4 See `the migration guide `_ :param homogeneous: whether ``self`` is homogeneous .. method:: set_interpolate_size(interpolate_size: bool) -> None Sets whether ``self`` interpolates its size when changing the visible child. If ``TRUE``, the squeezer will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the squeezer is horizontal, it will interpolate the its height. .. deprecated:: 1.4 See `the migration guide `_ :param interpolate_size: whether to interpolate the size .. method:: set_switch_threshold_policy(policy: ~gi.repository.Adw.FoldThresholdPolicy) -> None Sets the switch threshold policy for ``self``. Determines when the squeezer will switch children. If set to ``ADW_FOLD_THRESHOLD_POLICY_MINIMUM``, it will only switch when the visible child cannot fit anymore. With ``ADW_FOLD_THRESHOLD_POLICY_NATURAL``, it will switch as soon as the visible child doesn't get their natural size. This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately switching. .. deprecated:: 1.4 See `the migration guide `_ :param policy: the policy to use .. method:: set_transition_duration(duration: int) -> None Sets the transition animation duration for ``self``. .. deprecated:: 1.4 See `the migration guide `_ :param duration: the new duration, in milliseconds .. method:: set_transition_type(transition: ~gi.repository.Adw.SqueezerTransitionType) -> None Sets the type of animation used for transitions between children in ``self``. .. deprecated:: 1.4 See `the migration guide `_ :param transition: the new transition type .. method:: set_xalign(xalign: float) -> None Sets the horizontal alignment, from 0 (start) to 1 (end). This affects the children allocation during transitions, when they exceed the size of the squeezer. For example, 0.5 means the child will be centered, 0 means it will keep the start side aligned and overflow the end side, and 1 means the opposite. .. deprecated:: 1.4 See `the migration guide `_ :param xalign: the new alignment value .. method:: set_yalign(yalign: float) -> None Sets the vertical alignment, from 0 (top) to 1 (bottom). This affects the children allocation during transitions, when they exceed the size of the squeezer. For example, 0.5 means the child will be centered, 0 means it will keep the top side aligned and overflow the bottom side, and 1 means the opposite. .. deprecated:: 1.4 See `the migration guide `_ :param yalign: the new alignment value Properties ---------- .. rst-class:: interim-class .. class:: Squeezer :no-index: .. attribute:: props.allow_none :type: bool Whether to allow squeezing beyond the last child's minimum size. If set to ``TRUE``, the squeezer can shrink to the point where no child can be shown. This is functionally equivalent to appending a widget with 0×0 minimum size. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.homogeneous :type: bool Whether all children have the same size for the opposite orientation. For example, if a squeezer is horizontal and is homogeneous, it will request the same height for all its children. If it isn't, the squeezer may change size when a different child becomes visible. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.interpolate_size :type: bool Whether the squeezer interpolates its size when changing the visible child. If ``TRUE``, the squeezer will interpolate its size between the one of the previous visible child and the one of the new visible child, according to the set transition duration and the orientation, e.g. if the squeezer is horizontal, it will interpolate the its height. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.pages :type: ~gi.repository.Gtk.SelectionModel A selection model with the squeezer's pages. This can be used to keep an up-to-date view. The model also implements :obj:`~gi.repository.Gtk.SelectionModel` and can be used to track the visible page. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.switch_threshold_policy :type: ~gi.repository.Adw.FoldThresholdPolicy The switch threshold policy. Determines when the squeezer will switch children. If set to ``ADW_FOLD_THRESHOLD_POLICY_MINIMUM``, it will only switch when the visible child cannot fit anymore. With ``ADW_FOLD_THRESHOLD_POLICY_NATURAL``, it will switch as soon as the visible child doesn't get their natural size. This can be useful if you have a long ellipsizing label and want to let it ellipsize instead of immediately switching. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.transition_duration :type: int The transition animation duration, in milliseconds. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.transition_running :type: bool Whether a transition is currently running. If a transition is impossible, the property value will be set to ``TRUE`` and then immediately to ``FALSE``, so it's possible to rely on its notifications to know that a transition has happened. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.transition_type :type: ~gi.repository.Adw.SqueezerTransitionType The type of animation used for transitions between children. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.visible_child :type: ~gi.repository.Gtk.Widget The currently visible child. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.xalign :type: float The horizontal alignment, from 0 (start) to 1 (end). This affects the children allocation during transitions, when they exceed the size of the squeezer. For example, 0.5 means the child will be centered, 0 means it will keep the start side aligned and overflow the end side, and 1 means the opposite. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.yalign :type: float The vertical alignment, from 0 (top) to 1 (bottom). This affects the children allocation during transitions, when they exceed the size of the squeezer. For example, 0.5 means the child will be centered, 0 means it will keep the top side aligned and overflow the bottom side, and 1 means the opposite. .. deprecated:: 1.4 See `the migration guide `_