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)
MDLGPARENT MdlgGetDefaultParent (void)
DEPRECATED ERRVALUE MdlgGetFile (MDLGPARENT parent, FILEPATH &filepath, const char *ExtnFilters, const char *TitleKey, GETFILEFLAGS getfileflags, GETFILEFILTER *filter=0)
DEPRECATED ERRVALUE MdlgGetFile (MDLGPARENT parent, FILEPATH &filepath, const char *ExtnFilters, const MIUNICODE *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)
DEPRECATED int MdlgGetFile (MDLGPARENT dlgparent, MIUNICODE *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)
ERRVALUE MdlgGetFileComponentName (MDLGPARENT parent, const MISTRING &title, const FILEPATH &ParentDirectory, MISTRING &ComponentName, const MISTRING &Extension=TEXTID__None, const MISTRING &label=TEXTID__None)
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)
DEPRECATED int MdlgGetFileExtnUC (MDLGPARENT dlgparent, MIUNICODE *filename, const MIUNICODE *extns, const void *prompt, MdlgGetFileFilterProto filterfunc=0, void *funcdata=0, GETFILEFLAGS flags=GETFILEFLAG_None, int(*createoptfunc)(Widget, void *)=0, void *createoptdata=0)
int MdlgGetFiles (MDLGPARENT 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 MdlgGetFileSet (MDLGPARENT dlgparent, const char *extns, const void *prompt, FILEPATHLIST &fplist, MdlgGetFileFilterProto filterfunc=NULL, void *funcdata=NULL, GETFILEFLAGS flags=GETFILEFLAG_None, MdlgGetFilesValidMultiProto validfunc=0, int(*updatefunc)(const FILEPATH &, void *)=NULL, int(*createoptfunc)(Widget, void *)=NULL, void *createoptdata=NULL)
ERRVALUE MdlgGetFolder (MDLGPARENT dlgparent, FILEPATH &filepath, const MISTRING &promptstr, GETFOLDERFLAGS flags=GETFOLDERFLAG_None, GETFOLDERFILTER *filter=0)
int MdlgMaintGeneralFile (MDLGPARENT dlgparent, bool mainproc)
ERRVALUE MdlgSaveAsTextFile (MDLGPARENT dlgparent, const MISTRING &string, FILEPATH *pFilePath=0)
void MdlgSetMessageHookFunc (MESSAGEHOOKFUNC HookFunc, void *cbdata)
ERRVALUE MdlgShowErrorCode (MDLGPARENT parent, ERRVALUE errcode)
int MdlgShowErrorState (MDLGPARENT parent, const ERRORSTATE &ErrorState, MDLG_MESSAGEFLAGS flags=MDLG_MESSAGEFLAG_AllowSaveText)
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 MIUNICODE *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

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.

DEPRECATED 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 (MFC only).

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

DEPRECATED ERRVALUE MdlgGetFile ( MDLGPARENT  parent,
FILEPATH filepath,
const char *  ExtnFilters,
const MIUNICODE title,
GETFILEFLAGS  getfileflags,
GETFILEFILTER filter = 0 
)

Prompt user for single file using MIUNICODE* title and extension filter list (MFC only).

Deprecated:
Use
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(*)(Widget, void *)  createoptfunc = 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

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

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

Deprecated:
Use FILEPATH version.
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

ERRVALUE MdlgGetFileComponentName ( MDLGPARENT  parent,
const MISTRING title,
const FILEPATH ParentDirectory,
MISTRING ComponentName,
const MISTRING Extension = TEXTID__None,
const MISTRING label = TEXTID__None 
)

Prompt for a filepath component name for creation or renaming of a file.

Parameters:
parent  Parent for dialog
title  Dialog title
ParentDirectory  Parent directory that 'ComponentName' will be created in
ComponentName  File component name RETURNED
Extension  Extension to add on if user did not add one
label  Label to place in front of the name, TEXTID_Generic_Name_C is the default

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

Dialog to prompt user for single file using FILEPATH and MIUNICODE 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

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

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

Deprecated:
Use FILEPATH version.
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 ( MDLGPARENT  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(*)(Widget, void *)  createoptfunc = 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 MdlgGetFileSet ( MDLGPARENT  dlgparent,
const char *  extns,
const void *  prompt,
FILEPATHLIST fplist,
MdlgGetFileFilterProto  filterfunc = NULL,
void *  funcdata = NULL,
GETFILEFLAGS  flags = GETFILEFLAG_None,
MdlgGetFilesValidMultiProto  validfunc = 0,
int(*)(const FILEPATH &, void *)  updatefunc = NULL,
int(*)(Widget, void *)  createoptfunc = NULL,
void *  createoptdata = NULL 
)

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

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)

ERRVALUE MdlgSaveAsTextFile ( MDLGPARENT  dlgparent,
const MISTRING string,
FILEPATH pFilePath = 0 
)

Prompt user for file and save string in user-specified encoding.

Parameters:
dlgparent  Parent for dialog
string  String to save
pFilePath  Optional filepath passed/returned

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

int MdlgShowErrorState ( MDLGPARENT  parent,
const ERRORSTATE ErrorState,
MDLG_MESSAGEFLAGS  flags = MDLG_MESSAGEFLAG_AllowSaveText 
)

Display message dialog with text for specified error state.

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

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 MIUNICODE 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 Thu Apr 26 04:09:40 2007 for TNTsdk by  doxygen 1.5.2