1file_select_ex(3)               Allegro manual               file_select_ex(3)
2
3
4

NAME

6       file_select_ex - Displays the Allegro file selector with a caption.
7

SYNOPSIS

9       #include <allegro.h>
10
11
12       int  file_select_ex(const  char  *message, char *path, const char *ext,
13       int size, int w, int h);
14

DESCRIPTION

16       Displays the Allegro file selector, with the message  as  caption.  The
17       path  parameter  contains  the initial filename to display (this can be
18       used to set the starting directory, or to provide  a  default  filename
19       for  a  save-as  operation). The user selection is returned by altering
20       the path buffer, whose maximum capacity in bytes is  specified  by  the
21       size  parameter.  Note that it should have room for at least 80 charac‐
22       ters (not bytes), so you should reserve 6x  that  amount,  just  to  be
23       sure. The list of files is filtered according to the file extensions in
24       the ext parameter.  Passing NULL includes all files; "PCX;BMP" includes
25       only  files with one of the fields in the extension list can begin with
26       a slash, followed by a set of attribute characters. Any attribute writ‐
27       ten  on  its  own,  or  with a '+' before it, indicates to include only
28       files which have that attribute set. Any attribute with a '-' before it
29       indicates  to leave out any files with that attribute. The flag charac‐
30       ters are 'r' (read-only), example, an extension string of "PCX;BMP;/+r-
31       h"  will  display only PCX or BMP files that are read-only and not hid‐
32       den. The directories are not affected in the  same  way  as  the  other
33       files  by  the  extension  string:  the extensions are never taken into
34       account for them and the other attributes are taken into  account  only
35       when  'd'  is  mentioned in the string; in other words, all directories
36       are included when 'd' is not mentioned in the string. The file selector
37       is  stretched  to the width and height specified in the w and h parame‐
38       ters, and to the size of the standard  Allegro  font.   If  either  the
39       width  or height argument is set to zero, it is stretched to the corre‐
40       sponding screen dimension. This function returns zero if it was  closed
41       with the Cancel button or non-zero if it was OK'd.
42
43

SEE ALSO

45       gui_fg_color(3)
46
47
48
49Allegro                          version 4.2.2               file_select_ex(3)
Impressum