FmDirTreeView

FmDirTreeView — A directory tree view widget.

Synopsis

struct              FmDirTreeView;
struct              FmDirTreeViewClass;
void                fm_dir_tree_view_chdir              (FmDirTreeView *view,
                                                         FmPath *path);
FmPath *            fm_dir_tree_view_get_cwd            (FmDirTreeView *view);
FmDirTreeView *     fm_dir_tree_view_new                (void);

Object Hierarchy

  GObject
   +----GInitiallyUnowned
         +----GtkObject
               +----GtkWidget
                     +----GtkContainer
                           +----GtkTreeView
                                 +----FmDirTreeView

Implemented Interfaces

FmDirTreeView implements AtkImplementorIface and GtkBuildable.

Properties

  "show-hidden"              gboolean              : Read / Write

Signals

  "chdir"                                          : Run Last
  "item-popup"                                     : Run Last

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.

Details

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);
};

GtkTreeViewClass parent_class;

the parent class

chdir ()

the class closure for the "chdir" signal.

item_popup ()

the class closure for the "item-popup" signal.

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.

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.

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

Property Details

The "show-hidden" property

  "show-hidden"              gboolean              : Read / Write

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

Default value: FALSE

Since 1.2.0

Signal Details

The "chdir" signal

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

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

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.

Since 0.1.0


The "item-popup" signal

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

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.

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.

Since 1.2.0