FmDirTreeView

## FmDirTreeView FmDirTreeView — A directory tree view widget. |

## Functions

void | fm_dir_tree_view_chdir ()
FmPath * | fm_dir_tree_view_get_cwd ()
FmDirTreeView * | fm_dir_tree_view_new ()

## Properties

gboolean | show-hidden | Read / Write

## Signals

void | chdir | Run Last
void | item-popup | Run Last

## Types and Values

struct | FmDirTreeView
struct | FmDirTreeViewClass

## Object Hierarchy

        GObject
        ╰── GInitiallyUnowned
            ╰── GtkObject
                ╰── GtkWidget
                    ╰── GtkContainer
                        ╰── GtkTreeView
                            ╰── FmDirTreeView

## Implemented Interfaces

FmDirTreeView implements AtkImplementorIface and GtkBuildable.

## Description

`include` : libfm/fm-gtk.h

The FmDirTreeView represents view of filesystem as ierarchical tree of folders where each node can be expanded or collapsed when required.

## Functions

### fm_dir_tree_view_chdir ()

    void
    fm_dir_tree_view_chdir (FmDirTreeView *view,
                            FmPath *path);

Queries change selected directory in the `view` to new `path` . The widget will expand nodes in the tree if that will be needed to reach requested path.

#### Parameters

view | the widget to change |
path | new directory |

Since: 0.1.0

### fm_dir_tree_view_get_cwd ()

    FmPath *
    fm_dir_tree_view_get_cwd (FmDirTreeView *view);

Retrieves current selected directory. Returned data are owned by `view` and should not be freed by caller.

#### Parameters

view | the widget to retrieve info |

#### Returns

current directory path.

[transfer none]

Since: 0.1.0

### fm_dir_tree_view_new ()

    FmDirTreeView *
    fm_dir_tree_view_new (void);

Creates new FmDirTreeView widget.

#### Returns

a new FmDirTreeView object.

Since: 0.1.0

## Types and Values

### struct FmDirTreeView

    struct FmDirTreeView;

### struct FmDirTreeViewClass

    struct FmDirTreeViewClass {
        GtkTreeViewClass parent_class;
        void (*chdir)(FmDirTreeView* view, guint button, FmPath* path);
        void (*item_popup)(FmDirTreeView* view, GtkUIManager* ui, GtkActionGroup* act_grp, FmFileInfo* file);
    };

#### Members

GtkTreeViewClass `parent_class`; | the parent class |
`chdir` () | the class closure for the “chdir” signal. |
`item_popup` () | the class closure for the “item-popup” signal. |

## Property Details

### The `“show-hidden”` property

      “show-hidden”              gboolean

The “show-hidden” property defines whether any hidden files be shown in the tree or not

Flags: Read / Write

Default value: FALSE

Since: 1.2.0

## Signal Details

### The `“chdir”` signal

    void
    user_function (FmDirTreeView *view,
                   guint          button,
                   gpointer       path,
                   gpointer       user_data)

The “chdir” signal is emitted when current selected directory in view is changed.

#### Parameters

view | a view instance that emitted the signal |
button | always is 1 |
path | (FmPath *) new directory path |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 0.1.0

### The `“item-popup”` signal

    void
    user_function (FmDirTreeView *view,
                   GObject       *ui,
                   GObject       *act_grp,
                   gpointer       fi,
                   gpointer       user_data)

The “item-popup” signal is emitted when context menu is created for any directory in the view. Handler can modify the menu by adding or removing elements.

#### Parameters

view | a view instance that emitted the signal |
ui | the GtkUIManager using to create the menu |
act_grp | (GtkActionGroup *) the menu actions group |
fi | (FmFileInfo *) the item where menu popup is activated |
user_data | user data set when the signal handler was connected. |

Flags: Run Last

Since: 1.2.0