package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Entry_completion/index.html
Module Wrappers.Entry_completion
type t = [ `entry_completion | `object_ ] Gobject.objval new_ : unit -> tCreate a new EntryCompletion
val new_with_area :
[ `cell_area | `initially_unowned | `object_ ] Gobject.obj ->
tCreate a new EntryCompletion
val set_text_column : t -> int -> unitConvenience function for setting up the most used case of this code: a completion list with just strings.
This function will set up @completion to have a list displaying all (and just) strings in the completion list, and to get those strings from @column in the model of @completion.
This functions creates and adds a `GtkCellRendererText` for the selected column. If you need to set the text column, but don't want the cell renderer, use g_object_set() to set the property@Gtk.EntryCompletion:text-column property directly.
val set_popup_single_match : t -> bool -> unitSets whether the completion popup window will appear even if there is only a single match.
You may want to set this to %FALSE if you are using property@Gtk.EntryCompletion:inline-completion.
val set_popup_set_width : t -> bool -> unitSets whether the completion popup window will be resized to be the same width as the entry.
val set_popup_completion : t -> bool -> unitSets whether the completions should be presented in a popup window.
val set_model : t -> [ `tree_model ] Gobject.obj option -> unitSets the model for a `GtkEntryCompletion`.
If @completion already has a model set, it will remove it before setting the new model. If model is %NULL, then it will unset the model.
val set_minimum_key_length : t -> int -> unitRequires the length of the search key for @completion to be at least @length.
This is useful for long lists, where completing using a small key takes a lot of time and will come up with meaningless results anyway (ie, a too large dataset).
val set_inline_selection : t -> bool -> unitSets whether it is possible to cycle through the possible completions inside the entry.
val set_inline_completion : t -> bool -> unitSets whether the common prefix of the possible completions should be automatically inserted in the entry.
val insert_prefix : t -> unitRequests a prefix insertion.
val get_text_column : t -> intReturns the column in the model of @completion to get strings from.
val get_popup_single_match : t -> boolReturns whether the completion popup window will appear even if there is only a single match.
val get_popup_set_width : t -> boolReturns whether the completion popup window will be resized to the width of the entry.
val get_popup_completion : t -> boolReturns whether the completions should be presented in a popup window.
val get_model : t -> [ `tree_model ] Gobject.obj optionReturns the model the `GtkEntryCompletion` is using as data source.
Returns %NULL if the model is unset.
val get_minimum_key_length : t -> intReturns the minimum key length as set for @completion.
val get_inline_selection : t -> boolReturns %TRUE if inline-selection mode is turned on.
val get_inline_completion : t -> boolReturns whether the common prefix of the possible completions should be automatically inserted in the entry.
val get_entry : t -> [ `widget | `initially_unowned | `object_ ] Gobject.objGets the entry @completion has been attached to.
val get_completion_prefix : t -> string optionGet the original text entered by the user that triggered the completion or %NULL if there’s no completion ongoing.
val compute_prefix : t -> string -> string optionComputes the common prefix that is shared by all rows in @completion that start with @key.
If no row matches @key, %NULL will be returned. Note that a text column must have been set for this function to work, see method@Gtk.EntryCompletion.set_text_column for details.
val complete : t -> unitRequests a completion operation, or in other words a refiltering of the current list with completions, using the current key.
The completion list view will be updated accordingly.
val get_cell_area :
t ->
[ `cell_area | `initially_unowned | `object_ ] Gobject.objGet property: cell-area
val on_insert_prefix :
?after:bool ->
t ->
callback:(prefix:string -> bool) ->
Gobject.Signal.handler_idval on_no_matches :
?after:bool ->
t ->
callback:(unit -> unit) ->
Gobject.Signal.handler_id