Files
love-luigi/doc/classes/Layout.html
2015-12-16 22:23:20 -05:00

401 lines
9.5 KiB
HTML

<!doctype html>
<html>
<head>
<meta charset="utf-8">
<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">
<h1>LUIGI</h1>
<ul>
<li><a href="../index.html">Index</a></li>
</ul>
<h2>Widgets</h2>
<ul class="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><a href="../widgets/text.html">text</a></li>
</ul>
<h2>Modules</h2>
<ul class="nowrap">
<li><a href="../modules/attribute.html">attribute</a></li>
</ul>
<h2>Classes</h2>
<ul class="nowrap">
<li><a href="../classes/Event.html">Event</a></li>
<li><strong>Layout</strong></li>
<li><a href="../classes/Widget.html">Widget</a></li>
</ul>
</div>
<div id="content">
<div id="content_top">
<h1>Class <code>Layout</code></h1>
<p>A Layout contains a tree of widgets with a single <code>root</code> widget.</p>
<p>Layouts will resize to fit the window unless a <code>top</code> or <code>left</code>
property is found in the root widget.</p>
<p>Layouts are drawn in the order that they were shown, so the
most recently shown layout shown will always appear on top.</p>
<p>Other events are sent to layouts in the opposite direction,
and are trapped by the first layout that can handle the event
(for example, the topmost layer that is focused or hovered).</p>
<h2><a href="#Functions">Functions</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Luigi.Layout">Luigi.Layout (data)</a></td>
<td class="summary">Layout constructor.</td>
</tr>
</table>
<h2><a href="#Methods">Methods</a></h2>
<table class="function_list">
<tr>
<td class="name" nowrap><a href="#Layout:setMaster">Layout:setMaster (layout)</a></td>
<td class="summary">Set the master layout for this layout.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:setStyle">Layout:setStyle (rules)</a></td>
<td class="summary">Set the style from a definition table or function.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:setTheme">Layout:setTheme (rules)</a></td>
<td class="summary">Set the theme from a definition table or function.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:getStyle">Layout:getStyle ()</a></td>
<td class="summary">Get the style from master layout or this layout.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:getTheme">Layout:getTheme ()</a></td>
<td class="summary">Get the theme from master layout or this layout.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:show">Layout:show ()</a></td>
<td class="summary">Show the layout.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:hide">Layout:hide ()</a></td>
<td class="summary">Hide the layout.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:focusNextWidget">Layout:focusNextWidget ()</a></td>
<td class="summary">Focus next focusable widget.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:focusPreviousWidget">Layout:focusPreviousWidget ()</a></td>
<td class="summary">Focus previous focusable widget.</td>
</tr>
<tr>
<td class="name" nowrap><a href="#Layout:getWidgetAt">Layout:getWidgetAt (x, y[, root])</a></td>
<td class="summary">Get the innermost widget at given coordinates.</td>
</tr>
</table>
</div>
<h2 class="section-header "><a name="Functions"></a>Functions</h2>
Methods
<dl class="function">
<dt>
<a name = "Luigi.Layout"></a>
<strong>Luigi.Layout (data)</strong>
</dt>
<dd>
Layout constructor.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">data</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
A tree of widget data.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../classes/Layout.html#">Layout</a></span>
A Layout instance.
</ol>
</dd>
</dl>
<h2 class="section-header "><a name="Methods"></a>Methods</h2>
<dl class="function">
<dt>
<a name = "Layout:setMaster"></a>
<strong>Layout:setMaster (layout)</strong>
</dt>
<dd>
Set the master layout for this layout. </p>
<p>This layout's theme and style will be set the same as the master layout, and
widgets added to this layout will be indexed and keyboard-accelerated by the
master layout instead of this layout.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">layout</span>
<span class="types"><a class="type" href="../classes/Layout.html#">Layout</a></span>
Master layout
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../classes/Layout.html#">Layout</a></span>
Self
</ol>
</dd>
<dt>
<a name = "Layout:setStyle"></a>
<strong>Layout:setStyle (rules)</strong>
</dt>
<dd>
Set the style from a definition table or function.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">rules</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">function</span></span>
Style definition.
</li>
</ul>
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../classes/Layout.html#">Layout</a></span>
Self
</ol>
</dd>
<dt>
<a name = "Layout:setTheme"></a>
<strong>Layout:setTheme (rules)</strong>
</dt>
<dd>
Set the theme from a definition table or function.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">rules</span>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a> or <span class="type">function</span></span>
Theme definition.
</li>
</ul>
</dd>
<dt>
<a name = "Layout:getStyle"></a>
<strong>Layout:getStyle ()</strong>
</dt>
<dd>
Get the style from master layout or this layout.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Style table.
</ol>
</dd>
<dt>
<a name = "Layout:getTheme"></a>
<strong>Layout:getTheme ()</strong>
</dt>
<dd>
Get the theme from master layout or this layout.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="http://www.lua.org/manual/5.1/manual.html#5.5">table</a></span>
Theme table.
</ol>
</dd>
<dt>
<a name = "Layout:show"></a>
<strong>Layout:show ()</strong>
</dt>
<dd>
Show the layout. </p>
<p>Hooks all appropriate Love events and callbacks.
</dd>
<dt>
<a name = "Layout:hide"></a>
<strong>Layout:hide ()</strong>
</dt>
<dd>
Hide the layout. </p>
<p>Unhooks Love events and callbacks.
</dd>
<dt>
<a name = "Layout:focusNextWidget"></a>
<strong>Layout:focusNextWidget ()</strong>
</dt>
<dd>
Focus next focusable widget. </p>
<p>Traverses widgets using Widget:getNextNeighbor until a focusable widget is
found, and focuses that widget.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../classes/Widget.html#">Widget</a></span>
The widget that was focused, or nil
</ol>
</dd>
<dt>
<a name = "Layout:focusPreviousWidget"></a>
<strong>Layout:focusPreviousWidget ()</strong>
</dt>
<dd>
Focus previous focusable widget. </p>
<p>Traverses widgets using Widget:getPreviousNeighbor until a focusable widget is
found, and focuses that widget.
<h3>Returns:</h3>
<ol>
<span class="types"><a class="type" href="../classes/Widget.html#">Widget</a></span>
The widget that was focused, or nil
</ol>
</dd>
<dt>
<a name = "Layout:getWidgetAt"></a>
<strong>Layout:getWidgetAt (x, y[, root])</strong>
</dt>
<dd>
Get the innermost widget at given coordinates.
<h3>Parameters:</h3>
<ul>
<li><span class="parameter">x</span>
<span class="types"><span class="type">number</span></span>
Number of pixels from window's left edge.
</li>
<li><span class="parameter">y</span>
<span class="types"><span class="type">number</span></span>
Number of pixels from window's top edge.
</li>
<li><span class="parameter">root</span>
<span class="types"><a class="type" href="../classes/Widget.html#">Widget</a></span>
Widget to search within, defaults to layout root.
(<em>optional</em>)
</li>
</ul>
</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-16 14:12:04 </i>
</div> <!-- id="about" -->
</div> <!-- id="container" -->
</body>
</html>