Ewl_Filedialog: A Dialog For Picking Files
Detailed Description
A simple dialog to show a file selector widget
- Remarks:
- Inherits from Ewl_Dialog.
Tutorial
Data Structures | |
struct | Ewl_Filedialog |
Inherits from Ewl_Dialog and extends to create a filedialog. More... | |
Defines | |
#define | EWL_FILEDIALOG(fd) ((Ewl_Filedialog *) fd) |
#define | EWL_FILEDIALOG_IS(w) (ewl_widget_type_is(EWL_WIDGET(w), EWL_FILEDIALOG_TYPE)) |
#define | EWL_FILEDIALOG_TYPE "filedialog" |
Typedefs | |
typedef struct Ewl_Filedialog | Ewl_Filedialog |
Functions | |
void | ewl_filedialog_cb_delete_window (Ewl_Widget *w, void *ev_data, void *data) |
const char * | ewl_filedialog_directory_get (Ewl_Filedialog *fd) |
Retrieve the current filedialog path. | |
void | ewl_filedialog_directory_set (Ewl_Filedialog *fd, const char *dir) |
Changes the current path of a filedialog. | |
void | ewl_filedialog_filter_add (Ewl_Filedialog *fd, const char *name, const char *filter, Ecore_List *mime_types) |
Add the filter named name to the combo box in the filedialog. | |
int | ewl_filedialog_init (Ewl_Filedialog *fd) |
Initialize a new filedialog. | |
Ewl_Filelist_View * | ewl_filedialog_list_view_get (Ewl_Filedialog *fd) |
Retrieve the file list view used in this file dialog. | |
void | ewl_filedialog_list_view_set (Ewl_Filedialog *fd, Ewl_Filelist_View view) |
Set the view to be used for displaying the files in the dialog. | |
unsigned int | ewl_filedialog_multiselect_get (Ewl_Filedialog *fd) |
gets the multiselect setting of the filedialog | |
Ewl_Widget * | ewl_filedialog_multiselect_new (void) |
Create a new open filedialog. | |
void | ewl_filedialog_multiselect_set (Ewl_Filedialog *fd, unsigned int ms) |
Sets the dialog to multiselect or single select. | |
Ewl_Widget * | ewl_filedialog_new (void) |
Create a new filedialog. | |
unsigned int | ewl_filedialog_return_directories_get (Ewl_Filedialog *fd) |
Gets the filedialog's policy on returning directories. | |
void | ewl_filedialog_return_directories_set (Ewl_Filedialog *fd, unsigned int t) |
Sets the filedialog's policy on returning directories. | |
unsigned int | ewl_filedialog_save_as_get (Ewl_Filedialog *fd) |
Gets the current type fo the filedialog. | |
Ewl_Widget * | ewl_filedialog_save_as_new (void) |
A convenience function to create a Save As dialog widget. | |
void | ewl_filedialog_save_as_set (Ewl_Filedialog *fd, unsigned int t) |
Sets the type of the filedialog. | |
char * | ewl_filedialog_selected_file_get (Ewl_Filedialog *fd) |
Retrieve the selected filename. | |
void | ewl_filedialog_selected_file_set (Ewl_Filedialog *fd, const char *file) |
Set the currently selected file into the file dialog. | |
Ecore_List * | ewl_filedialog_selected_files_get (Ewl_Filedialog *fd) |
returns all the elements selected by the user | |
void | ewl_filedialog_selected_files_set (Ewl_Filedialog *fd, Ecore_List *files) |
Sets the given files as selected in the filedialog. | |
unsigned int | ewl_filedialog_show_dot_files_get (Ewl_Filedialog *fd) |
Returns the current dot file setting of the dialog. | |
void | ewl_filedialog_show_dot_files_set (Ewl_Filedialog *fd, unsigned int dot) |
Set if the file dialog should show dot files by default. | |
unsigned int | ewl_filedialog_show_favorites_get (Ewl_Filedialog *fd) |
Get the current show favorites setting for the filedialog. | |
void | ewl_filedialog_show_favorites_set (Ewl_Filedialog *fd, unsigned int show) |
Specify if the favorites column should be shown or not. |
Define Documentation
#define EWL_FILEDIALOG | ( | fd | ) | ((Ewl_Filedialog *) fd) |
Typecasts a pointer to an Ewl_Filedialog pointer.
Referenced by ewl_filedialog_cb_delete_window(), ewl_filedialog_multiselect_new(), and ewl_filedialog_save_as_new().
#define EWL_FILEDIALOG_IS | ( | w | ) | (ewl_widget_type_is(EWL_WIDGET(w), EWL_FILEDIALOG_TYPE)) |
Returns TRUE if the widget is an Ewl_Filedialog, FALSE otherwise
#define EWL_FILEDIALOG_TYPE "filedialog" |
- Widget Theme Keys:
- /filedialog/file
- Widget Theme Keys:
- /filedialog/group
Referenced by ewl_filedialog_cb_delete_window(), ewl_filedialog_directory_get(), ewl_filedialog_directory_set(), ewl_filedialog_filter_add(), ewl_filedialog_init(), ewl_filedialog_list_view_get(), ewl_filedialog_list_view_set(), ewl_filedialog_multiselect_get(), ewl_filedialog_multiselect_set(), ewl_filedialog_return_directories_get(), ewl_filedialog_return_directories_set(), ewl_filedialog_save_as_get(), ewl_filedialog_save_as_set(), ewl_filedialog_selected_file_get(), ewl_filedialog_selected_file_set(), ewl_filedialog_selected_files_get(), ewl_filedialog_selected_files_set(), ewl_filedialog_show_dot_files_get(), ewl_filedialog_show_dot_files_set(), ewl_filedialog_show_favorites_get(), and ewl_filedialog_show_favorites_set().
Typedef Documentation
typedef struct Ewl_Filedialog Ewl_Filedialog |
The Ewl_Filedialog provides a filedialog
Function Documentation
void ewl_filedialog_cb_delete_window | ( | Ewl_Widget * | w, | |
void * | ev_data, | |||
void * | data | |||
) |
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG, EWL_FILEDIALOG_TYPE, and EWL_STOCK_CANCEL.
Referenced by ewl_filedialog_init().
const char* ewl_filedialog_directory_get | ( | Ewl_Filedialog * | fd | ) |
Retrieve the current filedialog path.
- Parameters:
-
fd,: the filedialog
- Returns:
- Returns the current path of filedialog
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_directory_get(), and fp.
void ewl_filedialog_directory_set | ( | Ewl_Filedialog * | fd, | |
const 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.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_directory_set(), and fp.
void ewl_filedialog_filter_add | ( | Ewl_Filedialog * | fd, | |
const char * | name, | |||
const char * | filter, | |||
Ecore_List * | mime_types | |||
) |
Add the filter named name to the combo box in the filedialog.
- Parameters:
-
fd,: The filedialog to work with name,: The name to display for the filter filter,: The actual regular expression for the filter mime_types,: The mime types to filter for
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_filter_add(), and fp.
int ewl_filedialog_init | ( | Ewl_Filedialog * | fd | ) |
Initialize a new filedialog.
- Parameters:
-
fd,: the filedialog
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_BUTTON, ewl_button_label_set(), ewl_callback_append(), EWL_CALLBACK_CLICKED, EWL_CALLBACK_DELETE_WINDOW, EWL_CALLBACK_VALUE_CHANGED, EWL_CONTAINER, ewl_container_child_append(), EWL_CONTEXT_MENU, ewl_context_menu_attach(), ewl_context_menu_new(), EWL_DIALOG, ewl_dialog_active_area_set(), ewl_dialog_has_separator_set(), ewl_dialog_init(), ewl_filedialog_cb_delete_window(), EWL_FILEDIALOG_TYPE, ewl_filepicker_new(), ewl_menu_item_new(), ewl_menu_new(), EWL_POSITION_TOP, EWL_WIDGET, ewl_widget_hide(), ewl_widget_inherit(), ewl_widget_internal_set(), ewl_widget_show(), EWL_WINDOW, ewl_window_class_set(), ewl_window_name_set(), ewl_window_title_set(), fp, and menu.
Referenced by ewl_filedialog_new().
Ewl_Filelist_View* ewl_filedialog_list_view_get | ( | Ewl_Filedialog * | fd | ) |
Retrieve the file list view used in this file dialog.
- Parameters:
-
fd,: The filedialog to get the view from
- Returns:
- Returns the Ewl_View set on this file dialog
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_list_view_get(), and fp.
void ewl_filedialog_list_view_set | ( | Ewl_Filedialog * | fd, | |
Ewl_Filelist_View | view | |||
) |
Set the view to be used for displaying the files in the dialog.
- Parameters:
-
fd,: The filedialog to set the view on view,: The Ewl_View to set into the dialog
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_list_view_set(), and fp.
unsigned int ewl_filedialog_multiselect_get | ( | Ewl_Filedialog * | fd | ) |
gets the multiselect setting of the filedialog
- Parameters:
-
fd,: the filedialog
- Returns:
- Returns the multi select setting (0|1)
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_multiselect_get(), and fp.
Ewl_Widget* ewl_filedialog_multiselect_new | ( | void | ) |
Create a new open filedialog.
- Returns:
- Returns a new open filedialog if successful, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FILEDIALOG, ewl_filedialog_multiselect_set(), ewl_filedialog_new(), and EWL_WIDGET.
void ewl_filedialog_multiselect_set | ( | Ewl_Filedialog * | fd, | |
unsigned int | val | |||
) |
Sets the dialog to multiselect or single select.
- Parameters:
-
fd,: the filedialog val,: 1 to set multiselect, 0 otherwise
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_multiselect_set(), and fp.
Referenced by ewl_filedialog_multiselect_new().
Ewl_Widget* ewl_filedialog_new | ( | void | ) |
Create a new filedialog.
- Returns:
- Returns a new filedialog in success, NULL on failure.
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, ewl_filedialog_init(), EWL_WIDGET, ewl_widget_destroy(), and NEW.
Referenced by ewl_filedialog_multiselect_new(), and ewl_filedialog_save_as_new().
unsigned int ewl_filedialog_return_directories_get | ( | Ewl_Filedialog * | fd | ) |
Gets the filedialog's policy on returning directories.
- Parameters:
-
fp,: The filedialog to work with
- Returns:
- Returns non-zero if the filedialog can return directories
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_return_directories_get(), and fp.
void ewl_filedialog_return_directories_set | ( | Ewl_Filedialog * | fd, | |
unsigned int | t | |||
) |
Sets the filedialog's policy on returning directories.
- Parameters:
-
fd,: The filedialog to work with t,: Non-zero to allow the filedialog to open directories
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_return_directories_set(), and fp.
unsigned int ewl_filedialog_save_as_get | ( | Ewl_Filedialog * | fd | ) |
Gets the current type fo the filedialog.
- Parameters:
-
fd,: The filedialog to work with
- Returns:
- Returns non-zero if the filedialog is currently a Save As type
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_save_as_get(), and fp.
Ewl_Widget* ewl_filedialog_save_as_new | ( | void | ) |
A convenience function to create a Save As dialog widget.
- Returns:
- Returns a created Save As dialog widget or NULL on failure
References DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FILEDIALOG, ewl_filedialog_new(), and ewl_filedialog_save_as_set().
void ewl_filedialog_save_as_set | ( | Ewl_Filedialog * | fd, | |
unsigned int | t | |||
) |
Sets the type of the filedialog.
- Parameters:
-
fd,: The filedialog to work with : Non-zero to set the filedialog to a save type
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_save_as_set(), and fp.
Referenced by ewl_filedialog_save_as_new().
char* ewl_filedialog_selected_file_get | ( | Ewl_Filedialog * | fd | ) |
Retrieve the selected filename.
- Parameters:
-
fd,: the filedialog
- Returns:
- Returns the selected filename including its path
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_selected_file_get(), and fp.
void ewl_filedialog_selected_file_set | ( | Ewl_Filedialog * | fd, | |
const char * | file | |||
) |
Set the currently selected file into the file dialog.
- Parameters:
-
fd,: The filedialog to work with file,: The selected file to set
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_selected_file_set(), and fp.
Ecore_List* ewl_filedialog_selected_files_get | ( | Ewl_Filedialog * | fd | ) |
returns all the elements selected by the user
- Parameters:
-
fd,: The filedialog
- Returns:
- Returns an Ecore_List of selected items
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_PTR, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_selected_files_get(), and fp.
void ewl_filedialog_selected_files_set | ( | Ewl_Filedialog * | fd, | |
Ecore_List * | files | |||
) |
Sets the given files as selected in the filedialog.
- Parameters:
-
fd,: The filedialog to work with files,: The list of filenames to set selected in the dialog
- Returns:
- Returns no value
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_selected_files_set(), and fp.
unsigned int ewl_filedialog_show_dot_files_get | ( | Ewl_Filedialog * | fd | ) |
Returns the current dot file setting of the dialog.
- Parameters:
-
fd,: The filedialog to get the value from
- Returns:
- Returns the show dot file setting of the dialog
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_show_dot_files_get(), and fp.
void ewl_filedialog_show_dot_files_set | ( | Ewl_Filedialog * | fd, | |
unsigned int | dot | |||
) |
Set if the file dialog should show dot files by default.
- Parameters:
-
fd,: The filedialog to change dot,: The value to set for show dot files
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_show_dot_files_set(), and fp.
unsigned int ewl_filedialog_show_favorites_get | ( | Ewl_Filedialog * | fd | ) |
Get the current show favorites setting for the filedialog.
- Parameters:
-
fd,: The filedialog to work with
- Returns:
- Returns the current show favorites setting for the dialog
References DCHECK_PARAM_PTR_RET, DCHECK_TYPE_RET, DENTER_FUNCTION, DLEVEL_STABLE, DRETURN_INT, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_show_favorites_get(), and fp.
void ewl_filedialog_show_favorites_set | ( | Ewl_Filedialog * | fd, | |
unsigned int | show | |||
) |
Specify if the favorites column should be shown or not.
- Parameters:
-
fd,: The filedialog to set the value into show,: The setting for show favorites to set
- Returns:
- Returns no value.
References DCHECK_PARAM_PTR, DCHECK_TYPE, DENTER_FUNCTION, DLEAVE_FUNCTION, DLEVEL_STABLE, EWL_FILEDIALOG_TYPE, EWL_FILEPICKER, ewl_filepicker_show_favorites_set(), and fp.