package ocgtk
Install
dune-project
Dependency
Authors
Maintainers
Sources
sha256=4e50fdb5093136a10fc8ffbe388e44cbcb70d52f8afdd48863ec7e22580ff054
doc/ocgtk.gtk/Ocgtk_gtk/Gtk/Wrappers/Tree_store/index.html
Module Wrappers.Tree_store
type t = [ `tree_store | `object_ ] Gobject.objval newv : int -> Gobject.Type.t array -> tCreate a new TreeStore
val swap :
t ->
[ `tree_iter ] Gobject.obj ->
[ `tree_iter ] Gobject.obj ->
unitSwaps @a and @b in the same level of @tree_store.
Note that this function only works with unsorted stores.
val set_valuesv :
t ->
[ `tree_iter ] Gobject.obj ->
int array ->
Gobject.Value.t array ->
int ->
unitA variant of gtk_tree_store_set_valist() which takes the columns and values as two arrays, instead of using variadic arguments.
This function is mainly intended for language bindings or in case the number of columns to change is not known until run-time.
val set_value :
t ->
[ `tree_iter ] Gobject.obj ->
int ->
Gobject.Value.t ->
unitSets the data in the cell specified by @iter and @column.
The type of @value must be convertible to the type of the column.
val set_column_types : t -> int -> Gobject.Type.t array -> unitSets the type of the columns in a tree store.
This function is meant primarily for types that inherit from `GtkTreeStore`, and should only be used when constructing a new `GtkTreeStore`.
This functions cannot be called after a row has been added, or a method on the `GtkTreeModel` interface is called on the tree store.
val remove : t -> [ `tree_iter ] Gobject.obj -> boolRemoves @iter from @tree_store.
After being removed, @iter is set to the next valid row at that level, or invalidated if it previously pointed to the last one.
val prepend :
t ->
[ `tree_iter ] Gobject.obj option ->
[ `tree_iter ] Gobject.objPrepends a new row to @tree_store.
If @parent is non-%NULL, then it will prepend the new row before the first child of @parent, otherwise it will prepend a row to the top level. The `iter` parameter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value().
val move_before :
t ->
[ `tree_iter ] Gobject.obj ->
[ `tree_iter ] Gobject.obj option ->
unitMoves @iter in @tree_store to the position before @position.
@iter and @position should be in the same level.
Note that this function only works with unsorted stores.
If @position is %NULL, @iter will be moved to the end of the level.
val move_after :
t ->
[ `tree_iter ] Gobject.obj ->
[ `tree_iter ] Gobject.obj option ->
unitMoves @iter in @tree_store to the position after @position.
@iter and @position should be in the same level.
Note that this function only works with unsorted stores.
If @position is %NULL, @iter will be moved to the start of the level.
val iter_is_valid : t -> [ `tree_iter ] Gobject.obj -> boolChecks if the given iter is a valid iter for this `GtkTreeStore`.
This function is slow. Only use it for debugging and/or testing purposes.
val iter_depth : t -> [ `tree_iter ] Gobject.obj -> intReturns the depth of the position pointed by the iterator
The depth will be 0 for anything on the root level, 1 for anything down a level, etc.
val is_ancestor :
t ->
[ `tree_iter ] Gobject.obj ->
[ `tree_iter ] Gobject.obj ->
boolChecks if @iter is an ancestor of @descendant.
val insert_with_valuesv :
t ->
[ `tree_iter ] Gobject.obj option ->
int ->
int array ->
Gobject.Value.t array ->
int ->
[ `tree_iter ] Gobject.objA variant of gtk_tree_store_insert_with_values() which takes the columns and values as two arrays, instead of varargs.
This function is mainly intended for language bindings.
val insert_before :
t ->
[ `tree_iter ] Gobject.obj option ->
[ `tree_iter ] Gobject.obj option ->
[ `tree_iter ] Gobject.objInserts a new row before @sibling.
If @sibling is %NULL, then the row will be appended to @parent’s children.
If @parent and @sibling are %NULL, then the row will be appended to the toplevel.
If both @sibling and @parent are set, then @parent must be the parent of @sibling. When @sibling is set, @parent is optional.
The @iter parameter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value().
val insert_after :
t ->
[ `tree_iter ] Gobject.obj option ->
[ `tree_iter ] Gobject.obj option ->
[ `tree_iter ] Gobject.objInserts a new row after @sibling.
If @sibling is %NULL, then the row will be prepended to @parent’s children.
If @parent and @sibling are %NULL, then the row will be prepended to the toplevel.
If both @sibling and @parent are set, then @parent must be the parent of @sibling. When @sibling is set, @parent is optional.
The @iter parameter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value().
val insert :
t ->
[ `tree_iter ] Gobject.obj option ->
int ->
[ `tree_iter ] Gobject.objCreates a new row at @position.
If parent is non-%NULL, then the row will be made a child of @parent. Otherwise, the row will be created at the toplevel.
If @position is `-1` or is larger than the number of rows at that level, then the new row will be inserted to the end of the list.
The @iter parameter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value().
val clear : t -> unitRemoves all rows from @tree_store
val append :
t ->
[ `tree_iter ] Gobject.obj option ->
[ `tree_iter ] Gobject.objAppends a new row to @tree_store.
If @parent is non-%NULL, then it will append the new row after the last child of @parent, otherwise it will append a row to the top level.
The @iter parameter will be changed to point to this new row. The row will be empty after this function is called. To fill in values, you need to call gtk_tree_store_set() or gtk_tree_store_set_value().