Class: Tiling::Layout
- Inherits:
-
Object
- Object
- Tiling::Layout
- Defined in:
- lib/tiling/layout.rb
Overview
Public: Classe de base pour les layouts.
Direct Known Subclasses
Instance Method Summary collapse
-
#initialize(workspace, windows) ⇒ Layout
constructor
A new instance of Layout.
- #lay_master_window ⇒ Object
- #lay_remaining_windows ⇒ Object
Constructor Details
#initialize(workspace, windows) ⇒ Layout
Returns a new instance of Layout.
8 9 10 11 12 |
# File 'lib/tiling/layout.rb', line 8 def initialize workspace, windows @workspace = workspace @windows = windows @master = windows.master end |
Instance Method Details
#lay_master_window ⇒ Object
14 15 16 17 18 |
# File 'lib/tiling/layout.rb', line 14 def lay_master_window calculate_master Mover.move @master[:id], @workspace.x, @workspace.y, @master[:width], @master[:height] end |
#lay_remaining_windows ⇒ Object
20 21 22 |
# File 'lib/tiling/layout.rb', line 20 def lay_remaining_windows position_remaining_windows unless @windows.empty? end |