pub trait SearchEntryExt: 'static {
    fn handle_event(&self, event: &Event) -> bool;
    fn connect_next_match<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn emit_next_match(&self); fn connect_previous_match<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn emit_previous_match(&self); fn connect_search_changed<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn connect_stop_search<F: Fn(&Self) + 'static>(
        &self,
        f: F
    ) -> SignalHandlerId; fn emit_stop_search(&self); }
Expand description

Trait containing all SearchEntry methods.

Implementors

SearchEntry

Required Methods

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 SearchBar, it is preferable to call SearchBarExt::handle_event() instead, which will reveal the entry in addition to passing the event to this function.

If the key event is handled by the search entry and starts or continues a search, GDK_EVENT_STOP will be returned. The caller should ensure that the entry is shown in this case, and not propagate the event further.

event

a key event

Returns

GDK_EVENT_STOP if the key press event resulted in a search beginning or continuing, GDK_EVENT_PROPAGATE otherwise.

The ::next-match signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a move to the next match for the current search string.

Applications should connect to it, to implement moving between matches.

The default bindings for this signal is Ctrl-g.

The ::previous-match signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user initiates a move to the previous match for the current search string.

Applications should connect to it, to implement moving between matches.

The default bindings for this signal is Ctrl-Shift-g.

The signal::SearchEntry::search-changed signal is emitted with a short delay of 150 milliseconds after the last change to the entry text.

The ::stop-search signal is a [keybinding signal][GtkBindingSignal] which gets emitted when the user stops a search via keyboard input.

Applications should connect to it, to implement hiding the search entry in this case.

The default bindings for this signal is Escape.

Implementors