gtk.TreeModelSort.TreeModelSort Class Reference

Inheritance diagram for gtk.TreeModelSort.TreeModelSort:

gobject.ObjectG.ObjectG List of all members.

Public Member Functions

GtkTreeModelSortgetTreeModelSortStruct ()
 this (GtkTreeModelSort *gtkTreeModelSort)
 Sets our main struct and passes it to the parent class.
TreeModel getModel ()
 Returns the model the GtkTreeModelSort is sorting.
TreePath convertChildPathToPath (TreePath childPath)
 Converts child_path to a path relative to tree_model_sort.
void convertChildIterToIter (TreeIter sortIter, TreeIter childIter)
 Sets sort_iter to point to the row in tree_model_sort that corresponds to the row pointed at by child_iter.
TreePath convertPathToChildPath (TreePath sortedPath)
 Converts sorted_path to a path on the child model of tree_model_sort.
void convertIterToChildIter (TreeIter childIter, TreeIter sortedIter)
 Sets child_iter to point to the row pointed to by sorted_iter.
void resetDefaultSortFunc ()
 This resets the default sort function to be in the 'unsorted' state.
void clearCache ()
 This function should almost never be called.
int iterIsValid (TreeIter iter)
 Warning This function is slow.

Static Public Member Functions

static TreeModel newWithModel (TreeModel childModel)
 Creates a new GtkTreeModel, with child_model as the child model.

Protected Member Functions

void * getStruct ()
 the main Gtk struct as a void*

Protected Attributes

GtkTreeModelSortgtkTreeModelSort
 the main Gtk struct

Constructor & Destructor Documentation

gtk.TreeModelSort.TreeModelSort.this ( GtkTreeModelSort gtkTreeModelSort  ) 

Sets our main struct and passes it to the parent class.


Member Function Documentation

void gtk.TreeModelSort.TreeModelSort.clearCache (  ) 

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. tree_model_sort: A GtkTreeModelSort

void gtk.TreeModelSort.TreeModelSort.convertChildIterToIter ( TreeIter  sortIter,
TreeIter  childIter 
)

Sets sort_iter to point to the row in tree_model_sort that corresponds to the row pointed at by child_iter.

tree_model_sort: A GtkTreeModelSort sort_iter: An uninitialized GtkTreeIter. child_iter: A valid GtkTreeIter pointing to a row on the child model

TreePath gtk.TreeModelSort.TreeModelSort.convertChildPathToPath ( TreePath  childPath  ) 

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 NULL is returned. tree_model_sort: A GtkTreeModelSort child_path: A GtkTreePath to convert Returns: A newly allocated GtkTreePath, or NULL

void gtk.TreeModelSort.TreeModelSort.convertIterToChildIter ( TreeIter  childIter,
TreeIter  sortedIter 
)

Sets child_iter to point to the row pointed to by sorted_iter.

tree_model_sort: A GtkTreeModelSort child_iter: An uninitialized GtkTreeIter sorted_iter: A valid GtkTreeIter pointing to a row on tree_model_sort.

TreePath gtk.TreeModelSort.TreeModelSort.convertPathToChildPath ( TreePath  sortedPath  ) 

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, NULL is returned. tree_model_sort: A GtkTreeModelSort sorted_path: A GtkTreePath to convert Returns: A newly allocated GtkTreePath, or NULL

TreeModel gtk.TreeModelSort.TreeModelSort.getModel (  ) 

Returns the model the GtkTreeModelSort is sorting.

tree_model: a GtkTreeModelSort Returns: the "child model" being sorted

void* gtk.TreeModelSort.TreeModelSort.getStruct (  )  [protected]

the main Gtk struct as a void*

Reimplemented from gobject.ObjectG.ObjectG.

GtkTreeModelSort* gtk.TreeModelSort.TreeModelSort.getTreeModelSortStruct (  ) 

int gtk.TreeModelSort.TreeModelSort.iterIsValid ( TreeIter  iter  ) 

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 GtkTreeModelSort. tree_model_sort: A GtkTreeModelSort. iter: A GtkTreeIter. Returns: TRUE if the iter is valid, FALSE if the iter is invalid. Since 2.2 Property Details The "model" property "model" GtkTreeModel : Read / Write / Construct Only The model for the TreeModelSort to sort. See Also GtkTreeModel, GtkListStore, GtkTreeStore, GtkTreeSortable, GtkTreeModelFilter

static TreeModel gtk.TreeModelSort.TreeModelSort.newWithModel ( TreeModel  childModel  )  [static]

Creates a new GtkTreeModel, with child_model as the child model.

child_model: A GtkTreeModel Returns: A new GtkTreeModel.

void gtk.TreeModelSort.TreeModelSort.resetDefaultSortFunc (  ) 

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 GtkTreeModelSort is in 'unsorted' state. tree_model_sort: A GtkTreeModelSort


Member Data Documentation

GtkTreeModelSort* gtk.TreeModelSort.TreeModelSort.gtkTreeModelSort [protected]

the main Gtk struct


SourceForge.net Logo DSource.org Logo digitalmars.com Logo