|
NAMEXmtAskForItem(), XmtAskForItemNumber() - use a dialog box to prompt the user to select an item from a list and return the selected item.SYNOPSIS#include <Xmt/Dialogs.h>
Boolean XmtAskForItem(Widget w, String query_name, String prompt_default, String list_title_default, String *items_default, int num_items, Boolean must_match, String buffer_in_out, int buffer_len, String help_text_default) Boolean XmtAskForItemNumber(Widget w, String query_name, String prompt_default, String list_title_default, String *items_default, int num_items, int *value_in_out, String help_text_default) ARGUMENTSINPUTS
True if the user clicked the Ok button to dismiss the dialog; False if the user clicked the Cancel button. DESCRIPTIONXmtAskForItem() and XmtAskForItemNumber() display an application modal dialog similar to that created by XmCreateSelectionDialog(). They process events in a local event loop until the user double clicks on an item, types the Return key, or selects the Ok or Cancel buttons of the dialog, then they return to the calling procedure.If the user clicks the Cancel button, then these functions immediately return False. If the user selects an item by any of the supported methods, then the functions store the user's input as a string or an integer and return True. XmtAskForItem() returns the item as a string stored in buffer_in_out. If must_match is True and the user types a string that does not appear in the List widget, then XmtAskForItem() will display an error message (with XmtDisplayError()) and will not return. XmtAskForItemNumber() returns the user's input differently. It stores the index of the user's selected item at the address specified by value_in_out. If the user types the name of an item that does not appear in the list, the XmtAskForItemNumber() will display an error dialog. 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. Customization To allow customization, XmtAskForItem() and XmtAskForItemNumber() look up the following subpart resources of the toplevel shell. The name of the subpart is given by the query_name argument, and the class of the subpart is ``XmtItemDialog''. These subpart resources are looked up every time the functions are called, not simply when the widgets are created.
WIDGETS These functions create an XmDialogShell named ``xmtItemDialogShell'' and an XmSelectionBox widget named ``xmtItemDialog'' as a child of that shell. Once this dialog has been created, it is cached for reuse by subsequent calls. SEE ALSOChapter 26, Simple Input Dialogs,XmtAskForBoolean(), XmtAskForDouble(), XmtAskForFile(), XmtAskForFilename(), XmtAskForInteger(), XmtAskForItemNumber(), XmtAskForString().
Visit the GSP FreeBSD Man Page Interface. |