diff --git a/config.ld b/config.ld index e7b667d..1c0727f 100644 --- a/config.ld +++ b/config.ld @@ -3,6 +3,8 @@ description = 'Lovely User Interfaces for Game Inventors' full_description = 'A UI library' file = { 'luigi' } format = 'markdown' +style = 'css' +template = 'css' new_type('widget', 'Widgets', true) new_type('attrib', 'Attributes', false) diff --git a/css/ldoc.css b/css/ldoc.css new file mode 100644 index 0000000..50644e6 --- /dev/null +++ b/css/ldoc.css @@ -0,0 +1,208 @@ +#product { display:none; } + +#main { max-width: 960px; margin: auto !important; } + +#content li { margin-left: 1.2em; } + +#content_top h1, #content_top h2 { } + +#content_top p, #content_top .function_list { } + +#content_top { } + +h1 { font-size: 200%; } +h2 { font-size: 150%; } + +h1, h2 { + font-weight: normal; + margin:16px 0; padding: 0; +} +h3 { + color: #999; + text-transform: uppercase; +} +h3, h4, h5, h6 { + font-size: 100%; + font-weight: bold; + margin:16px 0 0 0; padding: 0; +} + +dt strong { + font-family: monospace; +} + +code { + background: #fdfdfd; + border-radius: 3px; + padding: 1px 3px; + border: 1px solid #ddd; +} + +h1 code { + background: inherit; + border-radius: inherit; + padding: inherit; + border: inherit; +} + +body { + margin: 0; padding:0; + font-family: sans-serif; + color: #333; + line-height: 150%; + font-size: 12px; +} +ul, ol { margin: 0; padding: 0; } + +code, tt { font-family: monospace; } +span.parameter { font-family:monospace; } +span.parameter:after { content:":"; } +span.types:before { content:"("; } +span.types:after { content:")"; } +.type { font-weight: bold; font-style:italic } + +strong { font-weight: bold;} + +em { font-style: italic;} + +a:link { color: #369; text-decoration: none; font-weight: bold; } +a:visited { color: #369; text-decoration: none; } +a:link:hover { text-decoration: underline; } +a[href^="http"] { color: #963; } + +hr { + color:#cccccc; + background: #00007f; + height: 1px; +} + +blockquote { margin-left: 32px; } + +ul { list-style-type: disc; } + +p.name { + font-family: monospace; + padding-top: 16px; +} + +pre { + background-color: rgb(245, 245, 245); + border: 1px solid #ddd; + padding: 10px; + margin: 10px 0 10px 0; + overflow: auto; + font-family: monospace; + border-radius: 3px; +} + + +table.index { border: 1px #00007f; } +table.index td { text-align: left; vertical-align: top; } + +#container { + margin: 0; padding: 0; +} + +#product { + text-align: center; +} + +#product big { + font-size: 14pt; +} + +#main { +} + +#navigation { + float: left; + width: 192px; + background-color: #eee; + box-shadow: 0 0 8px rgba(0,0,0,0.5); + padding: 16px; + border-radius: 4px; +} + +#navigation br { + display: none; +} + +#navigation h2 { +} + +#navigation ul +{ + list-style-type: none; + margin: 1px 1px 10px 1px; +} + +#navigation li { + text-indent: -16px; + display: block; + margin: 4px 0px 0px 16px; +} + +#navigation li li a { + margin: 0px 4px 0px -16px; +} + +#content { + margin-left: 232px; + padding: 16px; + width: 700px; + position: relative; + z-index: 1; +} + +#about { + clear: both; + text-align: center; +} + +table.module_list, table.function_list { + border-collapse: collapse; +} +table.module_list td, table.function_list td { + border-width: 1px; + border-style: solid; + border-color: #cccccc; + padding: 8px 16px; +} +table.module_list td.name, table.function_list td.name { min-width: 200px; } +table.module_list td.summary, table.function_list td.summary { width: 100%; } + +#content dl { padding: 0; margin: 0; } +dl.table dt, dl.function dt { background: #ccc; + margin-top: 32px; padding: 16px; border-radius: 4px 4px 0 0; } +dl.table dd, dl.function dd { background: #eee; border: 1px solid #ccc; + margin: 0; padding: 16px; border-radius: 0 0 4px 4px; } +dl.table h3, dl.function h3 { } + +.section-header { + margin: 32px 0 16px; padding: 0; +} +.section-description { + margin: 16px 0; padding: 0; +} + +/* stop sublists from having initial vertical space */ +ul ul { margin-top: 0px; } +ol ul { margin-top: 0px; } +ol ol { margin-top: 0px; } +ul ol { margin-top: 0px; } + + +/* styles for prettification of source */ +pre .comment { color: #558817; } +pre .constant { color: #a8660d; } +pre .escape { color: #844631; } +pre .keyword { color: #2239a8; font-weight: bold; } +pre .library { color: #0e7c6b; } +pre .marker { color: #512b1e; background: #fedc56; font-weight: bold; } +pre .string { color: #a8660d; } +pre .number { color: #f8660d; } +pre .operator { color: #2239a8; font-weight: bold; } +pre .preprocessor, pre .prepro { color: #a33243; } +pre .global { color: #800080; } +pre .prompt { color: #558817; } +pre .url { color: #272fc2; text-decoration: underline; } diff --git a/css/ldoc.ltp b/css/ldoc.ltp new file mode 100644 index 0000000..c1b6f80 --- /dev/null +++ b/css/ldoc.ltp @@ -0,0 +1,302 @@ + + + + + $(ldoc.title) + + + + +
+ +
+ +
+
+
+ + +
+ +# ldoc.kinds.put_kind_first = function () end -- don't move crap around +# 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' + + + + + +
+ +
+# if ldoc.body then -- verbatim HTML as contents; 'non-code' entries + $(ldoc.body) +# elseif module then -- module documentation +

$(ldoc.module_typename(module)) $(module.name)

+

$(M(module.summary,module))

+

$(M(module.description,module))

+# if module.tags.include then + $(M(ldoc.include_file(module.tags.include))) +# end +# if module.see then +# local li,il = use_li(module.see) +

See also:

+
    +# for see in iter(module.see) do + $(li)$(see.label)$(il) +# end -- for +
+# end -- if see +# if module.usage then +# local li,il = use_li(module.usage) +

Usage:

+
    +# for usage in iter(module.usage) do + $(li)
    $(ldoc.prettify(usage))
    $(il) +# end -- for +
+# end -- if usage +# if module.info then +

Info:

+
    +# for tag, value in module.info:iter() do +
  • $(tag): $(M(value,module))
  • +# end +
+# 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) +# for kind,items in module.kinds() do +

$(kind)

+ +# for item in items() do + + + + +# end -- for items +
$(display_name(item))$(M(item.summary,item))
+#end -- for kinds + +#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 +# local show_parms = show_return +# for kind, items in module.kinds() do +# local kitem = module.kinds:get_item(kind) +# local has_description = kitem and ldoc.descript(kitem) ~= "" +

$(kind)

+ $(M(module.kinds:get_section_description(kind),nil)) +# if kitem then +# if has_description then +
+ $(M(ldoc.descript(kitem),kitem)) +
+# end +# if kitem.usage then +

Usage:

+
$(ldoc.prettify(kitem.usage[1]))
+# end +# end +
+# for item in items() do +
+ + $(display_name(item)) +# if ldoc.prettify_files and ldoc.is_file_prettified[item.module.file.filename] then + line $(item.lineno) +# end +
+
+ $(M(ldoc.descript(item),item)) + +# 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 li,il = use_li(tag) +

$(custom.title or custom[1]):

+
    +# for value in iter(tag) do + $(li)$(custom.format and custom.format(value) or M(value))$(il) +# end -- for +# end -- if tag +
+# end -- iter tags +# end + +# if show_parms and item.params and #item.params > 0 then +# local subnames = module.kinds:type_of(item).subnames +# if subnames then +

$(subnames):

+# end +
    +# for parm in iter(item.params) do +# local param,sublist = item:subparam(parm) +# if sublist then +
  • $(sublist)$(M(item.params.map[sublist],item)) +
      +# 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) +
    • $(name) +# if tp ~= '' then + $(tp) +# end + $(M(item.params.map[p],item)) +# if def == true then + (optional) +# elseif def then + (default $(def)) +# end +# if item:readonly(p) then + readonly +# end +
    • +# end +# if sublist then +
    +# end +# end -- for +
+# end -- if params + +# if show_return and item.retgroups then local groups = item.retgroups +

Returns:

+# for i,group in ldoc.ipairs(groups) do local li,il = use_li(group) +
    +# for r in group:iter() do local type, ctypes = item:return_type(r); local rt = ldoc.typename(type) + $(li) +# if rt ~= '' then + $(rt) +# end + $(M(r.text,item))$(il) +# if ctypes then +
      +# for c in ctypes:iter() do +
    • $(c.name) + $(ldoc.typename(c.type)) + $(M(c.comment,item))
    • +# end +
    +# end -- if ctypes +# end -- for r +
+# if i < #groups then +

Or

+# end +# end -- for group +# end -- if returns + +# if show_return and item.raise then +

Raises:

+ $(M(item.raise,item)) +# end + +# if item.see then +# local li,il = use_li(item.see) +

See also:

+
    +# for see in iter(item.see) do + $(li)$(see.label)$(il) +# end -- for +
+# end -- if see + +# if item.usage then +# local li,il = use_li(item.usage) +

Usage:

+
    +# for usage in iter(item.usage) do + $(li)
    $(ldoc.prettify(usage))
    $(il) +# end -- for +
+# end -- if usage + +
+# end -- for items +
+# end -- for kinds + +# else -- if module; project-level contents + +# if ldoc.description then +

$(M(ldoc.description,nil))

+# end +# if ldoc.full_description then +

$(M(ldoc.full_description,nil))

+# end + +# for kind, mods in ldoc.kinds() do +

$(kind)

+# kind = kind:lower() + +# for m in mods() do + + + + +# end -- for modules +
$(m.name)$(M(ldoc.strip_header(m.summary),m))
+# end -- for kinds +# end -- if module + +
+
+
+generated by LDoc 1.4.3 +Last updated $(ldoc.updatetime) +
+
+ + diff --git a/css/logo.png b/css/logo.png new file mode 100644 index 0000000..7475496 Binary files /dev/null and b/css/logo.png differ diff --git a/doc/classes/Event.html b/doc/classes/Event.html index 2b3a473..c00d867 100644 --- a/doc/classes/Event.html +++ b/doc/classes/Event.html @@ -1,10 +1,9 @@ - + - + Reference - + @@ -23,27 +22,14 @@
+

Class Event

Event class.

@@ -80,9 +73,8 @@ -
-
+

Tables

@@ -165,7 +157,7 @@
generated by LDoc 1.4.3 -Last updated 2015-12-15 19:13:36 +Last updated 2015-12-16 14:12:04
diff --git a/doc/classes/Layout.html b/doc/classes/Layout.html index 1ae345d..25e070b 100644 --- a/doc/classes/Layout.html +++ b/doc/classes/Layout.html @@ -1,10 +1,9 @@ - + - + Reference - + @@ -23,28 +22,14 @@
+

Class Layout

A Layout contains a tree of widgets with a single root widget.

Layouts will resize to fit the window unless a top or left @@ -130,9 +122,8 @@ and are trapped by the first layout that can handle the event -
-
+

Functions

Methods @@ -402,7 +393,7 @@ found, and focuses that widget.
generated by LDoc 1.4.3 -Last updated 2015-12-15 19:13:36 +Last updated 2015-12-16 14:12:04
diff --git a/doc/classes/Widget.html b/doc/classes/Widget.html index d65a8e1..03946c3 100644 --- a/doc/classes/Widget.html +++ b/doc/classes/Widget.html @@ -1,10 +1,9 @@ - + - + Reference - + @@ -23,31 +22,14 @@
+

Class Widget

Widget class.

@@ -76,13 +65,6 @@

-

Functions

- - - - - -
Widget.register (name, decorator)Register a custom widget type.

Methods

@@ -196,6 +178,13 @@
The Text object associated with the widget.
+

Static Functions

+ + + + + +
Widget.register (name, decorator)Register a custom widget type.

Constructor

@@ -204,39 +193,9 @@
-
-
+
-

Functions

- Methods -
-
- - Widget.register (name, decorator) -
-
- Register a custom widget type. - - -

Parameters:

-
    -
  • name - string - A unique name for this type of widget. -
  • -
  • decorator - function(Widget) - An initialization function for this type of widget. -
  • -
- - - - - -
-

Methods

@@ -837,6 +796,35 @@ initializers should run on the widget. + +
+

Static Functions

+ +
+
+ + Widget.register (name, decorator) +
+
+ Register a custom widget type. + + +

Parameters:

+
    +
  • name + string + A unique name for this type of widget. +
  • +
  • decorator + function(Widget) + An initialization function for this type of widget. +
  • +
+ + + + +

Constructor

@@ -882,7 +870,7 @@ This table is identical to the constructed widget.
generated by LDoc 1.4.3 -Last updated 2015-12-15 19:13:36 +Last updated 2015-12-16 14:12:04
diff --git a/doc/index.html b/doc/index.html index 4a4fb62..7170d5c 100644 --- a/doc/index.html +++ b/doc/index.html @@ -1,10 +1,9 @@ - + - + Reference - + @@ -23,14 +22,14 @@