gtk.search_entry

Module for [SearchEntry] class

Types 3

#GtkSearchEntry is a subclass of #GtkEntry that has been tailored for use as a search entry.

It will show an inactive symbolic “find” icon when the search entry is empty, and a symbolic “clear” icon when there is text. Clicking on the “clear” icon will empty the search entry.

Note that the search/clear icon is shown using a secondary icon, and thus does not work if you are using the secondary icon position for some other purpose.

To make filtering appear more reactive, it is a good idea to not react to every change in the entry text immediately, but only after a short delay. To support this, #GtkSearchEntry emits the #GtkSearchEntry::search-changed signal which can be used instead of the #GtkEditable::changed signal.

The #GtkSearchEntry::previous-match, #GtkSearchEntry::next-match and #GtkSearchEntry::stop-search signals can be used to implement moving between search results and ending the search.

Often, GtkSearchEntry will be fed events by means of being placed inside a #GtkSearchBar. If that is not the case, you can use [gtk.search_entry.SearchEntry.handleEvent] to pass events.

Methods
GType _gType() @property
SearchEntry self()Returns `this`, for use in `with` statements.
SearchEntryGidBuilder builder()Get builder for [gtk.search_entry.SearchEntry] Returns: New builder object
bool handleEvent(gdk.event.Event event)This function should be called when the top-level window which contains the search entry received a key event. If the entry is part of a #GtkSearchBar, it is preferable to call [gtk.search_bar.Sear...
gulong connectNextMatch(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.search_entry.SearchEntry))) && Parameters!T.length < 2)Connect to `NextMatch` signal.
gulong connectPreviousMatch(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.search_entry.SearchEntry))) && Parameters!T.length < 2)Connect to `PreviousMatch` signal.
gulong connectSearchChanged(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.search_entry.SearchEntry))) && Parameters!T.length < 2)Connect to `SearchChanged` signal.
gulong connectStopSearch(T)(T callback, Flag!"After" after = No.After) if (isCallable!T && is(ReturnType!T == void) && (Parameters!T.length < 1 || (ParameterStorageClassTuple!T[0] == ParameterStorageClass.none && is(Parameters!T[0] : gtk.search_entry.SearchEntry))) && Parameters!T.length < 2)Connect to `StopSearch` signal.
Constructors
this(void * ptr, Flag!"Take" take)
this()Creates a #GtkSearchEntry, with a find icon when the search field is empty, and a clear icon when it isn't. Returns: a new #GtkSearchEntry

Fluent builder for [gtk.search_entry.SearchEntry]