panelBrowser

panelBrowser — A tab to view a list of files and quickly change from one to another.

Synopsis

#define             VISU_UI_PANEL_BROWSER_NEXT
#define             VISU_UI_PANEL_BROWSER_PREVIOUS
gboolean            visu_ui_panel_browser_getCurrentSelected
                                                        (GtkTreePath **path,
                                                         GtkTreeIter *iterSelected);
gboolean            visu_ui_panel_browser_getNextSelected
                                                        (GtkTreePath **path,
                                                         GtkTreeIter *iterSelected,
                                                         int direction);
VisuUiPanel *       visu_ui_panel_browser_init          ();
void                visu_ui_panel_browser_setCurrentDirectories
                                                        (gchar **dirs);
void                visu_ui_panel_browser_setCurrentDirectory
                                                        (const gchar *dir);
void                visu_ui_panel_browser_setMessage    (const gchar *message,
                                                         GtkMessageType message_type);

Description

One can display a message about the file list by calling visu_ui_panel_browser_setMessage(). It is possible also to change the browser directory or directories with visu_ui_panel_browser_setCurrentDirectory().

Details

VISU_UI_PANEL_BROWSER_NEXT

#define VISU_UI_PANEL_BROWSER_NEXT     1

Value that give the direction when the selector is moved around file list. See visu_ui_panel_browser_getNextSelected().


VISU_UI_PANEL_BROWSER_PREVIOUS

#define VISU_UI_PANEL_BROWSER_PREVIOUS 0

Value that give the direction when the selector is moved around file list. See visu_ui_panel_browser_getNextSelected().


visu_ui_panel_browser_getCurrentSelected ()

gboolean            visu_ui_panel_browser_getCurrentSelected
                                                        (GtkTreePath **path,
                                                         GtkTreeIter *iterSelected);

Get iter and path of the currently sleected file.

path :

a pointer to returned the path of the currently selected file ;

iterSelected :

a pointer to store the currently selected iter.

Returns :

TRUE if one exists.

visu_ui_panel_browser_getNextSelected ()

gboolean            visu_ui_panel_browser_getNextSelected
                                                        (GtkTreePath **path,
                                                         GtkTreeIter *iterSelected,
                                                         int direction);

Change the selected file in the browser given the direction.

path :

a pointer to returned the path of the newly selected file ;

iterSelected :

a pointer to store the newly selected iter ;

direction :

VISU_UI_PANEL_BROWSER_NEXT or VISU_UI_PANEL_BROWSER_PREVIOUS.

Returns :

TRUE if one exists.

visu_ui_panel_browser_init ()

VisuUiPanel *       visu_ui_panel_browser_init          ();

Should be used in the list declared in externalModules.h to be loaded by V_Sim on start-up. This routine will create the VisuUiPanel handling the browser.

Returns :

a newly created VisuUiPanel object.

visu_ui_panel_browser_setCurrentDirectories ()

void                visu_ui_panel_browser_setCurrentDirectories
                                                        (gchar **dirs);

Change the directories for the browser. It is the same routine than visu_ui_panel_browser_setCurrentDirectory(), but several directories can be loaded at once. But internally, contrary to visu_ui_panel_browser_setCurrentDirectory() the given array must not be freed since it is not copied.

dirs :

a NULL terminated array of directories to be loaded.

visu_ui_panel_browser_setCurrentDirectory ()

void                visu_ui_panel_browser_setCurrentDirectory
                                                        (const gchar *dir);

Change the directory for the browser. The directory is not parsed immediately but only when the subpanel becomes visible.

dir :

the path of a directory.

visu_ui_panel_browser_setMessage ()

void                visu_ui_panel_browser_setMessage    (const gchar *message,
                                                         GtkMessageType message_type);

This routine is used to give the user a message. This message can be mere information or a warning or an error.

message :

a string to be displaied.

message_type :

the kind of message.

Since 3.6