package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Search_bar/index.html
Module Wrappers.Search_bar
type t = [ `search_bar | `widget | `initially_unowned | `object_ ] Gobject.objval new_ : unit -> tCreate a new SearchBar
val set_show_close_button : t -> bool -> unitShows 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.
val set_search_mode : t -> bool -> unitSwitches the search mode on or off.
val set_key_capture_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets @widget as the widget that @bar will capture key events from.
If key events are handled by the search bar, the bar will be shown, and the entry populated with the entered text.
Note that despite the name of this function, the events are only 'captured' in the bubble phase, which means that editable child widgets of @widget will receive text input before it gets captured. If that is not desired, you can capture and forward the events yourself with method@Gtk.EventControllerKey.forward.
val set_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj option ->
unitSets the child widget of @bar.
val get_show_close_button : t -> boolReturns whether the close button is shown.
val get_search_mode : t -> boolReturns whether the search mode is on or off.
val get_key_capture_widget :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the widget that @bar is capturing key events from.
val get_child :
t ->
[ `widget | `initially_unowned | `object_ ] Gobject.obj optionGets the child widget of @bar.
val connect_entry : t -> [ `editable ] Gobject.obj -> unitConnects the `GtkEditable` widget passed as the one to be used in this search bar.
The entry should be a descendant of the search bar. Calling this function manually is only required if the entry isn’t the direct child of the search bar (as in our main example).
val get_search_mode_enabled : t -> boolGet property: search-mode-enabled
val set_search_mode_enabled : t -> bool -> unitSet property: search-mode-enabled