This commit is contained in:
nobody
2015-12-15 19:48:16 -05:00
parent ed4e8b562a
commit 75ff950ff1
18 changed files with 99 additions and 49 deletions

View File

@@ -165,7 +165,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -402,7 +402,7 @@ found, and focuses that widget.
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -172,10 +172,6 @@
<td class="name" nowrap><a href="#Widget.pressed">Widget.pressed</a></td>
<td class="summary">Whether the pointer was pressed on this widget and not yet released.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Widget.items">Widget.items</a></td>
<td class="summary">Used by some widgets to store unseen children.</td>
</tr>
</table>
<h2><a href="#Internal_Properties">Internal Properties </a></h2>
<table class="function_list">
@@ -752,20 +748,6 @@ the <code>Input</code> class, and should generally be treated as read-only.
</dd>
<dt>
<a name = "Widget.items"></a>
<strong>Widget.items</strong>
</dt>
<dd>
Used by some widgets to store unseen children.
</dd>
</dl>
<h2 class="section-header has-description"><a name="Internal_Properties"></a>Internal Properties </h2>
@@ -900,7 +882,7 @@ This table is identical to the constructed widget.
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -136,7 +136,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -755,7 +755,7 @@ child widgets appear.
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -99,7 +99,7 @@ layout:show()
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -83,7 +83,7 @@ standard themes, the widget's value should be indicated in some other way.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -79,7 +79,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -79,7 +79,7 @@ not be explicitly created.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -78,7 +78,7 @@ between 0 and 1 (inclusive) to change the width of the bar.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -119,7 +119,7 @@ in the same group change to <code>false</code>.
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -98,7 +98,7 @@ layout:show()
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -78,7 +78,7 @@ number between 0 and 1, inclusive.</p>
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -96,7 +96,7 @@ layout:show()
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -30,6 +30,10 @@
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Contents</h2>
<ul>
<li><a href="#Special_Attributes">Special Attributes </a></li>
</ul>
<h2>Widgets</h2>
@@ -64,24 +68,71 @@
<h1>Widget <code>stepper</code></h1>
<p>A stepper.</p>
<p>This widget is composed of two buttons and a content area.
Upon creation, this widget's children are moved into an
<code>items</code> property. The items are displayed one at a time in
Upon creation, this widget's children are moved into the
<a href="../widgets/stepper.html#items">items</a> 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.</p>
<h2><a href="#Special_Attributes">Special Attributes </a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#items">items</a></td>
<td class="summary">Content items.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#index">index</a></td>
<td class="summary">Child item index.</td>
</tr>
</table>
<br/>
<br/>
<h2 class="section-header "><a name="Special_Attributes"></a>Special Attributes </h2>
<dl class="function">
<dt>
<a name = "items"></a>
<strong>items</strong>
</dt>
<dd>
Content items. </p>
<p>Contains an array of child widgets to be displayed.
</dd>
<dt>
<a name = "index"></a>
<strong>index</strong>
</dt>
<dd>
Child item index. </p>
<p>Contains the index in <a href="../widgets/stepper.html#items">items</a> of the item being displayed.
</dd>
</dl>
</div> <!-- id="content" -->
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -112,7 +112,7 @@
</div> <!-- id="main" -->
<div id="about">
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
<i style="float:right;">Last updated 2015-12-15 13:53:58 </i>
<i style="float:right;">Last updated 2015-12-15 19:13:36 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -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

View File

@@ -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