GEMLIB  0.44.0
Macros | Typedefs | Functions
File Selector Library

standard file selector More...

Macros

#define fsel_exinput(a, b, c, d)   mt_fsel_exinput(a,b,c,d,aes_global)
 
#define fsel_input(a, b, c)   mt_fsel_input(a,b,c,aes_global)
 
#define fsel_boxinput(a, b, c, d, e)   mt_fsel_exinput(a,b,c,d,e,aes_global)
 

Typedefs

typedef void __CDECL(* FSEL_CALLBACK) (short *msg)
 

Functions

short mt_fsel_exinput (char *path, char *file, short *exit_button, const char *title, short *global)
 
short mt_fsel_input (char *path, char *file, short *exit_button, short *global)
 
short mt_fsel_boxinput (char *path, char *file, short *exit_button, const char *title, FSEL_CALLBACK callback, short *global)
 

Detailed Description

standard file selector

The File Selector Library contains two functions for displaying the system file selector (or currently installed alternate file selector) and prompting the user to select a file.

Macro Definition Documentation

#define fsel_boxinput (   a,
  b,
  c,
  d,
 
)    mt_fsel_exinput(a,b,c,d,e,aes_global)

single-thread version of mt_fsel_exinput()

#define fsel_exinput (   a,
  b,
  c,
 
)    mt_fsel_exinput(a,b,c,d,aes_global)

single-thread version of mt_fsel_exinput()

#define fsel_input (   a,
  b,
 
)    mt_fsel_input(a,b,c,aes_global)

single-thread version of mt_fsel_input()

Typedef Documentation

typedef void __CDECL(* FSEL_CALLBACK) (short *msg)

callback function used by BoxKite file selector. See mt_fsel_boxinput()

Function Documentation

short mt_fsel_boxinput ( char *  path,
char *  file,
short *  exit_button,
const char *  label,
FSEL_CALLBACK  callback,
short *  global_aes 
)

displays the extended file selector and allows the user to select a valid GEMDOS path and file.

Parameters
pathsee mt_fsel_exinput()
filesee mt_fsel_exinput()
exit_buttonsee mt_fsel_exinput()
[option CHECK_NULLPTR] exit_button may be NULL
labelsee mt_fsel_exinput()
callbackis a pointer to a callback function. This callback function will be called by BoxKite when it received an AES message for the main application. It does not only concern the Message WM_REDRAW and WM_MOVED. Other messages are ignored.
global_aesglobal AES array
Returns
0 if an error occured and 1 otherwise.
Since
this extended call is available if BoxKite is installed (since version 1.71). The Cookie HBFS can be checked to test the availability of this function.
See also
mt_fsel_input() mt_fsel_exinput()
short mt_fsel_exinput ( char *  path,
char *  file,
short *  exit_button,
const char *  title,
short *  global_aes 
)

displays the system file selector and offers the user an opportunity to choose a complete GEMDOS path specification.

Parameters
pathshould be a pointer to a character buffer at least 260 bytes long. On input the buffer should contain a complete GEMDOS path specification including a drive specifier, path string, and wildcard mask as follows: 'drive:\path\mask'. The mask can be any valid GEMDOS wildcard (usually *.*).
On function exit, path contains final path of the selected file (you will have to strip the mask)
fileshould point to a character buffer 13 bytes long (12 character filename plus NULL), or 260 bytes long if the application runs in MiNT domain (see Pdomain GEMDOS call). On input its contents will be placed on the filename line of the selector (usually this value can simply be a empty string). On function exit, file contains the filename which the user selected.
exit_buttonis a short pointer which upon function exit will contain FSEL_CANCEL (0) if the user selected CANCEL or FSEL_OK (1) if OK.
[option CHECK_NULLPTR] exit_button may be NULL
titleshould be a pointer to a character string up to 30 characters long which contains the title to appear in the file selector (usually indicates which action the user is about to take).
global_aesglobal AES array
Returns
0 if an error occured and 1 otherwise.
Since
Available from AES version 1.40. If an older AES version is detected, this function will redirect the call to mt_fsel_input().

The path parameter to this function should be validated to ensure that the path actually exists prior to calling this function to prevent confusing the user.

This call should always be used as opposed to mt_fsel_input() when it is available (ie always with this lib). Otherwise, the user has no reminder as to what function s/he is actually undertaking.

References mt_fsel_input().

short mt_fsel_input ( char *  path,
char *  file,
short *  exit_button,
short *  global_aes 
)

displays the system file selector and allows the user to select a valid GEMDOS path and file.

Parameters
pathsee mt_fsel_exinput()
filesee mt_fsel_exinput()
exit_buttonsee mt_fsel_exinput()
[option CHECK_NULLPTR] exit_button may be NULL
global_aesglobal AES array
Returns
0 if an error occurred or 1 otherwise.
Since
All AES versions
See also
mt_fsel_exinput()

Referenced by mt_fsel_exinput().