[tekui-devel] tekui: Removed tek.os.posix; Text, MenuItem: optimized rendering...

Timm S. Mueller tmueller at neoscientists.org
Wed Apr 9 22:00:20 CEST 2008


details:   http://hg.teklib.org/tekui/rev/c5337aa81c7b
changeset: 412:c5337aa81c7b
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Wed Apr 09 12:19:12 2008 +0200
description:
Removed tek.os.posix; Text, MenuItem: optimized rendering, calculations now
taking place in layout(); Class, Element, Object: improved documentation;
Area, MenuItem, Text: separated in new() and init(); Drawable, CheckMark,
MenuItem: AspectRatio separated in AspectX and AspectY

diffs (truncated from 1144 to 100 lines):

diff -r 1d0ac74aa315 -r c5337aa81c7b TODO
--- a/TODO	Tue Apr 08 23:41:29 2008 +0200
+++ b/TODO	Wed Apr 09 12:19:12 2008 +0200
@@ -26,7 +26,7 @@
  * Keyboard shortcuts
  * Localisation
  * Run in TEKlib-Lua-Interpreter
- * Document generator should be compatible with LFS
+ * Document generator should be compatible with LFS [ok]
  * realtime modification of attributes affecting layout [ok]
 
 === Bugs ===
diff -r 1d0ac74aa315 -r c5337aa81c7b build/tmkmakefile
--- a/build/tmkmakefile	Tue Apr 08 23:41:29 2008 +0200
+++ b/build/tmkmakefile	Wed Apr 09 12:19:12 2008 +0200
@@ -8,9 +8,6 @@
 	[embed body="meta"]
 		tek/class
 	[/embed]
-	[embed body="meta"]
-		tek/os
-	[/embed]
 [/body]
 
 [include name="BUILD:builds.tmk"/]
diff -r 1d0ac74aa315 -r c5337aa81c7b tek/class.lua
--- a/tek/class.lua	Tue Apr 08 23:41:29 2008 +0200
+++ b/tek/class.lua	Wed Apr 09 12:19:12 2008 +0200
@@ -9,12 +9,12 @@
 --		Class - implements inheritance and the creation of objects from classes
 --
 --	FUNCTIONS::
---	- Class:checkDescend() - Checks if an object descends from a class
---	- Class:getClass() - Returns class of an object or superclass of a class
---	- Class:getClassName() - Returns class name of an object or class
---	- Class.new() - Creates and returns a new object
---	- Class.newClass() - Creates a child class from a superclass
---	- Class:setClass() - Changes class of an object or superclass of a class
+--		- Class:checkDescend() - Checks if an object descends from a class
+--		- Class:getClass() - Returns class of an object or superclass of a class
+--		- Class:getClassName() - Returns class name of an object or class
+--		- Class.new() - Creates and returns a new object
+--		- Class.newClass() - Creates a child class from a superclass
+--		- Class:setClass() - Changes class of an object or superclass of a class
 --
 -------------------------------------------------------------------------------
 
@@ -29,7 +29,7 @@ local DEBUG = true
 local DEBUG = true
 
 module "tek.class"
-_VERSION = "Class 5.0"
+_VERSION = "Class 5.1"
 
 local Class = _M
 
diff -r 1d0ac74aa315 -r c5337aa81c7b tek/class/ui/area.lua
--- a/tek/class/ui/area.lua	Tue Apr 08 23:41:29 2008 +0200
+++ b/tek/class/ui/area.lua	Wed Apr 09 12:19:12 2008 +0200
@@ -36,7 +36,7 @@ local floor = math.floor
 local floor = math.floor
 
 module("tek.class.ui.area", tek.class.ui.element)
-_VERSION = "Area 5.10"
+_VERSION = "Area 5.11"
 local Area = _M
 
 -------------------------------------------------------------------------------
@@ -49,6 +49,17 @@ local NOTIFY_WEIGHT = { ui.NOTIFY_SELF, 
 -------------------------------------------------------------------------------
 --	Class implementation:
 -------------------------------------------------------------------------------
+
+function Area.new(class, self)
+	self = self or { }
+	-- Combined margin and border offsets of the element:
+	self.MarginAndBorder = { }
+	-- Calculated minimum/maximum sizes of the element:
+	self.MinMax = { }
+	-- The layouted rectangle of the element on the display:
+	self.Rect = { }
+	return Element.new(class, self)
+end
 
 function Area.init(self)
 	-- Element's background properties (color, pattern...):
@@ -70,19 +81,19 @@ function Area.init(self)
 	-- Margin offsets of the element:
 	self.Margin = self.Margin or false
 	-- Combined margin and border offsets of the element:
-	self.MarginAndBorder = { }
+	self.MarginAndBorder = { } -- TODO
 	-- Maximum height of the element:
 	self.MaxHeight = self.MaxHeight or false
 	-- Maximum width of the element:
 	self.MaxWidth = self.MaxWidth or false
 	-- Minimum height of the element:
-	self.MinHeight = self.MinHeight or false
+	self.MinHeight = self.MinHeight or 0
 	-- Minimum width of the element:


More information about the tekui-devel mailing list