2022-09-12 09:34:46 +02:00
|
|
|
--- Implements a spacer widget
|
|
|
|
--
|
|
|
|
-- @classmod yui.Spacer
|
|
|
|
-- @copyright 2022, The DoubleFourteen Code Forge
|
|
|
|
-- @author Lorenzo Cogotti, Andrea Pasquini
|
|
|
|
--
|
2022-10-25 13:26:30 +02:00
|
|
|
-- Spacer widget insert a space between two widget.
|
2022-09-12 09:34:46 +02:00
|
|
|
|
2022-08-24 11:18:48 +02:00
|
|
|
local BASE = (...):gsub('spacer$', '')
|
2022-08-15 23:41:17 +02:00
|
|
|
|
2022-08-16 00:23:52 +02:00
|
|
|
local Widget = require(BASE..'widget')
|
2022-08-15 23:41:17 +02:00
|
|
|
|
|
|
|
-- Spacers don't accept focus
|
2022-08-24 11:18:48 +02:00
|
|
|
local Spacer = setmetatable({
|
|
|
|
nofocus = true,
|
2022-10-25 13:26:30 +02:00
|
|
|
__call = function(cls, args) return cls:new(args) end
|
2022-08-24 11:18:48 +02:00
|
|
|
}, Widget)
|
2022-08-15 23:41:17 +02:00
|
|
|
Spacer.__index = Spacer
|
|
|
|
|
|
|
|
|
2022-09-12 09:34:46 +02:00
|
|
|
--- Attributes accepted by the @{Spacer} widget @{yui.Widget.WidgetAttributes|attributes}.
|
|
|
|
--
|
|
|
|
-- @param args @{yui.Widget.WidgetAttributes|Widgetattributes} widget attributes
|
2022-10-25 13:26:30 +02:00
|
|
|
function Spacer:new(args) return setmetatable(args, self) end
|
2022-08-15 23:41:17 +02:00
|
|
|
|
|
|
|
return Spacer
|