22 lines
414 B
Lua
22 lines
414 B
Lua
local BASE = (...):gsub('rows', '')
|
|
|
|
local Layout = require(BASE..'layout')
|
|
|
|
|
|
-- Advance position to next row,
|
|
-- given current position, widget dimensions and padding.
|
|
local function rowadvance(x,y, ww,wh, padding)
|
|
return x, y + wh + padding
|
|
end
|
|
|
|
function Rows(args)
|
|
local self = Layout.new(args)
|
|
|
|
self.advance = rowadvance
|
|
self.prev = 'up'
|
|
self.next = 'down'
|
|
return self
|
|
end
|
|
|
|
return Rows
|