GObject.Object
Gtk.TreeModelFilter
Import line: | Gtk = imports.gi.Gtk; |
GIR File: | Gtk-2.0.gir |
C documentation: | GtkTreeModelFilter |
Class : | TreeModelFilter |
Implements: | Gtk.TreeDragSource, Gtk.TreeModel |
Extends: | GObject.Object |
Show / Hide Inherited methods, properties and signals |
Properties | Defined By | |
---|---|---|
child_model : Gtk.TreeModel
|
Gtk.TreeModelFilter | |
parent : GObject.Object
read only
|
Gtk.TreeModelFilter | |
priv : Gtk.TreeModelFilterPrivate
read only
|
Gtk.TreeModelFilter | |
virtual_root : Gtk.TreePath
|
Gtk.TreeModelFilter |
Method / Constructor | Defined By | |
---|---|---|
new Gtk.TreeModelFilter
(Object properties)
Create a new Gtk.TreeModelFilter
Create a new Gtk.TreeModelFilter
|
||
Create a new Gtk.TreeModelFilter
Create a new Gtk.TreeModelFilter
|
||
clear_cache
()
:
none
This function should almost never be called.
This function should almost never be called. It clears the filter of any cached iterators that haven't been reffed with gtk_tree_model_ref_node(). This might be useful if the child model being filtered 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.
|
Gtk.TreeModelFilter | |
Sets filter_iter to point to the row in filter that corresponds to the row pointed at by child_iter.
Sets filter_iter to point to the row in filter that corresponds to the row pointed at by child_iter. If filter_iter was not set, FALSE is returned. valid iterator pointing to a visible row in child model.
|
Gtk.TreeModelFilter | |
convert_child_path_to_path
(TreePath child_path)
:
Gtk.TreePath
Converts child_path to a path relative to filter.
Converts child_path to a path relative to filter. That is, child_path points to a path in the child model. The rerturned path will point to the same row in the filtered model. If child_path isn't a valid path on the child model or points to a row which is not visible in filter, then NULL is returned.
|
Gtk.TreeModelFilter | |
Sets child_iter to point to the row pointed to by filter_iter.
Sets child_iter to point to the row pointed to by filter_iter.
|
Gtk.TreeModelFilter | |
convert_path_to_child_path
(TreePath filter_path)
:
Gtk.TreePath
Converts filter_path to a path on the child model of filter.
Converts filter_path to a path on the child model of filter. That is, point to the same location in the model not being filtered. If filter_path does not point to a location in the child model, NULL is returned.
|
Gtk.TreeModelFilter | |
Asks the GtkTreeDragSource to delete the row at path, because it was moved somewhere else via drag-and-drop.
Asks the GtkTreeDragSource to delete the row at path, because it was moved somewhere else via drag-and-drop. Returns FALSE if the deletion fails because path no longer exists, or for some model-specific reason. Should robustly handle a path no longer found in the model!
|
Gtk.TreeDragSource | |
Asks the GtkTreeDragSource to fill in selection_data with a representation of the row at path.
Asks the GtkTreeDragSource to fill in selection_data with a representation of the row at path. selection_data->target gives the required type of the data. Should robustly handle a path no longer found in the model!
|
Gtk.TreeDragSource | |
Calls func on each node in model in a depth-first fashion.
Calls func on each node in model in a depth-first fashion. If func returns TRUE, then the tree ceases to be walked, and gtk_tree_model_foreach() returns.
|
Gtk.TreeModel | |
Gtk.TreeModel | ||
get_flags
()
:
Gtk.TreeModelFlags
Returns a set of flags supported by this interface.
Returns a set of flags supported by this interface. The flags are a bitwise combination of GtkTreeModelFlags. The flags supported should not change during the lifecycle of the tree_model.
|
Gtk.TreeModel | |
Sets iter to a valid iterator pointing to path.
Sets iter to a valid iterator pointing to path.
|
Gtk.TreeModel | |
Initializes iter with the first iterator in the tree (the one at the path "0") and returns TRUE.
Initializes iter with the first iterator in the tree (the one at the path "0") and returns TRUE. Returns FALSE if the tree is empty.
|
Gtk.TreeModel | |
Sets iter to a valid iterator pointing to path_string, if it exists.
Sets iter to a valid iterator pointing to path_string, if it exists. Otherwise, iter is left invalid and FALSE is returned.
|
Gtk.TreeModel | |
get_model
()
:
Gtk.TreeModel
Returns a pointer to the child model of filter.
Returns a pointer to the child model of filter.
|
Gtk.TreeModelFilter | |
get_n_columns
()
:
Number
Returns the number of columns supported by tree_model.
Returns the number of columns supported by tree_model.
|
Gtk.TreeModel | |
get_path
(TreeIter iter)
:
Gtk.TreePath
Returns a newly-created GtkTreePath referenced by iter.
Returns a newly-created GtkTreePath referenced by iter. This path should be freed with gtk_tree_path_free().
|
Gtk.TreeModel | |
Generates a string representation of the iter.
Generates a string representation of the iter. This string is a ':' separated list of numbers. For example, "4:10:0:3" would be an acceptable return value for this string.
|
Gtk.TreeModel | |
Initializes and sets value to that at column.
Initializes and sets value to that at column. When done with value, g_value_unset() needs to be called to free any allocated memory.
|
Gtk.TreeModel | |
Sets iter to point to the first child of parent.
Sets iter to point to the first child of parent. If parent has no children, FALSE is returned and iter is set to be invalid. parent will remain a valid node after this function has been called. If parent is NULL returns the first node, equivalent to
|
Gtk.TreeModel | |
Returns TRUE if iter has children, FALSE otherwise.
Returns TRUE if iter has children, FALSE otherwise.
|
Gtk.TreeModel | |
Returns the number of children that iter has.
Returns the number of children that iter has. As a special case, if iter is NULL, then the number of toplevel nodes is returned.
|
Gtk.TreeModel | |
Sets iter to point to the node following it at the current level.
Sets iter to point to the node following it at the current level. If there is no next iter, FALSE is returned and iter is set to be invalid.
|
Gtk.TreeModel | |
Sets iter to be the child of parent, using the given index.
Sets iter to be the child of parent, using the given index. The first index is 0. If n is too big, or parent has no children, iter is set to an invalid iterator and FALSE is returned. parent will remain a valid node after this function has been called. As a special case, if parent is NULL, then the nth root node is set.
|
Gtk.TreeModel | |
Sets iter to be the parent of child.
Sets iter to be the parent of child. If child is at the toplevel, and doesn't have a parent, then iter is set to an invalid iterator and FALSE is returned. child will remain a valid node after this function has been called.
|
Gtk.TreeModel | |
ref_node
(TreeIter iter)
:
none
Lets the tree ref the node.
Lets the tree ref the node. This is an optional method for models to implement. To be more specific, models may ignore this call as it exists primarily for performance reasons. This function is primarily meant as a way for views to let caching model know when nodes are being displayed (and hence, whether or not to cache that node.) For example, a file-system based model would not want to keep the entire file-hierarchy in memory, just the sections that are currently being displayed by every current view. A model should be expected to be able to get an iter independent of its reffed state.
|
Gtk.TreeModel | |
refilter
()
:
none
Emits ::row_changed for each row in the child model, which causes the filter to re-evaluate whether a row is visible or not.
Emits ::row_changed for each row in the child model, which causes the filter to re-evaluate whether a row is visible or not.
|
Gtk.TreeModelFilter | |
Emits the "row-changed" signal on tree_model.
Emits the "row-changed" signal on tree_model.
|
Gtk.TreeModel | |
row_deleted
(TreePath path)
:
none
Emits the "row-deleted" signal on tree_model.
Emits the "row-deleted" signal on tree_model. This should be called by models after a row has been removed. The location pointed to by path should be the location that the row previously was at. It may not be a valid location anymore.
|
Gtk.TreeModel | |
Asks the GtkTreeDragSource whether a particular row can be used as the source of a DND operation.
Asks the GtkTreeDragSource whether a particular row can be used as the source of a DND operation. If the source doesn't implement this interface, the row is assumed draggable.
|
Gtk.TreeDragSource | |
Emits the "row-has-child-toggled" signal on tree_model.
Emits the "row-has-child-toggled" signal on tree_model. This should be called by models after the child state of a node changes.
|
Gtk.TreeModel | |
Emits the "row-inserted" signal on tree_model
Emits the "row-inserted" signal on tree_model
|
Gtk.TreeModel | |
Emits the "rows-reordered" signal on tree_model.
Emits the "rows-reordered" signal on tree_model. This should be called by models when their rows have been reordered.
|
Gtk.TreeModel | |
set_modify_func
(Number n_columns, Number types, Function func, void* data, Function destroy)
:
Number
With the n_columns and types parameters, you give an array of column types for this model (which will be exposed to the parent model/view).
With the n_columns and types parameters, you give an array of column types for this model (which will be exposed to the parent model/view). The func, data and destroy parameters are for specifying the modify function. The modify function will get called for
|
Gtk.TreeModelFilter | |
set_visible_column
(Number column)
:
none
Sets column of the child_model to be the column where filter should look for visibility information.
Sets column of the child_model to be the column where filter should look for visibility information. columns should be a column of type G_TYPE_BOOLEAN, where TRUE means that a row is visible, and FALSE if not.
|
Gtk.TreeModelFilter | |
Sets the visible function used when filtering the filter to be func.
Sets the visible function used when filtering the filter to be func. The function should return TRUE if the given row should be visible and FALSE otherwise. If the condition calculated by the function changes over time (e.g. because it depends on some global parameters), you must call gtk_tree_model_filter_refilter() to keep the visibility information of the model uptodate. Note that func is called whenever a row is inserted, when it may still be empty. The visible function should therefore take special care of empty rows, like in the example below.
|
Gtk.TreeModelFilter | |
unref_node
(TreeIter iter)
:
none
Lets the tree unref the node.
Lets the tree unref the node. This is an optional method for models to implement. To be more specific, models may ignore this call as it exists primarily for performance reasons. For more information on what this means, see gtk_tree_model_ref_node(). Please note that nodes that are deleted are not unreffed.
|
Gtk.TreeModel |
Event | Defined By | |
---|---|---|
This signal is emitted when a row in the model has changed.
This signal is emitted when a row in the model has changed.
|
Gtk.TreeModel | |
This signal is emitted when a row has been deleted.
This signal is emitted when a row has been deleted. Note that no iterator is passed to the signal handler, since the row is already deleted. Implementations of GtkTreeModel must emit row-deleted
|
Gtk.TreeModel | |
This signal is emitted when a row has gotten the first child row or lost its last child row.
This signal is emitted when a row has gotten the first child row or lost its last child row.
|
Gtk.TreeModel | |
This signal is emitted when a new row has been inserted in the model.
This signal is emitted when a new row has been inserted in the model. Note that the row may still be empty at this point, since it is a common pattern to first insert an empty row, and then fill it with the desired values.
|
Gtk.TreeModel | |
This signal is emitted when the children of a node in the GtkTreeModel have been reordered.
This signal is emitted when the children of a node in the GtkTreeModel have been reordered. Note that this signal is
|
Gtk.TreeModel |