Main Page | Modules | Alphabetical List | Data Structures | File List | Data Fields | Related Pages

Fileselector: Basic File And Directory Listing

Displays a list of directories and a list of files for the user to choose. More...

Data Structures

struct  Ewl_Fileselector
 Creates a fileselector with one tree for dirs and one for files. More...

struct  Ewl_Fileselector
 Creates a fileselector with one tree for dirs and one for files. More...


Defines

#define EWL_FILESELECTOR(fs)   ((Ewl_Fileselector *) fs)
 Typecasts a pointer to an Ewl_Fileselector pointer.


Typedefs

typedef Ewl_Fileselector Ewl_Fileselector
 The Ewl_Fileselector provides a fileselector.


Functions

Ewl_Widgetewl_fileselector_new ()
 Create a new fileselector.

void ewl_fileselector_init (Ewl_Fileselector *fs)
 Initalize the fileselector.

char * ewl_fileselector_path_get (Ewl_Fileselector *fs)
 Retrieve the current fileselector path.

char * ewl_fileselector_file_get (Ewl_Fileselector *fs)
 Retrieve the selected filename.

void ewl_fileselector_path_set (Ewl_Fileselector *fs, char *path)
 Prosess the given directory / change the fileselector dir.


Detailed Description

Displays a list of directories and a list of files for the user to choose.

The selector triggers a EWL_CALLBACK_VALUE_CHANGED callback when either a click causes the selected file to change, when a double click causes the currently displayed directory to change, or when a double click on a file occurs to signal an open. The event data passed to the callback is NULL, unless the double click event occurred on a file, in which case it is the file's path.


Function Documentation

char* ewl_fileselector_file_get Ewl_Fileselector fs  ) 
 

Retrieve the selected filename.

Parameters:
fs: the fileselector
Returns:
Returns the selected filename including its path

void ewl_fileselector_init Ewl_Fileselector fs  ) 
 

Initalize the fileselector.

Parameters:
fs: the fileselector
Returns:
Returns no value.

Ewl_Widget* ewl_fileselector_new  ) 
 

Create a new fileselector.

Returns:
Returns NULL on failure, or the new fileselector on success.

char* ewl_fileselector_path_get Ewl_Fileselector fs  ) 
 

Retrieve the current fileselector path.

Parameters:
fs: the fileselector
Returns:
Returns the current path of fileselector

void ewl_fileselector_path_set Ewl_Fileselector fs,
char *  path
 

Prosess the given directory / change the fileselector dir.

Parameters:
fs: The fileselector
path: the directory to process
Returns:
Returns nothing