VarOpen Function (ROM Call 0x28C)

dialogs.h

HSym VarOpen (const ESQ *FileTypes, ...);

Displays the standard "Open" dialog.

VarOpen implements the standard "Open" dialog. The user may select a type, the folder to look in, and finally a symbol in the selected folder which matches the selected type.

FileTypes is a pointer to a zero-terminated array of types that are supported. These types are, in fact, tags (see the Tags enum for more info). Supported tags are: EQ_TAG (expression), STR_TAG (string), LIST_TAG (list), MATRIX_TAG (matrix), PRGM_ITAG (program), FUNC_ITAG (function), DATA_TAG (data), GDB_TAG (Graph Database), PIC_TAG (picture), TEXT_TAG (text), FIG_TAG (geometry figure), MAC_TAG (geometry macro), ASM_TAG (assembly program), and OTH_TAG (custom-type file). Each value in the FileTypes list will be presented to the user in a pulldown menu, unless there is only one value in the list (then it will be a static field).

VarOpen returns the HSym descriptor of the selected symbol, or HS_NULL if the user pressed 'ESC' or in case of an error.

If the FileTypes list contains OTH_TAG items, an extra parameter of type char ** is required. This parameter is an array of strings (more precisely, of char pointers). There must be exactly one char pointer for each OTH_TAG item in the FileTypes list, and these pointers should point to the text to display in the pulldown menu for these custom types.

This function may cause heap compression.


Uses: DialogAdd, DialogDo, DialogNew, HeapFree, TokenizeSymName, top_estack, PopupAddText, PopupClear, PopupNew, PopupText, VarCreateFolderPopup, strcat, strchr, strcmp, strlen, XR_stringPtr, DataTypeNames, VarOptList, CheckSysFunc, FolderOp, GetFuncPrgmBodyPtr, StrToTokN, SymCpy0, SymFindFirst, SymFindNext, SymSysVar, VarRecall, ROM Call 0x3E8
Used by: GT_Open


See also: VarNew, VarSaveAs