Google

logo top
Main Page   Widgets   Namespaces   Book  

Gtk::TreeSortable Class Reference
[TreeView Classes]

Inheritance diagram for Gtk::TreeSortable:

Inheritance graph
[legend]
List of all members.

Public Types

typedef SigC::Slot2< int,
const Gtk::TreeModel::iterator&,
const Gtk::TreeModel::iterator& > 
SlotCompare
enum  { DEFAULT_SORT_COLUMN_ID = -1 }

Public Methods

virtual ~TreeSortable ()
GtkTreeSortable* gobj ()
const GtkTreeSortable* gobj () const
bool get_sort_column_id (int& sort_column_id, SortType& order) const
 Fills in sort_column_id and order with the current sort column and the order, if applicable.

void set_sort_column_id (const TreeModelColumnBase& sort_column_id, SortType order)
 Sets the current sort column to be sort_column_id .

void set_sort_column_id (int sort_column_id, SortType order)
 Sets the current sort column to be sort_column_id .

void set_sort_func (const TreeModelColumnBase& sort_column_id, const SlotCompare& slot)
void set_sort_func (int sort_column_id, const SlotCompare& slot)
void set_default_sort_func (const SlotCompare& slot)
bool has_default_sort_func () const
 Returns true if the model has a default sort function.

void sort_column_changed ()
 Emits a GtkTreeSortable::sort_column_changed signal on.

Glib::SignalProxy0<void> signal_sort_column_changed ()

Static Public Methods

void add_interface (GType gtype_implementer)

Protected Methods

virtual bool get_sort_column_id_vfunc (int* sort_column_id, SortType* order)
virtual void set_sort_column_id_vfunc (int sort_column_id, SortType order)
virtual void set_sort_func_vfunc (int sort_column_id, GtkTreeIterCompareFunc func, void* data, GtkDestroyNotify destroy)
virtual void set_default_sort_func_vfunc (GtkTreeIterCompareFunc func, void* data, GtkDestroyNotify destroy)
virtual bool has_default_sort_func_vfunc ()
virtual void on_sort_column_changed ()

Related Functions

(Note that these are not member functions.)

Glib::RefPtr<Gtk::TreeSortable> wrap (GtkTreeSortable* object, bool take_copy=false)

Member Typedef Documentation

typedef SigC::Slot2<int, const Gtk::TreeModel::iterator&, const Gtk::TreeModel::iterator&> Gtk::TreeSortable::SlotCompare
 


Member Enumeration Documentation

anonymous enum
 

Enumeration values:
DEFAULT_SORT_COLUMN_ID 


Constructor & Destructor Documentation

virtual Gtk::TreeSortable::~TreeSortable (   [virtual]
 


Member Function Documentation

void Gtk::TreeSortable::add_interface ( GType    gtype_implementer [static]
 

bool Gtk::TreeSortable::get_sort_column_id ( int&    sort_column_id,
SortType   order
const
 

Fills in sort_column_id and order with the current sort column and the order, if applicable.

If the sort column is not set, then false is returned, and the values in sort_column_id and order are unchanged.

Parameters:
sort_column_id The sort column id to be filled in.
order The Gtk::SortType to be filled in.
Returns:
true, if the sort column has been set.

virtual bool Gtk::TreeSortable::get_sort_column_id_vfunc ( int*    sort_column_id,
SortType   order
[protected, virtual]
 

const GtkTreeSortable* Gtk::TreeSortable::gobj (   const [inline]
 

Reimplemented from Glib::Interface.

Reimplemented in Gtk::ListStore, Gtk::TreeModelSort, and Gtk::TreeStore.

GtkTreeSortable* Gtk::TreeSortable::gobj (   [inline]
 

Reimplemented from Glib::Interface.

Reimplemented in Gtk::ListStore, Gtk::TreeModelSort, and Gtk::TreeStore.

bool Gtk::TreeSortable::has_default_sort_func (   const
 

Returns true if the model has a default sort function.

This is used primarily by GtkTreeViewColumns in order to determine if a model can go back to the default state, or not.

Returns:
true, if the model has a default sort function.

virtual bool Gtk::TreeSortable::has_default_sort_func_vfunc (   [protected, virtual]
 

virtual void Gtk::TreeSortable::on_sort_column_changed (   [protected, virtual]
 

void Gtk::TreeSortable::set_default_sort_func ( const SlotCompare   slot
 

virtual void Gtk::TreeSortable::set_default_sort_func_vfunc ( GtkTreeIterCompareFunc    func,
void*    data,
GtkDestroyNotify    destroy
[protected, virtual]
 

void Gtk::TreeSortable::set_sort_column_id ( int    sort_column_id,
SortType    order
 

Sets the current sort column to be sort_column_id .

The sortable will resort itself to reflect this change, after emitting a GtkTreeSortable::sort_column_changed signal. If sort_column_id is Gtk::TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the default sort function will be used, if it is set.

Parameters:
sort_column_id The sort column id to set.
order The sort order of the column.

void Gtk::TreeSortable::set_sort_column_id ( const TreeModelColumnBase   sort_column_id,
SortType    order
 

Sets the current sort column to be sort_column_id .

The sortable will resort itself to reflect this change, after emitting a GtkTreeSortable::sort_column_changed signal. If sort_column_id is Gtk::TREE_SORTABLE_DEFAULT_SORT_COLUMN_ID, then the default sort function will be used, if it is set.

Parameters:
sort_column_id The sort column id to set.
order The sort order of the column.

virtual void Gtk::TreeSortable::set_sort_column_id_vfunc ( int    sort_column_id,
SortType    order
[protected, virtual]
 

void Gtk::TreeSortable::set_sort_func ( int    sort_column_id,
const SlotCompare   slot
 

void Gtk::TreeSortable::set_sort_func ( const TreeModelColumnBase   sort_column_id,
const SlotCompare   slot
 

virtual void Gtk::TreeSortable::set_sort_func_vfunc ( int    sort_column_id,
GtkTreeIterCompareFunc    func,
void*    data,
GtkDestroyNotify    destroy
[protected, virtual]
 

Glib::SignalProxy0<void> Gtk::TreeSortable::signal_sort_column_changed (  
 

Prototype:
void sort_column_changed()

void Gtk::TreeSortable::sort_column_changed (  
 

Emits a GtkTreeSortable::sort_column_changed signal on.


Friends And Related Function Documentation

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


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