 |
|
 |
|
Dialog Requirements
Written by danm
Last modified by danm on 17 May 99
Overview
This document is a list of features planned for implementation in Mozilla dialogs.
Dialogs are simply windows: we draw no distinction between dialogs and windows
except the window border style. However, windows will have configurable settings
and helper methods which will make them easier to treat as dialogs.
This document does not cover planned helper classes for creating and using
classes of dialog, such as simple alerts. Clearly a useful facility would be
wrappers around the dialogs as described below, allowing simple requests on
the order of DoAlert(icon, message, buttons). Those wrappers will
be a part of Mozilla, but covered elsewhere (link to be added once a document
is written!)
Requirements
Features of windows which should prove useful for dialogs
onload JavaScript callback provides a hook for initializing
the window's contents from JavaScript, after the window's contents have been
loaded but before they have been displayed
- C++ callbacks similar to
onload, for the same purpose. There
is currently a pair of callbacks surrounding the call to onload,
so C++ code has a chance to modify the window both before and after the modifications
coded into the XUL. However, this ability will soon be deprecated, since the
callbacks require a nonstandard onload treatment.
- JavaScript and C++ callbacks for debriefing the window's contents after
the user has made modified control settings but before the content model has
been deleted. (See the Dialog Cookbook for
a more complete explanation of this feature.) There is no plan to provide
an explicit debriefing callback; this should be done in the event handler
for the dismissal buttons.
- A window should be able to specify its size in the XUL. If the window's
contents are described using a box, the
window may be resized to fit its contents. Without a box, a proper width is
difficult to calculate because of constraints of the layout engine. In that
case, given a width, it should be possible to shrink the height to fit the
contents. It would also be nice to be able to specify an aspect ratio.
- A
DoModal method to display the window as a modal dialog. This
will be accomplished internally through a captive event loop.
Questions, comments, or concerns about this document should go to netscape.public.mozilla.xpfe
|
|
 |