at_dialog - Creates a dialog window

SYNOPSIS

source at\$tk_include:at_defs.atk

at_dialog master title text bitmap default args

ARGUMENTS

master
Any top-level window to which the dialog is subservient.
title
The title that will appear in the window title bar as managed by the window manager.
text
The message that will appear in the dialog message area
bitmap
A standard X-window bitmap that will appear to the left of the message text and in the icon (should the dialog or its master window be iconised.
default
The index number of the button that will be activated if the user presses <Return> key. If the programmer wishes there to be no default, this value should be set to -1.
args
These args (of which any number greater than zero may be specified) contain the text of the buttons that are placed across the lower section of the widget in left-to-right order. These buttons are assigned numbers 0, 1, 2... (again from left to right), with the number specified by default (if greater than zero) corresponding to one of these.

DESCRIPTION

This procedure is part of the standard AT_DEFS. It allows \ the programmer to create a dialog box that has a local grab of the ATwish application. It requires a user response before the script will procede. The procedure returns the text of the button that was pressed. It also installs the result into the global variable at_response.

Example

Here is some example code that can be used to create a dialog box in the top level window of an ATwish application.

puts stdout [at_dialog . {Compact Array panic!} \
   {Monitor point VTXFIRE is reporting \
   STATE=TRUE. This implies that \
   Antenna 5 is on fire. \
   Please indicate how to proceed}\
   error 1 {Sound alarm} {Let it burn}]

This would generate the following window.

Notice the highlighting around the default (Button 1 - don't forget to start counting from 0). Also, because it is a transient window, it doesn't have iconizing and maximizing gadgets in the top right of the window manager frame. When the master window is iconized, the transient window will be iconized as well.

KEYWORDS

ATwish, transient, dialog, procedure


Original: dmckay (1-DEC-1994)
Modified: dmckay (17-JUL-1995)