2019-01-04 14:19:21 +01:00
|
|
|
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
|
|
|
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
2019-01-04 14:25:36 +01:00
|
|
|
# local title = module and ldoc.module_typename(module).." "..module.name.." - "..ldoc.title or ldoc.title
|
2019-01-04 14:19:21 +01:00
|
|
|
<html>
|
|
|
|
<head>
|
2019-01-04 14:25:36 +01:00
|
|
|
<meta http-equiv="Content-Type" content="text/html; charset=$(ldoc.doc_charset)"/>
|
|
|
|
<title>$(title)</title>
|
2019-01-04 14:19:21 +01:00
|
|
|
<link rel="stylesheet" href="$(ldoc.css)" type="text/css" />
|
|
|
|
# if ldoc.custom_css then -- add custom CSS file if configured.
|
|
|
|
<link rel="stylesheet" href="$(ldoc.custom_css)" type="text/css" />
|
|
|
|
# end
|
2019-11-25 05:59:27 +01:00
|
|
|
<script>
|
|
|
|
function show_extra(id) {
|
2019-11-28 09:04:26 +01:00
|
|
|
var cur = document.getElementById("item"+id).className
|
2019-11-25 05:59:27 +01:00
|
|
|
|
2019-11-28 09:04:26 +01:00
|
|
|
if (cur == "hide_extra") {
|
|
|
|
document.getElementById("item"+id).className = "show_more"
|
|
|
|
document.getElementById("button"+id).className = "hide_extra"
|
|
|
|
}
|
2019-11-25 05:59:27 +01:00
|
|
|
}
|
|
|
|
</script>
|
|
|
|
|
2019-01-04 14:19:21 +01:00
|
|
|
</head>
|
|
|
|
<body>
|
|
|
|
|
|
|
|
<div id="container">
|
|
|
|
|
|
|
|
<div id="product">
|
2019-07-09 23:00:20 +02:00
|
|
|
<div id="product_logo"></div>
|
|
|
|
<div id="product_name"><big><b></b></big></div>
|
|
|
|
<div id="product_description"></div>
|
2019-01-04 14:19:21 +01:00
|
|
|
</div> <!-- id="product" -->
|
|
|
|
|
|
|
|
|
|
|
|
<div id="main">
|
|
|
|
|
|
|
|
# local no_spaces = ldoc.no_spaces
|
|
|
|
# local use_li = ldoc.use_li
|
|
|
|
# local display_name = ldoc.display_name
|
|
|
|
# local iter = ldoc.modules.iter
|
|
|
|
# local function M(txt,item) return ldoc.markup(txt,item,ldoc.plain) end
|
|
|
|
# local nowrap = ldoc.wrap and '' or 'nowrap'
|
2019-06-28 15:34:32 +02:00
|
|
|
# local html_space = function(s) return s:gsub(" ", "%%20") end
|
2019-07-09 22:28:42 +02:00
|
|
|
# local no_underscores = function(s) return s:gsub("_", " ") end
|
2019-01-04 14:19:21 +01:00
|
|
|
|
|
|
|
<!-- Menu -->
|
|
|
|
|
|
|
|
<div id="navigation">
|
|
|
|
<br/>
|
|
|
|
<h1>$(ldoc.project)</h1>
|
|
|
|
|
|
|
|
# if not ldoc.single and module then -- reference back to project index
|
|
|
|
<ul>
|
|
|
|
<li><a href="../$(ldoc.output).html">Index</a></li>
|
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
|
|
|
# --------- contents of module -------------
|
|
|
|
# if module and not ldoc.no_summary and #module.items > 0 then
|
|
|
|
<h2>Contents</h2>
|
|
|
|
<ul>
|
|
|
|
# for kind,items in module.kinds() do
|
2019-10-27 20:39:23 +01:00
|
|
|
# if not kind:match("^ldoc_skip") then
|
2019-01-04 14:19:21 +01:00
|
|
|
<li><a href="#$(no_spaces(kind))">$(kind)</a></li>
|
|
|
|
# end
|
2019-10-27 20:39:23 +01:00
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
|
|
|
|
|
|
|
# if ldoc.no_summary and module and not ldoc.one then -- bang out the functions on the side
|
|
|
|
# for kind, items in module.kinds() do
|
2019-10-27 20:39:23 +01:00
|
|
|
# if not kind:match("^ldoc_skip") then
|
|
|
|
<h2>$(kind)dasdasd</h2>
|
2019-01-04 14:19:21 +01:00
|
|
|
<ul class="nowrap">
|
2019-10-27 20:39:23 +01:00
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
# for item in items() do
|
|
|
|
<li><a href="#$(item.name)">$(display_name(item))</a></li>
|
|
|
|
# end
|
2019-10-27 20:39:23 +01:00
|
|
|
# if not kind:match("^ldoc_skip") then
|
2019-01-04 14:19:21 +01:00
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
# end
|
2019-10-27 20:39:23 +01:00
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
# -------- contents of project ----------
|
|
|
|
# local this_mod = module and module.name
|
|
|
|
# for kind, mods, type in ldoc.kinds() do
|
|
|
|
# if ldoc.allowed_in_contents(type,module) then
|
2019-07-09 22:28:42 +02:00
|
|
|
<h2>$(no_underscores(kind))</h2>
|
2019-01-04 14:19:21 +01:00
|
|
|
<ul class="$(kind=='Topics' and '' or 'nowrap')">
|
|
|
|
# for mod in mods() do local name = display_name(mod)
|
|
|
|
# if mod.name == this_mod then
|
|
|
|
<li><strong>$(name)</strong></li>
|
|
|
|
# else
|
|
|
|
<li><a href="$(ldoc.ref_to_module(mod))">$(name)</a></li>
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
<div id="content">
|
|
|
|
|
|
|
|
# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries
|
|
|
|
$(ldoc.body)
|
|
|
|
# elseif module then -- module documentation
|
2019-06-08 01:20:48 +02:00
|
|
|
<h1>Module: <code>$(module.name)</code></h1>
|
2019-01-04 14:19:21 +01:00
|
|
|
<p>$(M(module.summary,module))</p>
|
|
|
|
<p>$(M(module.description,module))</p>
|
|
|
|
# if module.tags.include then
|
|
|
|
$(M(ldoc.include_file(module.tags.include)))
|
|
|
|
# end
|
|
|
|
# if module.see then
|
|
|
|
# local li,il = use_li(module.see)
|
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
# for see in iter(module.see) do
|
|
|
|
$(li)<a href="$(ldoc.href(see))">$(see.label)</a>$(il)
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if see
|
|
|
|
# if module.usage then
|
|
|
|
# local li,il = use_li(module.usage)
|
|
|
|
<h3>Usage:</h3>
|
|
|
|
<ul>
|
|
|
|
# for usage in iter(module.usage) do
|
|
|
|
$(li)<pre class="example">$(ldoc.escape(usage))</pre>$(il)
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if usage
|
|
|
|
# if module.info then
|
|
|
|
<h3>Info:</h3>
|
|
|
|
<ul>
|
|
|
|
# for tag, value in module.info:iter() do
|
|
|
|
<li><strong>$(tag)</strong>: $(M(value,module))</li>
|
|
|
|
# end
|
|
|
|
</ul>
|
|
|
|
# end -- if module.info
|
|
|
|
|
|
|
|
|
|
|
|
# if not ldoc.no_summary then
|
|
|
|
# -- bang out the tables of item types for this module (e.g Functions, Tables, etc)
|
2019-10-27 20:39:23 +01:00
|
|
|
# local last_kind = ""
|
2019-01-04 14:19:21 +01:00
|
|
|
# for kind,items in module.kinds() do
|
2019-10-27 20:39:23 +01:00
|
|
|
# if not kind:match("^ldoc_skip") then
|
|
|
|
# if last_kind ~= "" then
|
|
|
|
</table>
|
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
<h2><a href="#$(no_spaces(kind))">$(kind)</a></h2>
|
|
|
|
<table class="function_list">
|
2019-10-27 20:39:23 +01:00
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
# for item in items() do
|
2019-06-08 04:53:36 +02:00
|
|
|
# local dn = display_name(item)
|
|
|
|
# if item.sanitize_type then item.sanitize_type(item, ldoc) end
|
2019-07-09 23:00:20 +02:00
|
|
|
<tr>
|
2019-06-08 04:53:36 +02:00
|
|
|
# if item.display_type then
|
2019-07-09 23:00:20 +02:00
|
|
|
<td class="shortname" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
|
|
|
|
<td class="summarytype" nowrap>$(item.display_type)</td>
|
2019-06-08 04:53:36 +02:00
|
|
|
# else
|
2019-07-09 23:00:20 +02:00
|
|
|
<td class="name" $(nowrap)><a href="#$(item.name)">$(dn)</a></td>
|
2019-06-08 04:53:36 +02:00
|
|
|
# end
|
2019-11-23 13:58:47 +01:00
|
|
|
<td colspan="$(item.inherited and 1 or 2)" class="summary">$(M(item.summary,item))</td>
|
2019-11-26 13:46:44 +01:00
|
|
|
# if item.inherited then
|
2019-11-23 13:58:47 +01:00
|
|
|
<td class="baseclass" $(nowrap)>
|
2019-11-26 13:46:44 +01:00
|
|
|
Inherited from $(item.baseclass)
|
|
|
|
</td>
|
2019-11-23 13:58:47 +01:00
|
|
|
# end
|
2019-07-09 23:00:20 +02:00
|
|
|
</tr>
|
2019-01-04 14:19:21 +01:00
|
|
|
# end -- for items
|
2019-10-27 20:39:23 +01:00
|
|
|
# last_kind = kind
|
2019-01-04 14:19:21 +01:00
|
|
|
#end -- for kinds
|
2019-10-27 20:39:23 +01:00
|
|
|
</table>
|
2019-01-04 14:19:21 +01:00
|
|
|
|
|
|
|
<br/>
|
|
|
|
<br/>
|
|
|
|
|
|
|
|
#end -- if not no_summary
|
|
|
|
|
|
|
|
# --- currently works for both Functions and Tables. The params field either contains
|
|
|
|
# --- function parameters or table fields.
|
|
|
|
# local show_return = not ldoc.no_return_or_parms
|
2019-10-27 20:39:23 +01:00
|
|
|
# local show_parms, last_kind = show_return, ""
|
2019-01-04 14:19:21 +01:00
|
|
|
# for kind, items in module.kinds() do
|
|
|
|
# local kitem = module.kinds:get_item(kind)
|
|
|
|
# local has_description = kitem and ldoc.descript(kitem) ~= ""
|
2019-10-27 20:39:23 +01:00
|
|
|
# if not kind:match("^ldoc_skip") then
|
|
|
|
# if last_kind ~= "" then
|
|
|
|
</dl>
|
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
<h2 class="section-header $(has_description and 'has-description')"><a name="$(no_spaces(kind))"></a>$(kind)</h2>
|
2019-10-27 20:39:23 +01:00
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
$(M(module.kinds:get_section_description(kind),nil))
|
|
|
|
# if kitem then
|
|
|
|
# if has_description then
|
|
|
|
<div class="section-description">
|
|
|
|
$(M(ldoc.descript(kitem),kitem))
|
|
|
|
</div>
|
|
|
|
# end
|
|
|
|
# if kitem.usage then
|
|
|
|
<h3>Usage:</h3>
|
|
|
|
<pre class="example">$(ldoc.prettify(kitem.usage[1]))</pre>
|
|
|
|
# end
|
|
|
|
# end
|
2019-10-27 20:39:23 +01:00
|
|
|
# if not kind:match("^ldoc_skip") then
|
2019-01-04 14:19:21 +01:00
|
|
|
<dl class="function">
|
2019-10-27 20:39:23 +01:00
|
|
|
# end
|
2019-01-04 14:19:21 +01:00
|
|
|
# for item in items() do
|
|
|
|
<dt>
|
|
|
|
<a name = "$(item.name)"></a>
|
|
|
|
<strong>$(display_name(item))</strong>
|
2019-11-23 13:58:47 +01:00
|
|
|
# if item.display_inheritance then
|
|
|
|
<span class="inheritance">
|
|
|
|
· Inherited from
|
|
|
|
<a href="$(item.display_inheritance)">$(item.display_inheritance)</a>
|
2019-11-28 09:04:26 +01:00
|
|
|
</span>
|
|
|
|
# end -- display_inheritance
|
2019-06-08 04:53:36 +02:00
|
|
|
# if item.display_type then
|
|
|
|
<span class="proptype">($(item.display_type))</span>
|
|
|
|
# end
|
2019-11-28 09:04:26 +01:00
|
|
|
<span class="baseclass" $(nowrap)>
|
2019-11-26 13:46:44 +01:00
|
|
|
# if item.inherited then
|
2019-11-28 09:04:26 +01:00
|
|
|
· Inherited from $(item.baseclass)
|
2019-11-26 13:46:44 +01:00
|
|
|
# end
|
2019-11-28 09:04:26 +01:00
|
|
|
# if item.extra_summary then
|
|
|
|
# for _, col in ldoc.ipairs(item.extra_summary) do
|
2019-12-31 07:45:43 +01:00
|
|
|
· $((col.showcount and col.count.." " or "")..col.title)
|
2019-11-28 09:04:26 +01:00
|
|
|
# end -- summary col
|
|
|
|
# end -- summary
|
|
|
|
</span>
|
2019-01-04 14:19:21 +01:00
|
|
|
# if ldoc.prettify_files and ldoc.is_file_prettified[item.module.file.filename] then
|
|
|
|
<a style="float:right;" href="$(ldoc.source_ref(item))">line $(item.lineno)</a>
|
|
|
|
# end
|
|
|
|
</dt>
|
|
|
|
<dd>
|
|
|
|
$(M(ldoc.descript(item),item))
|
|
|
|
|
2019-06-08 04:53:36 +02:00
|
|
|
# if show_parms and item.params and #item.params > 0 and not item.hide_params then
|
2019-01-04 14:19:21 +01:00
|
|
|
# local subnames = module.kinds:type_of(item).subnames
|
|
|
|
# if subnames then
|
|
|
|
<h3>$(subnames):</h3>
|
|
|
|
# end
|
|
|
|
<ul>
|
|
|
|
# for parm in iter(item.params) do
|
|
|
|
# local param,sublist = item:subparam(parm)
|
|
|
|
# if sublist then
|
|
|
|
<li><span class="parameter">$(sublist)</span>$(M(item.params.map[sublist],item))
|
|
|
|
<ul>
|
|
|
|
# end
|
|
|
|
# for p in iter(param) do
|
|
|
|
# local name,tp,def = item:display_name_of(p), ldoc.typename(item:type_of_param(p)), item:default_of_param(p)
|
|
|
|
<li><span class="parameter">$(name)</span>
|
|
|
|
# if tp ~= '' then
|
|
|
|
<span class="types">$(tp)</span>
|
|
|
|
# end
|
|
|
|
$(M(item.params.map[p],item))
|
|
|
|
# if def == true then
|
|
|
|
(<em>optional</em>)
|
|
|
|
# elseif def then
|
|
|
|
(<em>default</em> $(def))
|
|
|
|
# end
|
|
|
|
# if item:readonly(p) then
|
|
|
|
<em>readonly</em>
|
|
|
|
# end
|
|
|
|
</li>
|
|
|
|
# end
|
|
|
|
# if sublist then
|
|
|
|
</li></ul>
|
|
|
|
# end
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if params
|
|
|
|
|
|
|
|
# if show_return and item.retgroups then local groups = item.retgroups
|
|
|
|
<h3>Returns:</h3>
|
|
|
|
# for i,group in ldoc.ipairs(groups) do local li,il = use_li(group)
|
|
|
|
<ol>
|
|
|
|
# for r in group:iter() do local type, ctypes = item:return_type(r); local rt = ldoc.typename(type)
|
|
|
|
$(li)
|
|
|
|
# if rt ~= '' then
|
|
|
|
<span class="types">$(rt)</span>
|
|
|
|
# end
|
|
|
|
$(M(r.text,item))$(il)
|
|
|
|
# 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
|
|
|
|
# end -- for r
|
|
|
|
</ol>
|
|
|
|
# if i < #groups then
|
|
|
|
<h3>Or</h3>
|
|
|
|
# end
|
|
|
|
# end -- for group
|
|
|
|
# end -- if returns
|
|
|
|
|
|
|
|
# if show_return and item.raise then
|
|
|
|
<h3>Raises:</h3>
|
|
|
|
$(M(item.raise,item))
|
|
|
|
# end
|
|
|
|
|
|
|
|
# if item.see then
|
|
|
|
# local li,il = use_li(item.see)
|
|
|
|
<h3>See also:</h3>
|
|
|
|
<ul>
|
|
|
|
# for see in iter(item.see) do
|
|
|
|
$(li)<a href="$(ldoc.href(see))">$(see.label)</a>$(il)
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if see
|
|
|
|
|
|
|
|
# if item.usage then
|
|
|
|
# local li,il = use_li(item.usage)
|
|
|
|
<h3>Usage:</h3>
|
|
|
|
<ul>
|
|
|
|
# for usage in iter(item.usage) do
|
|
|
|
$(li)<pre class="example">$(ldoc.prettify(usage))</pre>$(il)
|
|
|
|
# end -- for
|
|
|
|
</ul>
|
|
|
|
# end -- if usage
|
|
|
|
|
2019-12-31 07:45:43 +01:00
|
|
|
# if item.has_show_more then
|
2019-11-28 09:04:26 +01:00
|
|
|
<br />
|
|
|
|
<center id=button$(item.uid)>
|
|
|
|
<a class="show_more_button" onclick="show_extra('$(item.uid)')">
|
|
|
|
Click to display more
|
|
|
|
</a>
|
|
|
|
</center>
|
|
|
|
# end
|
2019-11-25 05:59:27 +01:00
|
|
|
|
|
|
|
<span id=item$(item.uid) class="hide_extra">
|
|
|
|
# if ldoc.custom_tags then
|
|
|
|
# for custom in iter(ldoc.custom_tags) do
|
|
|
|
# local tag = item.tags[custom[1]]
|
|
|
|
# if tag and not custom.hidden then
|
|
|
|
# local group_begin, group_end, row_type_begin, row_type_end, group_header = item.get_delim(custom[1])
|
|
|
|
<h3>$(custom.title or custom[1]):</h3>
|
|
|
|
<$(group_begin)>
|
|
|
|
# if group_header then
|
|
|
|
<tr style='font-weight: bold;'>
|
|
|
|
# for _, g in ldoc.ipairs(group_header) do
|
|
|
|
<th>$(g)</th>
|
|
|
|
# end -- for g
|
|
|
|
</tr>
|
|
|
|
# end -- if group_header then
|
|
|
|
# for value in iter(tag) do
|
|
|
|
<$(row_type_begin)>$(custom.format and custom.format(value, item, M) or M(value))</$(row_type_end)>
|
|
|
|
# local sub_values, sub_custom = item.get_auto_params(custom[1], value)
|
|
|
|
# if sub_values then
|
|
|
|
<ul>
|
|
|
|
# for _, value in ldoc.ipairs(sub_values) do
|
|
|
|
<li>$(sub_custom.format(value, item, M))</li>
|
|
|
|
# end -- for auto_params
|
|
|
|
</ul>
|
|
|
|
# end -- if item.auto_params
|
|
|
|
# end -- for
|
|
|
|
</$(group_end)>
|
|
|
|
# end -- if tag
|
|
|
|
# end -- iter tags
|
|
|
|
# end -- ldoc.custom_tags
|
|
|
|
</span>
|
2019-11-24 09:59:38 +01:00
|
|
|
|
2019-01-04 14:19:21 +01:00
|
|
|
</dd>
|
|
|
|
# end -- for items
|
2019-10-27 20:39:23 +01:00
|
|
|
# last_kind = kind
|
2019-01-04 14:19:21 +01:00
|
|
|
# end -- for kinds
|
2019-10-27 20:39:23 +01:00
|
|
|
</dl>
|
2019-01-04 14:19:21 +01:00
|
|
|
|
|
|
|
# else -- if module; project-level contents
|
|
|
|
|
|
|
|
# if ldoc.description then
|
|
|
|
<h2>$(M(ldoc.description,nil))</h2>
|
|
|
|
# end
|
|
|
|
# if ldoc.full_description then
|
|
|
|
<p>$(M(ldoc.full_description,nil))</p>
|
|
|
|
# end
|
|
|
|
|
|
|
|
# for kind, mods in ldoc.kinds() do
|
|
|
|
<h2>$(kind)</h2>
|
|
|
|
# kind = kind:lower()
|
|
|
|
<table class="module_list">
|
|
|
|
# for m in mods() do
|
2019-07-09 23:00:20 +02:00
|
|
|
<tr>
|
|
|
|
<td class="name" $(nowrap)><a href="$(html_space(kind))/$(m.name).html">$(m.name)</a></td>
|
|
|
|
<td class="summary">$(M(ldoc.strip_header(m.summary),m))</td>
|
|
|
|
</tr>
|
2019-01-04 14:19:21 +01:00
|
|
|
# end -- for modules
|
|
|
|
</table>
|
|
|
|
# end -- for kinds
|
|
|
|
# end -- if module
|
|
|
|
|
|
|
|
</div> <!-- id="content" -->
|
|
|
|
</div> <!-- id="main" -->
|
|
|
|
<div id="about">
|
|
|
|
<i>generated by <a href="http://github.com/stevedonovan/LDoc">LDoc $(ldoc.version)</a></i>
|
|
|
|
<i style="float:right;">Last updated $(ldoc.updatetime) </i>
|
|
|
|
</div> <!-- id="about" -->
|
|
|
|
</div> <!-- id="container" -->
|
|
|
|
</body>
|
|
|
|
</html>
|