2011-08-22 12:54:32 +02:00
|
|
|
return [==[
|
2011-06-06 18:35:23 +02:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
|
|
|
<html>
|
2013-03-27 14:50:37 +01:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=$(ldoc.doc_charset)"/>
|
2011-06-06 18:35:23 +02:00
|
|
|
<head>
|
|
|
|
<title>$(ldoc.title)</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" -->
|
|
|
|
|
2011-07-06 11:47:41 +02:00
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
<div id="main">
|
|
|
|
|
2011-07-12 14:14:55 +02:00
|
|
|
# local no_spaces = ldoc.no_spaces
|
|
|
|
# local use_li = ldoc.use_li
|
|
|
|
# local display_name = ldoc.display_name
|
2011-06-06 18:35:23 +02:00
|
|
|
# local iter = ldoc.modules.iter
|
2013-05-09 12:52:15 +02:00
|
|
|
# local function M(txt,item) return ldoc.markup(txt,item,ldoc.plain) end
|
2013-02-13 13:44:33 +01:00
|
|
|
# local nowrap = ldoc.wrap and '' or 'nowrap'
|
2011-06-06 18:35:23 +02:00
|
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
|
|
|
|
<div id="navigation">
|
2011-09-22 15:48:09 +02:00
|
|
|
<br/>
|
2011-06-06 18:35:23 +02:00
|
|
|
<h1>$(ldoc.project)</h1>
|
2011-07-10 19:12:35 +02:00
|
|
|
|
2011-08-26 15:45:56 +02:00
|
|
|
# if not ldoc.single and module then -- reference back to project index
|
2011-06-06 18:35:23 +02:00
|
|
|
<ul>
|
2011-07-03 18:22:45 +02:00
|
|
|
<li><a href="../$(ldoc.output).html">Index</a></li>
|
2011-06-06 18:35:23 +02:00
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
2011-07-10 19:12:35 +02:00
|
|
|
# --------- contents of module -------------
|
|
|
|
# if module and not ldoc.no_summary and #module.items > 0 then
|
2011-06-06 18:35:23 +02:00
|
|
|
<h2>Contents</h2>
|
|
|
|
<ul>
|
|
|
|
# for kind,items in module.kinds() do
|
|
|
|
<li><a href="#$(no_spaces(kind))">$(kind)</a></li>
|
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
2011-09-21 15:50:11 +02:00
|
|
|
|
2013-03-28 12:28:05 +01:00
|
|
|
# if ldoc.no_summary and module and not ldoc.one then -- bang out the functions on the side
|
2011-09-21 15:50:11 +02:00
|
|
|
# for kind, items in module.kinds() do
|
|
|
|
<h2>$(kind)</h2>
|
2013-08-27 12:44:04 +02:00
|
|
|
<ul class="nowrap">
|
2011-09-21 15:50:11 +02:00
|
|
|
# for item in items() do
|
|
|
|
<li><a href="#$(item.name)">$(display_name(item))</a></li>
|
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
# end
|
2011-07-10 19:12:35 +02:00
|
|
|
# -------- contents of project ----------
|
|
|
|
# local this_mod = module and module.name
|
2011-06-06 18:35:23 +02:00
|
|
|
# for kind, mods, type in ldoc.kinds() do
|
2014-10-12 16:09:09 +02:00
|
|
|
# if ldoc.allowed_in_contents(type,module) then
|
2011-06-06 18:35:23 +02:00
|
|
|
<h2>$(kind)</h2>
|
2013-11-18 09:26:40 +01:00
|
|
|
<ul class="$(kind=='Topics' and '' or 'nowrap'">
|
2013-08-27 14:16:21 +02:00
|
|
|
# for mod in mods() do local name = ldoc.module_name(mod)
|
|
|
|
# if mod.name == this_mod then
|
|
|
|
<li><strong>$(name)</strong></li>
|
2011-07-12 15:42:58 +02:00
|
|
|
# else
|
2013-08-27 14:16:21 +02:00
|
|
|
<li><a href="$(ldoc.ref_to_module(mod))">$(name)</a></li>
|
2011-07-12 15:42:58 +02:00
|
|
|
# end
|
2011-07-10 19:12:35 +02:00
|
|
|
# end
|
2011-07-06 11:47:41 +02:00
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
</ul>
|
2011-09-21 15:50:11 +02:00
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
2011-07-10 19:12:35 +02:00
|
|
|
# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries
|
2011-07-06 15:24:05 +02:00
|
|
|
$(ldoc.body)
|
|
|
|
# elseif module then -- module documentation
|
2013-11-17 18:48:35 +01:00
|
|
|
<h1>$(ldoc.module_typename(module)) <code>$(module.name)</code></h1>
|
2011-09-17 17:57:22 +02:00
|
|
|
<p>$(M(module.summary,module))</p>
|
|
|
|
<p>$(M(module.description,module))</p>
|
2014-10-12 18:35:19 +02:00
|
|
|
# if module.tags.include then
|
|
|
|
$(M(ldoc.include_file(module.tags.include)))
|
|
|
|
# end
|
2011-09-19 13:34:01 +02:00
|
|
|
# if module.usage then
|
|
|
|
# local li,il = use_li(module.usage)
|
|
|
|
<h3>Usage:</h3>
|
|
|
|
<ul>
|
|
|
|
# for usage in iter(module.usage) do
|
2012-12-13 18:18:24 +01:00
|
|
|
$(li)<pre class="example">$(ldoc.escape(usage))</pre>$(il)
|
2011-09-19 13:34:01 +02:00
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if usage
|
2012-12-31 13:52:00 +01:00
|
|
|
# if module.info then
|
|
|
|
<h3>Info:</h3>
|
|
|
|
<ul>
|
2014-01-07 16:48:50 +01:00
|
|
|
# for tag, value in module.info:iter() do
|
2013-08-22 09:43:26 +02:00
|
|
|
<li><strong>$(tag)</strong>: $(M(value,module))</li>
|
2012-12-31 13:52:00 +01:00
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end -- if module.info
|
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
|
2011-07-06 11:47:41 +02:00
|
|
|
# if not ldoc.no_summary then
|
2011-06-06 18:35:23 +02:00
|
|
|
# -- bang out the tables of item types for this module (e.g Functions, Tables, etc)
|
|
|
|
# for kind,items in module.kinds() do
|
|
|
|
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
|
|
|
|
<table class="function_list">
|
2011-07-14 15:26:03 +02:00
|
|
|
# for item in items() do
|
2011-06-06 18:35:23 +02:00
|
|
|
<tr>
|
2013-02-13 13:44:33 +01:00
|
|
|
<td class="name" $(nowrap)><a href="#$(item.name)">$(display_name(item))</a></td>
|
2011-09-17 17:57:22 +02:00
|
|
|
<td class="summary">$(M(item.summary,item))</td>
|
2011-06-06 18:35:23 +02:00
|
|
|
</tr>
|
|
|
|
# end -- for items
|
|
|
|
</table>
|
|
|
|
#end -- for kinds
|
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
2011-07-06 11:47:41 +02:00
|
|
|
#end -- if not no_summary
|
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
# --- currently works for both Functions and Tables. The params field either contains
|
|
|
|
# --- function parameters or table fields.
|
2011-07-06 15:24:05 +02:00
|
|
|
# local show_return = not ldoc.no_return_or_parms
|
|
|
|
# local show_parms = show_return
|
2011-06-06 18:35:23 +02:00
|
|
|
# for kind, items in module.kinds() do
|
2013-03-07 12:09:48 +01:00
|
|
|
# local kitem = module.kinds:get_item(kind)
|
2011-06-06 18:35:23 +02:00
|
|
|
<h2><a name="$(no_spaces(kind))"></a>$(kind)</h2>
|
2014-05-25 13:58:25 +02:00
|
|
|
$(M(module.kinds:get_section_description(kind),nil))
|
2013-03-07 12:09:48 +01:00
|
|
|
# if kitem then
|
|
|
|
$(M(ldoc.descript(kitem),kitem))
|
|
|
|
# if kitem.usage then
|
|
|
|
<h3>Usage:</h3>
|
|
|
|
<pre class="example">$(ldoc.prettify(kitem.usage[1]))</pre>
|
|
|
|
# end
|
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
<dl class="function">
|
2011-09-17 17:57:22 +02:00
|
|
|
# for item in items() do
|
2011-06-06 18:35:23 +02:00
|
|
|
<dt>
|
|
|
|
<a name = "$(item.name)"></a>
|
|
|
|
<strong>$(display_name(item))</strong>
|
2014-10-12 16:09:09 +02:00
|
|
|
# if ldoc.prettify_files then
|
|
|
|
<a style="float:right;" href="$(ldoc.source_ref(item))">line $(item.lineno)</a>
|
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
</dt>
|
|
|
|
<dd>
|
2013-03-07 12:09:48 +01:00
|
|
|
$(M(ldoc.descript(item),item))
|
2013-12-09 14:13:00 +01:00
|
|
|
|
2013-11-28 01:47:44 +01:00
|
|
|
# if ldoc.custom_tags then
|
|
|
|
# for custom in iter(ldoc.custom_tags) do
|
|
|
|
# local tag = item.tags[custom[1]]
|
2013-12-09 14:13:00 +01:00
|
|
|
# if tag and not custom.hidden then
|
2013-11-28 01:47:44 +01:00
|
|
|
# local li,il = use_li(tag)
|
|
|
|
<h3>$(custom.title or custom[1]):</h3>
|
|
|
|
<ul>
|
|
|
|
# for value in iter(tag) do
|
|
|
|
$(li)$(custom.format and custom.format(value) or M(value))$(il)
|
|
|
|
# end -- for
|
|
|
|
# end -- if tag
|
|
|
|
</ul>
|
|
|
|
# end -- iter tags
|
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
|
2011-07-06 15:24:05 +02:00
|
|
|
# if show_parms and item.params and #item.params > 0 then
|
2013-11-16 18:21:50 +01:00
|
|
|
# local subnames = module.kinds:type_of(item).subnames
|
|
|
|
# if subnames then
|
|
|
|
<h3>$(subnames):</h3>
|
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
<ul>
|
2013-03-18 14:51:28 +01:00
|
|
|
# for parm in iter(item.params) do
|
|
|
|
# local param,sublist = item:subparam(parm)
|
|
|
|
# if sublist then
|
2014-04-23 13:19:16 +02:00
|
|
|
<li><span class="parameter">$(sublist)</span>$(M(item.params.map[sublist],item))
|
2013-03-18 14:51:28 +01:00
|
|
|
<ul>
|
|
|
|
# end
|
|
|
|
# for p in iter(param) do
|
2013-08-22 10:12:04 +02:00
|
|
|
# local name,tp,def = item:display_name_of(p), ldoc.typename(item:type_of_param(p)), item:default_of_param(p)
|
2013-03-18 14:51:28 +01:00
|
|
|
<li><span class="parameter">$(name)</span>
|
|
|
|
# if tp ~= '' then
|
|
|
|
<span class="types">$(tp)</span>
|
2013-08-22 10:12:04 +02:00
|
|
|
# end
|
2014-04-23 13:19:16 +02:00
|
|
|
$(M(item.params.map[p],item))
|
2014-10-12 16:45:09 +02:00
|
|
|
# if def == true then
|
|
|
|
(<em>optional</em>)
|
|
|
|
# elseif def then
|
2013-08-22 10:12:04 +02:00
|
|
|
(<em>default</em> $(def))
|
2013-11-16 18:21:50 +01:00
|
|
|
# end
|
|
|
|
# if item:readonly(p) then
|
|
|
|
<em>readonly</em>
|
2013-08-22 10:12:04 +02:00
|
|
|
# end
|
|
|
|
</li>
|
2013-03-18 14:51:28 +01:00
|
|
|
# end
|
|
|
|
# if sublist then
|
|
|
|
</li></ul>
|
2012-10-29 01:26:07 +01:00
|
|
|
# end
|
2011-06-06 18:35:23 +02:00
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if params
|
|
|
|
|
2013-08-24 13:21:41 +02:00
|
|
|
# if show_return and item.retgroups then local groups = item.retgroups
|
2011-06-06 18:35:23 +02:00
|
|
|
<h3>Returns:</h3>
|
2013-08-24 13:21:41 +02:00
|
|
|
# for i,group in ldoc.ipairs(groups) do local li,il = use_li(group)
|
2011-06-06 18:35:23 +02:00
|
|
|
<ol>
|
2013-08-27 12:44:04 +02:00
|
|
|
# for r in group:iter() do local type, ctypes = item:return_type(r); local rt = ldoc.typename(type)
|
2012-10-29 01:26:07 +01:00
|
|
|
$(li)
|
2013-08-27 12:44:04 +02:00
|
|
|
# if rt ~= '' then
|
|
|
|
<span class="types">$(rt)</span>
|
2013-08-25 10:47:45 +02:00
|
|
|
# end
|
2013-08-24 13:21:41 +02:00
|
|
|
$(M(r.text,item))$(il)
|
2013-08-25 10:47:45 +02:00
|
|
|
# if ctypes then
|
|
|
|
<ul>
|
|
|
|
# for c in ctypes:iter() do
|
|
|
|
<li><span class="parameter">$(c.name)</span>
|
|
|
|
<span class="types">$(ldoc.typename(c.type))</span>
|
|
|
|
$(M(c.comment,item))</li>
|
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end -- if ctypes
|
2013-08-24 13:21:41 +02:00
|
|
|
# end -- for r
|
2011-06-06 18:35:23 +02:00
|
|
|
</ol>
|
2013-08-24 13:21:41 +02:00
|
|
|
# if i < #groups then
|
|
|
|
<h3>Or</h3>
|
|
|
|
# end
|
|
|
|
# end -- for group
|
2011-06-06 18:35:23 +02:00
|
|
|
# end -- if returns
|
|
|
|
|
2011-12-06 18:19:09 +01:00
|
|
|
# if show_return and item.raise then
|
|
|
|
<h3>Raises:</h3>
|
|
|
|
$(M(item.raise,item))
|
|
|
|
# end
|
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
# if item.see then
|
|
|
|
# local li,il = use_li(item.see)
|
2013-08-20 14:59:13 +02:00
|
|
|
<h3>See also:</h3>
|
2011-06-06 18:35:23 +02:00
|
|
|
<ul>
|
|
|
|
# for see in iter(item.see) do
|
2011-07-05 18:19:49 +02:00
|
|
|
$(li)<a href="$(ldoc.href(see))">$(see.label)</a>$(il)
|
2011-06-06 18:35:23 +02:00
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if see
|
2012-12-29 11:05:51 +01:00
|
|
|
|
|
|
|
# if item.usage then
|
|
|
|
# local li,il = use_li(item.usage)
|
|
|
|
<h3>Usage:</h3>
|
|
|
|
<ul>
|
|
|
|
# for usage in iter(item.usage) do
|
2013-03-05 15:21:54 +01:00
|
|
|
$(li)<pre class="example">$(ldoc.prettify(usage))</pre>$(il)
|
2012-12-29 11:05:51 +01:00
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if usage
|
|
|
|
|
2011-06-06 18:35:23 +02:00
|
|
|
</dd>
|
|
|
|
# end -- for items
|
|
|
|
</dl>
|
|
|
|
# end -- for kinds
|
|
|
|
|
2011-07-06 15:24:05 +02:00
|
|
|
# else -- if module; project-level contents
|
2011-06-06 18:35:23 +02:00
|
|
|
|
|
|
|
# if ldoc.description then
|
2011-09-22 15:48:09 +02:00
|
|
|
<h2>$(M(ldoc.description,nil))</h2>
|
|
|
|
# end
|
|
|
|
# if ldoc.full_description then
|
|
|
|
<p>$(M(ldoc.full_description,nil))</p>
|
2011-06-06 18:35:23 +02:00
|
|
|
# end
|
|
|
|
|
|
|
|
# for kind, mods in ldoc.kinds() do
|
|
|
|
<h2>$(kind)</h2>
|
|
|
|
# kind = kind:lower()
|
|
|
|
<table class="module_list">
|
2011-06-18 11:26:57 +02:00
|
|
|
# for m in mods() do
|
2011-06-06 18:35:23 +02:00
|
|
|
<tr>
|
2013-02-13 13:44:33 +01:00
|
|
|
<td class="name" $(nowrap)><a href="$(no_spaces(kind))/$(m.name).html">$(m.name)</a></td>
|
2014-06-20 15:09:38 +02:00
|
|
|
<td class="summary">$(M(ldoc.strip_header(m.summary),m))</td>
|
2011-06-06 18:35:23 +02:00
|
|
|
</tr>
|
|
|
|
# end -- for modules
|
|
|
|
</table>
|
|
|
|
# end -- for kinds
|
|
|
|
# end -- if module
|
|
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
|
|
</div> <!-- id="main" -->
|
|
|
|
<div id="about">
|
2014-10-21 17:57:26 +02:00
|
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc 1.4.3</a></i>
|
2014-09-10 04:37:11 +02:00
|
|
|
<i style="float:right;">Last updated $(ldoc.updatetime) </i>
|
2011-06-06 18:35:23 +02:00
|
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
|
|
</body>
|
|
|
|
</html>
|
2011-08-22 12:54:32 +02:00
|
|
|
]==]
|
2011-06-06 18:35:23 +02:00
|
|
|
|