hiDisplayAppDBox
hiDisplayAppDBox(?names_dboxHandle[?dboxBannert_dboxBanner] [?dboxTextt_dboxText] [?callbackg_callback] [?dialogTypex_dialogType] [?dialogStyles_dialogStyle] [?buttonLayouts_buttonLayout] [?buttonsg_buttons] [?dontPopdownsg_dontPopdowns] [?defaultButtonx_defaultButton] [?locationl_location] [?helpg_help] ) =>t / nil / cancel
Description
Creates and displays a dialog box. You can add a pre-defined set of buttons to the dialog box or you can specfiy your own buttons. The dialog box is destroyed when it is removed from the screen.
Arguments
|
SKILL handle to the dialog box. The dboxHandle symbol is set to point to the created dialog box; when the dialog box is dismissed, this symbol is reset to |
|
|
Text that appears in the window manager banner of the dialog box. |
|
|
Text string specifying the SKILL procedure to be executed when the user clicks OK or Yes in the dialog box. This callback is called if s_buttonLayout is If you specified a Help button in g_buttons and if you want the standard Doc Assistant mechanism to be invoked when the user clicks the button, use the following procedure as the callback for the Help button: procedure ( myHelp ( ) hiHelp ( ’dbox dBoxName ))
If s_buttonLayout is procedure( myCallback ( button ) when (button == 1 "Overwrite selected")
and, in the ?callback ’("myCallback(1)" "myCallback(2)" "myCallback(3)") |
|
|
One of the following dialog box types, which determine the appearance of the dialog box: |
|
|
One of the following symbols, which determine the blocking behavior of the dialog box: Blocks access to the application while it is displayed. The user must dismiss the dialog box in order to continue using the application. (Access to window manager commands or other applications is not blocked.)
The Does not block access to the application. The user can continue using the application without having to close the dialog box. |
|
|
Symbol specifying the buttons that appear in this dialog box. Valid values are:
If you want to customize the buttons, specify
A Help button appears with all choices except
The dialog box callback, if any, is executed only if s_buttonLayout is not of type |
|
|
List of buttons that you want to display in the dialog box. Specify this argument as a list of strings. You can specify any string for a button, for example, " A Help button is not added by default to your list of buttons. If you want a Help button, specify it in the g_buttons list and specify a callback for it in the g_callbacks argument. You can also invoke the standard Doc Assistant mechanism when the user clicks Help; see the description of g_callbacks for more information. |
|
|
A list, each element of which is The items in the list correspond to the buttons in g_buttons. The first item in g_dontPopdowns determines the behavior of the first button in g_buttons, the second item determines the behavior of the second button, and so on. |
|
|
Specifies the default button to be used when the Return key is pressed. The default button should be specified by its position. Possible choices can range from 1 through 4 depending on s_buttonLayout. For example, if the s_buttonLayout argument is set to ’ |
|
|
The location of the dialog box on the screen, specified as the x and y coordinates of the upper left corner of the box:
If this argument is not specified or if it is specified incorrectly, then the default location set by |
|
|
The value of this argument is used if s_buttonLayout is
If you specify a single string or symbol, it is used to set the
(If you want to specify the help symbol only, specify a list of two strings or symbols, with
When a user clicks Help on the dialog box, the
If the
The appId and helpTag determine the name of the tag file that is called (appId
You can also use the |
|
|
If you do not want to use the default |
|
Values Returned
If s_buttonLayout is not ’UserDefined, this function returns one of the following values:
If s_buttonLayout is ’UserDefined and If s_dialogStyle is ’modal, this function returns one of the following values when a button is clicked:
If s_buttonLayout is ’UserDefined and s_dialogStyle is ’modeless, this function returns one of the following values immediately after the dialog box is displayed:
Examples
Creates a reminder list and a warning dialog box for each item of the list.
;;; creating the reminder list
trReminders = '( "Project Meeting 10-11" "Workout 12-1" "Team Meeting 3-4" )
foreach( reminderText trReminders ; for each reminder
hiDisplayAppDBox(
?name gensym( 'trReminderDialogBox ) ; unique variable
?dboxBanner "Reminder"
?dboxText reminderText
?callback sprintf( nil "trReminderCB( \"%s\" )" reminderText ) ; dynamically built callback
?dialogType hicWarningDialog
?dialogStyle 'modeless
?buttonLayout 'YesNo
)
) ; foreach
procedure( trReminderCB( reminderText )
printf( "%s completed" reminderText )
)
Creates different types of modal dialog boxes.
trDialogTypes = '(
hicWarningDialog hicErrorDialog hicInformationDialog
hicMessageDialog hicQuestionDialog hicWorkingDialog
)
Related Topics
Return to top