Class: CWM::DumbTabPager

Inherits:
Pager show all
Defined in:
library/cwm/src/lib/cwm/tabs.rb

Overview

A Pager for the GUI, using the DumbTab widget. Do not instantiate directly, use Tabs.

Instance Attribute Summary

Attributes inherited from Pager

#current_page

Attributes inherited from AbstractWidget

#handle_all_events, #widget_id

Instance Method Summary collapse

Methods inherited from Pager

#handle, #init, #initial_page, #initialize, #page_for_id, #page_order, #replace_point, #store_page, #switch_page

Methods inherited from CustomWidget

#cwm_contents, #cwm_definition, #find_ids, #ids_in_contents

Methods inherited from AbstractWidget

#cleanup, #cwm_definition, #disable, #displayed?, #enable, #enabled?, #focus, #fun_ref, #handle, #help, #init, #label, #my_event?, #opt, #refresh_help, #store, #validate, widget_type=

Constructor Details

This class inherits a constructor from CWM::Pager

Instance Method Details

#contentsObject



33
34
35
36
37
38
39
# File 'library/cwm/src/lib/cwm/tabs.rb', line 33

def contents
  panes = page_order.map do |page_id|
    page = page_for_id(page_id)
    Item(Id(page.widget_id), page.label, page == initial_page)
  end
  DumbTab(Id(widget_id), panes, replace_point)
end

#mark_page(page) ⇒ Object

visually mark currently active tab

Parameters:



29
30
31
# File 'library/cwm/src/lib/cwm/tabs.rb', line 29

def mark_page(page)
  Yast::UI.ChangeWidget(Id(widget_id), :CurrentItem, page.widget_id)
end