sphinx / Doc-26 / maclib / macui.rst

:mod:`EasyDialogs` --- Basic Macintosh dialogs

The :mod:`EasyDialogs` module contains some simple dialogs for the Macintosh. All routines take an optional resource ID parameter id with which one can override the :const:`DLOG` resource used for the dialog, provided that the dialog items correspond (both type and item number) to those in the default :const:`DLOG` resource. See source code for details.

The :mod:`EasyDialogs` module defines the following functions:

ProgressBar Objects

:class:`ProgressBar` objects provide support for modeless progress-bar dialogs. Both determinate (thermometer style) and indeterminate (barber-pole style) progress bars are supported. The bar will be determinate if its maximum value is greater than zero; otherwise it will be indeterminate.

The dialog is displayed immediately after creation. If the dialog's "Cancel" button is pressed, or if :kbd:`Cmd-.` or :kbd:`ESC` is typed, the dialog window is hidden and :exc:`KeyboardInterrupt` is raised (but note that this response does not occur until the progress bar is next updated, typically via a call to :meth:`inc` or :meth:`set`). Otherwise, the bar remains visible until the :class:`ProgressBar` object is discarded.

:class:`ProgressBar` objects possess the following attributes and methods: