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

Filedialog: A Dialog For Picking Files

The filedialog is intended to be used for a simple file chooser. More...

Data Structures

struct  Ewl_Filedialog
 Creates a floating widget with different filedialog components. More...

struct  Ewl_Filedialog
 Creates a floating widget with different filedialog components. More...


Defines

#define EWL_FILEDIALOG(fd)   ((Ewl_Filedialog *) fd)
 Typecasts a pointer to an Ewl_Filedialog pointer.


Typedefs

typedef Ewl_Filedialog Ewl_Filedialog
 The Ewl_Filedialog provides a filedialog.


Functions

Ewl_Widgetewl_filedialog_new (Ewl_Filedialog_Type type)
 Create a new filedialog.

int ewl_filedialog_init (Ewl_Filedialog *fd, Ewl_Filedialog_Type type)
 Initialize a new filedialog.

char * ewl_filedialog_path_get (Ewl_Filedialog *fd)
 Retrieve the current filedialog path.

char * ewl_filedialog_file_get (Ewl_Filedialog *fd)
 Retrieve the selected filename.

void ewl_filedialog_path_set (Ewl_Filedialog *fd, char *path)
 Changes the current path of a filedialog.


Detailed Description

The filedialog is intended to be used for a simple file chooser.

It can be placed inside any other container, and provides the ability to pack extra buttons or widgets along the left side. It currently supports two types, an Open and a Save dialog.

The normal use of the filedialog is to create a new one the first time an event occurs that requires one. Setting a callback for EWL_CALLBACK_VALUE_CHANGED, allows the programmer to determine when the Open/Save buttons were chosen. If the event data on the callback is NULL, Cancel was clicked, otherwise, the event data is a pointer to the chosen file(s).


Function Documentation

char* ewl_filedialog_file_get Ewl_Filedialog fd  ) 
 

Retrieve the selected filename.

Parameters:
fd: the filedialog
Returns:
Returns the selected filename including its path

int ewl_filedialog_init Ewl_Filedialog fd,
Ewl_Filedialog_Type  type
 

Initialize a new filedialog.

Parameters:
fd: the filedialog
type: the filedialog type
Returns:
Returns no value.

Ewl_Widget* ewl_filedialog_new Ewl_Filedialog_Type  type  ) 
 

Create a new filedialog.

Parameters:
type: type of dialog to display
Returns:
Returns a new filedialog in success, NULL on failure.

char* ewl_filedialog_path_get Ewl_Filedialog fd  ) 
 

Retrieve the current filedialog path.

Parameters:
fd: the filedialog
Returns:
Returns the current path of filedialog

void ewl_filedialog_path_set Ewl_Filedialog fd,
char *  path
 

Changes the current path of a filedialog.

Parameters:
fd: the filedialog to change paths
path: the new path used for the filedialog
Returns:
Returns no value.