Class: Gtk::Filter

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#changed(change) ⇒ nil

Notifies all users of the filter that it has changed.

This emits the [signalGtk.Filter::changed] signal. Users of the filter should then check items again via [methodGtk.Filter.match].

Depending on the change parameter, not all items need to be changed, but only some. Refer to the [enumGtk.FilterChange] documentation for details.

This function is intended for implementers of GtkFilter subclasses and should not be called from other functions.

Parameters:

Returns:

  • (nil)

#match(item) ⇒ Boolean

Checks if the given item is matched by the filter or not.

Parameters:

  • item (GObject::Object)

    The item to check

Returns:

  • (Boolean)

    true if the filter matches the item and a filter model should keep it, false if not.

#strictnessGtk::FilterMatch

Gets the known strictness of filters.

If the strictness is not known, %GTK_FILTER_MATCH_SOME is returned.

This value may change after emission of the [signalGtk.Filter::changed] signal.

This function is meant purely for optimization purposes, filters can choose to omit implementing it, but GtkFilterListModel uses it.

Returns: