File dialog box

This is a file requestor dialog box that uses the cygwin file system. Download filebox.tar.gz and read the README for linking and using.

File dialog box

The filebox code provides the following functions:

int filebox_dialog(char *dialog_title, char *file_ext, int ext_strip, int save_flag, char *default_name, int default_size, char *full_name, int full_size);
filebox_dialog shows all valid filenames in the current working directory, and allows the user to make a selection. Only files with the extension given by file_ext are shown or allowed to be selected. Set file_ext to "" to show all files.

void filebox_set_path(char *path_name);
filebox_set_path sets the current working directory.

int filebox_get_path(char *path_name, int buffer_size);
filebox_get_path retrieves the current working directory.