ThunarTreeModel: Thunar Internal Functions Reference Manual

## ThunarTreeModel ThunarTreeModel |

## Functions

gboolean | (*ThunarTreeModelVisibleFunc) ()
void | thunar_tree_model_set_visible_func ()
void | thunar_tree_model_refilter ()
void | thunar_tree_model_cleanup ()
gboolean | thunar_tree_model_node_has_dummy ()
void | thunar_tree_model_add_child ()

## Properties

gboolean | case-sensitive | Read / Write

## Types and Values

enum | ThunarTreeModelColumn

## Object Hierarchy

        GObject
        ╰── ThunarTreeModel

## Description

## Functions

### ThunarTreeModelVisibleFunc ()

    gboolean
    (*ThunarTreeModelVisibleFunc) (ThunarTreeModel *model,
                                   ThunarFile *file,
                                   gpointer data);

### thunar_tree_model_set_visible_func ()

    void
    thunar_tree_model_set_visible_func (ThunarTreeModel *model,
                                        ThunarTreeModelVisibleFunc func,
                                        gpointer data);

Sets the visible function used when filtering the ThunarTreeModel. The function should return `TRUE` if the given row should be visible and `FALSE` otherwise.

#### Parameters

model | a ThunarTreeModel. |
func | a ThunarTreeModelVisibleFunc, the visible function. |
data | User data to pass to the visible function, or `NULL`. |

### thunar_tree_model_refilter ()

    void
    thunar_tree_model_refilter (ThunarTreeModel *model);

Walks all the folders in the ThunarTreeModel and updates their visibility.

#### Parameters

model | a ThunarTreeModel. |

### thunar_tree_model_cleanup ()

    void
    thunar_tree_model_cleanup (ThunarTreeModel *model);

Walks all the folders in the ThunarTreeModel and release them when they are unused by the treeview.

#### Parameters

model | a ThunarTreeModel. |

### thunar_tree_model_node_has_dummy ()

    gboolean
    thunar_tree_model_node_has_dummy (ThunarTreeModel *model,
                                      GNode *node);

Checks if node is a dummy node ( if it only has a dummy item )

#### Parameters

model | a ThunarTreeModel. |
node | GNode to check |

#### Returns

`TRUE` if `node` has a dummy item

### thunar_tree_model_add_child ()

    void
    thunar_tree_model_add_child (ThunarTreeModel *model,
                                 GNode *node,
                                 ThunarFile *file);

Creates a new ThunarTreeModelItem as a child of `node` and stores a reference to the passed `file` Automatically creates/removes dummy items if required

#### Parameters

model | a ThunarTreeModel. |
node | GNode to add a child |
file | ThunarFile to be added |

## Types and Values

### enum ThunarTreeModelColumn

Columns exported by the ThunarTreeModel using the GtkTreeModel interface.

#### Members

THUNAR_TREE_MODEL_COLUMN_FILE | the index of the file column. |
THUNAR_TREE_MODEL_COLUMN_NAME | the index of the name column. |
THUNAR_TREE_MODEL_COLUMN_ATTR | the index of the PangoAttrList column. |
THUNAR_TREE_MODEL_COLUMN_DEVICE | the index of the ThunarDevice column. |
THUNAR_TREE_MODEL_N_COLUMNS |  |

## Property Details

### The `“case-sensitive”` property

      “case-sensitive”           gboolean

Whether the sorting of the folder items will be done in a case-sensitive manner.

Owner: ThunarTreeModel

Flags: Read / Write

Default value: TRUE