ETreeModelGenerator: Evolution Utilities Reference Manual

## ETreeModelGenerator ETreeModelGenerator |

## Functions

gint | (*ETreeModelGeneratorGenerateFunc) ()
void | (*ETreeModelGeneratorModifyFunc) ()
ETreeModelGenerator * | e_tree_model_generator_new ()
GtkTreeModel * | e_tree_model_generator_get_model ()
void | e_tree_model_generator_set_generate_func ()
void | e_tree_model_generator_set_modify_func ()
GtkTreePath * | e_tree_model_generator_convert_child_path_to_path ()
void | e_tree_model_generator_convert_child_iter_to_iter ()
GtkTreePath * | e_tree_model_generator_convert_path_to_child_path ()
gboolean | e_tree_model_generator_convert_iter_to_child_iter ()

## Properties

GObject * | child-model | Read / Write / Construct Only

## Types and Values

struct | ETreeModelGenerator

## Object Hierarchy

        GObject
        ╰── ETreeModelGenerator

## Implemented Interfaces

ETreeModelGenerator implements GtkTreeModel.

## Description

## Functions

### ETreeModelGeneratorGenerateFunc ()

    gint
    (*ETreeModelGeneratorGenerateFunc) (GtkTreeModel *model,
                                        GtkTreeIter *child_iter,
                                        gpointer data);

### ETreeModelGeneratorModifyFunc ()

    void
    (*ETreeModelGeneratorModifyFunc) (GtkTreeModel *model,
                                      GtkTreeIter *child_iter,
                                      gint permutation_n,
                                      gint column,
                                      GValue *value,
                                      gpointer data);

### e_tree_model_generator_new ()

    ETreeModelGenerator *
    e_tree_model_generator_new (GtkTreeModel *child_model);

Creates a new ETreeModelGenerator wrapping `child_model` .

#### Parameters

child_model | a GtkTreeModel |

#### Returns

A new ETreeModelGenerator.

### e_tree_model_generator_get_model ()

    GtkTreeModel *
    e_tree_model_generator_get_model (ETreeModelGenerator *tree_model_generator);

Gets the child model being wrapped by `tree_model_generator` .

#### Parameters

tree_model_generator | an ETreeModelGenerator |

#### Returns

A GtkTreeModel being wrapped.

### e_tree_model_generator_set_generate_func ()

    void
    e_tree_model_generator_set_generate_func
                                   (ETreeModelGenerator *tree_model_generator,
                                    ETreeModelGeneratorGenerateFunc func,
                                    gpointer data,
                                    GDestroyNotify destroy);

Sets the callback function used to filter or generate additional rows based on the child model's data. This function is called for each child row, and returns a value indicating the number of rows that will be used to represent the child row - 0 or more.

If `func` is `NULL`, a filtering/generating function will not be applied.

#### Parameters

tree_model_generator | an ETreeModelGenerator |
func | an ETreeModelGeneratorGenerateFunc, or `NULL` |
data | user data to pass to `func` |

### e_tree_model_generator_set_modify_func ()

    void
    e_tree_model_generator_set_modify_func
                                   (ETreeModelGenerator *tree_model_generator,
                                    ETreeModelGeneratorModifyFunc func,
                                    gpointer data,
                                    GDestroyNotify destroy);

Sets the callback function used to override values for the child row's columns and specify values for generated rows' columns.

If `func` is `NULL`, the child model's values will always be used.

#### Parameters

tree_model_generator | an ETreeModelGenerator |
func | an `ETreeModelGeneratorModifyFunc` , or `NULL` |
data | user data to pass to `func` |

### e_tree_model_generator_convert_child_path_to_path ()

    GtkTreePath *
    e_tree_model_generator_convert_child_path_to_path
                                   (ETreeModelGenerator *tree_model_generator,
                                    GtkTreePath *child_path);

Convert a path to a child row to a path to a `tree_model_generator` row.

#### Parameters

tree_model_generator | an ETreeModelGenerator |
child_path | a GtkTreePath |

#### Returns

A new GtkTreePath, owned by the caller.

### e_tree_model_generator_convert_child_iter_to_iter ()

    void
    e_tree_model_generator_convert_child_iter_to_iter
                                   (ETreeModelGenerator *tree_model_generator,
                                    GtkTreeIter *generator_iter,
                                    GtkTreeIter *child_iter);

Convert `child_iter` to a corresponding GtkTreeIter for `tree_model_generator` , storing the result in `generator_iter` .

#### Parameters

tree_model_generator | an ETreeModelGenerator |
generator_iter | a GtkTreeIter to set |
child_iter | a GtkTreeIter to convert |

### e_tree_model_generator_convert_path_to_child_path ()

    GtkTreePath *
    e_tree_model_generator_convert_path_to_child_path
                                   (ETreeModelGenerator *tree_model_generator,
                                    GtkTreePath *generator_path);

Converts `generator_path` to a corresponding GtkTreePath in the child model.

#### Parameters

tree_model_generator | an ETreeModelGenerator |
generator_path | a GtkTreePath to a `tree_model_generator` row |

#### Returns

A new GtkTreePath, owned by the caller.

### e_tree_model_generator_convert_iter_to_child_iter ()

    gboolean
    e_tree_model_generator_convert_iter_to_child_iter
                                   (ETreeModelGenerator *tree_model_generator,
                                    GtkTreeIter *child_iter,
                                    gint *permutation_n,
                                    GtkTreeIter *generator_iter);

Converts a `tree_model_generator` row into a child row and permutation index. The permutation index is the index of the generated row based on this child row, with the first generated row based on this child row being 0.

#### Parameters

tree_model_generator | an ETreeModelGenerator |
child_iter | a GtkTreeIter to set |
permutation_n | a permutation index to set |
generator_iter | a GtkTreeIter indicating the row to convert |

## Types and Values

### struct ETreeModelGenerator

    struct ETreeModelGenerator;

## Property Details

### The `“child-model”` property

      “child-model”              GObject *

The child model to extend.

Flags: Read / Write / Construct Only