SearchBar

Constructors

this
this(HdySearchBar* hdySearchBar, bool ownedRef)

Sets our main struct and passes it to the parent class.

this
this()

Creates a #HdySearchBar. You will need to tell it about which widget is going to be your text entry using hdy_search_bar_connect_entry().

Members

Functions

connectEntry
void connectEntry(Entry entry)

Connects the #GtkEntry widget passed as the one to be used in this search bar. The entry should be a descendant of the search bar. This is only required if the entry isn’t the direct child of the search bar (as in our main example).

getSearchBarStruct
HdySearchBar* getSearchBarStruct(bool transferOwnership)

Get the main Gtk struct

getSearchMode
bool getSearchMode()

Returns whether the search mode is on or off.

getShowCloseButton
bool getShowCloseButton()

Returns whether the close button is shown.

getStruct
void* getStruct()

the main Gtk struct as a void*

handleEvent
bool handleEvent(Event event)

This function should be called when the top-level window which contains the search bar received a key event.

setSearchMode
void setSearchMode(bool searchMode)

Switches the search mode on or off.

setShowCloseButton
void setShowCloseButton(bool visible)

Shows or hides the close button. Applications that already have a “search” toggle button should not show a close button in their search bar, as it duplicates the role of the toggle button.

Static functions

getType
GType getType()

Variables

hdySearchBar
HdySearchBar* hdySearchBar;

the main Gtk struct

Meta