package ocgtk

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Wrappers.Entry_completion

type t = [ `entry_completion | `object_ ] Gobject.obj
val new_ : unit -> t

Create a new EntryCompletion

val new_with_area : [ `cell_area | `initially_unowned | `object_ ] Gobject.obj -> t

Create a new EntryCompletion

val set_text_column : t -> int -> unit

Convenience 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 -> unit

Sets 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 -> unit

Sets whether the completion popup window will be resized to be the same width as the entry.

val set_popup_completion : t -> bool -> unit

Sets whether the completions should be presented in a popup window.

val set_model : t -> [ `tree_model ] Gobject.obj option -> unit

Sets 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 -> unit

Requires 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 -> unit

Sets whether it is possible to cycle through the possible completions inside the entry.

val set_inline_completion : t -> bool -> unit

Sets whether the common prefix of the possible completions should be automatically inserted in the entry.

val insert_prefix : t -> unit

Requests a prefix insertion.

val get_text_column : t -> int

Returns the column in the model of @completion to get strings from.

val get_popup_single_match : t -> bool

Returns whether the completion popup window will appear even if there is only a single match.

val get_popup_set_width : t -> bool

Returns whether the completion popup window will be resized to the width of the entry.

val get_popup_completion : t -> bool

Returns whether the completions should be presented in a popup window.

val get_model : t -> [ `tree_model ] Gobject.obj option

Returns the model the `GtkEntryCompletion` is using as data source.

Returns %NULL if the model is unset.

val get_minimum_key_length : t -> int

Returns the minimum key length as set for @completion.

val get_inline_selection : t -> bool

Returns %TRUE if inline-selection mode is turned on.

val get_inline_completion : t -> bool

Returns whether the common prefix of the possible completions should be automatically inserted in the entry.

val get_entry : t -> [ `widget | `initially_unowned | `object_ ] Gobject.obj

Gets the entry @completion has been attached to.

val get_completion_prefix : t -> string option

Get 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 option

Computes 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 -> unit

Requests 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.obj

Get property: cell-area

val on_insert_prefix : ?after:bool -> t -> callback:(prefix:string -> bool) -> Gobject.Signal.handler_id
val on_no_matches : ?after:bool -> t -> callback:(unit -> unit) -> Gobject.Signal.handler_id