Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
XmtAskForString(3)	   Library Functions Manual	    XmtAskForString(3)

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

SYNOPSIS
       #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)

ARGUMENTS
       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  cus-
		   tomized 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 XmtAsk-
		   ForString(),	 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 but-
		   ton,	 unless	an overriding value is found in	resource data-
		   base. NULL may be specified.
       OUTPUTS

	    buffer_in_out
		   A character	buffer	owned  by  the	caller.	 When  XmtAsk-
		   ForString()	returns	 True, this buffer contains the	string
		   input by the	user. The string is guaranteed to be null-ter-
		   minated and never to	contain	more than buffer_len-1 charac-
		   ters.
       RETURNS

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

DESCRIPTION
       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 dis-
       played (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 dia-  |
       |	 |		     | log's titlebar.	   |
       +---------+-------------------+---------------------+
       |helpText | help_text_default | Online help for the |
       |	 |		     | dialog.		   |
       +---------+-------------------+---------------------+
       WIDGETS

       XmtAskForString()  creates  a XmDialogShell widget named	``xmtStringDi-
       alogShell'', 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.

SEE ALSO
       Chapter 26, Simple Input	Dialogs,
       XmtAskForInteger(), XmtAskForDouble(), XmtAskForBoolean(),
       XmtAskForFile(),	XmtAskForFilename(), XmtAskForItem(),
       XmtAskForItemNumber().

Xmt				  Motif	Tools		    XmtAskForString(3)

NAME | SYNOPSIS | ARGUMENTS | DESCRIPTION | SEE ALSO

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=XmtAskForString&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help