GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
XmtAskForString(3) FreeBSD Library Functions Manual XmtAskForString(3)

XmtAskForString() - use a dialog box to prompt the user for a string and return the user's response.

#include <Xmt/Dialogs.h>

Boolean XmtAskForString(Widget w, String query_name, String ompt_default, String buffer_in_out, int buffer_length, String help_text_default)

INPUTS
w
The shell widget over which the dialog will be displayed, or any descendant of that shell.
query_name
The name for this instantiation of the dialog. NULL may be specified, but will result in a dialog that cannot be customized through the resource man ager.
prompt_default
The prompt message to be displayed in the dialog, unless an overriding value is found in the resource database.
buffer_in_out
A character buffer owned by the caller. On entry to XmtAskForString(), this buffer contains the default string to be displayed in the dialog's text widget.
buffer_len
The length in characters of the buffer.
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.
OUTPUTS
buffer_in_out
A character buffer owned by the caller. When XmtAskForString() returns True, this buffer contains the string input by the user. The string is guaranteed to be null-terminated and never to contain more than buffer_len-1 characters.
RETURNS

True if the user clicked the Ok button to dismiss the dialog; False if the user clicked the Cancel button.

XmtAskForString() displays an application modal dialog box, of the type created by XmCreatePromptDialog(), to prompt the user to input a string. It processes events in a local event loop until the user selects either the Ok or Cancel button of the dialog, and then returns with the user's input, if any, in a programmer specified buffer.

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 for the dialog, then the Help button will be made insensitive.

Customization

To allow dialog customization, XmtAskForString() looks up the following subpart resources of the shell specified by w. The name of the subpart is given by the argument query_name, and the class of the subpart is ``XmtStringDialog''. These subpart resources are looked up every time XmtAskForString() is called, not simply when the widgets are created.

Resource Default Description
message prompt_default The prompt for the dialog.
title ”Enter a String“ The string to appear in the dialog's titlebar.
helpText help_text_default Online help for the dialog.

WIDGETS

XmtAskForString() creates a XmDialogShell widget named ``xmtStringDialogShell'', and an XmSelectionBox widget named ``xmtStringDialog'' as a child of that shell. Once this dialog has been created, it is cached for reuse by subsequent calls.

Chapter 26, Simple Input Dialogs,
XmtAskForInteger(), XmtAskForDouble(), XmtAskForBoolean(), XmtAskForFile(), XmtAskForFilename(), XmtAskForItem(), XmtAskForItemNumber().
Motif Tools Xmt

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.