:right-sidebar: True Flap =================================================================== .. currentmodule:: gi.repository.Adw .. deprecated:: 1.4 See `the migration guide `_ .. class:: Flap(**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.Adw.Swipeable`, :class:`~gi.repository.Gtk.Accessible`, :class:`~gi.repository.Gtk.Buildable`, :class:`~gi.repository.Gtk.ConstraintTarget`, :class:`~gi.repository.Gtk.Orientable` :Constructors: :: Flap(**properties) new() -> Gtk.Widget Constructors ------------ .. rst-class:: interim-class .. class:: Flap :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``AdwFlap``. .. deprecated:: 1.4 See `the migration guide `_ Methods ------- .. rst-class:: interim-class .. class:: Flap :no-index: .. method:: get_content() -> ~gi.repository.Gtk.Widget | None Gets the content widget for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_flap() -> ~gi.repository.Gtk.Widget | None Gets the flap widget for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_flap_position() -> ~gi.repository.Gtk.PackType Gets the flap position for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_fold_duration() -> int Gets the fold transition animation duration for ``self``, in milliseconds. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_fold_policy() -> ~gi.repository.Adw.FlapFoldPolicy Gets the fold policy for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_fold_threshold_policy() -> ~gi.repository.Adw.FoldThresholdPolicy Gets the fold threshold policy for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_folded() -> bool Gets whether ``self`` is currently folded. See :obj:`~gi.repository.Adw.Flap.props.fold_policy`. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_locked() -> bool Gets whether ``self`` is locked. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_modal() -> bool Gets whether ``self`` is modal. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_reveal_flap() -> bool Gets whether the flap widget is revealed for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_reveal_params() -> ~gi.repository.Adw.SpringParams Gets the reveal animation spring parameters for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_reveal_progress() -> float Gets the current reveal progress for ``self``. 0 means fully hidden, 1 means fully revealed. See :obj:`~gi.repository.Adw.Flap.props.reveal_flap`. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_separator() -> ~gi.repository.Gtk.Widget | None Gets the separator widget for ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_swipe_to_close() -> bool Gets whether ``self`` can be closed with a swipe gesture. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_swipe_to_open() -> bool Gets whether ``self`` can be opened with a swipe gesture. .. deprecated:: 1.4 See `the migration guide `_ .. method:: get_transition_type() -> ~gi.repository.Adw.FlapTransitionType Gets the type of animation used for reveal and fold transitions in ``self``. .. deprecated:: 1.4 See `the migration guide `_ .. method:: set_content(content: ~gi.repository.Gtk.Widget | None = None) -> None Sets the content widget for ``self``. It's always displayed when unfolded, and partially visible when folded. .. deprecated:: 1.4 See `the migration guide `_ :param content: the content widget .. method:: set_flap(flap: ~gi.repository.Gtk.Widget | None = None) -> None Sets the flap widget for ``self``. It's only visible when :obj:`~gi.repository.Adw.Flap.props.reveal_progress` is greater than 0. .. deprecated:: 1.4 See `the migration guide `_ :param flap: the flap widget .. method:: set_flap_position(position: ~gi.repository.Gtk.PackType) -> None Sets the flap position for ``self``. If it's set to ``GTK_PACK_START``, the flap is displayed before the content, if ``GTK_PACK_END``, it's displayed after the content. .. deprecated:: 1.4 See `the migration guide `_ :param position: the new value .. method:: set_fold_duration(duration: int) -> None Sets the fold transition animation duration for ``self``, in milliseconds. .. deprecated:: 1.4 See `the migration guide `_ :param duration: the new duration, in milliseconds .. method:: set_fold_policy(policy: ~gi.repository.Adw.FlapFoldPolicy) -> None Sets the fold policy for ``self``. .. deprecated:: 1.4 See `the migration guide `_ :param policy: the fold policy .. method:: set_fold_threshold_policy(policy: ~gi.repository.Adw.FoldThresholdPolicy) -> None Sets the fold threshold policy for ``self``. If set to ``ADW_FOLD_THRESHOLD_POLICY_MINIMUM``, flap will only fold when the children cannot fit anymore. With ``ADW_FOLD_THRESHOLD_POLICY_NATURAL``, it will fold as soon as children don'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 folding. .. deprecated:: 1.4 See `the migration guide `_ :param policy: the policy to use .. method:: set_locked(locked: bool) -> None Sets whether ``self`` is locked. If ``FALSE``, folding when the flap is revealed automatically closes it, and unfolding it when the flap is not revealed opens it. If ``TRUE``, :obj:`~gi.repository.Adw.Flap.props.reveal_flap` value never changes on its own. .. deprecated:: 1.4 See `the migration guide `_ :param locked: the new value .. method:: set_modal(modal: bool) -> None Sets whether ``self`` is modal. If ``TRUE``, clicking the content widget while flap is revealed, as well as pressing the :kbd:`Esc` key, will close the flap. If ``FALSE``, clicks are passed through to the content widget. .. deprecated:: 1.4 See `the migration guide `_ :param modal: whether ``self`` is modal .. method:: set_reveal_flap(reveal_flap: bool) -> None Sets whether the flap widget is revealed for ``self``. .. deprecated:: 1.4 See `the migration guide `_ :param reveal_flap: whether to reveal the flap widget .. method:: set_reveal_params(params: ~gi.repository.Adw.SpringParams) -> None Sets the reveal animation spring parameters for ``self``. The default value is equivalent to: .. code-block:: c :dedent: adw_spring_params_new (1, 0.5, 500) .. deprecated:: 1.4 See `the migration guide `_ :param params: the new parameters .. method:: set_separator(separator: ~gi.repository.Gtk.Widget | None = None) -> None Sets the separator widget for ``self``. It's displayed between content and flap when there's no shadow to display. When exactly it's visible depends on the :obj:`~gi.repository.Adw.Flap.props.transition_type` value. .. deprecated:: 1.4 See `the migration guide `_ :param separator: the separator widget .. method:: set_swipe_to_close(swipe_to_close: bool) -> None Sets whether ``self`` can be closed with a swipe gesture. The area that can be swiped depends on the :obj:`~gi.repository.Adw.Flap.props.transition_type` value. .. deprecated:: 1.4 See `the migration guide `_ :param swipe_to_close: whether ``self`` can be closed with a swipe gesture .. method:: set_swipe_to_open(swipe_to_open: bool) -> None Sets whether ``self`` can be opened with a swipe gesture. The area that can be swiped depends on the :obj:`~gi.repository.Adw.Flap.props.transition_type` value. .. deprecated:: 1.4 See `the migration guide `_ :param swipe_to_open: whether ``self`` can be opened with a swipe gesture .. method:: set_transition_type(transition_type: ~gi.repository.Adw.FlapTransitionType) -> None Sets the type of animation used for reveal and fold transitions in ``self``. :obj:`~gi.repository.Adw.Flap.props.flap` is transparent by default, which means the content will be seen through it with ``ADW_FLAP_TRANSITION_TYPE_OVER`` transitions; add the ```.background`` `_ style class to it if this is unwanted. .. deprecated:: 1.4 See `the migration guide `_ :param transition_type: the new transition type Properties ---------- .. rst-class:: interim-class .. class:: Flap :no-index: .. attribute:: props.content :type: ~gi.repository.Gtk.Widget The content widget. It's always displayed when unfolded, and partially visible when folded. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.flap :type: ~gi.repository.Gtk.Widget The flap widget. It's only visible when :obj:`~gi.repository.Adw.Flap.props.reveal_progress` is greater than 0. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.flap_position :type: ~gi.repository.Gtk.PackType The flap position. If it's set to ``GTK_PACK_START``, the flap is displayed before the content, if ``GTK_PACK_END``, it's displayed after the content. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.fold_duration :type: int The fold transition animation duration, in milliseconds. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.fold_policy :type: ~gi.repository.Adw.FlapFoldPolicy The fold policy for the flap. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.fold_threshold_policy :type: ~gi.repository.Adw.FoldThresholdPolicy Determines when the flap will fold. If set to ``ADW_FOLD_THRESHOLD_POLICY_MINIMUM``, flap will only fold when the children cannot fit anymore. With ``ADW_FOLD_THRESHOLD_POLICY_NATURAL``, it will fold as soon as children don'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 folding. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.folded :type: bool Whether the flap is currently folded. See :obj:`~gi.repository.Adw.Flap.props.fold_policy`. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.locked :type: bool Whether the flap is locked. If ``FALSE``, folding when the flap is revealed automatically closes it, and unfolding it when the flap is not revealed opens it. If ``TRUE``, :obj:`~gi.repository.Adw.Flap.props.reveal_flap` value never changes on its own. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.modal :type: bool Whether the flap is modal. If ``TRUE``, clicking the content widget while flap is revealed, as well as pressing the :kbd:`Esc` key, will close the flap. If ``FALSE``, clicks are passed through to the content widget. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.reveal_flap :type: bool Whether the flap widget is revealed. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.reveal_params :type: ~gi.repository.Adw.SpringParams The reveal animation spring parameters. The default value is equivalent to: .. code-block:: c :dedent: adw_spring_params_new (1, 0.5, 500) .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.reveal_progress :type: float The current reveal transition progress. 0 means fully hidden, 1 means fully revealed. See :obj:`~gi.repository.Adw.Flap.props.reveal_flap`. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.separator :type: ~gi.repository.Gtk.Widget The separator widget. It's displayed between content and flap when there's no shadow to display. When exactly it's visible depends on the :obj:`~gi.repository.Adw.Flap.props.transition_type` value. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.swipe_to_close :type: bool Whether the flap can be closed with a swipe gesture. The area that can be swiped depends on the :obj:`~gi.repository.Adw.Flap.props.transition_type` value. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.swipe_to_open :type: bool Whether the flap can be opened with a swipe gesture. The area that can be swiped depends on the :obj:`~gi.repository.Adw.Flap.props.transition_type` value. .. deprecated:: 1.4 See `the migration guide `_ .. attribute:: props.transition_type :type: ~gi.repository.Adw.FlapTransitionType the type of animation used for reveal and fold transitions. :obj:`~gi.repository.Adw.Flap.props.flap` is transparent by default, which means the content will be seen through it with ``ADW_FLAP_TRANSITION_TYPE_OVER`` transitions; add the ```.background`` `_ style class to it if this is unwanted. .. deprecated:: 1.4 See `the migration guide `_