gtkmm  3.22.2
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | Related Functions | List of all members
Gtk::EntryCompletion Class Reference

Completion functionality for Gtk::Entry. More...

#include <gtkmm/entrycompletion.h>

Inheritance diagram for Gtk::EntryCompletion:
Inheritance graph
[legend]

Public Types

typedef sigc::slot< bool, const Glib::ustring&, const TreeModel::const_iterator& > SlotMatch
 For example, bool on_match(const Glib::ustring& key, const TreeModel::const_iterator& iter);. More...
 
- Public Types inherited from Glib::Object
typedef void(*)(gpointer data DestroyNotify)
 
- Public Types inherited from sigc::trackable
typedef internal::func_destroy_notify func_destroy_notify
 
- Public Types inherited from Gtk::CellLayout
typedef sigc::slot< void, const TreeModel::const_iterator& > SlotCellData
 

Public Member Functions

 EntryCompletion (EntryCompletion&& src) noexcept
 
EntryCompletionoperator= (EntryCompletion&& src) noexcept
 
 ~EntryCompletion () noexceptoverride
 
GtkEntryCompletion* gobj ()
 Provides access to the underlying C GObject. More...
 
const GtkEntryCompletion* gobj () const
 Provides access to the underlying C GObject. More...
 
GtkEntryCompletion* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs. More...
 
Entryget_entry ()
 Gets the entry completion has been attached to. More...
 
const Entryget_entry () const
 Gets the entry completion has been attached to. More...
 
void set_model (const Glib::RefPtr< TreeModel >& model)
 Sets the model for a Gtk::EntryCompletion. More...
 
Glib::RefPtr< TreeModelget_model ()
 Returns the model the Gtk::EntryCompletion is using as data source. More...
 
Glib::RefPtr< const TreeModelget_model () const
 Returns the model the Gtk::EntryCompletion is using as data source. More...
 
void unset_model ()
 Remove the model from the EntryCompletion. More...
 
void set_match_func (const SlotMatch& slot)
 
void set_minimum_key_length (int length)
 Requires the length of the search key for completion to be at least length. More...
 
int get_minimum_key_length () const
 Returns the minimum key length as set for completion. More...
 
Glib::ustring compute_prefix (const Glib::ustring& key)
 Computes the common prefix that is shared by all rows in completion that start with key. More...
 
void complete ()
 Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key. More...
 
void insert_prefix ()
 Requests a prefix insertion. More...
 
void insert_action_text (const Glib::ustring& text, int index)
 
void prepend_action_text (const Glib::ustring& text)
 
void insert_action_markup (const Glib::ustring& markup, int index)
 
void prepend_action_markup (const Glib::ustring& markup)
 
void delete_action (int index=0)
 Deletes the action at index from completion’s action list. More...
 
void set_inline_completion (bool inline_completion=true)
 Sets whether the common prefix of the possible completions should be automatically inserted in the entry. More...
 
bool get_inline_completion () const
 Returns whether the common prefix of the possible completions should be automatically inserted in the entry. More...
 
void set_inline_selection (bool inline_selection=true)
 Sets whether it is possible to cycle through the possible completions inside the entry. More...
 
bool get_inline_selection () const
 Returns true if inline-selection mode is turned on. More...
 
void set_popup_completion (bool popup_completion=true)
 Sets whether the completions should be presented in a popup window. More...
 
bool get_popup_completion () const
 Returns whether the completions should be presented in a popup window. More...
 
void set_popup_set_width (bool popup_set_width=true)
 Sets whether the completion popup window will be resized to be the same width as the entry. More...
 
bool get_popup_set_width () const
 Returns whether the completion popup window will be resized to the width of the entry. More...
 
void set_popup_single_match (bool popup_single_match=true)
 Sets whether the completion popup window will appear even if there is only a single match. More...
 
bool get_popup_single_match () const
 Returns whether the completion popup window will appear even if there is only a single match. More...
 
Glib::ustring get_completion_prefix () const
 Get the original text entered by the user that triggered the completion or an empty string if there's no completion ongoing. More...
 
void set_text_column (const TreeModelColumnBase& column)
 Convenience function for setting up the most used case of this code: a completion list with just strings. More...
 
void set_text_column (int column)
 Convenience function for setting up the most used case of this code: a completion list with just strings. More...
 
int get_text_column () const
 Returns the column in the model of completion to get strings from. More...
 
Glib::SignalProxy< void, int > signal_action_activated ()
 
Glib::SignalProxy1< bool, const TreeModel::iterator& > signal_match_selected ()
 Emitted when a match from the list is selected. More...
 
Glib::SignalProxy1< bool, const TreeModel::iterator& > signal_cursor_on_match ()
 Emitted when a match from the cursor is on a match of the list. More...
 
Glib::SignalProxy< bool, const Glib::ustring& > signal_insert_prefix ()
 
Glib::SignalProxy< void > signal_no_matches ()
 
Glib::PropertyProxy< Glib::RefPtr< Gtk::TreeModel > > property_model ()
 The model to find matches in. More...
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< Gtk::TreeModel > > property_model () const
 The model to find matches in. More...
 
Glib::PropertyProxy< int > property_minimum_key_length ()
 Minimum length of the search key in order to look up matches. More...
 
Glib::PropertyProxy_ReadOnly< int > property_minimum_key_length () const
 Minimum length of the search key in order to look up matches. More...
 
Glib::PropertyProxy< int > property_text_column ()
 The column of the model containing the strings. More...
 
Glib::PropertyProxy_ReadOnly< int > property_text_column () const
 The column of the model containing the strings. More...
 
Glib::PropertyProxy< bool > property_inline_completion ()
 Determines whether the common prefix of the possible completions should be inserted automatically in the entry. More...
 
Glib::PropertyProxy_ReadOnly< bool > property_inline_completion () const
 Determines whether the common prefix of the possible completions should be inserted automatically in the entry. More...
 
Glib::PropertyProxy< bool > property_popup_completion ()
 Determines whether the possible completions should be shown in a popup window. More...
 
Glib::PropertyProxy_ReadOnly< bool > property_popup_completion () const
 Determines whether the possible completions should be shown in a popup window. More...
 
Glib::PropertyProxy< bool > property_popup_set_width ()
 Determines whether the completions popup window will be resized to the width of the entry. More...
 
Glib::PropertyProxy_ReadOnly< bool > property_popup_set_width () const
 Determines whether the completions popup window will be resized to the width of the entry. More...
 
Glib::PropertyProxy< bool > property_popup_single_match ()
 Determines whether the completions popup window will shown for a single possible completion. More...
 
Glib::PropertyProxy_ReadOnly< bool > property_popup_single_match () const
 Determines whether the completions popup window will shown for a single possible completion. More...
 
Glib::PropertyProxy< bool > property_inline_selection ()
 Determines whether the possible completions on the popup will appear in the entry as you navigate through them. More...
 
Glib::PropertyProxy_ReadOnly< bool > property_inline_selection () const
 Determines whether the possible completions on the popup will appear in the entry as you navigate through them. More...
 
Glib::PropertyProxy_ReadOnly< Glib::RefPtr< CellArea > > property_cell_area () const
 The Gtk::CellArea used to layout cell renderers in the treeview column. More...
 
- Public Member Functions inherited from Glib::Object
 Object (const Object &)=delete
 
Objectoperator= (const Object &)=delete
 
 Object (Object &&src) noexcept
 
Objectoperator= (Object &&src) noexcept
 
void * get_data (const QueryQuark &key)
 
void set_data (const Quark &key, void *data)
 
void set_data (const Quark &key, void *data, DestroyNotify notify)
 
void remove_data (const QueryQuark &quark)
 
void * steal_data (const QueryQuark &quark)
 
Glib::RefPtr< Glib::Objectwrap (GObject *object, bool take_copy=false)
 
- Public Member Functions inherited from Glib::ObjectBase
 ObjectBase (const ObjectBase &)=delete
 
ObjectBaseoperator= (const ObjectBase &)=delete
 
void set_property_value (const Glib::ustring &property_name, const Glib::ValueBase &value)
 
void get_property_value (const Glib::ustring &property_name, Glib::ValueBase &value) const
 
void set_property (const Glib::ustring &property_name, const PropertyType &value)
 
void get_property (const Glib::ustring &property_name, PropertyType &value) const
 
void connect_property_changed (const Glib::ustring &property_name, const sigc::slot< void > &slot)
 
void connect_property_changed (const Glib::ustring &property_name, sigc::slot< void > &&slot)
 
sigc::connection connect_property_changed_with_return (const Glib::ustring &property_name, const sigc::slot< void > &slot)
 
sigc::connection connect_property_changed_with_return (const Glib::ustring &property_name, sigc::slot< void > &&slot)
 
void freeze_notify ()
 
void thaw_notify ()
 
virtual void reference () const
 
virtual void unreference () const
 
GObject * gobj ()
 
const GObject * gobj () const
 
GObject * gobj_copy () const
 
- Public Member Functions inherited from sigc::trackable
 trackable () noexcept
 
 trackable (const trackable &src) noexcept
 
 trackable (trackable &&src)
 
 ~trackable ()
 
void add_destroy_notify_callback (void *data, func_destroy_notify func) const
 
void notify_callbacks ()
 
trackableoperator= (const trackable &src)
 
trackableoperator= (trackable &&src)
 
void remove_destroy_notify_callback (void *data) const
 
- Public Member Functions inherited from Gtk::CellLayout
 CellLayout (CellLayout&& src) noexcept
 
CellLayoutoperator= (CellLayout&& src) noexcept
 
 ~CellLayout () noexceptoverride
 
GtkCellLayout* gobj ()
 Provides access to the underlying C GObject. More...
 
const GtkCellLayout* gobj () const
 Provides access to the underlying C GObject. More...
 
template<class ColumnType >
void pack_start (const TreeModelColumn< ColumnType >& model_column, bool expand=true)
 
void pack_start (CellRenderer& cell, bool expand=true)
 Packs the cell into the beginning of cell_layout. More...
 
void pack_end (CellRenderer& cell, bool expand=true)
 Adds the cell to the end of cell_layout. More...
 
std::vector< CellRenderer* > get_cells ()
 Return value: a list of cell renderers. More...
 
std::vector< const CellRenderer* > get_cells () const
 Return value: a list of cell renderers. More...
 
CellRendererget_first_cell ()
 Gets the CellRenderer for the first column if any has been added, or nullptr otherwise. More...
 
const CellRendererget_first_cell () const
 Gets the CellRenderer for the first column if any has been added, or nullptr otherwise. More...
 
void clear ()
 Unsets all the mappings on all renderers on cell_layout and removes all renderers from cell_layout. More...
 
void add_attribute (CellRenderer& cell, const Glib::ustring& attribute, int column)
 Adds an attribute mapping to the list in cell_layout. More...
 
void add_attribute (const Glib::PropertyProxy_Base& property, const TreeModelColumnBase& column)
 
void add_attribute (CellRenderer& cell, const Glib::ustring& attribute, const TreeModelColumnBase& column)
 
void set_cell_data_func (CellRenderer& cell, const SlotCellData& slot)
 
void clear_attributes (CellRenderer& cell)
 Clears all existing attributes previously set with set_attributes(). More...
 
void reorder (CellRenderer& cell, int position)
 Re-inserts cell at position. More...
 
Glib::RefPtr< CellAreaget_area ()
 Returns the underlying Gtk::CellArea which might be cell_layout if called on a Gtk::CellArea or might be nullptr if no Gtk::CellArea is used by cell_layout. More...
 
Glib::RefPtr< const CellAreaget_area () const
 Returns the underlying Gtk::CellArea which might be cell_layout if called on a Gtk::CellArea or might be nullptr if no Gtk::CellArea is used by cell_layout. More...
 
template<class T_ModelColumnType >
void pack_start (const TreeModelColumn< T_ModelColumnType >& column, bool expand)
 
- Public Member Functions inherited from Glib::Interface
 Interface ()
 
 Interface (Interface &&src) noexcept
 
Interfaceoperator= (Interface &&src) noexcept
 
 Interface (const Glib::Interface_Class &interface_class)
 
 Interface (GObject *castitem)
 
 ~Interface () noexceptoverride
 
 Interface (const Interface &)=delete
 
Interfaceoperator= (const Interface &)=delete
 
GObject * gobj ()
 
const GObject * gobj () const
 
- Public Member Functions inherited from Gtk::Buildable
 Buildable (Buildable&& src) noexcept
 
Buildableoperator= (Buildable&& src) noexcept
 
 ~Buildable () noexceptoverride
 
GtkBuildable* gobj ()
 Provides access to the underlying C GObject. More...
 
const GtkBuildable* gobj () const
 Provides access to the underlying C GObject. More...
 
void set_name (const Glib::ustring& name)
 Sets the name of the buildable object. More...
 
Glib::ustring get_name () const
 Gets the name of the buildable object. More...
 

Static Public Member Functions

static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...
 
static Glib::RefPtr< EntryCompletioncreate ()
 
- Static Public Member Functions inherited from Gtk::CellLayout
static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...
 
- Static Public Member Functions inherited from Gtk::Buildable
static void add_interface (GType gtype_implementer)
 
static GType get_type ()
 Get the GType for this class, for use with the underlying GObject type system. More...
 

Protected Member Functions

 EntryCompletion ()
 
virtual bool on_match_selected (const TreeModel::iterator& iter)
 
virtual void on_action_activated (int index)
 This is a default handler for the signal signal_action_activated(). More...
 
virtual bool on_insert_prefix (const Glib::ustring& prefix)
 This is a default handler for the signal signal_insert_prefix(). More...