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, #initialize

Methods inherited from CustomWidget

#cwm_definition

Methods inherited from AbstractWidget

#cleanup, #cwm_definition, #disable, #enable, #enabled?, #handle, #help, #init, #label, #opt, #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



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