Module: VER::Layout::HorizontalTiling

Extended by:
Tiling
Defined in:
lib/ver/layout.rb

Constant Summary

Constants included from Tiling

Tiling::DEFAULT

Class Method Summary collapse

Methods included from Tiling

apply, apply_hidden, prepare

Class Method Details

.apply_masters(windows, height, step = 1.0 / windows.size) ⇒ Object



156
157
158
159
160
161
# File 'lib/ver/layout.rb', line 156

def apply_masters(windows, height, step = 1.0 / windows.size)
  windows.each_with_index do |window, idx|
    window.place(relx: (step * idx), rely: 0.0,
                 relheight: height, relwidth: step)
  end
end

.apply_stacked(windows, height, step = 1.0 / windows.size) ⇒ Object



163
164
165
166
167
168
# File 'lib/ver/layout.rb', line 163

def apply_stacked(windows, height, step = 1.0 / windows.size)
  windows.each_with_index do |window, idx|
    window.place(relx: (step * idx), rely: 0.5,
                 relheight: height, relwidth: step)
  end
end