Class: CWM::PushButtonTabPager
- Inherits:
-
Pager
- Object
- AbstractWidget
- CustomWidget
- Pager
- CWM::PushButtonTabPager
- Defined in:
- library/cwm/src/lib/cwm/tabs.rb
Overview
Instance Attribute Summary
Attributes inherited from Pager
Attributes inherited from AbstractWidget
#handle_all_events, #widget_id
Instance Method Summary collapse
- #contents ⇒ Object
-
#mark_page(page) ⇒ Object
visually mark currently active tab.
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
#contents ⇒ Object
62 63 64 65 66 67 68 |
# File 'library/cwm/src/lib/cwm/tabs.rb', line 62 def contents = page_order.each_with_object(HBox()) do |page, res| page = page_for_id(page) res << PushButton(Id(page.), page.label) end VBox(Left(), Frame("", replace_point)) end |
#mark_page(page) ⇒ Object
visually mark currently active tab
47 48 49 50 51 52 53 54 55 56 57 58 59 60 |
# File 'library/cwm/src/lib/cwm/tabs.rb', line 47 def mark_page(page) if @current_page Yast::UI.ChangeWidget( Id(@current_page.), :Label, @current_page.label ) end Yast::UI.ChangeWidget( Id(page.), :Label, "#{Yast::UI.Glyph(:BulletArrowRight)} #{page.label}" ) end |