Functions | |
int | mt_FselInput (APPvar *app, char *path, char *fname, char *ext, char *title, char *lpath, char *lext) |
Universal file selector. | |
int | mt_FontSel (APPvar *app, char *title, char *example, int flags, int *id, int *size, char *name) |
Builtin WinDom font selector. |
|
Builtin WinDom font selector.
Before the call, the fontid and fontsize parameters can be filled with a default font-id and size. If a null value is used, default values are the system font and a size of 13 pixels. If the example parameter is NULL, a default text is used to display the fonts. The window hosting fontselector catches the AP_TERM message : the function will terminate in the same manner than a user clic on the Cancel button and an AP_TERM message is emited again.
|
|
Universal file selector.
When the function returns, parameters path and name are filled in with the directory and the filename selected. Then mt_FselInput() can be used both as a file and as a directory selector. If the path parameter is an empty string, the current directory is used. If the ext parameter is an empty string, the default mask used by mt_FselInput() will be "*.*". Parameter title sets fileselector title and can be used for any TOS version. If fileselelector does not support this feature, this parameter has no effect. The lpath and lext parameters allow you to define a list of preset directories and file mask. There list are displayed inside the file selector if it is possible (that is the case with Selectrics, BoxKite 2 and the FLSX selectors). A list is a string whose each items are delimited by a ';' character, for example : "C:\\usr;C:\\usr\\bin" "*.c;*.h" mt_FselInput() adds in the directories preset, the path of the user directory (if the $HOME environ variable is defined). The environ variables $FSELPATH and $FSELMASK are used to build a default list of directories and file mask. The additional lists given by lpath and lext are adding in these lists. Environ variables provide a way to configure globally all WinDom clients. In addition, it is possible, for the user, to configure a specific application : the windom.fsel.path and windom.fsel.mask variable in the configuration file define the list of directories and file mask. These values are adding to the lists displayed by the file selector. If the system has a FSLX extension (see mt_appl_getinfo()), the file selector is displayed in a modal window. The windom.fsel.fslx variable from the WinDom configuration file set to FALSE forces mt_FselInput() to not use the FSLX extension.
|