logo top
Main Page   Widgets   Namespaces   Book  

Gtk::EntryCompletion Class Reference

Inheritance diagram for Gtk::EntryCompletion:

Inheritance graph
[legend]
List of all members.

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);.


Public Member Functions

virtual ~EntryCompletion ()
GtkEntryCompletion* gobj ()
 Provides access to the underlying C GObject.

const GtkEntryCompletion* gobj () const
 Provides access to the underlying C GObject.

GtkEntryCompletion* gobj_copy ()
 Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

Entryget_entry ()
 Gets the entry completion has been attached to.

const Entryget_entry () const
 Gets the entry completion has been attached to.

void set_model (const Glib::RefPtr<TreeModel>& model)
 Sets the model for a Gtk::EntryCompletion.

Glib::RefPtr<TreeModelget_model ()
 Returns the model the Gtk::EntryCompletion is using as data source.

Glib::RefPtr<const TreeModelget_model () const
 Returns the model the Gtk::EntryCompletion is using as data source.

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 .

int get_minimum_key_length () const
 Returns the minimum key length as set for completion .

void complete ()
 Requests a completion operation, or in other words a refiltering of the current list with completions, using the current key.

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.

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.

void set_text_column (int column)
 Convenience function for setting up the most used case of this code: a completion list with just strings.

Glib::SignalProxy1< void,
int > 
signal_action_activated ()
Glib::SignalProxy1< bool,
const TreeModel::iterator& > 
signal_match_selected ()

Static Public Member Functions

Glib::RefPtr<EntryCompletioncreate ()

Protected Member Functions

virtual bool on_match_selected (const TreeModel::iterator& iter)
virtual void on_action_activated (int index)

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gtk::EntryCompletionwrap (GtkEntryCompletion* object, bool take_copy=false)

Member Typedef Documentation

typedef sigc::slot<bool, const Glib::ustring&, const TreeModel::const_iterator&> Gtk::EntryCompletion::SlotMatch
 

For example, bool on_match(const Glib::ustring& key, const TreeModel::const_iterator& iter);.


Constructor & Destructor Documentation

virtual Gtk::EntryCompletion::~EntryCompletion (  )  [virtual]
 


Member Function Documentation

void Gtk::EntryCompletion::complete (  ) 
 

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.

Since: 2.4

Glib::RefPtr<EntryCompletion> Gtk::EntryCompletion::create (  )  [static]
 

void Gtk::EntryCompletion::delete_action ( int  index = 0  ) 
 

Deletes the action at index from completion 's action list.

Since: 2.4

Parameters:
index The index of the item to Delete.

const Entry* Gtk::EntryCompletion::get_entry (  )  const
 

Gets the entry completion has been attached to.

Returns:
The entry completion has been attached to.
Since: 2.4.

Entry* Gtk::EntryCompletion::get_entry (  ) 
 

Gets the entry completion has been attached to.

Returns:
The entry completion has been attached to.
Since: 2.4.

int Gtk::EntryCompletion::get_minimum_key_length (  )  const
 

Returns the minimum key length as set for completion .

Returns:
The currently used minimum key length.
Since: 2.4.

Glib::RefPtr<const TreeModel> Gtk::EntryCompletion::get_model (  )  const
 

Returns the model the Gtk::EntryCompletion is using as data source.

Returns 0 if the model is unset.

Returns:
A Gtk::TreeModel, or 0 if none is currently being used.
Since: 2.4.

Glib::RefPtr<TreeModel> Gtk::EntryCompletion::get_model (  ) 
 

Returns the model the Gtk::EntryCompletion is using as data source.

Returns 0 if the model is unset.

Returns:
A Gtk::TreeModel, or 0 if none is currently being used.
Since: 2.4.

const GtkEntryCompletion* Gtk::EntryCompletion::gobj (  )  const [inline]
 

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GtkEntryCompletion* Gtk::EntryCompletion::gobj (  )  [inline]
 

Provides access to the underlying C GObject.

Reimplemented from Glib::ObjectBase.

GtkEntryCompletion* Gtk::EntryCompletion::gobj_copy (  ) 
 

Provides access to the underlying C instance. The caller is responsible for unrefing it. Use when directly setting fields in structs.

void Gtk::EntryCompletion::insert_action_markup ( const Glib::ustring markup,
int  index
 

void Gtk::EntryCompletion::insert_action_text ( const Glib::ustring text,
int  index
 

virtual void Gtk::EntryCompletion::on_action_activated ( int  index  )  [protected, virtual]
 

virtual bool Gtk::EntryCompletion::on_match_selected ( const TreeModel::iterator iter  )  [protected, virtual]
 

void Gtk::EntryCompletion::prepend_action_markup ( const Glib::ustring markup  ) 
 

void Gtk::EntryCompletion::prepend_action_text ( const Glib::ustring text  ) 
 

void Gtk::EntryCompletion::set_match_func ( const SlotMatch slot  ) 
 

void Gtk::EntryCompletion::set_minimum_key_length ( int  length  ) 
 

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).

Since: 2.4

Parameters:
length The minimum length of the key in order to start completing.

void Gtk::EntryCompletion::set_model ( const Glib::RefPtr<TreeModel>&  model  ) 
 

Sets the model for a Gtk::EntryCompletion.

If completion already has a model set, it will remove it before setting the new model.

Since: 2.4

Parameters:
model The Gtk::TreeModel.

void Gtk::EntryCompletion::set_text_column ( int  column  ) 
 

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.

Since: 2.4

Parameters:
column The column in the model of completion to get strings from.

void Gtk::EntryCompletion::set_text_column ( const TreeModelColumnBase column  ) 
 

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.

Since: 2.4

Parameters:
column The column in the model of completion to get strings from.

Glib::SignalProxy1<void,int> Gtk::EntryCompletion::signal_action_activated (  ) 
 

Glib::SignalProxy1<bool, const TreeModel::iterator&> Gtk::EntryCompletion::signal_match_selected (  ) 
 

Prototype:
bool match_selected(const TreeModel::iterator& iter)


Friends And Related Function Documentation

Glib::RefPtr<Gtk::EntryCompletion> wrap ( GtkEntryCompletion*  object,
bool  take_copy = false
[related]
 

Parameters:
object The C instance
take_copy False if the result should take ownership of the C instance. True if it should take a new copy or ref.
Returns:
A C++ instance that wraps this C instance.


The documentation for this class was generated from the following file:
Generated for gtkmm 2.4 by Doxygen 1.3.7 © 1997-2001