Class: Gtk::EntryCompletion

Inherits:
Object
  • Object
show all
Defined in:
(unknown)

Instance Method Summary collapse

Instance Method Details

#cell_areaGtk::CellArea

The Gtk::CellArea used to layout cell renderers in the treeview column.

If no area is specified when creating the entry completion with gtk_entry_completion_new_with_area() a horizontally oriented Gtk::CellAreaBox will be used.

Returns:

#cell_area=(cell_area) ⇒ Gtk::CellArea

The Gtk::CellArea used to layout cell renderers in the treeview column.

If no area is specified when creating the entry completion with gtk_entry_completion_new_with_area() a horizontally oriented Gtk::CellAreaBox will be used.

Parameters:

Returns:

#completenil

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.

Returns:

  • (nil)

#completion_prefixString

Get the original text entered by the user that triggered the completion or nil if there’s no completion ongoing.

Returns:

  • (String)

    the prefix for the current completion

#compute_prefix(key) ⇒ String

Computes the common prefix that is shared by all rows in completion that start with key. If no row matches key, nil will be returned. Note that a text column must have been set for this function to work, see gtk_entry_completion_set_text_column() for details.

Parameters:

  • key (String)

    The text to complete for

Returns:

  • (String)

    The common prefix all rows starting with key or nil if no row matches key.

#delete_action(index_) ⇒ nil

Deletes the action at index_ from completion’s action list.

Note that index_ is a relative position and the position of an action may have changed since it was inserted.

Parameters:

  • index_ (Integer)

    the index of the item to delete

Returns:

  • (nil)

#entryGtk::Widget

Gets the entry completion has been attached to.

Returns:

  • (Gtk::Widget)

    The entry completion has been attached to

#inline_completionTrueClass

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

Returns:

  • (TrueClass)

    true if inline completion is turned on

#inline_completion=(inline_completion) ⇒ TrueClass

Determines whether the common prefix of the possible completions should be inserted automatically in the entry. Note that this requires text-column to be set, even if you are using a custom match function.

Parameters:

  • inline_completion (TrueClass)

Returns:

  • (TrueClass)

    inline-completion

  • (TrueClass)

    inline-completion

#inline_completion?TrueClass

Determines whether the common prefix of the possible completions should be inserted automatically in the entry. Note that this requires text-column to be set, even if you are using a custom match function.

Returns:

  • (TrueClass)

    inline-completion

#inline_selectionTrueClass

Returns true if inline-selection mode is turned on.

Returns:

  • (TrueClass)

    true if inline-selection mode is on

#inline_selection=(inline_selection) ⇒ TrueClass

Determines whether the possible completions on the popup will appear in the entry as you navigate through them.

Parameters:

  • inline_selection (TrueClass)

Returns:

  • (TrueClass)

    inline-selection

  • (TrueClass)

    inline-selection

#inline_selection?TrueClass

Determines whether the possible completions on the popup will appear in the entry as you navigate through them.

Returns:

  • (TrueClass)

    inline-selection

#insert_action_markup(index_, markup) ⇒ nil

Inserts an action in completion’s action item list at position index_ with markup markup.

Parameters:

  • index_ (Integer)

    the index of the item to insert

  • markup (String)

    markup of the item to insert

Returns:

  • (nil)

#insert_action_text(index_, text) ⇒ nil

Inserts an action in completion’s action item list at position index_ with text text. If you want the action item to have markup, use gtk_entry_completion_insert_action_markup().

Note that index_ is a relative position in the list of actions and the position of an action can change when deleting a different action.

Parameters:

  • index_ (Integer)

    the index of the item to insert

  • text (String)

    text of the item to insert

Returns:

  • (nil)

#insert_prefixnil

Requests a prefix insertion.

Returns:

  • (nil)

#minimum_key_lengthInteger

Returns minimum-key-length.

Returns:

  • (Integer)

    minimum-key-length

#minimum_key_length=(minimum_key_length) ⇒ Integer

Parameters:

  • minimum_key_length (Integer)

Returns:

  • (Integer)

    minimum-key-length

  • (Integer)

    minimum-key-length

#modelGtk::TreeModel

Returns model.

Returns:

#model=(model) ⇒ Gtk::TreeModel

Parameters:

Returns:

#newGtk::EntryCompletion

Creates a new Gtk::EntryCompletion object.

Returns:

#new_with_area(area) ⇒ Gtk::EntryCompletion

Creates a new Gtk::EntryCompletion object using the specified area to layout cells in the underlying Gtk::TreeViewColumn for the drop-down menu.

Parameters:

  • area (Gtk::CellArea)

    the Gtk::CellArea used to layout cells

Returns:

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

Returns:

  • (TrueClass)

    true if popup completion is turned on

Determines whether the possible completions should be shown in a popup window.

Parameters:

  • popup_completion (TrueClass)

Returns:

  • (TrueClass)

    popup-completion

  • (TrueClass)

    popup-completion

Determines whether the possible completions should be shown in a popup window.

Returns:

  • (TrueClass)

    popup-completion

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

Returns:

  • (TrueClass)

    true if the popup window will be resized to the width of the entry

Determines whether the completions popup window will be resized to the width of the entry.

Parameters:

  • popup_set_width (TrueClass)

Returns:

  • (TrueClass)

    popup-set-width

  • (TrueClass)

    popup-set-width

Determines whether the completions popup window will be resized to the width of the entry.

Returns:

  • (TrueClass)

    popup-set-width

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

Returns:

  • (TrueClass)

    true if the popup window will appear regardless of the number of matches

Determines whether the completions popup window will shown for a single possible completion. You probably want to set this to false if you are using [inline completion].

Parameters:

  • popup_single_match (TrueClass)

Returns:

  • (TrueClass)

    popup-single-match

  • (TrueClass)

    popup-single-match

Determines whether the completions popup window will shown for a single possible completion. You probably want to set this to false if you are using [inline completion].

Returns:

  • (TrueClass)

    popup-single-match

#set_match_func(func, func_data, func_notify) ⇒ nil

Sets the match function for completion to be func. The match function is used to determine if a row should or should not be in the completion list.

Parameters:

  • func (Gtk::EntryCompletionMatchFunc)

    the Gtk::EntryCompletionMatchFunc to use

  • func_data (GObject)

    user data for func

  • func_notify (GLib::DestroyNotify)

    destroy notify for func_data.

Returns:

  • (nil)

#text_columnInteger

The column of the model containing the strings. Note that the strings must be UTF-8.

Returns:

  • (Integer)

    text-column

#text_column=(text_column) ⇒ Integer

The column of the model containing the strings. Note that the strings must be UTF-8.

Parameters:

  • text_column (Integer)

Returns:

  • (Integer)

    text-column

  • (Integer)

    text-column