[tekui-devel] tekui: gendoc: cosmetic changes; removed remaining traces of bgp...
Timm S. Mueller
tmueller at neoscientists.org
Sat Mar 29 05:06:25 CET 2008
details: http://hg.teklib.org/tekui/rev/08d144a9f538
changeset: 380:08d144a9f538
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Mon Mar 24 03:34:56 2008 +0100
description:
gendoc: cosmetic changes; removed remaining traces of bgpen passed to draw();
added TextInput:setState() and Slider:setState()
diffs (truncated from 362 to 100 lines):
diff -r 2d279bc7c074 -r 08d144a9f538 tek/app/gendoc.lua
--- a/tek/app/gendoc.lua Sun Mar 23 21:31:13 2008 +0100
+++ b/tek/app/gendoc.lua Mon Mar 24 03:34:56 2008 +0100
@@ -9,7 +9,7 @@
-- module("lse.class.fm.foo", lse.class.service) - class and superclass
-- --------... - beginning and end of a comment block
--
--- Text extraction begins with these markers:
+-- Text extraction begins with these markers in a comment block:
-- -- DEFINITION:: definition, e.g. SYNOPSIS, OVERVIEW
-- -- ret1, ... = funcname(arg1, ...): a function with results
-- -- funcname(arg1, arg2, ...): a function without results
@@ -173,6 +173,7 @@ function processfile(state, fname)
if doc and doc ~= "" then
addblock("%s\n", doc)
end
+
break
elseif line:match("^%-%-") then
parser = 1
@@ -598,15 +599,16 @@ if not args or args[3] then
print("Usage: gendoc.lua [path or filename] [options]")
print("Available options:")
print(" -h=HELP/S this help")
- print(" -p=PLAIN/S generate plain text intermediate format")
+ print(" -p=PLAIN/S generate formatted plain text instead of HTML")
print(" -n=NAME/F document name (rest of commandline will be used)")
- print("If a path is specified, this tool scans the filesystem for files")
- print("with the extension .lua and generates a HTML document containing")
- print("a class tree, library index and function reference from specially")
- print("crafted comments in the source code. A WIKI-like markup parser")
- print("will be used for formatting.")
- print("If a file is specified, it will be interpreted as plain text with")
- print("markup (the same format that is created with the -p option).")
+ print("If a path is specified, this path is scanned for files with the")
+ print("extension .lua. From these files, a HTML document is generated")
+ print("containing a class tree, library index and function reference")
+ print("from specially crafted comments in the source code. A WIKI-like")
+ print("parser will be used for formatting.")
+ print("If a file is specified instead of a path, this file will be")
+ print("interpreted as formatted plain text with markup in the same")
+ print("format as created with the -p option.")
else
diff -r 2d279bc7c074 -r 08d144a9f538 tek/app/ui/weight.lua
--- a/tek/app/ui/weight.lua Sun Mar 23 21:31:13 2008 +0100
+++ b/tek/app/ui/weight.lua Mon Mar 24 03:34:56 2008 +0100
@@ -15,8 +15,8 @@ end
local mybutton = ui.button:newClass()
-function mybutton:draw(bgpen)
- ui.frame.draw(self, bgpen)
+function mybutton:draw()
+ ui.frame.draw(self)
local Label = tostring(self.Rect[3] - self.Rect[1] - 1)
local d = self.Drawable
local p1, p2, p3, p4 = unpack(self.PaddingAndBorder)
diff -r 2d279bc7c074 -r 08d144a9f538 tek/class/ui/area.lua
--- a/tek/class/ui/area.lua Sun Mar 23 21:31:13 2008 +0100
+++ b/tek/class/ui/area.lua Mon Mar 24 03:34:56 2008 +0100
@@ -34,7 +34,7 @@ local floor = math.floor
local floor = math.floor
module("tek.class.ui.area", tek.class.ui.element)
-_VERSION = "Area 5.1"
+_VERSION = "Area 5.2"
local Area = _M
-------------------------------------------------------------------------------
@@ -275,7 +275,7 @@ end
function Area:draw()
local d = self.Drawable
- bgpen = d.Pens[self.Background]
+ local bgpen = d.Pens[self.Background]
local dr = self.DamageRegion
if dr then
-- repaint intra-area damagerects:
diff -r 2d279bc7c074 -r 08d144a9f538 tek/class/ui/floattext.lua
--- a/tek/class/ui/floattext.lua Sun Mar 23 21:31:13 2008 +0100
+++ b/tek/class/ui/floattext.lua Mon Mar 24 03:34:56 2008 +0100
@@ -87,12 +87,11 @@ function TextArea:cleanupDisplay()
Area.cleanupDisplay(self)
end
-function TextArea:draw(bgpen)
+function TextArea:draw()
local d = self.Drawable
- local pens = d.Pens
- bgpen = bgpen or pens[self.BackPen or ui.PEN_AREABACK]
- local fgpen = pens[ui.PEN_BUTTONTEXT]
+ local bgpen = d.Pens[self.BackPen or ui.PEN_AREABACK]
+ local fgpen = d.Pens[ui.PEN_BUTTONTEXT]
d:setFont(self.Font)
-- repaint intra-area damagerects:
diff -r 2d279bc7c074 -r 08d144a9f538 tek/class/ui/frame.lua
More information about the tekui-devel
mailing list