libyui
Public Member Functions | Protected Member Functions

YWizard Class Reference

#include <YWizard.h>

Inheritance diagram for YWizard:
YWidget

List of all members.

Public Member Functions

virtual ~YWizard ()
virtual const char * widgetClass () const
YWizardMode wizardMode () const
virtual YPushButtonbackButton () const =0
virtual YPushButtonabortButton () const =0
virtual YPushButtonnextButton () const =0
virtual YReplacePointcontentsReplacePoint () const =0
void protectNextButton (bool protect)
bool nextButtonIsProtected () const
virtual void setButtonLabel (YPushButton *button, const string &newLabel)
virtual void setHelpText (const string &helpText)=0
virtual void setDialogIcon (const string &iconName)=0
virtual void setDialogTitle (const string &titleText)=0
virtual void setDialogHeading (const string &headingText)=0
virtual void addStep (const string &text, const string &id)=0
virtual void addStepHeading (const string &text)=0
virtual void deleteSteps ()=0
virtual void setCurrentStep (const string &id)=0
virtual void updateSteps ()=0
virtual void addTreeItem (const string &parentID, const string &text, const string &id)=0
virtual void selectTreeItem (const string &id)=0
virtual string currentTreeSelection ()=0
virtual void deleteTreeItems ()=0
virtual void addMenu (const string &text, const string &id)=0
virtual void addSubMenu (const string &parentMenuID, const string &text, const string &id)=0
virtual void addMenuEntry (const string &parentMenuID, const string &text, const string &id)=0
virtual void addMenuSeparator (const string &parentMenuID)=0
virtual void deleteMenus ()=0
virtual void showReleaseNotesButton (const string &label, const string &id)=0
virtual void hideReleaseNotesButton ()=0
virtual void retranslateInternalButtons ()=0
void ping ()
virtual YPropertyValue getProperty (const string &propertyName)
virtual const YPropertySetpropertySet ()

Protected Member Functions

 YWizard (YWidget *parent, const string &backButtonLabel, const string &abortButtonLabel, const string &nextButtonLabel, YWizardMode wizardMode=YWizardMode_Standard)

Detailed Description

A wizard is a more complex frame typically used for multi-step workflows:

+------------+------------------------------------------------+ | | | | | | | | | | | | | | | | | | | | | | | | | Side bar | Content Area | | | (YReplacePoint) | | | | | | | | | | | | | | | | | | | | | [Back] [Abort] [Next] | +------------+------------------------------------------------+

The side bar can contain help text, a list of steps that are performed, or an embedded tree (much like the YTree widget).

The client application creates the wizard and replaces the widget in the content area for each step.

The wizard buttons can theoretically be used to do anything, but good UI design will stick to the model above: [Back], [Abort], [Next].

If only two buttons are desired, leave the [Back] button's label emtpy. The remaining two buttons will be rearranged accordingly in the button area.

In the last step of a multi-step workflow, the [Next] button's label is customarily replaced with a label that indicates that this is the last step. [Accept] is recommended for that button label: [Finish] (as sometimes used in other environments) by no means clearly indicates that this is the positive ending, the final "do it" button. Worse, translations of that are often downright miserable: To German, [Finish] gets translated as [Beenden] which is the same word as "Quit" (used in menus). This does not at all tell the user that that button really performs the requested action the multi-step wizard is all about.


Constructor & Destructor Documentation

YWizard::YWizard ( YWidget parent,
const string &  backButtonLabel,
const string &  abortButtonLabel,
const string &  nextButtonLabel,
YWizardMode  wizardMode = YWizardMode_Standard 
) [protected]

Constructor.

If only two buttons are desired, leave 'backButtonLabel' empty.

YWizard::~YWizard ( ) [virtual]

Destructor.


Member Function Documentation

virtual void YWizard::addMenu ( const string &  text,
const string &  id 
) [pure virtual]

Add a menu to the menu bar. If the menu bar is not visible yet, it will be made visible. 'text' is the user-visible text for the menu bar (including keyboard shortcuts marked with '&'), 'id' is the menu ID for later addMenuEntry() etc. calls.

virtual void YWizard::addMenuEntry ( const string &  parentMenuID,
const string &  text,
const string &  id 
) [pure virtual]

Add a menu entry to the menu with ID 'parentMenuID'. 'id' is what will be returned by UI::UserInput() etc. when a user activates this menu entry.

virtual void YWizard::addMenuSeparator ( const string &  parentMenuID) [pure virtual]

Add a menu separator to a menu.

virtual void YWizard::addStep ( const string &  text,
const string &  id 
) [pure virtual]

Add a step for the steps panel on the side bar. This only adds the step to the internal list of steps. The display is only updated upon calling updateSteps().

virtual void YWizard::addStepHeading ( const string &  text) [pure virtual]

Add a step heading for the steps panel on the side bar. This only adds the heading to the internal list of steps. The display is only updated upon calling updateSteps().

virtual void YWizard::addSubMenu ( const string &  parentMenuID,
const string &  text,
const string &  id 
) [pure virtual]

Add a submenu to the menu with ID 'parentMenuID'.

virtual void YWizard::addTreeItem ( const string &  parentID,
const string &  text,
const string &  id 
) [pure virtual]

Add a tree item. If "parentID" is an empty string, it will be a root item. 'text' is the text that will be displayed in the tree, 'id' the ID with which this newly created item can be referenced - and that will be returned when the user clicks on a tree item.

virtual YPushButton* YWizard::backButton ( ) const [pure virtual]

Return the wizard buttons or 0 if there is no such button.

Derived classes are required to implement this.

virtual YReplacePoint* YWizard::contentsReplacePoint ( ) const [pure virtual]

Return the internal contents ReplacePoint.

Derived classes are required to implement this.

virtual string YWizard::currentTreeSelection ( ) [pure virtual]

Returns the current tree selection or an empty string if nothing is selected or there is no tree.

virtual void YWizard::deleteMenus ( ) [pure virtual]

Delete all menus and hide the menu bar.

virtual void YWizard::deleteSteps ( ) [pure virtual]

Delete all steps and step headings from the internal lists. The display is only updated upon calling updateSteps().

virtual void YWizard::deleteTreeItems ( ) [pure virtual]

Delete all tree items.

YPropertyValue YWizard::getProperty ( const string &  propertyName) [virtual]

Get a property. Reimplemented from YWidget.

This method may throw YUIPropertyExceptions.

Reimplemented from YWidget.

virtual void YWizard::hideReleaseNotesButton ( ) [pure virtual]

Hide an existing "Release Notes" button.

bool YWizard::nextButtonIsProtected ( ) const

Check if the wizard's "Next" button is currently protected against disabling.

void YWizard::ping ( )

NOP command to check if a YWizard is running.

const YPropertySet & YWizard::propertySet ( ) [virtual]

Return this class's property set. This also initializes the property upon the first call.

Reimplemented from YWidget.

Reimplemented from YWidget.

void YWizard::protectNextButton ( bool  protect)

Protect the wizard's "Next" button against disabling.

virtual void YWizard::retranslateInternalButtons ( ) [pure virtual]

Retranslate internal buttons that are not accessible from the outside:

  • [Help]
  • [Steps]
  • [Tree]
virtual void YWizard::selectTreeItem ( const string &  id) [pure virtual]

Select the tree item with the specified ID, if such an item exists.

void YWizard::setButtonLabel ( YPushButton button,
const string &  newLabel 
) [virtual]

Set the label of one of the wizard buttons (backButton(), abortButton(), nextButton() ) if that button is non-null.

The default implementation simply calls button->setLabel( newLabel ).

virtual void YWizard::setCurrentStep ( const string &  id) [pure virtual]

Set the current step. This also triggers updateSteps() if necessary.

virtual void YWizard::setDialogHeading ( const string &  headingText) [pure virtual]

Set the dialog heading.

virtual void YWizard::setDialogIcon ( const string &  iconName) [pure virtual]

Set the dialog icon. An empty icon name clears the current icon.

virtual void YWizard::setDialogTitle ( const string &  titleText) [pure virtual]

Set the dialog title shown in the window manager's title bar. An empty string clears the current title.

virtual void YWizard::setHelpText ( const string &  helpText) [pure virtual]

Set the help text.

Reimplemented from YWidget.

virtual void YWizard::showReleaseNotesButton ( const string &  label,
const string &  id 
) [pure virtual]

Show a "Release Notes" button above the "Help" button in the steps panel with the specified label that will return the specified id to UI::UserInput() when clicked.

virtual void YWizard::updateSteps ( ) [pure virtual]

Update the steps display: Reflect the internal steps and heading lists in the layout.

virtual const char* YWizard::widgetClass ( ) const [inline, virtual]

Returns a descriptive name of this widget class for logging, debugging etc.

Reimplemented from YWidget.

YWizardMode YWizard::wizardMode ( ) const

Return the wizard mode (what kind of wizard this is): YWizardMode_Standard, YWizardMode_Steps, YWizardMode_Tree


The documentation for this class was generated from the following files:
 All Classes Functions Variables Enumerations Friends