Google

logo top
Main Page   Widgets   Namespaces   Book  

Gtk::TreeModelSort Class Reference
[TreeView Classes]

Inheritance diagram for Gtk::TreeModelSort:

Inheritance graph
[legend]
List of all members.

Public Methods

virtual ~TreeModelSort ()
GtkTreeModelSort* gobj ()
const GtkTreeModelSort* gobj () const
GtkTreeModelSort* gobj_copy ()
Glib::RefPtr<TreeModelget_model ()
 Returns the model the Gtk::TreeModelSort is sorting.

Glib::RefPtr<const TreeModelget_model () const
 Returns the model the Gtk::TreeModelSort is sorting.

TreeModel::Path convert_child_path_to_path (const Path& child_path) const
 Converts child_path to a path relative to tree_model_sort .

iterator convert_child_iter_to_iter (const iterator& child_iter) const
TreeModel::Path convert_path_to_child_path (const Path& sorted_path) const
 Converts sorted_path to a path on the child model of tree_model_sort .

iterator convert_iter_to_child_iter (const iterator& sorted_iter) const
void reset_default_sort_func ()
 This resets the default sort function to be in the 'unsorted' state.

void clear_cache ()
 This function should almost never be called.

bool iter_is_valid (const iterator& iter) const
 WARNING: This function is slow.


Static Public Methods

Glib::RefPtr<TreeModelSort> create (const Glib::RefPtr<TreeModel>& model)

Protected Methods

 TreeModelSort (const Glib::RefPtr<TreeModel>& model)
virtual void set_value_impl (const iterator& row, int column, const Glib::ValueBase& value)

Related Functions

(Note that these are not member functions.)

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

Constructor & Destructor Documentation

virtual Gtk::TreeModelSort::~TreeModelSort (   [virtual]
 

Gtk::TreeModelSort::TreeModelSort ( const Glib::RefPtr<TreeModel>&    model [explicit, protected]
 


Member Function Documentation

void Gtk::TreeModelSort::clear_cache (  
 

This function should almost never be called.

It clears the tree_model_sort of any cached iterators that haven't been reffed with gtk_tree_model_ref_node(). This might be useful if the child model being sorted is static (and doesn't change often) and there has been a lot of unreffed access to nodes. As a side effect of this function, all unreffed iters will be invalid.

iterator Gtk::TreeModelSort::convert_child_iter_to_iter ( const iterator   child_iter const
 

TreeModel::Path Gtk::TreeModelSort::convert_child_path_to_path ( const Path   child_path const
 

Converts child_path to a path relative to tree_model_sort .

That is, child_path points to a path in the child model. The returned path will point to the same row in the sorted model. If child_path isn't a valid path on the child model, then 0 is returned.

Parameters:
child_path A Gtk::TreePath to convert.
Returns:
A newly allocated Gtk::TreePath, or 0.

iterator Gtk::TreeModelSort::convert_iter_to_child_iter ( const iterator   sorted_iter const
 

TreeModel::Path Gtk::TreeModelSort::convert_path_to_child_path ( const Path   sorted_path const
 

Converts sorted_path to a path on the child model of tree_model_sort .

That is, sorted_path points to a location in tree_model_sort . The returned path will point to the same location in the model not being sorted. If sorted_path does not point to a location in the child model, 0 is returned.

Parameters:
sorted_path A Gtk::TreePath to convert.
Returns:
A newly allocated Gtk::TreePath, or 0.

Glib::RefPtr<TreeModelSort> Gtk::TreeModelSort::create ( const Glib::RefPtr<TreeModel>&    model [static]
 

Glib::RefPtr<const TreeModel> Gtk::TreeModelSort::get_model (   const
 

Returns the model the Gtk::TreeModelSort is sorting.

Returns:
The "child model" being sorted.

Glib::RefPtr<TreeModel> Gtk::TreeModelSort::get_model (  
 

Returns the model the Gtk::TreeModelSort is sorting.

Returns:
The "child model" being sorted.

const GtkTreeModelSort* Gtk::TreeModelSort::gobj (   const [inline]
 

Reimplemented from Gtk::TreeModel.

GtkTreeModelSort* Gtk::TreeModelSort::gobj (   [inline]
 

Reimplemented from Gtk::TreeModel.

GtkTreeModelSort* Gtk::TreeModelSort::gobj_copy (  
 

bool Gtk::TreeModelSort::iter_is_valid ( const iterator   iter const
 

WARNING: This function is slow.

Only use it for debugging and/or testing purposes.

Checks if the given iter is a valid iter for this Gtk::TreeModelSort.

Parameters:
iter A Gtk::TreeIter.
Returns:
true if the iter is valid, false if the iter is invalid.
Since: 2.2.

void Gtk::TreeModelSort::reset_default_sort_func (  
 

This resets the default sort function to be in the 'unsorted' state.

That is, it is in the same order as the child model. It will re-sort the model to be in the same order as the child model only if the Gtk::TreeModelSort is in 'unsorted' state.

virtual void Gtk::TreeModelSort::set_value_impl ( const iterator   row,
int    column,
const Glib::ValueBase   value
[protected, virtual]
 

Reimplemented from Gtk::TreeModel.


Friends And Related Function Documentation

Glib::RefPtr<Gtk::TreeModelSort> wrap ( GtkTreeModelSort*    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