:right-sidebar: True FlowBoxChild =================================================================== .. currentmodule:: gi.repository.Gtk .. class:: FlowBoxChild(**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` ``GtkFlowBoxChild`` is the kind of widget that can be added to a ``GtkFlowBox``. Constructors ------------ .. rst-class:: interim-class .. class:: FlowBoxChild :no-index: .. classmethod:: new() -> ~gi.repository.Gtk.Widget Creates a new ``GtkFlowBoxChild``. This should only be used as a child of a ``GtkFlowBox``. Methods ------- .. rst-class:: interim-class .. class:: FlowBoxChild :no-index: .. method:: changed() -> None Marks ``child`` as changed, causing any state that depends on this to be updated. This affects sorting and filtering. Note that calls to this method must be in sync with the data used for the sorting and filtering functions. For instance, if the list is mirroring some external data set, and *two* children changed in the external data set when you call :func:`~gi.repository.Gtk.FlowBoxChild.changed` on the first child, the sort function must only read the new data for the first of the two changed children, otherwise the resorting of the children will be wrong. This generally means that if you don’t fully control the data model, you have to duplicate the data that affects the sorting and filtering functions into the widgets themselves. Another alternative is to call :obj:`~gi.repository.Gtk.FlowBox.invalidate_sort` on any model change, but that is more expensive. .. method:: get_child() -> ~gi.repository.Gtk.Widget | None Gets the child widget of ``self``. .. method:: get_index() -> int Gets the current index of the ``child`` in its ``GtkFlowBox`` container. .. method:: is_selected() -> bool Returns whether the ``child`` is currently selected in its ``GtkFlowBox`` container. .. method:: set_child(child: ~gi.repository.Gtk.Widget | None = None) -> None Sets the child widget of ``self``. :param child: the child widget Properties ---------- .. rst-class:: interim-class .. class:: FlowBoxChild :no-index: .. attribute:: props.child :type: ~gi.repository.Gtk.Widget The child widget. Signals ------- .. rst-class:: interim-class .. class:: FlowBoxChild.signals :no-index: .. method:: activate() -> None Emitted when the user activates a child widget in a ``GtkFlowBox``. This can happen either by clicking or double-clicking, or via a keybinding. This is a `keybinding signal `_, but it can be used by applications for their own purposes. The default bindings are :kbd:`Space` and :kbd:`Enter`. Virtual Methods --------------- .. rst-class:: interim-class .. class:: FlowBoxChild :no-index: .. method:: do_activate() -> None Fields ------ .. rst-class:: interim-class .. class:: FlowBoxChild :no-index: .. attribute:: parent_instance