Mdlg functions


Functions

ERRVALUE MdlgAskNumber (MDLGPARENT dlgparent, const MISTRING &dlgtitle, const MISTRING &prompt, double &value, double minvalue, double maxvalue, int decplaces, HELPID helpid=HELPID__None)
ERRVALUE MdlgAskNumber (MDLGPARENT dlgparent, const MISTRING &prompt, double &value, double minvalue, double maxvalue, int decplaces, HELPID helpid=HELPID__None)
DLGRESPONSE MdlgAskQuestion (MDLGPARENT parent, const MISTRING &dlgtitle, const MISTRING &text, DLGQ_STYLE style, DLGRESPONSE dftresponse, HELPID helpid=HELPID__None)
DLGRESPONSE MdlgAskQuestion (MDLGPARENT parent, const MISTRING &text, DLGQ_STYLE style, DLGRESPONSE dftresponse, HELPID helpid=HELPID__None)
ERRVALUE MdlgAskString (MDLGPARENT dlgparent, const MISTRING &dlgtitle, const MISTRING &prompt, MISTRING &string, int maxchars=0, HELPID helpid=HELPID__None, GETSTRINGFILTER *filter=0)
ERRVALUE MdlgAskString (MDLGPARENT dlgparent, const MISTRING &prompt, MISTRING &string, int maxchars=0, HELPID helpid=HELPID__None, GETSTRINGFILTER *filter=0)
DEPRECATED int MdlgAskYesNo (MDLGPARENT parent, const char *msgname, int dft, HELPID helpid=HELPID__None)
DEPRECATED DLGRESPONSE MdlgAskYesNo (MDLGPARENT parent, const MISTRING &text, DLGRESPONSE dftresponse, HELPID helpid=HELPID__None)
DEPRECATED int MdlgAskYesNoCancel (MDLGPARENT parent, const char *msgname, int dft, HELPID helpid=HELPID__None)
DEPRECATED DLGRESPONSE MdlgAskYesNoCancel (MDLGPARENT parent, const MISTRING &text, DLGRESPONSE dftresponse, HELPID helpid=HELPID__None)
MDLGPARENT MdlgGetDefaultParent (void)
ERRVALUE MdlgGetFile (MDLGPARENT parent, FILEPATH &filepath, const char *ExtnFilters, const char *TitleKey, GETFILEFLAGS getfileflags, GETFILEFILTER *filter=0)
ERRVALUE MdlgGetFile (MDLGPARENT parent, FILEPATH &filepath, const char *ExtnFilters, const UNICODE *title, GETFILEFLAGS getfileflags, GETFILEFILTER *filter=0)
int MdlgGetFile (MDLGPARENT dlgparent, FILEPATH &filename, const char *extns, const void *prompt, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
int MdlgGetFile (MDLGPARENT dlgparent, UNICODE *filename, const char *extns, const void *prompt, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
int MdlgGetFileExtnUC (MDLGPARENT dlgparent, FILEPATH &filename, const MISTRING &extns, const void *prompt, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
int MdlgGetFileExtnUC (MDLGPARENT dlgparent, UNICODE *filename, const UNICODE *extns, const void *prompt, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
int MdlgGetFiles (Widget dlgparent, FILEPATH &filename, const char *extns, const void *prompt, int minfiles, int maxfiles, FILEPATHLIST &FileList, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, MdlgGetFilesValidMultiProto validfunc=0, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
int MdlgGetFiles (Widget dlgparent, UNICODE *filename, const char *extns, const void *prompt, int minfiles, int maxfiles, FNAMEUC **fnameret, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, MdlgGetFilesValidMultiProto validfunc=0, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
int MdlgGetFileSet (Widget dlgparent, UNICODE *filename, const char *extns, const void *prompt, int setnumfiles, FNAMEUC fname[], UNICODE **filelabel, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, MdlgGetFilesValidMultiProto validfunc=0, int(*updatefunc)(FILEPATHLIST::ITERATOR, void *)=0, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
ERRVALUE MdlgGetFolder (MDLGPARENT dlgparent, FILEPATH &filepath, const MISTRING &promptstr, GETFOLDERFLAGS flags=GETFOLDERFLAG_None, GETFOLDERFILTER *filter=0)
ERRVALUE MdlgGetTextFile (MDLGPARENT dlgparent, FILEPATH &filepath, CHAR_ENCODING &encoding, ENCODELIST_FLAGS enclistflags, const char *extns, const void *prompt, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None)
int MdlgMaintGeneralFile (MDLGPARENT dlgparent, bool mainproc)
void MdlgSetMessageHookFunc (MESSAGEHOOKFUNC HookFunc, void *cbdata)
ERRVALUE MdlgShowErrorCode (MDLGPARENT parent, ERRVALUE errcode)
DEPRECATED int MdlgShowMessage (MDLGPARENT parent, MDLG_MESSAGETYPE msgtype, const char *group, const char *key, const char *help=NULL, MDLG_MESSAGEFLAGS flags=MDLG_MESSAGEFLAG_None)
int MdlgShowMessage (MDLGPARENT parent, MDLG_MESSAGETYPE msgtype, const MISTRING &msgtext, MDLG_MESSAGEFLAGS flags=MDLG_MESSAGEFLAG_None, HELPID helpid=HELPID__None, const char *inibasetag=0, const UNICODE *details=0)
int MdlgShowMessageCode (MDLGPARENT parent, int errcode, MDLG_MESSAGETYPE msgtype=MDLG_MESSAGETYPE_Default, MDLG_MESSAGEFLAGS flags=MDLG_MESSAGEFLAG_AllowSaveText)
void MdlgShowProductInfo (MDLGPARENT dlgparent=0)

Function Documentation

ERRVALUE MdlgAskNumber MDLGPARENT  dlgparent,
const MISTRING dlgtitle,
const MISTRING prompt,
double &  value,
double  minvalue,
double  maxvalue,
int  decplaces,
HELPID  helpid = HELPID__None
 

Dialog to ask user for numeric value (window title specified).

Parameters:
dlgparent  Parent for dialog
dlgtitle  Dialog title
prompt  Prompt string
value  Value passed/returned
minvalue  Minimum allowed value
maxvalue  Maximum allowed value
decplaces  Number of decimal places to show
helpid  Help ID if help provided

ERRVALUE MdlgAskNumber MDLGPARENT  dlgparent,
const MISTRING prompt,
double &  value,
double  minvalue,
double  maxvalue,
int  decplaces,
HELPID  helpid = HELPID__None
 

Dialog to ask user for numeric value (default window title).

Parameters:
dlgparent  Parent for dialog
prompt  Prompt string
value  Value passed/returned
minvalue  Minimum allowed value
maxvalue  Maximum allowed value
decplaces  Number of decimal places to show
helpid  Help ID if help provided

DLGRESPONSE MdlgAskQuestion MDLGPARENT  parent,
const MISTRING dlgtitle,
const MISTRING text,
DLGQ_STYLE  style,
DLGRESPONSE  dftresponse,
HELPID  helpid = HELPID__None
 

Dialog to ask user question with buttons for responses (window title specified).

Returns:
DLGRESPONSE value
Parameters:
parent  Parent for dialog, NULL for default
dlgtitle  Title for dialog window
text  Text to display
style  Dialog style and buttons
dftresponse  Default response (DLGRESPONSE_Yes or DLGRESPONSE_No)
helpid  Help ID if help provided

DLGRESPONSE MdlgAskQuestion MDLGPARENT  parent,
const MISTRING text,
DLGQ_STYLE  style,
DLGRESPONSE  dftresponse,
HELPID  helpid = HELPID__None
 

Dialog to ask user question with buttons for responses (default window title).

Returns:
DLGRESPONSE value
Parameters:
parent  Parent for dialog, NULL for default
text  Text to display
style  Dialog style and buttons
dftresponse  Default response (DLGRESPONSE_Yes or DLGRESPONSE_No)
helpid  Help ID if help provided

ERRVALUE MdlgAskString MDLGPARENT  dlgparent,
const MISTRING dlgtitle,
const MISTRING prompt,
MISTRING string,
int  maxchars = 0,
HELPID  helpid = HELPID__None,
GETSTRINGFILTER filter = 0
 

Dialog to ask user for string value (window title specified).

Parameters:
dlgparent  Parent for dialog
dlgtitle  Dialog title
prompt  Prompt string
string  String passed/returned
maxchars  Maximum number of characters in string, 0 for no maximum
helpid  Help ID if help provided
filter  Optional filter for string validation

ERRVALUE MdlgAskString MDLGPARENT  dlgparent,
const MISTRING prompt,
MISTRING string,
int  maxchars = 0,
HELPID  helpid = HELPID__None,
GETSTRINGFILTER filter = 0
 

Dialog to ask user for string value (default window title).

Parameters:
dlgparent  Parent for dialog
prompt  Prompt string
string  String passed/returned
maxchars  Maximum number of characters in string, 0 for no maximum
helpid  Help ID if help provided
filter  Optional filter for string validation

DEPRECATED int MdlgAskYesNo MDLGPARENT  parent,
const char *  msgname,
int  dft,
HELPID  helpid = HELPID__None
 

DEPRECATED Dialog to ask user for Yes/No response with prompt from message lookup.

Deprecated:
Replaced by MdlgAskQuestion
Returns:
0 = "No", 1 = "Yes".
Parameters:
parent  Parent for dialog, NULL for default
msgname  Message name for lookup in "popupync" group
dft  Default response
helpid  Help ID if help provided

DEPRECATED DLGRESPONSE MdlgAskYesNo MDLGPARENT  parent,
const MISTRING text,
DLGRESPONSE  dftresponse,
HELPID  helpid = HELPID__None
 

DEPRECATED Dialog to ask user for Yes/No response.

Deprecated:
Replaced by MdlgAskQuestion
Returns:
DLGRESPONSE_Yes or DLGRESPONSE_No
Parameters:
parent  Parent for dialog, NULL for default
text  Text to display
dftresponse  Default response (DLGRESPONSE_Yes or DLGRESPONSE_No)
helpid  Help ID if help provided

DEPRECATED int MdlgAskYesNoCancel MDLGPARENT  parent,
const char *  msgname,
int  dft,
HELPID  helpid = HELPID__None
 

DEPRECATED Dialog to ask user for Yes/No/Cancel response with prompt from message lookup.

Deprecated:
Replaced by MdlgAskQuestion
Returns:
0 = "No", 1 = "Yes", -1 = "Cancel".
Parameters:
parent  Parent for dialog, NULL for default
msgname  Message name for lookup in "popupync" group
dft  Default response
helpid  Help ID if help provided

DEPRECATED DLGRESPONSE MdlgAskYesNoCancel MDLGPARENT  parent,
const MISTRING text,
DLGRESPONSE  dftresponse,
HELPID  helpid = HELPID__None
 

DEPRECATED Dialog to ask user for Yes/No/Cancel response.

Deprecated:
Replaced by MdlgAskQuestion
Returns:
DLGRESPONSE_Yes, DLGRESPONSE_No or DLGRESPONSE_Cancel
Parameters:
parent  Parent for dialog, NULL for default
text  Text to display
dftresponse  Default response (DLGRESPONSE_Yes, DLGRESPONSE_No or DLGRESPONSE_Cancel)
helpid  Help ID if help provided

MDLGPARENT MdlgGetDefaultParent void   ) 
 

Retrieve default parent for creating dialog.

Returns:
Default parent for creating dialog. This function should be used by the individual Mdlg... function itself, not by the caller. If the default parent is desired, pass NULL as the parent for any Mdlg function.

ERRVALUE MdlgGetFile MDLGPARENT  parent,
FILEPATH filepath,
const char *  ExtnFilters,
const char *  TitleKey,
GETFILEFLAGS  getfileflags,
GETFILEFILTER filter = 0
 

Prompt user for single file using title from message lookup.

Parameters:
parent  Parent for dialog
filepath  Path to file passed/returned
ExtnFilters  Extension filters in form "msgkey|extns|msgkey|extns" extns are ;-separated and must include "*."
TitleKey  Title key for use with 'getfile' group in message file
getfileflags  Flags
filter  Optional filter

ERRVALUE MdlgGetFile MDLGPARENT  parent,
FILEPATH filepath,
const char *  ExtnFilters,
const UNICODE title,
GETFILEFLAGS  getfileflags,
GETFILEFILTER filter = 0
 

Prompt user for single file using UNICODE* title and extension filter list.

Parameters:
parent  Parent for dialog
filepath  Path to file passed/returned
ExtnFilters  Extension filters in form "msgkey|extns|msgkey|extns" extns are ;-separated and must include "*."
title  Title for dialog prompt
getfileflags  Flags
filter  Optional filter

int MdlgGetFile MDLGPARENT  dlgparent,
FILEPATH filename,
const char *  extns,
const void *  prompt,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None,
int(*  createoptfunc)(Widget, void *) = 0,
void *  createoptdata = 0
 

Parameters:
filename  File path/name passed/returned
extns  Extensions to show, if any
filterfunc  Filter function
funcdata  Data to pass to filter function
createoptfunc  Function to create optional controls on dialog

int MdlgGetFile MDLGPARENT  dlgparent,
UNICODE filename,
const char *  extns,
const void *  prompt,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None,
int(*  createoptfunc)(Widget, void *) = 0,
void *  createoptdata = 0
 

Dialog to prompt user for single file using UNICODE filename (X only).

Parameters:
filename  File path/name passed/returned
extns  Extensions to show, if any
filterfunc  Filter function
funcdata  Data to pass to filter function
createoptfunc  Function to create optional controls on dialog

int MdlgGetFileExtnUC MDLGPARENT  dlgparent,
FILEPATH filename,
const MISTRING extns,
const void *  prompt,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None,
int(*  createoptfunc)(Widget, void *) = 0,
void *  createoptdata = 0
 

Dialog to prompt user for single file using FILEPATH and UNICODE extension (X only).

Parameters:
filename  File path/name passed/returned
extns  Extensions to show, if any
filterfunc  Filter function
funcdata  Data to pass to filter function
createoptfunc  Function to create optional controls on dialog

int MdlgGetFileExtnUC MDLGPARENT  dlgparent,
UNICODE filename,
const UNICODE extns,
const void *  prompt,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None,
int(*  createoptfunc)(Widget, void *) = 0,
void *  createoptdata = 0
 

Dialog to prompt user for single file using UNICODE filename and UNICODE extension (X only).

Parameters:
filename  File path/name passed/returned
extns  Extensions to show, if any
filterfunc  Filter function
funcdata  Data to pass to filter function
createoptfunc  Function to create optional controls on dialog

int MdlgGetFiles Widget  dlgparent,
FILEPATH filename,
const char *  extns,
const void *  prompt,
int  minfiles,
int  maxfiles,
FILEPATHLIST FileList,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None,
MdlgGetFilesValidMultiProto  validfunc = 0,
int(*  createoptfunc)(Widget, void *) = 0,
void *  createoptdata = 0
 

Display dialog allowing user to select multiple files.

Parameters:
filename  Default filename
extns  Extensions to show, if any
minfiles  Minimum number of files required
maxfiles  Maximum allowed to be selected, 0 if no limit
filterfunc  Filter function
funcdata  Data to pass to filter function
createoptfunc  Function to create optional controls on dialog

int MdlgGetFiles Widget  dlgparent,
UNICODE filename,
const char *  extns,
const void *  prompt,
int  minfiles,
int  maxfiles,
FNAMEUC **  fnameret,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None,
MdlgGetFilesValidMultiProto  validfunc = 0,
int(*  createoptfunc)(Widget, void *) = 0,
void *  createoptdata = 0
 

Display dialog allowing user to select multiple files (X only).

Parameters:
filename  Default filename
extns  Extensions to show, if any
minfiles  Minimum number of files required
maxfiles  Maximum allowed to be selected, 0 if no limit
filterfunc  Filter function
funcdata  Data to pass to filter function
createoptfunc  Function to create optional controls on dialog

int MdlgGetFileSet Widget  dlgparent,
UNICODE filename,
const char *  extns,
const void *  prompt,
int  setnumfiles,
FNAMEUC  fname[],
UNICODE **  filelabel,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None,
MdlgGetFilesValidMultiProto  validfunc = 0,
int(*  updatefunc)(FILEPATHLIST::ITERATOR, void *) = 0,
int(*  createoptfunc)(Widget, void *) = 0,
void *  createoptdata = 0
 

Prompt user for "set" of filenames with allowance for optional controls (X only).

Parameters:
filename  Default filename
extns  Extensions to show, if any
setnumfiles  Number of files to be selected
filelabel  Labels and default names for each file
filterfunc  Filter function
funcdata  Data to pass to filter function
updatefunc  Function called when any file in the set is changed by the user
createoptfunc  Function to create optional controls on dialog

ERRVALUE MdlgGetFolder MDLGPARENT  dlgparent,
FILEPATH filepath,
const MISTRING promptstr,
GETFOLDERFLAGS  flags = GETFOLDERFLAG_None,
GETFOLDERFILTER filter = 0
 

Dialog to allow user to select folder.

Parameters:
dlgparent  Parent for dialog
filepath  Folder path passed/returned
promptstr  Prompt string (also allows TEXTID)
flags  Flags
filter  Filter

ERRVALUE MdlgGetTextFile MDLGPARENT  dlgparent,
FILEPATH filepath,
CHAR_ENCODING encoding,
ENCODELIST_FLAGS  enclistflags,
const char *  extns,
const void *  prompt,
MdlgGetFileFilterProto  filterfunc = 0,
void *  funcdata = 0,
GETFILEFLAGS  flags = GETFILEFLAG_None
 

Prompt for a text file with user-specified encoding.

Parameters:
dlgparent  Parent for dialog
filepath  File path passed/returned
encoding  Text character encoding passed/returned
enclistflags  Flags specifying allowed encodings
extns  Extensions to show, if any
prompt  Prompt message
filterfunc  Filter function
funcdata  Data to pass to filter function
flags  File selection flags

int MdlgMaintGeneralFile MDLGPARENT  dlgparent,
bool  mainproc
 

Dialog for general file maintenance.

Parameters:
dlgparent  Parent for dialog
mainproc  Treat as "main process (show "Exit" instead of "Close" button)

void MdlgSetMessageHookFunc MESSAGEHOOKFUNC  HookFunc,
void *  cbdata
 

Arrange to intercept all messages.

This is to be used by non-interactive applications such as the automated test suite which don't work very well if they sit all night waiting for somebody to click OK on an error dialog. It allows you to register a function that will get called instead of popping up the error dialog.

ERRVALUE MdlgShowErrorCode MDLGPARENT  parent,
ERRVALUE  errcode
 

Display error dialog with text for specified error code.

Returns:
error code or EUserCancel. Similar to MdlgShowMessageCode(parent,errcode,MDLG_MESSAGETYPE_Error) except that EUserCancel messages are not displayed.
Parameters:
parent  Parent for dialog, NULL for default
errcode  Error code

DEPRECATED int MdlgShowMessage MDLGPARENT  parent,
MDLG_MESSAGETYPE  msgtype,
const char *  group,
const char *  key,
const char *  help = NULL,
MDLG_MESSAGEFLAGS  flags = MDLG_MESSAGEFLAG_None
 

Show dialog displaying a message using message file (DEPRECATED).

Deprecated:
Replaced by version using MISTRING and HELPID.
Returns:
EUserCancel or 0.
If the MDLG_MESSAGEFLAG_AllowNoShowAgain flag is set, an entry in the ini file in the "popupmsg" section based on the group/key will be checked to determine if the user has previously requested that this dialog not be shown. If set, the dialog will not be displayed and a value of 0 will be returned.
Parameters:
parent  Parent for dialog, NULL for default
msgtype  Message type
group  Message database group, eg: "tntdisp"
key  Message database key, eg: "SelectRaster"
help  Help code (NULL for no help button)
flags  Flags

int MdlgShowMessage MDLGPARENT  parent,
MDLG_MESSAGETYPE  msgtype,
const MISTRING msgtext,
MDLG_MESSAGEFLAGS  flags = MDLG_MESSAGEFLAG_None,
HELPID  helpid = HELPID__None,
const char *  inibasetag = 0,
const UNICODE details = 0
 

Display message window with specified text.

Returns:
EUserCancel or 0.
Parameters:
parent  Parent for dialog, NULL for default
msgtype  Message type
msgtext  Message string, multiple lines allowed, TEXTID implied.
flags  Flags
helpid  Help ID (HELPID__None for no 'help' button)
inibasetag  Ini base tag for savable settings (eg. MDLG_MESSAGEFLAG_AllowNoShowAgain)
details  Optional message "details"

int MdlgShowMessageCode MDLGPARENT  parent,
int  errcode,
MDLG_MESSAGETYPE  msgtype = MDLG_MESSAGETYPE_Default,
MDLG_MESSAGEFLAGS  flags = MDLG_MESSAGEFLAG_AllowSaveText
 

Display message dialog with text for specified error code.

Returns:
If AllowCancel flag specified will return 0 or EUserCancel, otherwise the error code is returned.
Parameters:
parent  Parent for dialog, NULL for default
errcode  Error code
msgtype  Message type
flags  Flags

void MdlgShowProductInfo MDLGPARENT  dlgparent = 0  ) 
 

Display (modeless) dialog showing standard product information.


Generated on Tue Dec 14 13:20:25 2004 for TNTsdk by  doxygen 1.3.8-20040913