panelBrowser

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

Synopsis

#define             BROWSER_PREVIOUS
#define             BROWSER_NEXT
ToolPanel*          panelBrowser_init                   ();
gboolean            panelBrowserGet_nextSelected        (GtkTreePath **path,
                                                         GtkTreeIter *iterSelected,
                                                         int direction);
gboolean            panelBrowserGet_currentSelected     (GtkTreePath **path,
                                                         GtkTreeIter *iterSelected);
void                panelBrowserSet_currentDirectory    (const gchar *dir);
void                panelBrowserSet_currentDirectories  (gchar **dirs);
void                panelBrowserSet_infoMessage         (const gchar *message,
                                                         GtkMessageType message_type);

Description

Details

BROWSER_PREVIOUS

#define BROWSER_PREVIOUS 0

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


BROWSER_NEXT

#define BROWSER_NEXT     1

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


panelBrowser_init ()

ToolPanel*          panelBrowser_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 ToolPanel handling the browser.

Returns :

a newly created ToolPanel object.

panelBrowserGet_nextSelected ()

gboolean            panelBrowserGet_nextSelected        (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 :

BROWSER_NEXT or BROWSER_PREVIOUS.

Returns :

TRUE if one exists.

panelBrowserGet_currentSelected ()

gboolean            panelBrowserGet_currentSelected     (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.

panelBrowserSet_currentDirectory ()

void                panelBrowserSet_currentDirectory    (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.

panelBrowserSet_currentDirectories ()

void                panelBrowserSet_currentDirectories  (gchar **dirs);

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

dirs :

a NULL terminated array of directories to be loaded.

panelBrowserSet_infoMessage ()

void                panelBrowserSet_infoMessage         (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