gtk.TreeIter
- class
TreeIter
;
- The #GtkTreeIter is the primary structure
for accessing a #GtkTreeModel. Models are expected to put a unique
integer in the @stamp member, and put
model-specific data in the three @user_data
members.
- protected GtkTreeIter*
gtkTreeIter
;
- the main Gtk struct
- GtkTreeIter*
getTreeIterStruct
();
- Get the main Gtk struct
- protected void*
getStruct
();
- the main Gtk struct as a void*
- this(GtkTreeIter* gtkTreeIter, bool ownedRef = false);
- Sets our main struct and passes it to the parent class.
- GtkTreeModel*
gtkTreeModel
;
- this will be set only when the iter
is created from the model.
- void
setModel
(GtkTreeModel* gtkTreeModel);
-
- void
setModel
(TreeModelIF treeModel);
-
- this(TreeModelIF treeModel, string treePath);
- Throws:
ConstructionException GTK+ fails to create the object.
- this(TreeModelIF treeModel, TreePath treePath);
- Throws:
ConstructionException GTK+ fails to create the object.
- this();
- creates a new tree iteractor.
used TreeView.createIter and TreeView.append() to create iteractor for a tree or list
- TreeIter
copy
(TreeIter iter);
- Creates a dynamically allocated tree iterator as a
copy
of iter.
- void
getValue
(int column, Value value);
- Get Value
Params:
- string
getValueString
(int column);
- Get the value of a column as a string
Params:
int column |
the column number |
Returns:
a string representing the value of the column
- int
getValueInt
(int column);
- Get the value of a column as an int
Params:
int column |
the column number |
Returns:
a string representing the value of the column
- TreePath
getTreePath
();
-
- string
getVisiblePath
(string separator);
- This return the path visible to the user.
- TreeIter
getParent
();
- Gets the parent of this iter
Returns:
the parent iter or null if can't get parent or an error occured
- TreeIter
getGrandParent
();
-
- int
stamp
();
void
stamp
(int
stamp
);
- A unique
stamp
to catch invalid iterators
- void*
userData
();
void
userData
(void* data);
- Model specific data
- void
setUserData
(T)(T data);
T
getUserData
(T)();
-
setUserData
and
getUserData
provide simple boxing
around the userData field in the TreeIter struct.
Throws:
TreeIterError for unsupported types or a type mismatch.
Example:
Treeiter iter = new TreeIter();
iter.setUserData(20);
int i = iter.getUserData!(int)();
- static GType
getType
();
-
|