mirror of
https://github.com/airstruck/luigi.git
synced 2026-01-10 16:28:23 +00:00
minor
This commit is contained in:
@@ -49,13 +49,6 @@ the `Input` class, and should generally be treated as read-only.
|
||||
--]]--
|
||||
Widget.pressed = false
|
||||
|
||||
--[[--
|
||||
Used by some widgets to store unseen children.
|
||||
--]]--
|
||||
Widget.items = false
|
||||
-- TODO: make this a custom attribute, or
|
||||
-- maybe add a `visibile` attribute instead
|
||||
|
||||
--[[--
|
||||
Internal Properties
|
||||
|
||||
@@ -135,10 +128,6 @@ function Widget.register (name, decorator)
|
||||
Widget.typeDecorators[name] = decorator
|
||||
end
|
||||
|
||||
local function maybeCall (something, ...)
|
||||
return something
|
||||
end
|
||||
|
||||
-- look for properties in attributes, Widget, style, and theme
|
||||
local function metaIndex (self, property)
|
||||
-- look in widget's own attributes
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
A stepper.
|
||||
|
||||
This widget is composed of two buttons and a content area.
|
||||
Upon creation, this widget's children are moved into an
|
||||
`items` property. The items are displayed one at a time in
|
||||
Upon creation, this widget's children are moved into the
|
||||
`items` attribute. The items are displayed one at a time in
|
||||
the content area. Pressing the buttons cycles through the
|
||||
item displayed in the content area.
|
||||
|
||||
@@ -11,6 +11,34 @@ item displayed in the content area.
|
||||
--]]--
|
||||
|
||||
return function (self)
|
||||
|
||||
--[[--
|
||||
Special Attributes
|
||||
|
||||
@section special
|
||||
--]]--
|
||||
|
||||
--[[--
|
||||
Content items.
|
||||
|
||||
Contains an array of child widgets to be displayed.
|
||||
|
||||
@attrib items
|
||||
--]]--
|
||||
self:defineAttribute('items', {})
|
||||
|
||||
--[[--
|
||||
Child item index.
|
||||
|
||||
Contains the index in `items` of the item being displayed.
|
||||
|
||||
@attrib index
|
||||
--]]--
|
||||
self:defineAttribute('index', {})
|
||||
--[[--
|
||||
@section end
|
||||
--]]--
|
||||
|
||||
self.items = {}
|
||||
self.index = 1
|
||||
self.flow = 'x' -- TODO: support vertical stepper
|
||||
|
||||
Reference in New Issue
Block a user