simplify style system

This commit is contained in:
airstruck
2015-12-07 04:22:36 -05:00
parent 367535ad33
commit 69703fdce0
41 changed files with 2227 additions and 292 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-06 11:22:48 </i>
<i style="float:right;">Last updated 2015-12-07 03:00:19 </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-06 11:22:48 </i>
<i style="float:right;">Last updated 2015-12-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -621,7 +621,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-06 11:22:48 </i>
<i style="float:right;">Last updated 2015-12-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -66,7 +66,7 @@
<table class="module_list">
<tr>
<td class="name" nowrap><a href="widgets/button.html">button</a></td>
<td class="summary">A simple button.</td>
<td class="summary">A button.</td>
</tr>
<tr>
<td class="name" nowrap><a href="widgets/check.html">check</a></td>
@@ -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-06 11:22:48 </i>
<i style="float:right;">Last updated 2015-12-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -741,7 +741,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-06 11:22:48 </i>
<i style="float:right;">Last updated 2015-12-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget types/button.html">button</a></li>
<li><a href="../widget types/check.html">check</a></li>
<li><a href="../widget types/menu.html">menu</a></li>
<li><a href="../widget types/menu.item.html">menu.item</a></li>
<li><a href="../widget types/progress.html">progress</a></li>
<li><a href="../widget types/radio.html">radio</a></li>
<li><a href="../widget types/sash.html">sash</a></li>
<li><a href="../widget types/slider.html">slider</a></li>
<li><strong>status</strong></li>
<li><a href="../widget types/stepper.html">stepper</a></li>
<li><a href="../widget types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>status</code></h1>
<p>A status bar.</p>
<p>
</p>
<br/>
<br/>
</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-05 16:15:11 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><strong>button</strong></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>button</code></h1>
<p>A simple button.</p>
<p>
</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><strong>check</strong></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>check</code></h1>
<p>A check box.</p>
<p>
</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><strong>menu</strong></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>menu</code></h1>
<p>A menu bar.</p>
<p>
</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><strong>menu.item</strong></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>menu.item</code></h1>
<p>A menu item.</p>
<p>When a <a href="../widget_types/menu.html#">menu</a> is created, any sub-items not having a specified type
are automatically given a type of <code>&apos;menu.item&apos;</code>. These widgets should
not be explicitly created.</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,85 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><strong>progress</strong></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>progress</code></h1>
<p>A progress bar.</p>
<p>Set the widget's <code>value</code> property to a decimal value
between 0 and 1 (inclusive) to change the width of the bar.</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><strong>radio</strong></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>radio</code></h1>
<p>A radio button.</p>
<p>
</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,90 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><strong>sash</strong></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>sash</code></h1>
<p>A sash.</p>
<p>Dragging this widget resizes the widgets adjacent to it.
A sash must be adjacent to a widget with a specified size
in the same direction as the parent element's <code>flow</code>.</p>
<p>For example, if the parent of the sash is <code>flow = &apos;x&apos;</code>
then either or both of the siblings next to the sash
must have a specified <code>width</code> property.</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,85 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><strong>slider</strong></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>slider</code></h1>
<p>A slider.</p>
<p>Dragging this widget changes its <code>value</code> property to a
number between 0 and 1, inclusive.</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><strong>status</strong></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>status</code></h1>
<p>A status bar.</p>
<p>
</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,88 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><strong>stepper</strong></li>
<li><a href="../widget_types/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<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
the content area. Pressing the buttons cycles through the
item displayed in the content area.</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widget_Types</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widget_types/button.html">button</a></li>
<li><a href="../widget_types/check.html">check</a></li>
<li><a href="../widget_types/menu.html">menu</a></li>
<li><a href="../widget_types/menu.item.html">menu.item</a></li>
<li><a href="../widget_types/progress.html">progress</a></li>
<li><a href="../widget_types/radio.html">radio</a></li>
<li><a href="../widget_types/sash.html">sash</a></li>
<li><a href="../widget_types/slider.html">slider</a></li>
<li><a href="../widget_types/status.html">status</a></li>
<li><a href="../widget_types/stepper.html">stepper</a></li>
<li><strong>text</strong></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>text</code></h1>
<p>A text entry area.</p>
<p>
</p>
<br/>
<br/>
</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-05 16:16:13 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

106
doc/widgets/button.html Normal file
View File

@@ -0,0 +1,106 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><strong>button</strong></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>button</code></h1>
<p>A button.</p>
<p>Buttons have no special behavior beyond that of generic widgets,
but themes should give buttons an appropriate appearance.</p>
<h3>Usage:</h3>
<ul>
<pre class="example">
-- create a layout containing only a button
local layout = Layout {
type = &apos;button&apos;,
id = &apos;exampleButton&apos;,
text = &apos;Press me&apos;,
width = 100,
height = 32,
}
-- handle Press events
layout.exampleButton:onPress(function (event)
print &apos;You pressed the button.&apos;
end)
-- show the layout
layout:show()
</pre>
</ul>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

90
doc/widgets/check.html Normal file
View File

@@ -0,0 +1,90 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><strong>check</strong></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>check</code></h1>
<p>A check box.</p>
<p>Check boxes toggle their <a href="../modules/attribute.html#value">value</a> attribute between
<code>true</code> and <code>false</code> when pressed.</p>
<p>Changing the value of a check box causes it to change its appearance to
indicate its value. The standard themes use the <a href="../modules/attribute.html#icon">icon</a>
attribute for this purpose. If a custom icon is provided when using the
standard themes, the widget's value should be indicated in some other way.</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

86
doc/widgets/menu.html Normal file
View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><strong>menu</strong></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>menu</code></h1>
<p>A menu bar.</p>
<p>
</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><strong>menu.item</strong></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>menu.item</code></h1>
<p>A menu item.</p>
<p>When a <a href="../widgets/menu.html#">menu</a> is created, any sub-items not having a specified type
are automatically given a type of <code>&apos;menu.item&apos;</code>. These widgets should
not be explicitly created.</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

85
doc/widgets/progress.html Normal file
View File

@@ -0,0 +1,85 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><strong>progress</strong></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>progress</code></h1>
<p>A progress bar.</p>
<p>Set the widget's <code>value</code> property to a decimal value
between 0 and 1 (inclusive) to change the width of the bar.</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

93
doc/widgets/radio.html Normal file
View File

@@ -0,0 +1,93 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><strong>radio</strong></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>radio</code></h1>
<p>A radio button.</p>
<p>Radio buttons change their <a href="../modules/attribute.html#value">value</a> attribute to
<code>true</code> when pressed. Radio buttons should also have a <code>group</code>
attribute. When a radio button is pressed, other radio buttons
in the same layout with the same <code>group</code> attribute change their values
to <code>false</code>.</p>
<p>Changing the value of a radio button causes it to change its appearance to
indicate its value. The standard themes use the <a href="../modules/attribute.html#icon">icon</a>
attribute for this purpose. If a custom icon is provided when using the
standard themes, the widget's value should be indicated in some other way.</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

105
doc/widgets/sash.html Normal file
View File

@@ -0,0 +1,105 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><strong>sash</strong></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>sash</code></h1>
<p>A sash.</p>
<p>Dragging this widget resizes the widgets adjacent to it.
A sash should be adjacent to a widget with a specified size
in the same direction as the parent element's <a href="../modules/attribute.html#flow">flow</a>.</p>
<p>For example, if the parent of the sash is <code>flow = &apos;x&apos;</code>
then either or both of the siblings adjacent to the sash
should have a specified <a href="../modules/attribute.html#width">width</a> attribute.</p>
<h3>Usage:</h3>
<ul>
<pre class="example">
-- create a layout containing two widgets separated by a sash
local layout = Layout {
type = &apos;panel&apos;, flow = &apos;x&apos;,
{ text = &apos;This is the left side&apos;, wrap = true, width = 100 },
{ type = &apos;sash&apos; },
{ text = &apos;This is the right side&apos;, wrap = true },
}
-- show the layout
layout:show()
</pre>
</ul>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

85
doc/widgets/slider.html Normal file
View File

@@ -0,0 +1,85 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><strong>slider</strong></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>slider</code></h1>
<p>A slider.</p>
<p>Dragging this widget changes its <code>value</code> property to a
number between 0 and 1, inclusive.</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

103
doc/widgets/status.html Normal file
View File

@@ -0,0 +1,103 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><strong>status</strong></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>status</code></h1>
<p>A status bar.</p>
<p>This widget will display the <a href="../modules/attribute.html#status">status</a> attribute of the
hovered widget. Only one status widget should exist per layout. If multiple
status widgets exist in the same layout, only the last one created will
display status messages.</p>
<h3>Usage:</h3>
<ul>
<pre class="example">
-- create a layout containing some buttons and a status bar
local layout = Layout {
{ type = &apos;panel&apos;, flow = &apos;x&apos;,
{ text = &apos;Do stuff&apos;, status = &apos;Press to do stuff&apos; },
{ text = &apos;Quit&apos;, status = &apos;Press to quit&apos; },
},
{ type = &apos;status&apos;, height = 24 },
}
-- show the layout
layout:show()
</pre>
</ul>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

88
doc/widgets/stepper.html Normal file
View File

@@ -0,0 +1,88 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><strong>stepper</strong></li>
<li><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<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
the content area. Pressing the buttons cycles through the
item displayed in the content area.</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

86
doc/widgets/text.html Normal file
View File

@@ -0,0 +1,86 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"/>
<head>
<title>Reference</title>
<link rel="stylesheet" href="../ldoc.css" type="text/css" />
</head>
<body>
<div id="container">
<div id="product">
<div id="product_logo"></div>
<div id="product_name"><big><b></b></big></div>
<div id="product_description"></div>
</div> <!-- id="product" -->
<div id="main">
<!-- Menu -->
<div id="navigation">
<br/>
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../widgets/button.html">button</a></li>
<li><a href="../widgets/check.html">check</a></li>
<li><a href="../widgets/menu.html">menu</a></li>
<li><a href="../widgets/menu.item.html">menu.item</a></li>
<li><a href="../widgets/progress.html">progress</a></li>
<li><a href="../widgets/radio.html">radio</a></li>
<li><a href="../widgets/sash.html">sash</a></li>
<li><a href="../widgets/slider.html">slider</a></li>
<li><a href="../widgets/status.html">status</a></li>
<li><a href="../widgets/stepper.html">stepper</a></li>
<li><strong>text</strong></li>
</ul>
<h2>Modules</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="$(kind=='Topics' and '' or 'nowrap'">
<li><a href="../classes/Event.html">Event</a></li>
<li><a href="../classes/Layout.html">Layout</a></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<h1>Widget <code>text</code></h1>
<p>A text entry area.</p>
<p>
</p>
<br/>
<br/>
</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-07 03:00:19 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>

View File

@@ -8,12 +8,11 @@ return {
toolButton = {
align = 'center middle',
width = 48,
},
toolButton_focused = {
slices = 'defer',
},
toolButton_not_hovered = {
slices = false,
slices = function (self)
return self.focused and 'defer'
or self.hovered and 'defer'
or false
end
},
statusbar = {
align = 'left middle',
@@ -32,7 +31,6 @@ return {
type = 'submenu',
width = 600,
height = 400,
float = true,
},
dialogHead = {
type = 'panel',

View File

@@ -85,6 +85,7 @@ Backend.run = function ()
end
end
sdl.renderSetClipRect(renderer, nil)
sdl.setRenderDrawColor(renderer, 0, 0, 0, 255)
sdl.renderClear(renderer)
callback.draw()
@@ -273,8 +274,6 @@ local stack = {}
Backend.pop = function ()
local history = stack[#stack]
local color = history.color or { 0, 0, 0, 255 }
Backend.setColor(history.color or { 0, 0, 0, 255 })
Backend.sdl = sdl
sdl.setRenderDrawColor(renderer,
color[1], color[2], color[3], color[4] or 255)

View File

@@ -36,18 +36,9 @@ local function renderMulti (self, font, text, color, align, limit)
local height = #lines * lineHeight
color = sdl.Color(color or 0)
local r, g, b, a
--[[
if sdl.BYTEORDER == sdl.BIG_ENDIAN then
r, g, b, a = 0xFF000000, 0x00FF0000, 0x0000FF00, 0x000000FF
else
r, g, b, a = 0x000000FF, 0x0000FF00, 0x00FF0000, 0xFF000000
end
--]]
-- values from SDL_ttf.c
r, g, b, a = 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000
-- mask values from SDL_ttf.c
-- TODO: something with sdl.BYTEORDER == sdl.BIG_ENDIAN ?
local r, g, b, a = 0x00FF0000, 0x0000FF00, 0x000000FF, 0xFF000000
local surface = ffi.gc(
sdl.createRGBSurface(sdl.SWSURFACE, limit, height, 32, r, g, b, a),

View File

@@ -213,12 +213,9 @@ end
function Input:handleReshape (layout, width, height)
local root = layout.root
if root.float then
root:reshape()
else
root.width = width
root.height = height
end
root:reshape()
root.dimensions.width = width
root.dimensions.height = height
Event.Reshape:emit(layout, { target = layout })
end

View File

@@ -13,6 +13,7 @@ function Style:getProperty (object, property, original)
local value = rawget(object, property)
if value ~= nil then return value end
local rules = self.rules
original = original or object
for _, lookupName in ipairs(self.lookupNames) do
@@ -23,7 +24,8 @@ function Style:getProperty (object, property, original)
lookup = { lookup }
end
for _, lookupValue in ipairs(lookup) do
for _, rule in ipairs(self:getRules(original, lookupValue)) do
local rule = rules[lookupValue]
if rule then
local value = self:getProperty(rule, property, original)
if value ~= nil then return value end
end
@@ -32,21 +34,4 @@ function Style:getProperty (object, property, original)
end -- lookup names
end
function Style:getRules (object, lookupValue)
local rules = self.rules
local result = {}
for _, flag in ipairs { 'pressed', 'focused', 'hovered', 'active' } do
if rawget(object, flag) then
result[#result + 1] = rules[lookupValue .. '_' .. flag]
else
result[#result + 1] = rules[lookupValue .. '_not_' .. flag]
end
end
result[#result + 1] = rules[lookupValue]
return result
end
return Style

View File

@@ -1,157 +1,12 @@
local RESOURCE = (...):gsub('%.', '/') .. '/'
local REL = (...):gsub('[^.]*$', '')
return function (config)
config = config or {}
local backColor = config.backColor or { 40, 40, 40 }
local lineColor = config.lineColor or { 60, 60, 60 }
local textColor = config.textColor or { 240, 240, 240 }
local highlight = config.highlight or { 0x00, 0x5c, 0x94 }
return {
button = {
align = 'center middle',
padding = 6,
slices = RESOURCE .. 'button.png',
minwidth = 24,
minheight = 24,
focusable = true,
color = textColor,
},
button_hovered = {
slices = RESOURCE .. 'button_hovered.png'
},
button_focused = {
slices = RESOURCE .. 'button_focused.png',
},
button_pressed = {
slices = RESOURCE .. 'button_pressed.png',
},
['stepper.left'] = {
type = 'button',
icon = RESOURCE .. 'triangle_left.png',
},
['stepper.right'] = {
type = 'button',
icon = RESOURCE .. 'triangle_right.png',
},
menu = {
height = 24,
},
['menu.item'] = {
padding = 4,
align = 'left middle',
color = { 0, 0, 0 },
color = textColor,
},
['menu.item_active'] = {
background = highlight,
},
['menu.expander'] = {
icon = RESOURCE .. 'triangle_right.png',
},
submenu = {
padding = 10,
margin = -10,
slices = RESOURCE .. 'submenu.png',
color = textColor,
},
sash = {
background = lineColor
},
sash_hovered = {
background = highlight
},
slider = {
slices = RESOURCE .. 'button_pressed.png',
padding = 0,
minwidth = 24,
minheight = 24
},
panel = {
background = backColor,
color = textColor,
},
progress = {
slices = RESOURCE .. 'button_pressed.png',
padding = 0,
minwidth = 24,
minheight = 24
},
['progress.bar'] = {
slices = RESOURCE .. 'progress.png',
padding = 0,
minwidth = 12,
},
slider_hovered = {
},
stepper = {
slices = RESOURCE .. 'button_pressed.png',
},
['stepper.item'] = {
align = 'center middle',
color = textColor,
},
text = {
align = 'left middle',
slices = RESOURCE .. 'text.png',
padding = 6,
minwidth = 24,
minheight = 24,
focusable = true,
cursor = 'ibeam',
highlight = highlight,
color = textColor,
},
text_focused = {
slices = RESOURCE .. 'text_focused.png',
},
check = {
focusable = true,
color = textColor,
},
['check.unchecked'] = {
icon = RESOURCE .. 'check_unchecked.png',
},
['check.checked'] = {
icon = RESOURCE .. 'check_checked.png',
},
['check.unchecked_pressed'] = {
icon = RESOURCE .. 'check_unchecked_pressed.png',
},
['check.checked_pressed'] = {
icon = RESOURCE .. 'check_checked_pressed.png',
},
['check.unchecked_focused'] = {
icon = RESOURCE .. 'check_unchecked_focused.png',
},
['check.checked_focused'] = {
icon = RESOURCE .. 'check_checked_focused.png',
},
radio = {
focusable = true,
color = textColor,
},
['radio.unchecked'] = {
icon = RESOURCE .. 'radio_unchecked.png',
},
['radio.checked'] = {
icon = RESOURCE .. 'radio_checked.png',
},
['radio.unchecked_pressed'] = {
icon = RESOURCE .. 'radio_unchecked_pressed.png',
},
['radio.checked_pressed'] = {
icon = RESOURCE .. 'radio_checked_pressed.png',
},
['radio.unchecked_focused'] = {
icon = RESOURCE .. 'radio_unchecked_focused.png',
},
['radio.checked_focused'] = {
icon = RESOURCE .. 'radio_checked_focused.png',
},
}
config.resources = config.resources or RESOURCE
config.backColor = config.backColor or { 40, 40, 40 }
config.lineColor = config.lineColor or { 60, 60, 60 }
config.textColor = config.textColor or { 240, 240, 240 }
config.highlight = config.highlight or { 0x00, 0x5c, 0x94 }
return require(REL .. 'light')(config)
end

View File

@@ -2,38 +2,74 @@ local RESOURCE = (...):gsub('%.', '/') .. '/'
return function (config)
config = config or {}
local resources = config.resources or RESOURCE
local backColor = config.backColor or { 240, 240, 240 }
local lineColor = config.lineColor or { 220, 220, 220 }
local textColor = config.textColor or { 0, 0, 0 }
local highlight = config.highlight or { 0x19, 0xAE, 0xFF }
local function getButtonSlices (self)
return self.pressed and resources .. 'button_pressed.png'
or self.focused and resources .. 'button_focused.png'
or self.hovered and resources .. 'button_hovered.png'
or resources .. 'button.png'
end
local function getCheckOrRadioIcon (self)
local prefix = resources .. self.type
if self.pressed then
if self.value then
return prefix .. '_checked_pressed.png'
else
return prefix .. '_unchecked_pressed.png'
end
elseif self.focused then
if self.value then
return prefix .. '_checked_focused.png'
else
return prefix .. '_unchecked_focused.png'
end
else
if self.value then
return prefix .. '_checked.png'
else
return prefix .. '_unchecked.png'
end
end
end
local function getMenuItemBackground (self)
return self.active and highlight
end
local function getSashBackground (self)
return self.hovered and highlight or lineColor
end
local function getTextSlices (self)
return self.focused and resources .. 'text_focused.png'
or resources .. 'text.png'
end
return {
button = {
align = 'center middle',
padding = 6,
slices = RESOURCE .. 'button.png',
slices = getButtonSlices,
minwidth = 24,
minheight = 24,
focusable = true
},
button_hovered = {
slices = RESOURCE .. 'button_hovered.png'
},
button_focused = {
slices = RESOURCE .. 'button_focused.png',
},
button_pressed = {
slices = RESOURCE .. 'button_pressed.png',
focusable = true,
color = textColor,
},
['stepper.left'] = {
type = 'button',
icon = RESOURCE .. 'triangle_left.png',
icon = resources .. 'triangle_left.png',
},
['stepper.right'] = {
type = 'button',
icon = RESOURCE .. 'triangle_right.png',
icon = resources .. 'triangle_right.png',
},
menu = {
height = 24,
@@ -41,107 +77,72 @@ return function (config)
['menu.item'] = {
padding = 4,
align = 'left middle',
color = { 0, 0, 0 }
},
['menu.item_active'] = {
background = highlight,
color = textColor,
background = getMenuItemBackground,
},
['menu.expander'] = {
icon = RESOURCE .. 'triangle_right.png',
icon = resources .. 'triangle_right.png',
},
submenu = {
padding = 10,
margin = -10,
slices = RESOURCE .. 'submenu.png',
slices = resources .. 'submenu.png',
color = textColor,
},
sash = {
background = lineColor
},
sash_hovered = {
background = highlight
background = getSashBackground
},
slider = {
slices = RESOURCE .. 'button_pressed.png',
slices = resources .. 'button_pressed.png',
padding = 0,
minwidth = 24,
minheight = 24
},
panel = {
background = backColor,
color = textColor,
},
progress = {
slices = RESOURCE .. 'button_pressed.png',
slices = resources .. 'button_pressed.png',
padding = 0,
minwidth = 24,
minheight = 24
},
['progress.bar'] = {
slices = RESOURCE .. 'progress.png',
slices = resources .. 'progress.png',
padding = 0,
minwidth = 12,
},
slider_hovered = {
},
stepper = {
slices = RESOURCE .. 'button_pressed.png',
slices = resources .. 'button_pressed.png',
},
['stepper.item'] = {
align = 'center middle',
color = textColor,
},
status = {
type = 'panel',
},
text = {
align = 'left middle',
slices = RESOURCE .. 'text.png',
slices = getTextSlices,
padding = 6,
minwidth = 24,
minheight = 24,
focusable = true,
cursor = 'ibeam',
highlight = highlight,
},
text_focused = {
slices = RESOURCE .. 'text_focused.png',
color = textColor,
},
check = {
focusable = true,
},
['check.unchecked'] = {
icon = RESOURCE .. 'check_unchecked.png',
},
['check.checked'] = {
icon = RESOURCE .. 'check_checked.png',
},
['check.unchecked_pressed'] = {
icon = RESOURCE .. 'check_unchecked_pressed.png',
},
['check.checked_pressed'] = {
icon = RESOURCE .. 'check_checked_pressed.png',
},
['check.unchecked_focused'] = {
icon = RESOURCE .. 'check_unchecked_focused.png',
},
['check.checked_focused'] = {
icon = RESOURCE .. 'check_checked_focused.png',
color = textColor,
icon = getCheckOrRadioIcon
},
radio = {
focusable = true,
},
['radio.unchecked'] = {
icon = RESOURCE .. 'radio_unchecked.png',
},
['radio.checked'] = {
icon = RESOURCE .. 'radio_checked.png',
},
['radio.unchecked_pressed'] = {
icon = RESOURCE .. 'radio_unchecked_pressed.png',
},
['radio.checked_pressed'] = {
icon = RESOURCE .. 'radio_checked_pressed.png',
},
['radio.unchecked_focused'] = {
icon = RESOURCE .. 'radio_unchecked_focused.png',
},
['radio.checked_focused'] = {
icon = RESOURCE .. 'radio_checked_focused.png',
color = textColor,
icon = getCheckOrRadioIcon
},
}

View File

@@ -66,8 +66,8 @@ local function metaIndex (self, property)
local layout = self.layout
local style = layout:getStyle()
value = style and style:getProperty(self, property)
if value ~= nil and value ~= 'defer' then return maybeCall(value, self) end
value = style and maybeCall(style:getProperty(self, property), self)
if value ~= nil and value ~= 'defer' then return value end
local theme = layout:getTheme()
return theme and maybeCall(theme:getProperty(self, property), self)

View File

@@ -1,5 +1,26 @@
--[[--
A simple button.
A button.
Buttons have no special behavior beyond that of generic widgets,
but themes should give buttons an appropriate appearance.
@usage
-- create a layout containing only a button
local layout = Layout {
type = 'button',
id = 'exampleButton',
text = 'Press me',
width = 100,
height = 32,
}
-- handle Press events
layout.exampleButton:onPress(function (event)
print 'You pressed the button.'
end)
-- show the layout
layout:show()
@widget button
--]]--

View File

@@ -1,6 +1,14 @@
--[[--
A check box.
Check boxes toggle their @{attribute.value|value} attribute between
`true` and `false` when pressed.
Changing the value of a check box causes it to change its appearance to
indicate its value. The standard themes use the @{attribute.icon|icon}
attribute for this purpose. If a custom icon is provided when using the
standard themes, the widget's value should be indicated in some other way.
@widget check
--]]--
@@ -9,10 +17,5 @@ return function (self)
self.value = not self.value
end)
self:onChange(function ()
local subtype = self.value and 'check.checked' or 'check.unchecked'
self.type = { 'check', subtype }
end)
self.value = not not self.value
end

View File

@@ -1,6 +1,17 @@
--[[--
A radio button.
Radio buttons change their @{attribute.value|value} attribute to
`true` when pressed. Radio buttons should also have a `group`
attribute. When a radio button is pressed, other radio buttons
in the same layout with the same `group` attribute change their values
to `false`.
Changing the value of a radio button causes it to change its appearance to
indicate its value. The standard themes use the @{attribute.icon|icon}
attribute for this purpose. If a custom icon is provided when using the
standard themes, the widget's value should be indicated in some other way.
@widget radio
--]]--
@@ -24,10 +35,5 @@ return function (self)
end
end)
self:onChange(function ()
local subtype = self.value and 'radio.checked' or 'radio.unchecked'
self.type = { 'radio', subtype }
end)
self.value = not not self.value
end

View File

@@ -2,12 +2,24 @@
A sash.
Dragging this widget resizes the widgets adjacent to it.
A sash must be adjacent to a widget with a specified size
in the same direction as the parent element's `flow`.
A sash should be adjacent to a widget with a specified size
in the same direction as the parent element's @{attribute.flow|flow}.
For example, if the parent of the sash is `flow = 'x'`
then either or both of the siblings next to the sash
must have a specified `width` property.
then either or both of the siblings adjacent to the sash
should have a specified @{attribute.width|width} attribute.
@usage
-- create a layout containing two widgets separated by a sash
local layout = Layout {
type = 'panel', flow = 'x',
{ text = 'This is the left side', wrap = true, width = 100 },
{ type = 'sash' },
{ text = 'This is the right side', wrap = true },
}
-- show the layout
layout:show()
@widget sash
--]]--

View File

@@ -1,6 +1,24 @@
--[[--
A status bar.
This widget will display the @{attribute.status|status} attribute of the
hovered widget. Only one status widget should exist per layout. If multiple
status widgets exist in the same layout, only the last one created will
display status messages.
@usage
-- create a layout containing some buttons and a status bar
local layout = Layout {
{ type = 'panel', flow = 'x',
{ text = 'Do stuff', status = 'Press to do stuff' },
{ text = 'Quit', status = 'Press to quit' },
},
{ type = 'status', height = 24 },
}
-- show the layout
layout:show()
@widget status
--]]--