Adds an option to the file type option menuint sm_filetypes(char *option_text, char *filters);
- The text of the option to display on the file type option menu.
- A semicolon-separated list of file masks that specify the files selected through
sm_filetypesdefines a file type and adds it to the option menu that Panther displays in a file selection dialog box. This menu gives users an easy way to specify which files to show in the current directory.
You build the option menu through repeated calls to
sm_filetypes. For example, the following statements define two files types, Text and Executables:sm_filetypes("Text", "*.doc; *.txt");
sm_filetypes("Executables", "*.com; *.exe; *.bat");
The dialog box subsequently invoked by sm_filebox or sm_jfilebox contains an option menu with these file types. Options are displayed in order of their definition:
To change the menu, first reinitialize the current one by calling
NULLarguments or empty strings, as in this JPL statement:call sm_filetypes("", "")