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

FreeBSD Manual Pages

  
 
  

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

NAME
     XmtAskForBoolean()  - ask a yes-or-no question with a dialog box and return
     the user's response.

SYNOPSIS
     #include <Xmt/Dialogs.h>
     Boolean XmtAskForBoolean(Widget w, String query_name, String
		    prompt_default, String yes_default, String no_default,
		    String cancel_default, XmtButtonType default_button_default,
		    int icon_type_default, Boolean show_cancel_button, Boolean
		    *value_return, 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 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.

	  yes_default
		 The  string  to be displayed in the Yes button, unless an over-
		 riding value is found in the resource	database.  NULL  may  be
		 specified.

	  no_default
		 The string to be displayed in the No button, unless an overrid-
		 ing value is found in the resource database. NULL may be speci-
		 fied.

	  cancel_default
		 The  string  to  be  displayed  in the Cancel button, unless an
		 overriding value is found in the resource database. NULL may be
		 specified.

	  default_button_default
		 The default button (ie. the button that will  be  activated  if
		 the user presses the Return key), unless an overriding value is
		 found in the resource database. The legal values for this argu-
		 ment are XmtYesButton, XmtNoButton, and XmtCancelButton.

	  icon_type_default
		 The  icon that is to appear in the dialog, unless an overriding
		 value is found in the resource database.  The legal values  are
		 those supported by the XmNdialogType resource of the Motif Mes-
		 sageBox widget. Note that this argument is not a Pixmap.

	  show_cancel_button
		 Whether the Cancel button should appear in the dialog.

	  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

	  value_return
		 The  address  of a Boolean owned by the caller. When XmtAskFor-
		 Boolean() returns True, this Boolean will be set to True if the
		 user clicked the Yes button and  will	be  False  if  the  user
		 clicked the No but ton.
     RETURNS

	  True	if the user clicked the Yes or No buttons to dismiss the dialog;
	  False if the user clicked the Cancel button.

DESCRIPTION
     XmtAskForBoolean() displays an application modal dialog box similar to  the
     dialog  created by XmCreateQuestionDialog().  It processes events in an in-
     ternal event loop until the user selects the Yes, No or  Cancel  button  of
     the  dialog, and then returns to the calling procedure. If the user selects
     Yes or No, XmtAskForBoolean()  stores  True  or  False  into  the	location
     pointed  to  by value_return and returns True as its value. If the user se-
     lects Cancel, XmtAskForBoolean() returns False  without  setting  value_re-
     turn.

     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 in-
     sensitive.

     Customization
     XmtAskForBoolean()  looks	up  the following subpart resources of the shell
     specified by w. The name of the subpart is given by  the  query_name  argu-
     ment,  and  the class of the subpart is ``XmtBooleanDialog''. These subpart
     resources are looked up every time XmtAskForBoolean() is called, not simply
     when the widgets are created.

     +---------------+----------------------------+----------------------+
     | Resource      | Default			  | Description 	 |
     +---------------+----------------------------+----------------------+
     | message	     | prompt_default		  | The prompt for the	 |
     |		     |				  | dialog.		 |
     +---------------+----------------------------+----------------------+
     | title	     | "Question"		  | The string in the	 |
     |		     |				  | dialog's titlebar.	 |
     +---------------+----------------------------+----------------------+
     | yesLabel      | yes_default or "Yes"	  | The label of Yes	 |
     |		     |				  | button.		 |
     +---------------+----------------------------+----------------------+
     | noLabel	     | no_default or "No"	  | The label of No but- |
     |		     |				  | ton.		 |
     +---------------+----------------------------+----------------------+
     | cancelLabel   | cancel_default or "Cancel" | The label of Cancel  |
     |		     |				  | button.		 |
     +---------------+----------------------------+----------------------+
     | defaultButton | default_button_default	  | Which button is the  |
     |		     |				  | default.		 |
     +---------------+----------------------------+----------------------+
     | iconType      | icon_type_default	  | Which standard icon  |
     |		     |				  | to display. 	 |
     +---------------+----------------------------+----------------------+
     | helpText      | help_text_default	  | Online help for the  |
     |		     |				  | dialog.		 |
     +---------------+----------------------------+----------------------+
     WIDGETS
     XmtAskForBoolean() creates an XmDialogShell  widget  named  ``xmtBooleanDi-
     alogShell'',  and an XmtLayout widget named ``xmtBooleanDialog'' as a child
     of the XmDialogShell. It uses XmtLayout gadgets to display the dialog  mes-
     sage  and	icon,  and also creates four XmPushButton widgets named ``yes'',
     ``no'', ``cancel'', and ``help''. Once this boolean dialog  has  been  cre-
     ated,  it	is cached for reuse by subsequent calls, so if you set resources
     on these widgets, note that they will affect all instances of the dialog.

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

Xmt				   Motif Tools		     XmtAskForBoolean(3)

Want to link to this manual page? Use this URL:
<https://man.freebsd.org/cgi/man.cgi?query=XmtAskForBoolean&sektion=3&manpath=FreeBSD+Ports+15.1.quarterly>

home | help