## GtexTreeModelNode

GtexTreeModelNode — GtkTreeModel based on GNode

## Functions

void | gtex_tree_model_node_set_column_types ()
void | gtex_tree_model_node_set_tree ()
gboolean | gtex_tree_model_node_column_index_is_valid ()
void | gtex_tree_model_node_change_stamp ()
void | gtex_tree_model_node_get_iter_at_node ()
GNode * | gtex_tree_model_node_get_node_from_iter ()
gboolean | gtex_tree_model_node_iter_is_valid ()

## Types and Values

struct | GtexTreeModelNode

## Object Hierarchy

        GObject
        ╰── GtexTreeModelNode

## Implemented Interfaces

GtexTreeModelNode implements GtkTreeModel.

## Includes

    #include <gtex.h>

## Description

GtexTreeModelNode is a class that implements a maximum of the GtkTreeModel interface in a generic way, based on a GNode tree. GtexTreeModelNode doesn't look at the GNode's data fields, it is not aware of what the nodes contain.

Only the following virtual functions of GtkTreeModelIface are not implemented by GtexTreeModelNode:

- `GtkTreeModelIface.get_value()`

- `GtkTreeModelIface.ref_node()` (optional)

- `GtkTreeModelIface.unref_node()` (optional)

So a subclass of GtexTreeModelNode needs to be created, implementing at least `GtkTreeModelIface.get_value()`.

Side note: GObject permits to implement an interface in this fashion. In other words, class "A" inherits from GObject and implements some vfuncs of the interface "I". Then class "B" inherits from class "A" and implements the remaining vfuncs from the same interface "I".

## Functions

### gtex_tree_model_node_set_column_types ()

    void
    gtex_tree_model_node_set_column_types (GtexTreeModelNode *gtex_model,
                                           gint n_columns,
                                           GType *column_types);

#### Parameters

gtex_model | a GtexTreeModelNode. |
n_columns | number of columns. |
column_types | an array of GType types for the columns, from first to last. | [array length=n_columns]

### gtex_tree_model_node_set_tree ()

    void
    gtex_tree_model_node_set_tree (GtexTreeModelNode *model,
                                   GNode *tree);

### gtex_tree_model_node_column_index_is_valid ()

    gboolean
    gtex_tree_model_node_column_index_is_valid
                                   (GtexTreeModelNode *model,
                                    gint index);

### gtex_tree_model_node_change_stamp ()

    void
    gtex_tree_model_node_change_stamp (GtexTreeModelNode *model);

### gtex_tree_model_node_get_iter_at_node ()

    void
    gtex_tree_model_node_get_iter_at_node (GtexTreeModelNode *model,
                                           GtkTreeIter *iter,
                                           GNode *node);

#### Parameters

iter | . | [out]

### gtex_tree_model_node_get_node_from_iter ()

    GNode *
    gtex_tree_model_node_get_node_from_iter
                                   (const GtkTreeIter *iter);

#### Parameters

iter | must be a valid GtkTreeIter. |

#### Returns

.

[transfer none]

### gtex_tree_model_node_iter_is_valid ()

    gboolean
    gtex_tree_model_node_iter_is_valid (GtexTreeModelNode *model,
                                        const GtkTreeIter *iter);

## Types and Values

### struct GtexTreeModelNode

    struct GtexTreeModelNode;