BasicDialog(3U) InterViews Reference Manual BasicDialog(3U)
NAME
AcknowledgeDialog, BasicDialog, ConfirmDialog, GridDialog, PrintDialog, UChooser - an assortment of useful dialog boxes
SYNOPSIS
#include <Unidraw/dialogs.h>
DESCRIPTION
BasicDialog is the base class for subclasses that implement simple but common dialog boxes. AcknowledgeDialog simply displays a one or two
line message with a PushButton for dismissing the dialog. ConfirmDialog displays one or two lines of descriptive text with three pushbut-
tons marked ``Yes,'' ``No,'' and ``Cancel'', all of which dismiss the dialog. ConfirmDialog also provides an interface for retrieving the
button pushed. GridDialog lets the user specify the resolution of a cartesian grid. PrintDialog is a FileChooser for specifying the name
of a file or a printer. Finally, UChooser extends the StringChooser protocol to provide additional useful features, including support for
alphabetizing its StringBrowser's contents and for embellishing the dialog with descriptive text.
BASICDIALOG PUBLIC OPERATIONS
void SetTitle(const char*)
void SetSubtitle(const char*)
BasicDialogs can display one or two lines of descriptive text. These functions change the text appearing in these lines. The
change appears immediately if the dialog is visible.
BASICDIALOG PROTECTED OPERATIONS
BasicDialog(
ButtonState*, const char* title = ``'',
const char* subtitle = ``'', Alignment = Center
)
BasicDialog(
const char*, ButtonState*, const char* title = ``'',
const char* subtitle = ``'', Alignment = Center
)
Instantiate a BasicDialog, supplying an optional instance name, a button state, title and subtitle strings, and the dialog's align-
ment, which is used by its Popup operation. These operations will initialize two protected MarginFrame member variables, _title and
_subtitle, which will contain either a Message instance with the specified string or a piece of glue if the string is null. These
MarginFrames will be composed vertically at the top of the dialog, and no vertical space will be taken up by a null title or subti-
tle string.
virtual void Forward(Event&)
boolean IsAChild(Interactor*)
These functions are useful for rejecting spurious events while the dialog is visible, effectively locking out the rest of the appli-
cation. If Forward's event argument has x and y coordinates that fall within the dialog's canvas, then Forward calls Handle on the
event's target. Otherwise the BasicDialog's Handle is called. IsAChild returns true if the given interactor is a child of the dia-
log.
ACKNOWLEDGEDIALOG PUBLIC OPERATIONS
AcknowledgeDialog(const char* title, const char* subtitle)
Construct an AcknowledgeDialog instance with the given title and subtitle.
virtual void Acknowledge()
Call this function when the application should wait for the user to acknowledge the dialog. It returns when the user has pressed
and released the dialog's push button. This function does not pop up the dialog.
CONFIRMDIALOG PUBLIC OPERATIONS
ConfirmDialog(const char* title, const char* subtitle)
Construct a ConfirmDialog instance with the given title and subtitle.
virtual char Confirm()
Call this function when the application should wait for the user to confirm the dialog. It returns 'y', 'n', or '^G' ('