290. Wizard

290.1. Authors

  • Stefan Hundhammer <sh@suse.de>

  • Provides the wizard dialog (common screen for all YaST2 installation

  • modules) and functions to set the contents, to replace and restore

  • special widgets.

290.2. Summary of Module Globals

List of Global Functions

List of Global Variables

    290.3. Global Functions

    290.3.1. AbortAcceptButtonBox

    Returns a button box with buttons "Abort", "Accept"

    Return value

    • term - a widget tree

    290.3.2. AbortApplyFinishButtonBox

    Returns a button box with buttons "Abort", "Apply", "Finish"

    Return value

    • term - a widget tree

    290.3.3. AbortInstallationAcceptButtonBox

    Returns a button box with buttons "Abort Installation", "Accept"

    Return value

    • term - a widget tree

    290.3.4. AcceptDialog

    Returns a standard wizard dialog with buttons "Cancel", "Accept"

    Return value

    • term - describing the dialog.

    290.3.5. AddMenu

    Add Menu

    Function parameters

    • list<map> Menu

    • string title

    • string id

    Return value

    • list<map> - Updated Menu Data

    290.3.6. AddMenuEntry

    Add Menu Entry

    Function parameters

    • list<map> Menu

    • string parent_id

    • string title

    • string id

    Return value

    • list<map> - Updated Menu Data

    290.3.7. AddSubMenu

    Add Sub Menu

    Function parameters

    • list<map> Menu

    • string parent_id

    • string title

    • string id

    Return value

    • list<map> - Updated Menu Data

    290.3.8. AddTreeItem

    Add Tree Item to tree enabled Wizard

    Function parameters

    • list<map> Tree

    • string parent

    • string title

    • string id

    Return value

    • list<map> - Updated Tree Data

    290.3.9. BackAbortInstallationNextButtonBox

    Returns a button box with buttons "Back", "Abort Installation", "Next"

    Return value

    • term - a widget tree

    290.3.10. BackAbortNextButtonBox

    Returns a button box with buttons "Back", "Abort", "Next"

    Return value

    • term - a widget tree

    290.3.11. BackNextButtonBox

    Returns a button box with buttons "Back", "Next"

    Return value

    • term - a widget tree

    290.3.12. CancelAcceptButtonBox

    Returns a button box with buttons "Cancel", "Accept"

    Return value

    • term - a widget tree

    290.3.13. CancelOKButtonBox

    Returns a button box with buttons "Cancel", "OK"

    Return value

    • term - a widget tree

    290.3.14. ClearContents

    Clear the wizard contents.

    Return value

    • void

    290.3.15. ClearTitleIcon

    Clear the wizard 'title' icon, i.e. replace it with nothing

    Return value

    • void

    See also:

    • SetTitleIcon

    290.3.16. CloseDialog

    Close a wizard dialog.

    Return value

    • void

    290.3.17. CreateDialog

    Create and open a typical installation wizard dialog.

    Return value

    • void

    290.3.18. CreateMenu

    Create the menu in the dialog

    Function parameters

    • list<map> Menu

    Return value

    • void

    290.3.19. CreateTree

    Create the tree in the dialog, replaces helpspace with new tree widget

    Function parameters

    • list<map> Tree

    • string title

    Return value

    • void

    290.3.20. CreateTreeDialog

    Create and open a Tree wizard dialog.

    Return value

    • void

    290.3.21. DeleteMenus

    Delete Menu items

    Return value

    • void

    290.3.22. DeleteTreeItems

    Delete Tree items

    Return value

    • void

    290.3.23. DisableAbortButton

    Disable the wizard's "Abort" button.

    Return value

    • void

    See also:

    • EnableAbortButton

    290.3.24. DisableBackButton

    Disable the wizard's "Back" button.

    Return value

    • void

    See also:

    • EnableBackButton

    290.3.25. DisableCancelButton

    Disable the wizard's "Cancel" button.

    Return value

    • void

    See also:

    • EnableCancelButton

    290.3.26. DisableNextButton

    Disable the wizard's "Next" (or "Accept") button.

    Return value

    • void

    See also:

    • EnableNextButton

    290.3.27. EnableAbortButton

    Enable the wizard's "Abort" button.

    Return value

    • void

    See also:

    • DisableAbortButton

    290.3.28. EnableBackButton

    Enable the wizard's "Back" button.

    Return value

    • void

    See also:

    • DisableBackButton

    290.3.29. EnableCancelButton

    Enable the wizard's "Cancel" button.

    Return value

    • void

    See also:

    • DisableCancelButton

    290.3.30. EnableNextButton

    Enable the wizard's "Next" (or "Accept") button.

    Return value

    • void

    See also:

    • DisableNextButton

    290.3.31. GenericDialog

    Create a Generic Dialog

    Function parameters

    • term button_box

    Return value

    • term - term describing the dialog.

    290.3.32. GenericTreeDialog

    Create a Generic Tree Dialog

    Function parameters

    • term button_box

    Return value

    • term - term describing the dialog.

    290.3.33. HideAbortButton

    Hide the Wizard's "Abort" button. Restore it later with RestoreAbortButton():

    Return value

    • void

    See also:

    • RestoreAbortButton

    290.3.34. HideBackButton

    Hide the Wizard's "Back" button. Restore it later with RestoreBackButton():

    Return value

    • void

    See also:

    • RestoreBackButton

    290.3.35. HideNextButton

    Hide the Wizard's "Next" button. Restore it later with RestoreNextButton():

    Return value

    • void

    See also:

    • RestoreNextButton

    290.3.36. HideReleaseNotesButton

    Hide the "Release Notes" button, if there is any

    Return value

    • void

    290.3.37. IsWizardDialog

    Check if the topmost dialog is a wizard dialog (i.e. has a widget with `id(`WizardDialog) )

    Return value

    • boolean - True if topmost dialog is a wizard dialog, false otherwise

    290.3.38. NextBackDialog

    Returns a standard wizard dialog with buttons "Next", "Back", "Abort".

    Return value

    • term - describing the dialog.

    290.3.39. OKDialog

    Returns a standard wizard dialog with buttons "Cancel", "OK"

    Return value

    • term - describing the dialog.

    290.3.40. OpenAbortApplyFinishDialog

    Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".

    Return value

    • void

    290.3.41. OpenAcceptAbortStepsDialog

    Open a dialog with "Accept", "Cancel" that will also accept workflow steps.

    Return value

    • void

    290.3.42. OpenAcceptDialog

    Open a dialog with "Accept", "Cancel" and set the keyboard focus to "Accept".

    Return value

    • void

    290.3.43. OpenAcceptStepsDialog

    Open a dialog with "Accept", "Cancel" that will also accept workflow steps.

    Return value

    • void

    290.3.44. OpenCustomDialog

    Open a wizard dialog with simple layout

    Function parameters

    • term help_space_contents

    • term button_box

    Return value

    • void

    See also:

    • CloseDialog

    290.3.45. OpenDialog

    Open any wizard dialog.

    Function parameters

    • term dialog

    Return value

    • void

    290.3.46. OpenNextBackDialog

    Open a dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".

    Return value

    • void

    290.3.47. OpenNextBackStepsDialog

    Open a dialog with "Back", "Next", "Abort" that will also accept workflow steps.

    Return value

    • void

    290.3.48. OpenOKDialog

    Open a dialog with "OK", "Cancel" and set the keyboard focus to "OK".

    Return value

    • void

    290.3.49. OpenTreeNextBackDialog

    Open a Tree dialog with buttons "Next", "Back", "Abort" and set the keyboard focus to "Next".

    Return value

    • void

    290.3.50. QueryTreeItem

    Query Tree Item

    Return value

    • string - Tree Item

    290.3.51. ReplaceCustomHelp

    Replace the help widget for dialogs opened with Wizard::OpenCustomDialog().

    Function parameters

    • term contents

    Return value

    • void

    290.3.52. ReplaceHelp

    Replace the wizard help subwindow with a custom widget.

    Function parameters

    • term contents

    Return value

    • void

    290.3.53. RestoreAbortButton

    Restore the wizard 'abort' button.

    Return value

    • void

    See also:

    • HideAbortButton

    290.3.54. RestoreBackButton

    Restore the wizard 'back' button.

    Return value

    • void

    See also:

    • HideBackButton

    290.3.55. RestoreHelp

    Restore the wizard help subwindow.

    Function parameters

    • string help_text

    Return value

    • void

    290.3.56. RestoreNextButton

    Restore the wizard 'next' button.

    Return value

    • void

    See also:

    • HideNextButton

    290.3.57. RestoreScreenShotName

    Restore the screenshot name.

    Return value

    • void

    290.3.58. RetranslateButtons

    Retranslate the wizard buttons.

    Return value

    • void

    290.3.59. SelectTreeItem

    Select Tree item

    Function parameters

    • string tree_item

    Return value

    • void

    290.3.60. SetAbortButton

    Set the dialog's "Abort" button with a new label and a new ID

    Function parameters

    • any id

    • string label

    Return value

    • void

    290.3.61. SetBackButton

    Set the dialog's "Back" button with a new label and a new ID

    Function parameters

    • any id

    • string label

    Return value

    • void

    290.3.62. SetContents

    Set the contents of a wizard dialog

    Function parameters

    • string title

    • term contents

    • string help_text

    • boolean has_back

    • boolean has_next

    Return value

    • void

    290.3.63. SetContentsButtons

    Set contents and Buttons of wizard dialog

    Function parameters

    • string title

    • term contents

    • string help_text

    • string back_label

    • string next_label

    Return value

    • void

    290.3.64. SetContentsFocus

    Set the contents of a wizard dialog and define if to move focus to next button

    Function parameters

    • string title

    • term contents

    • string help_text

    • boolean has_back

    • boolean has_next

    • boolean set_focus

    Return value

    • void

    290.3.65. SetDesktopIcon

    Sets the icon specified in a .desktop file got as parameter. Desktop file is placed in a special directory (/usr/share/applications/YaST2). Parameter file is realative to that directory without ".desktop" suffix. Warning: There are no desktop files in inst-sys. Use "SetTitleIcon" instead.

    Function parameters

    • string file

    Return value

    • boolean - true on success

    Example 148. 

    	// Opens /usr/share/applications/YaST2/lan.desktop
    	// Reads "Icon" entry from there
    	// Sets the icon.
    	SetDesktopIcon ("lan")


    290.3.66. SetDesktopTitle

    Sets the window title according to the name specified in a .desktop file got as parameter. Desktop file is placed in a special directory (/usr/share/applications/YaST2). Parameter file is realative to that directory without ".desktop" suffix.

    Function parameters

    • string file

    Return value

    • boolean - true on success

    Example 149. 

    	// Opens /usr/share/applications/YaST2/lan.desktop
    	// Reads (localized) "name" entry from there
    	// Sets the window title.
    	SetDesktopTitle ("lan")


    290.3.67. SetDialogTitle

    Sets the dialog title shown in the window manager's title bar.

    Function parameters

    • string titleText

    Return value

    • void

    Example 150. 

    	SetDialogTitle ("DNS Server Configuration");


    290.3.68. SetFocusToBackButton

    Set the keyboard focus to the wizard's "Back" (or "Cancel") button.

    Return value

    • void

    290.3.69. SetFocusToNextButton

    Set the keyboard focus to the wizard's "Next" (or "Accept") button.

    Return value

    • void

    290.3.70. SetHelpText

    Set a new help text.

    Function parameters

    • string help_text

    Return value

    • void

    Example 151. 

     Wizard::SetHelpText("This is a help Text");


    290.3.71. SetNextButton

    Set the dialog's "Next" button with a new label and a new ID

    Function parameters

    • any id

    • string label

    Return value

    • void

    290.3.72. SetProductName

    Set the product name for UI

    Function parameters

    • string name

    Return value

    • void

    290.3.73. SetScreenShotName

    Set a name for the current dialog:

    Function parameters

    • string name

    Return value

    • void

    See also:

    • RestoreScreenShotName

    290.3.74. SetTitleIcon

    Sets the wizard 'title' icon to the specified icon from the standard icon directory.

    Function parameters

    • string icon_name

    Return value

    • void

    Example 152. 

    	SetTitleIcon ("yast-dns-server");


    See also:

    • ClearTitleIcon

    290.3.75. ShowHelp

    Open a popup dialog that displays a help text (rich text format).

    Function parameters

    • string help_text

    Return value

    • void

    290.3.76. ShowReleaseNotesButton

    Show a "Release Notes" button with the specified label and ID if there is a "steps" panel

    Function parameters

    • string label

    • string id

    Return value

    • void

    290.3.77. TimeoutUserInput

    Substitute for UI::TimeoutUserInput

    Function parameters

    • integer timeout_millisec

    Return value

    • any

    290.3.78. UserInput

    Substitute for UI::UserInput

    Return value

    • any - (maybe normalized) widget ID

    290.3.79. WaitForEvent

    Substitute for UI::WaitForEvent

    Function parameters

    • integer timeout_millisec

    Return value

    • map

    290.4. Global Variables

    290.5. Module Requirements

    290.5.1. Module Imports

    • Directory
    • Label
    • Popup
    • SuSERelease

    290.5.2. Module Includes