Method: Yast::DialogTreeClass#DrawScreen

Defined in:
library/cwm/src/modules/DialogTree.rb

#DrawScreen(current_screen, widget_descr, extra_widget, set_focus) ⇒ Object

Draw the screen related to the particular tree item extra_widget a map of the additional widget to be added at the end of the list of widgets

Parameters:

  • current_screen (Hash{String => Object})

    a map describing the current screen

  • widget_descr (Hash <String, Hash{String => Object>})

    a map describing all widgets that may be present in the screen

Returns:

  • a list of preprocessed widgets that appear in this dialog



118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
# File 'library/cwm/src/modules/DialogTree.rb', line 118

def DrawScreen(current_screen, widget_descr, extra_widget, set_focus)
  current_screen = deep_copy(current_screen)
  widget_descr = deep_copy(widget_descr)
  extra_widget = deep_copy(extra_widget)
  widget_names = Ops.get_list(current_screen, "widget_names", [])
  contents = Ops.get_term(current_screen, "contents", VBox())
  caption = Ops.get_string(current_screen, "caption", "")

  w = CWM.CreateWidgets(widget_names, widget_descr)
  help = CWM.MergeHelps(w)
  contents = CWM.PrepareDialog(contents, w)
  Wizard.SetContentsFocus(caption, contents, help, true, true, set_focus)

  # add virtual widget
  w = Builtins.add(w, extra_widget)

  # return widgets of the dialog for further usage
  deep_copy(w)
end