RB.SearchEntry

g Atk.ImplementorIface Atk.ImplementorIface Gtk.Widget Gtk.Widget Atk.ImplementorIface->Gtk.Widget GObject.GInterface GObject.GInterface GObject.GInterface->Atk.ImplementorIface Gtk.Buildable Gtk.Buildable GObject.GInterface->Gtk.Buildable Gtk.Orientable Gtk.Orientable GObject.GInterface->Gtk.Orientable GObject.InitiallyUnowned GObject.InitiallyUnowned GObject.InitiallyUnowned->Gtk.Widget GObject.Object GObject.Object GObject.Object->GObject.InitiallyUnowned Gtk.Box Gtk.Box RB.SearchEntry RB.SearchEntry Gtk.Box->RB.SearchEntry Gtk.Buildable->Gtk.Widget Gtk.Container Gtk.Container Gtk.Container->Gtk.Box Gtk.Orientable->Gtk.Box Gtk.Widget->Gtk.Container

Subclasses:None

Properties

Inherited:Gtk.Box (3), Gtk.Container (3), Gtk.Widget (39), Gtk.Orientable (1)
Name Type Flags Short Description
explicit-mode bool r/w whether in explicit search mode or not
has-popup bool r/w/co whether to display the search menu icon

Child Properties

Inherited:Gtk.Box (5)

Style Properties

Inherited:Gtk.Widget (17)

Signals

Inherited:Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name Short Description
activate Emitted when the entry is activated.
search Emitted when the search text changes.
show-popup Emitted when a popup menu should be shown

Fields

Inherited:Gtk.Container (4), Gtk.Widget (69), GObject.Object (1)
Name Type Access Description
parent Gtk.Box r  

Class Details

class RB.SearchEntry(*args, **kwargs)
Bases:Gtk.Box
Abstract:No
Structure:RB.SearchEntryClass
classmethod new(has_popup)
Parameters:has_popup (bool) –
Returns:new search entry widget.
Return type:RB.SearchEntry

Creates a new search entry widget.

clear()

Clears the search entry text. The ‘search’ signal will be emitted.

grab_focus()

Grabs input focus for the text entry widget.

searching()
Returns:True if searching
Return type:bool

Returns True if there is search text in the entry widget.

set_mnemonic(enable)
Parameters:enable (bool) – if True, enable the mnemonic

Adds or removes a mnemonic allowing the user to focus the search entry.

set_placeholder(text)
Parameters:text (str) – placeholder text

Sets the placeholder text in the search entry box.

set_text(text)
Parameters:text (str) – new search text

Sets the text in the search entry box. The ‘search’ signal will be emitted.

do_activate(text) virtual
Parameters:text (str) –
Parameters:text (str) –
do_show_popup() virtual

Signal Details

RB.SearchEntry.signals.activate(search_entry, text)
Signal Name:

activate

Flags:

RUN_LAST

Parameters:
  • search_entry (RB.SearchEntry) – The object which received the signal
  • text (str) – search text

Emitted when the entry is activated.

RB.SearchEntry.signals.search(search_entry, text)
Signal Name:

search

Flags:

RUN_LAST

Parameters:
  • search_entry (RB.SearchEntry) – The object which received the signal
  • text (str) – search text

Emitted when the search text changes. A signal handler must initiate a search on the current source.

RB.SearchEntry.signals.show_popup(search_entry)
Signal Name:show-popup
Flags:RUN_LAST
Parameters:search_entry (RB.SearchEntry) – The object which received the signal

Emitted when a popup menu should be shown

Property Details

RB.SearchEntry.props.explicit_mode
Name:explicit-mode
Type:bool
Default Value:False
Flags:READABLE, WRITABLE

If True, show a button and only emit the ‘search’ signal when the user presses it rather than when they stop typing.

RB.SearchEntry.props.has_popup
Name:has-popup
Type:bool
Default Value:False
Flags:READABLE, WRITABLE, CONSTRUCT_ONLY

If True, show a primary icon and emit the show-popup when clicked.