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


Manual Reference Pages  -  XMTASKFORBOOLEAN (3)

NAME

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

CONTENTS

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 overriding value is found in the resource database. NULL may be specified.
no_default The string to be displayed in the No button, unless an overriding value is found in the resource database. NULL may be specified.
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 argument 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 MessageBox 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 XmtAskForBoolean() 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 internal 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 selects Cancel, XmtAskForBoolean() returns False without setting value_return.

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
XmtAskForBoolean() looks 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 ‘‘XmtBooleanDialog’’. These subpart resources are looked up every time XmtAskForBoolean() is called, not simply when the widgets are created.

ResourceDefaultDescription
messageprompt_defaultThe prompt for the dialog.
title”Question“The string in the dialog’s titlebar.
yesLabelyes_default or ”Yes“The label of Yes button.
noLabelno_default or ”No“The label of No button.
cancelLabelcancel_default or ”Cancel“The label of Cancel button.
defaultButtondefault_button_defaultWhich button is the default.
iconTypeicon_type_defaultWhich standard icon to display.
helpTexthelp_text_defaultOnline help for the dialog.
WIDGETS
XmtAskForBoolean() creates an XmDialogShell widget named ‘‘xmtBooleanDialogShell’’, and an XmtLayout widget named ‘‘xmtBooleanDialog’’ as a child of the XmDialogShell. It uses XmtLayout gadgets to display the dialog message and icon, and also creates four XmPushButton widgets named ‘‘yes’’, ‘‘no’’, ‘‘cancel’’, and ‘‘help’’. Once this boolean dialog has been created, 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().
Search for    or go to Top of page |  Section 3 |  Main Index


Xmt XMTASKFORBOOLEAN (3) Motif Tools

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