| GTK-EXTRA - Reference Manual

| Home

## Name

### Gtkfilelist - gtkfilelist widget for gtk+

## Synopsis

    GtkType
    gtk_file_list_get_type
    (void);
    GtkWidget*
    gtk_file_list_new
    guint icon_width,
    gint mode,
    const gchar *path);
    void
    gtk_file_list_construct
    (GtkFileList *file_list,
    guint icon_width,
    gint mode,
    const gchar *path);
    void
    gtk_file_list_set_filter
    (GtkFileList *file_list,
     const gchar *filter);
    gboolean
    gtk_file_list_open_dir
    (GtkFileList *file_list,
    const gchar *path);
    gchar*
    gtk_file_list_get_path
    (GtkFileList *file_list);
    gchar*
    gtk_file_list_get_filename
    ((GtkFileList *file_list);
    gint
    gtk_file_list_get_filetype
    (GtkFileList *file_list);
    gint
    gtk_file_list_add_type
    (GtkFileList *file_list,
    const gchar **pixmap_data);
    void
    gtk_file_list_add_type_filter
    (GtkFileList *file_list,
    gint type,
    const gchar *filter);

## Object Hierarchy

##
Args

## Signal Prototypes

    No signals

## Description

#### It is a GtkIconList subclass that displays the contents of a given directory using fancy icons for different types of files

##
Details

    struct _GtkFileList
           {
           GtkIconList iconlist;
           gint sort_mode;
           gchar *filter;
           gboolean show_folders;
           gboolean show_hidden;
           gchar *path;
           GList *pixmaps;
           GList *types;
           gint ntypes;
           };
    struct _GtkFileListItem
             {
             gchar *file_name;
             gint type;
             gint is_dir;
             gint is_link;
             };
    enum
             {
             GTK_FILE_LIST_FOLDER,
             GTK_FILE_LIST_FILE,
             GTK_FILE_LIST_HTML,
             GTK_FILE_LIST_TEXT,
             GTK_FILE_LIST_DOC,
             GTK_FILE_LIST_PS,
             GTK_FILE_LIST_PDF,
             GTK_FILE_LIST_C,
             GTK_FILE_LIST_CPP,
             GTK_FILE_LIST_H,
             GTK_FILE_LIST_F,
             GTK_FILE_LIST_JAVA,
             GTK_FILE_LIST_EXEC,
             GTK_FILE_LIST_IMG,
             GTK_FILE_LIST_ARCH,
             GTK_FILE_LIST_PKG,
             GTK_FILE_LIST_DEB,
             GTK_FILE_LIST_RPM,
             GTK_FILE_LIST_CAT,
             GTK_FILE_LIST_SOUND,
             GTK_FILE_LIST_MOVIE,
             GTK_FILE_LIST_CORE,
             };
    enum
               {
               GTK_FILE_LIST_SORT_NAME,
               GTK_FILE_LIST_SORT_TYPE,
               };
    "Mode" argument

## Screenshot

### gtk_file_list_get_type ()

    GtkType gtk_file_list_get_type (void);

##

### gtk_file_list_new ()

    GtkWidget* gtk_file_list_new (guint icon_width, gint mode, const gchar *path);

Create a newfile list widget.
Remark for the 2nd open file window you must use: gtk_icon_file_selection_show_tree(GTK_ICON_FILESEL(filesel), TRUE);

icon width | the width of the icon
mode | GTK_FILE_LIST_SORT_NAME, GTK_FILE_LIST_SORT_TYPE
path | the pah to the files that will be open in filelist
Returns | the filelist widget

### gtk_file_list_construct ()

    void gtk_file_list_construct (GtkFileList *file_list,
                                  guint icon_width,
                                  gint mode,
                                  const gchar *path);

file_list | the file_list widget
icon width | the width of the icon
mode | GTK_FILE_LIST_SORT_NAME, GTK_FILE_LIST_SORT_TYPE
path | the pah to the files that will be open in filelist

### gtk_file_list_set_filter ()

    void gtk_file_list_set_filter (GtkFileList *file_list,
                                   const gchar *filter);

Set a filter for the files show in filelist.

file_list |
filter |

### gtk_file_list_open_dir ()

    gboolean gtk_file_list_open_dir (GtkFileList *file_list,
                                    const gchar *path);

Open directory path in file list

file_list | file list widget
`path` | path of the files to be shown in filelist

### gtk_file_list_get_path ()

    gchar* gtk_file_list_get_path (GtkFileList *file_list);

Get the path of the files shown in filelist

file_list | file list widget

### gtk_file_list_get_filename ()

    gchar* gtk_file_list_get_filename (GtkFileList *file_list);

Get the name of the selected file in filelist

file_list | file list widget

### gtk_file_list_get_filetype()

    gint gtk_file_list_get_filetype (GtkFileList *file_list);

Get the file type of the selected file in filelist

file_list | file list widget
Returns | The file type(gint) Look at Details(struct _GtkFileList)

### gtk_file_list_add_type()

    gint gtk_file_list_add_type (GtkFileList *file_list,
                                 const gchar **pixmap_data);

Add a file type to the filelist structure .

file_list | file list widget
pixmap_data | the asociated pixmap for the filetype
Returns | the number of the filetypes in the filelist structure

### gtk_file_list_add_type_filter()

    void gtk_file_list_add_type_filter(GtkFileList *file_list,
                                       gint type,
                                       const gchar *filter);

Add a filtered file type to the filelist structure .

file_list | file list widget
type | Look at Details(struct _GtkFileList)
filter | the filter applied to the type

| Home |  |