libyui
 
Loading...
Searching...
No Matches
YWizard Class Referenceabstract

#include <YWizard.h>

Inheritance diagram for YWizard:
Collaboration diagram for YWizard:

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 std::string &newLabel)
 
virtual void setHelpText (const std::string &helpText)=0
 
virtual void setDialogIcon (const std::string &iconName)=0
 
virtual void setDialogTitle (const std::string &titleText)=0
 
virtual std::string getDialogTitle ()=0
 
virtual void setDialogHeading (const std::string &headingText)=0
 
virtual std::string getDialogHeading ()=0
 
virtual void addStep (const std::string &text, const std::string &id)=0
 
virtual void addStepHeading (const std::string &text)=0
 
virtual void deleteSteps ()=0
 
virtual void setCurrentStep (const std::string &id)=0
 
virtual void updateSteps ()=0
 
virtual void addTreeItem (const std::string &parentID, const std::string &text, const std::string &id)=0
 
virtual void selectTreeItem (const std::string &id)=0
 
virtual std::string currentTreeSelection ()=0
 
virtual void deleteTreeItems ()=0
 
virtual void addMenu (const std::string &text, const std::string &id)=0
 
virtual void addSubMenu (const std::string &parentMenuID, const std::string &text, const std::string &id)=0
 
virtual void addMenuEntry (const std::string &parentMenuID, const std::string &text, const std::string &id)=0
 
virtual void addMenuSeparator (const std::string &parentMenuID)=0
 
virtual void deleteMenus ()=0
 
virtual void showReleaseNotesButton (const std::string &label, const std::string &id)=0
 
virtual void hideReleaseNotesButton ()=0
 
virtual void retranslateInternalButtons ()=0
 
void ping ()
 
virtual YPropertyValue getProperty (const std::string &propertyName)
 
virtual const YPropertySetpropertySet ()
 
- Public Member Functions inherited from YWidget
virtual ~YWidget ()
 
virtual std::string debugLabel () const
 
std::string helpText () const
 
void setHelpText (const std::string &helpText)
 
virtual bool setProperty (const std::string &propertyName, const YPropertyValue &val)
 
bool hasChildren () const
 
YWidgetfirstChild () const
 
YWidgetlastChild () const
 
YWidgetListIterator childrenBegin () const
 
YWidgetListIterator childrenEnd () const
 
YWidgetListConstIterator childrenConstBegin () const
 
YWidgetListConstIterator childrenConstEnd () const
 
YWidgetListIterator begin ()
 
YWidgetListIterator end ()
 
int childrenCount () const
 
bool contains (YWidget *child) const
 
virtual void addChild (YWidget *child)
 
virtual void removeChild (YWidget *child)
 
void deleteChildren ()
 
YWidgetparent () const
 
bool hasParent () const
 
void setParent (YWidget *newParent)
 
YDialogfindDialog ()
 
YWidgetfindWidget (YWidgetID *id, bool doThrow=true) const
 
virtual int preferredWidth ()=0
 
virtual int preferredHeight ()=0
 
virtual int preferredSize (YUIDimension dim)
 
virtual void setSize (int newWidth, int newHeight)=0
 
bool isValid () const
 
bool beingDestroyed () const
 
void * widgetRep () const
 
void setWidgetRep (void *toolkitWidgetRep)
 
bool hasId () const
 
YWidgetIDid () const
 
void setId (YWidgetID *newId_disown)
 
virtual void setEnabled (bool enabled=true)
 
void setDisabled ()
 
virtual bool isEnabled () const
 
virtual bool stretchable (YUIDimension dim) const
 
void setStretchable (YUIDimension dim, bool newStretch)
 
void setDefaultStretchable (YUIDimension dim, bool newStretch)
 
virtual int weight (YUIDimension dim)
 
bool hasWeight (YUIDimension dim)
 
void setWeight (YUIDimension dim, int weight)
 
void setNotify (bool notify=true)
 
bool notify () const
 
void setNotifyContextMenu (bool notifyContextMenu=true)
 
bool notifyContextMenu () const
 
bool sendKeyEvents () const
 
void setSendKeyEvents (bool doSend)
 
bool autoShortcut () const
 
void setAutoShortcut (bool _newAutoShortcut)
 
int functionKey () const
 
bool hasFunctionKey () const
 
virtual void setFunctionKey (int fkey_no)
 
virtual bool setKeyboardFocus ()
 
virtual std::string shortcutString () const
 
virtual void setShortcutString (const std::string &str)
 
virtual const char * userInputProperty ()
 
void dumpWidgetTree (int indentationLevel=0)
 
void dumpDialogWidgetTree ()
 
void setChildrenEnabled (bool enabled)
 
virtual void saveUserInput (YMacroRecorder *macroRecorder)
 
void * operator new (size_t size)
 
void operator delete (void *ptr) noexcept
 
virtual void startMultipleChanges ()
 
virtual void doneMultipleChanges ()
 

Protected Member Functions

 YWizard (YWidget *parent, const std::string &backButtonLabel, const std::string &abortButtonLabel, const std::string &nextButtonLabel, YWizardMode wizardMode=YWizardMode_Standard)
 
- Protected Member Functions inherited from YWidget
 YWidget (YWidget *parent)
 
YWidgetChildrenManagerchildrenManager () const
 
void setChildrenManager (YWidgetChildrenManager *manager)
 
void setBeingDestroyed ()
 
void dumpWidget (YWidget *w, int indentationLevel)
 

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::YWizard ( YWidget * parent,
const std::string & backButtonLabel,
const std::string & abortButtonLabel,
const std::string & nextButtonLabel,
YWizardMode wizardMode = YWizardMode_Standard )
protected

Constructor.

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

◆ ~YWizard()

YWizard::~YWizard ( )
virtual

Destructor.

Member Function Documentation

◆ addMenu()

virtual void YWizard::addMenu ( const std::string & text,
const std::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.

◆ addMenuEntry()

virtual void YWizard::addMenuEntry ( const std::string & parentMenuID,
const std::string & text,
const std::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.

◆ addMenuSeparator()

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

Add a menu separator to a menu.

◆ addStep()

virtual void YWizard::addStep ( const std::string & text,
const std::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().

◆ addStepHeading()

virtual void YWizard::addStepHeading ( const std::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().

◆ addSubMenu()

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

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

◆ addTreeItem()

virtual void YWizard::addTreeItem ( const std::string & parentID,
const std::string & text,
const std::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.

◆ backButton()

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.

◆ contentsReplacePoint()

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

Return the internal contents ReplacePoint.

Derived classes are required to implement this.

◆ currentTreeSelection()

virtual std::string YWizard::currentTreeSelection ( )
pure virtual

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

◆ deleteMenus()

virtual void YWizard::deleteMenus ( )
pure virtual

Delete all menus and hide the menu bar.

◆ deleteSteps()

virtual void YWizard::deleteSteps ( )
pure virtual

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

◆ deleteTreeItems()

virtual void YWizard::deleteTreeItems ( )
pure virtual

Delete all tree items.

◆ getDialogHeading()

virtual std::string YWizard::getDialogHeading ( )
pure virtual

Get the dialog heading.

◆ getDialogTitle()

virtual std::string YWizard::getDialogTitle ( )
pure virtual

Get the current dialog title shown in the window manager's title bar.

◆ getProperty()

YPropertyValue YWizard::getProperty ( const std::string & propertyName)
virtual

Get a property. Reimplemented from YWidget.

This method may throw YUIPropertyExceptions.

Reimplemented from YWidget.

◆ hideReleaseNotesButton()

virtual void YWizard::hideReleaseNotesButton ( )
pure virtual

Hide an existing "Release Notes" button.

◆ nextButtonIsProtected()

bool YWizard::nextButtonIsProtected ( ) const

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

◆ ping()

void YWizard::ping ( )

NOP command to check if a YWizard is running.

◆ propertySet()

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.

◆ protectNextButton()

void YWizard::protectNextButton ( bool protect)

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

◆ retranslateInternalButtons()

virtual void YWizard::retranslateInternalButtons ( )
pure virtual

Retranslate internal buttons that are not accessible from the outside:

  • [Help]
  • [Steps]
  • [Tree]

◆ selectTreeItem()

virtual void YWizard::selectTreeItem ( const std::string & id)
pure virtual

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

◆ setButtonLabel()

void YWizard::setButtonLabel ( YPushButton * button,
const std::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 ).

◆ setCurrentStep()

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

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

◆ setDialogHeading()

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

Set the dialog heading.

◆ setDialogIcon()

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

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

◆ setDialogTitle()

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

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

◆ setHelpText()

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

Set the help text.

◆ showReleaseNotesButton()

virtual void YWizard::showReleaseNotesButton ( const std::string & label,
const std::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.

◆ updateSteps()

virtual void YWizard::updateSteps ( )
pure virtual

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

◆ widgetClass()

virtual const char * YWizard::widgetClass ( ) const
inlinevirtual

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

Reimplemented from YWidget.

◆ wizardMode()

YWizardMode YWizard::wizardMode ( ) const

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


The documentation for this class was generated from the following files: