Class: UI::HorizontalContainer
- Inherits:
-
GenericContainer
- Object
- Widget
- GenericContainer
- UI::HorizontalContainer
- Defined in:
- lib/ektoplayer/ui/widgets/container.rb
Instance Attribute Summary
Attributes inherited from GenericContainer
#selected, #selected_index, #widgets
Attributes inherited from Widget
Instance Method Summary collapse
Methods inherited from GenericContainer
#add, #draw, #initialize, #mouse_click, #on_key_press, #refresh, #remove, #select_next, #select_prev, #visible_widgets, #win
Methods inherited from Widget
#display, #draw, #events, #initialize, #invisible!, #invisible?, #key_press, #keys, #lock, #mouse, #mouse_click, #mouse_event_transform, #mouse_section, #on_key_press, #on_widget_raise, #raise_widget, #refresh, #sub, #unlock, #visible!, #visible=, #visible?, #want_layout, #want_redraw, #want_refresh, #with_lock
Constructor Details
This class inherits a constructor from UI::GenericContainer
Instance Method Details
#layout ⇒ Object
96 97 98 99 100 101 102 103 104 105 106 107 108 109 |
# File 'lib/ektoplayer/ui/widgets/container.rb', line 96 def layout xoff = 0 .each do || .with_lock do fail WidgetSizeError if xoff + .size.width > @size.width .size=(.size.update(height: @size.height)) .pos=(@pos.calc(x: xoff)) fail WidgetSizeError if .size.height > @size.height xoff += (.size.width + (@pad or 0)) end end super end |