Class: Tiling::Layout

Inherits:
Object
  • Object
show all
Defined in:
lib/tiling/layout.rb

Overview

Public: Classe de base pour les layouts.

Direct Known Subclasses

HorizontalLayout, VerticalLayout

Instance Method Summary collapse

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_windowObject



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_windowsObject



20
21
22
# File 'lib/tiling/layout.rb', line 20

def lay_remaining_windows
  position_remaining_windows unless @windows.empty?
end