A wizard is a dialog which guides the user through a number of tasks (usually input of data), which the user can
accomplish either sequentially or out-of-order. For this, a wizard is comprised of a number of tab pages,
each page representing a single step.
Sequential navigation in a wizard is done via a Next and a Back button. Non-sequential navigation
is done via a roadmap, which is displayed on the left hand side of the wizard dialog, lists all available
steps, and allows jumping to a certain step (where the creator of the wizard can restrict the available steps
depending on the current situation in the wizard, see below).
A sequence of steps in a wizard dialog is called a path. A given wizard can support one or multiple paths,
which are declared at the time of construction of the wizard.
In the simplest case, where the wizard supports only one path, all available steps are displayed in the roadmap,
and the user can simply travel through them as desired.
If the wizard is more complex, and supports multiple paths, things become more complicated. In a given situation
of the wizard, where the user is at step k of the current path, the potential or conflicting
paths are those whose first k steps are the same as in the current path. Obviously, there's at least one
potential path in every situation: the current one. If there is more than one, then the future steps in the dialog
are not finally decided. In such a case, the roadmap will display future steps up to the point where the potential
paths diverge, and then an item
... indicating that the order of steps is undecided.
An XWizardController can declare a certain path as active path by calling the activatePath
method. Usually, this is done depending on user input. For instance, your wizard could have radio buttons on the
first page which effectively decide about which path to take in the wizard.
Single steps in the wizard can be freely enabled and disabled, using the enablePage method.
Disabled pages are skipped during sequential traveling, and not selectable in the roadmap.
The state of the Next button in the dialog will be automatically maintained in most situations,
depending on the results of calls to the XWizardController::canAdvance and XWizardPage::canAdvance
methods. More sophisticated wizard logic, however, will need manual calls to the enableButton method.
Also, the Finish button needs to be maintained by the wizard's controller, too, as it cannot be decided
generically in which situations it should be enabled or disabled.