GtkTreeModelFilter {RGtk2} | R Documentation

## GtkTreeModelFilter

### Description

A GtkTreeModel which hides parts of an underlying tree model

### Methods and Functions

`gtkTreeModelFilterNew(child.model, root = NULL)`
`gtkTreeModelFilterSetVisibleFunc(object, func, data = NULL)`
`gtkTreeModelFilterSetModifyFunc(object, types, func, data = NULL)`
`gtkTreeModelFilterSetVisibleColumn(object, column)`
`gtkTreeModelFilterGetModel(object)`
`gtkTreeModelFilterConvertChildIterToIter(object, child.iter)`
`gtkTreeModelFilterConvertIterToChildIter(object, filter.iter)`
`gtkTreeModelFilterConvertChildPathToPath(object, child.path)`
`gtkTreeModelFilterConvertPathToChildPath(object, filter.path)`
`gtkTreeModelFilterRefilter(object)`
`gtkTreeModelFilterClearCache(object)`
`gtkTreeModelFilter(child.model, root = NULL)`

### Hierarchy

    GObject
       +----GtkTreeModelFilter

### Interfaces

GtkTreeModelFilter implements `GtkTreeModel` and `GtkTreeDragSource`.

### Detailed Description

A `GtkTreeModelFilter` is a tree model which wraps another tree model, and can do the following things:

- Filter specific rows, based on data from a "visible column", a column storing booleans indicating whether the row should be filtered or not, or based on the return value of a "visible function", which gets a model, iter and user_data and returns a boolean indicating whether the row should be filtered or not.

- Modify the "appearance" of the model, using a modify function. This is extremely powerful and allows for just changing some values and also for creating a completely different model based on the given child model.

- Set a different root node, also known as a "virtual root". You can pass in a `GtkTreePath` indicating the root node for the filter at construction time.

### Structures

`GtkTreeModelFilter`

  The GtkTreeModelFilter struct contains only private fields.

### Convenient Construction

`gtkTreeModelFilter` is the equivalent of `gtkTreeModelFilterNew`.

### User Functions

`GtkTreeModelFilterVisibleFunc(model, iter, data)`

  A function which decides whether the row indicated by `iter` is visible.

  `model`

    the child model of the `GtkTreeModelFilter`

  `iter`

    a `GtkTreeIter` pointing to the row in `model` whose visibility is determined

  `data`

    user data given to `gtkTreeModelFilterSetVisibleFunc`

  Returns: [logical] Whether the row indicated by `iter` is visible.

`GtkTreeModelFilterModifyFunc(model, iter, value, column, data)`

  A function which calculates display values from raw values in the model. It must fill `value` with the display value for the column `column` in the row indicated by `iter`.

  Since this function is called for each data access, it's not a particularly efficient operation.

  `model`

    the `GtkTreeModelFilter`

  `iter`

    a `GtkTreeIter` pointing to the row whose display values are determined

  `value`

    A `R object` which is already initialized for with the correct type for the column `column`.

  `column`

    the column whose display value is determined

  `data`

    user data given to `gtkTreeModelFilterSetModifyFunc`

### Properties

`child-model` [`GtkTreeModel` : * : Read / Write / Construct Only]

  The model for the filtermodel to filter.

`virtual-root` [`GtkTreePath` : * : Read / Write / Construct Only]

  The virtual root (relative to the child model) for this filtermodel.

### Author(s)

Derived by RGtkGen from GTK+ documentation

### References

https://developer.gnome.org/gtk2/stable/GtkTreeModelFilter.html

### See Also

`GtkTreeModelSort`

[Package RGtk2 version 2.20.36.3 Index]