April 26, 2024

Dynamic Windows Function [dw_file_browse]

Syntax

char * dw_file_browse(char *title, char *defpath, char *ext, int flags)

Parameters

char *title: Title bar text for dialog.
char *defpath: The default path and/or filename of the open dialog.
char *ext: Default file extention.
int flags: DW_FILE_OPEN, DW_FILE_SAVE or DW_DIRECTORY_OPEN.

Returns

char * NULL on error. A malloced buffer containing the file path on success.

Description

Opens a file dialog and queries user selection.

Remarks

As of version 2.2 you can pass a path and/or filename to dw_file_browse(). Prior to version 2.2 only a path was supported.

GTK1 and MacOS prior to 10.6 do not support this parameter. Mac prior to version 2.2 did not support this parameter either.

To remain cross platform use / as a delimiter on all platforms.