yast2 |
Wizard.ycp |
| Wizard dialog |
|
|
|
Provides the wizard dialog (common screen for all YaST2 installation
modules) and functions to set the contents, to replace and restore
special widgets.
Imports
Global Functions
- AbortAcceptButtonBox ()
- AbortApplyFinishButtonBox ()
- AbortInstallationAcceptButtonBox ()
- AcceptDialog ()
- AddMenu (list<map> Menu, string title, string id)
- AddMenuEntry (list<map> Menu, string parent_id, string title, string id)
- AddSubMenu (list<map> Menu, string parent_id, string title, string id)
- AddTreeItem (list<map> Tree, string parent, string title, string id)
- BackAbortInstallationNextButtonBox ()
- BackAbortNextButtonBox ()
- BackNextButtonBox ()
- CancelAcceptButtonBox ()
- ClearContents ()
- ClearTitleIcon ()
- CloseDialog ()
- CreateDialog ()
- CreateMenu (list<map> Menu)
- CreateTree (list<map> Tree, string title)
- CreateTreeDialog ()
- DeleteMenus ()
- DeleteTreeItems ()
- DisableAbortButton ()
- DisableBackButton ()
- DisableCancelButton ()
- DisableNextButton ()
- EnableAbortButton ()
- EnableBackButton ()
- EnableCancelButton ()
- EnableNextButton ()
- GenericDialog (term button_box)
- HideAbortButton ()
- HideBackButton ()
- HideNextButton ()
- HideReleaseNotesButton ()
- IsWizardDialog ()
- NextBackDialog ()
- OpenAbortApplyFinishDialog ()
- OpenAcceptAbortStepsDialog ()
- OpenAcceptDialog ()
- OpenAcceptStepsDialog ()
- OpenCustomDialog (term help_space_contents, term button_box)
- OpenDialog (term dialog)
- OpenNextBackDialog ()
- OpenNextBackStepsDialog ()
- OpenTreeNextBackDialog ()
- QueryTreeItem ()
- ReplaceAbortButton (term contents)
- ReplaceBackButton (term contents)
- ReplaceCustomHelp (term contents)
- ReplaceHelp (term contents)
- ReplaceNextButton (term contents)
- RestoreAbortButton ()
- RestoreBackButton ()
- RestoreHelp (string help_text)
- RestoreNextButton ()
- RestoreScreenShotName ()
- RetranslateButtons ()
- SelectTreeItem (string tree_item)
- SetAbortButton (any id, string label)
- SetBackButton (any id, string label)
- SetContents (string title, term contents, string help_text, boolean has_back, boolean has_next)
- SetContentsButtons (string title, term contents, string help_text, string back_label, string next_label)
- SetDesktopIcon (string file)
- SetFocusToBackButton ()
- SetFocusToNextButton ()
- SetHelpText (string help_text)
- SetNextButton (any id, string label)
- SetProductName (string name)
- SetScreenShotName (string s)
- SetTitleIcon (string icon_name)
- ShowHelp (string help_text)
- ShowReleaseNotesButton (string label, any id)
- UserInput ()
Local Variables
Local Functions
|
|
|
|
global BackAbortNextButtonBox () -> term
|
|
Returns a button box with buttons "Back", "Abort", "Next"
- Return value:
|
global BackAbortInstallationNextButtonBox () -> term
|
|
Returns a button box with buttons "Back", "Abort Installation", "Next"
- Return value:
|
global BackNextButtonBox () -> term
|
|
Returns a button box with buttons "Back", "Next"
- Return value:
|
global CancelAcceptButtonBox () -> term
|
|
Returns a button box with buttons "Cancel", "Accept"
- Return value:
|
global AbortAcceptButtonBox () -> term
|
|
Returns a button box with buttons "Abort", "Accept"
- Return value:
|
global AbortInstallationAcceptButtonBox () -> term
|
|
Returns a button box with buttons "Abort Installation", "Accept"
- Return value:
|
global AbortApplyFinishButtonBox () -> term
|
|
Returns a button box with buttons "Abort", "Apply", "Finish"
- Return value:
|
global GenericDialog (term button_box) -> term
|
|
Create a Generic Dialog
Returns a term describing a generic wizard dialog with a configurable
button box.
- Parameters:
|
button_box |
term that contains a `HBox() with buttons in it |
- Return value:
|
|
term describing the dialog. |
|
global IsWizardDialog () -> boolean
|
|
Check if the topmost dialog is a wizard dialog
(i.e. has a widget with `id(`WizardDialog) )
- Return value:
|
|
True if topmost dialog is a wizard dialog, false otherwise |
|
global ShowHelp (string help_text) -> void
|
|
Open a popup dialog that displays a help text (rich text format).
- Parameters:
|
help_text |
the text to display |
|
global NextBackDialog () -> term
|
|
Returns a standard wizard dialog with buttons "Next", "Back", "Abort".
- Return value:
|
global AcceptDialog () -> term
|
|
Returns a standard wizard dialog with buttons "Cancel", "Accept"
- Return value:
|
global OpenDialog (term dialog) -> void
|
|
Open any wizard dialog.
- Parameters:
|
dialog |
a wizard dialog, e.g. Wizard::GenericDialog() |
|
global OpenNextBackDialog () -> void
|
|
Open a dialog with buttons "Next", "Back", "Abort"
and set the keyboard focus to "Next".
|
global OpenAcceptDialog () -> void
|
|
Open a dialog with "Accept", "Cancel"
and set the keyboard focus to "Accept".
|
global OpenAbortApplyFinishDialog () -> void
|
|
Open a dialog with "Accept", "Cancel"
and set the keyboard focus to "Accept".
|
global OpenAcceptStepsDialog () -> void
|
|
Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
|
global OpenAcceptAbortStepsDialog () -> void
|
|
Open a dialog with "Accept", "Cancel" that will also accept workflow steps.
|
global OpenNextBackStepsDialog () -> void
|
|
Open a dialog with "Back", "Next", "Abort" that will also accept workflow steps.
|
global OpenCustomDialog (term help_space_contents, term button_box) -> void
|
|
Open a wizard dialog with simple layout
no graphics, no steps,
only a help widget buttons (by default "Back", "Abort", "Next").
This is the only type of wizard dialog which still allows replacing
the help space - either already upon opening it or later with
Wizard::ReplaceCustomHelp().
- Parameters:
|
help_space_contents |
Help space contents |
|
button_box |
Buttom Box |
|
global ReplaceCustomHelp (term contents) -> void
|
|
Replace the help widget for dialogs opened with Wizard::OpenCustomDialog().
- Parameters:
|
contents |
Replace custom help with supplied contents |
|
global CloseDialog () -> void
|
|
Close a wizard dialog.
|
global UserInput () -> any
|
|
Substitute for UI::UserInput
This function transparently handles different
variations of the wizard layout. Returns `next if `next or `accept were
clicked, `back if `back or `cancel were clicked. Simply replace
ret = UI::UserInput()
with
ret = Wizard::UserInput()
- Return value:
|
|
(maybe normalized) widget ID |
|
global CreateDialog () -> void
|
|
Create and open a typical installation wizard dialog.
|
global SetContents (string title, term contents, string help_text, boolean has_back, boolean has_next) -> void
|
|
Set the contents of a wizard dialog
How the general framework for the installation wizard should
look like. This function creates and shows a dialog.
- Parameters:
|
title |
Dialog Title |
|
contents |
The Dialog contents |
|
help_text |
Help text |
|
has_back |
Is the Back button enabled? |
|
has_next |
Is the Next button enabled? |
|
global ClearContents () -> void
|
|
Clear the wizard contents.
|
global SetContentsButtons (string title, term contents, string help_text, string back_label, string next_label) -> void
|
|
Set contents and Buttons of wizard dialog
- Parameters:
|
title |
title of window |
|
contents |
contents of dialog |
|
help_text |
help text |
|
back_label |
label of back button |
|
next_label |
label of next button |
|
global ReplaceHelp (term contents) -> void
|
|
This function is deprecated.
Replace the wizard help subwindow with a custom widget.
- Parameters:
|
contents |
Replace Help with contents |
|
global SetHelpText (string help_text) -> void
|
|
Set a new help text.
- Parameters:
- Example:
-
Wizard::SetHelpText("This is a help Text"); |
|
global RestoreHelp (string help_text) -> void
|
|
Restore the wizard help subwindow.
- Parameters:
|
global SetNextButton (any id, string label) -> void
|
|
Set the dialog's "Next" button with a new label and a new ID
- Parameters:
|
id |
Button ID |
|
label |
Button Label |
|
global SetBackButton (any id, string label) -> void
|
|
Set the dialog's "Back" button with a new label and a new ID
- Parameters:
|
id |
Button ID |
|
label |
Button Label |
|
global SetAbortButton (any id, string label) -> void
|
|
Set the dialog's "Abort" button with a new label and a new ID
- Parameters:
|
id |
Button ID |
|
label |
Button Label |
|
global HideNextButton () -> void
|
|
Hide the Wizard's "Next" button.
Restore it later with RestoreNextButton():
|
global HideBackButton () -> void
|
|
Hide the Wizard's "Back" button.
Restore it later with RestoreBackButton():
|
global HideAbortButton () -> void
|
|
Hide the Wizard's "Abort" button.
Restore it later with RestoreAbortButton():
|
global RestoreBackButton () -> void
|
|
Restore the wizard 'back' button.
|
global RestoreNextButton () -> void
|
|
Restore the wizard 'next' button.
|
global RestoreAbortButton () -> void
|
|
Restore the wizard 'abort' button.
|
global ReplaceNextButton (term contents) -> void
|
|
Replace the wizard 'next' button with a custom widget.
THIS FUNCTION IS DEPRECATED!
- Parameters:
|
contents |
a term describing the new contents |
|
global ReplaceBackButton (term contents) -> void
|
|
Replace the wizard 'back' button with a custom widget.
THIS FUNCTION IS DEPRECATED!
- Parameters:
|
contents |
a term describing the new contents |
|
global ReplaceAbortButton (term contents) -> void
|
|
Replace the wizard 'abort' button with a custom widget.
THIS FUNCTION IS DEPRECATED!
- Parameters:
|
contents |
a term describing the new contents |
|
global SetTitleIcon (string icon_name) -> void
|
|
Set the wizard 'title' icon
Set the wizard 'title' icon to the specified icon from the standard icon
directory.
- Parameters:
|
icon_name |
name (without path) of the new icon |
|
global ClearTitleIcon () -> void
|
|
Clear the wizard 'title' icon, i.e. replace it with nothing
|
global SetDesktopIcon (string file) -> boolean
|
|
Set Desktop Icon
- Parameters:
- Return value:
|
local ReplaceButtonBox (term button_box) -> void
|
|
PRIVATE - Replace the entire Wizard button box with a new one.
- Parameters:
|
button_box |
Button Box term |
|
global EnableAbortButton () -> void
|
|
Enable the wizard's "Abort" button.
|
global DisableAbortButton () -> void
|
|
Disable the wizard's "Abort" button.
|
global DisableNextButton () -> void
|
|
Disable the wizard's "Next" (or "Accept") button.
|
global EnableNextButton () -> void
|
|
Enable the wizard's "Next" (or "Accept") button.
|
global DisableBackButton () -> void
|
|
Disable the wizard's "Back" button.
|
global EnableBackButton () -> void
|
|
Enable the wizard's "Back" button.
|
global DisableCancelButton () -> void
|
|
Disable the wizard's "Cancel" button.
|
global EnableCancelButton () -> void
|
|
Enable the wizard's "Cancel" button.
|
global ShowReleaseNotesButton (string label, any id) -> void
|
|
Show a "Release Notes" button with the specified label and ID if there is a "steps" panel
- Parameters:
|
global HideReleaseNotesButton () -> void
|
|
Hide the "Release Notes" button, if there is any
|
global RetranslateButtons () -> void
|
|
Retranslate the wizard buttons.
|
global SetFocusToNextButton () -> void
|
|
Set the keyboard focus to the wizard's "Next" (or "Accept") button.
|
global SetFocusToBackButton () -> void
|
|
Set the keyboard focus to the wizard's "Back" (or "Cancel") button.
|
local screenshot_name -> string
|
|
Currently used screenshot name.
Initially, it must match the UI default, "yast2"
|
local screenshot_name_stack -> list<string>
|
|
Screenshot names overriden by nested SetScreenShotName calls
|
global SetScreenShotName (string s) -> void
|
|
Declare a name for the current dialog
- Parameters:
- See:
-
|
global RestoreScreenShotName () -> void
|
|
Restore the screenshot name.
|
global OpenTreeNextBackDialog () -> void
|
|
Open a Tree dialog with buttons "Next", "Back", "Abort"
and set the keyboard focus to "Next".
|
global CreateTreeDialog () -> void
|
|
Create and open a Tree wizard dialog.
|
global AddTreeItem (list<map> Tree, string parent, string title, string id) -> list<map>
|
|
Add Tree Item to tree enabled Wizard
- Parameters:
|
Tree |
Tree Data |
|
parent |
Parent of this item |
|
title |
Item Title |
|
id |
Item ID |
- Return value:
|
local CreateTreeInternal (list<map> Tree, string parent) -> list
|
|
Create the Tree Items
- Parameters:
|
Tree |
Tree data |
|
parent |
Parent of current Item |
- Return value:
|
global QueryTreeItem () -> string
|
|
Query Tree Item
- Return value:
|
global CreateTree (list<map> Tree, string title) -> void
|
|
Create the tree in the dialog, replaces helpspace with new tree widget
- Parameters:
|
Tree |
Tree data |
|
title |
Tree title |
|
global SelectTreeItem (string tree_item) -> void
|
|
Select Tree item
- Parameters:
|
global DeleteTreeItems () -> void
|
|
Delete Tree items
|
global DeleteMenus () -> void
|
|
Delete Menu items
|
global AddMenu (list<map> Menu, string title, string id) -> list<map>
|
|
Add Menu
- Parameters:
|
Menu |
Menu data |
|
title |
Menu Title |
|
id |
Menu ID |
- Return value:
|
global AddSubMenu (list<map> Menu, string parent_id, string title, string id) -> list<map>
|
|
Add Sub Menu
- Parameters:
|
Menu |
Menu data |
|
parent_id |
Menu Parent |
|
title |
Menu Title |
|
id |
Menu ID |
- Return value:
|
global AddMenuEntry (list<map> Menu, string parent_id, string title, string id) -> list<map>
|
|
Add Menu Entry
- Parameters:
|
Menu |
Menu data |
|
parent_id |
Menu Parent |
|
title |
Menu Title |
|
id |
Menu ID |
- Return value:
|
local CreateMenuInternal (list<map> Menu, string parent) -> list
|
|
Create the Menu Items
- Parameters:
|
Menu |
Menu data |
|
parent |
Menu Parent |
- Return value:
|
global CreateMenu (list<map> Menu) -> void
|
|
Create the menu in the dialog
- Parameters:
|
global SetProductName (string name) -> void
|
|
Set the product name for UI
- Parameters:
|