|w||The shell widget over which the dialog will be displayed, or any descendant of that shell.|
|query_name||The name of this instantiation of the dialog; used to look up resources. NULL may be specified, but will result in a dialog that cannot be customized through the resource database.|
|prompt_default||The prompt message to be displayed in the dialog, unless an overriding value is found in the resource database.|
|value_in_out||The address of a double or int owned by the caller. On entry to these functions, this variable contains the default value to be presented to the user.|
|min||The minimum number that the user will be allowed to enter.|
|max||The maximum number that the user will be allowed to enter.|
|help_text_default||The help text to display when the user clicks the Help button, unless an overriding value is found in resource database. NULL may be specified.|
value_in_out The address of a double or int owned by the caller. When these functions return True, the value entered by the user is stored at this address.RETURNS
True if the user clicked the Ok button to dismiss the dialog;
False if the user clicked the Cancel button.
XmtAskForDouble() and XmtAskForInteger() display an application modal dialog box, of the type created by XmCreatePromptDialog(), to prompt the user to enter a number. They process events in a local event loop until the user selects either the Ok or Cancel button of the dialog, and then return control to the calling procedure. If the user enters a legal number in the correct range, and clicks Ok, then that number is stored at the location pointed to by the value_in_out argument, and the functions return True. If the user clicks the Cancel button, the functions immediately return False without checking or storing the input value.
If the user clicks Ok, and the value entered is not a valid number (e.g. if it contains illegal characters), or if it is not within the minimum and maximum bounds specified for this dialog, then an error message is displayed (using XmtDisplay Error()) and control remains within the local event loop so that the user can correct his input. If range checking is not desired with these functions, specify a min value that is greater than or equal to max.
If help text is found in the resource database for this dialog, or if the help_text_default argument is non-NULL, then this text will be displayed (using XmtDisplayInformation()) when the user clicks on the Help button. If there is no help available for the dialog, then the Help button will be insensitive.
To allow dialog customization, XmtAskForDouble() and XmtAskForInteger() look up the following subpart resources of the shell specified by w. The name of the subpart is given by the query_name argument, and the class of the subpart is XmtDoubleDialog or XmtIntDialog. These subpart resources are looked up every time these functions are called, not simply when the widgets are created.
Resource Default Description message prompt_default The prompt for the dialog title Enter an Integer or Enter a Number The string to appear in the dialogs titlebar. helpText help_text_default Online help for the dialog.
XmtAskForDouble() and XmtAskForInteger() use the same cached dialog widgets as XmtAskForString() does-an XmDialogShell named xmtStringDialogShell and its XmSelectionBox child named xmtStringDialog.
Chapter 26, Simple Input Dialogs,
XmtAskForBoolean(), XmtAskForFile(), XmtAskForFilename(), XmtAskForItem(), XmtAskForItemNumber(), XmtAskForString().
|Xmt||XMTASKFORDOUBLE (3)||Motif Tools|