Expose padding function
This commit is contained in:
parent
b5137a4477
commit
0af9460410
1 changed files with 10 additions and 9 deletions
19
layout.lua
19
layout.lua
|
@ -177,7 +177,7 @@ local function layout_retained_mode(self, t, constructor, string_argument_to_tab
|
||||||
|
|
||||||
-- finally: return layout with iterator
|
-- finally: return layout with iterator
|
||||||
self:pop()
|
self:pop()
|
||||||
layout.item = function(self, i)
|
layout.cell = function(self, i)
|
||||||
if self ~= layout then -- allow either colon or dot syntax
|
if self ~= layout then -- allow either colon or dot syntax
|
||||||
i = self
|
i = self
|
||||||
end
|
end
|
||||||
|
@ -206,14 +206,15 @@ end
|
||||||
|
|
||||||
local instance = Layout.new()
|
local instance = Layout.new()
|
||||||
return setmetatable({
|
return setmetatable({
|
||||||
new = Layout.new,
|
new = Layout.new,
|
||||||
reset = function(...) return instance:reset(...) end,
|
reset = function(...) return instance:reset(...) end,
|
||||||
push = function(...) return instance:push(...) end,
|
padding = function(...) return instance:padding(...) end,
|
||||||
pop = function(...) return instance:pop(...) end,
|
push = function(...) return instance:push(...) end,
|
||||||
row = function(...) return instance:row(...) end,
|
pop = function(...) return instance:pop(...) end,
|
||||||
col = function(...) return instance:col(...) end,
|
row = function(...) return instance:row(...) end,
|
||||||
rows = function(...) return instance:rows(...) end,
|
col = function(...) return instance:col(...) end,
|
||||||
cols = function(...) return instance:cols(...) end,
|
rows = function(...) return instance:rows(...) end,
|
||||||
|
cols = function(...) return instance:cols(...) end,
|
||||||
}, {__call = function(_,...) return Layout.new(...) end})
|
}, {__call = function(_,...) return Layout.new(...) end})
|
||||||
|
|
||||||
--[[do
|
--[[do
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue