[tekui-devel] tekui: Visual, Display: added getTime(); removed checkFocus(), g...

Timm S. Mueller tmueller at neoscientists.org
Tue Apr 22 20:02:31 CEST 2008


details:   http://hg.teklib.org/tekui/rev/097c04f6117d
changeset: 438:097c04f6117d
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Tue Apr 22 00:16:04 2008 +0200
description:
Visual, Display: added getTime(); removed checkFocus(), getSelectedByXY(),
getHiliteByXY(); Mode attribute moved from Gadget to Area; Handle: Mode is now
"button", some cleanup; TextInput: KEYUP events are now swallowed when
editing; Window: added doubleclick detection, added distinction between Hover-
and HiliteElement

diffs (truncated from 770 to 100 lines):

diff -r 4e62c68aad7e -r 097c04f6117d tek/app/ui/sudoku.lua
--- a/tek/app/ui/sudoku.lua	Mon Apr 21 11:04:52 2008 +0200
+++ b/tek/app/ui/sudoku.lua	Tue Apr 22 00:16:04 2008 +0200
@@ -128,10 +128,6 @@ function sudokubutton:onRelease()
 		self:setLabel(n and tostring(n))
 		self.Application:modify()
 	end
-end
-
-function sudokubutton:checkFocus()
-	return self.changeable and ui.text.checkFocus(self)
 end
 
 function sudokubutton:setState()
diff -r 4e62c68aad7e -r 097c04f6117d tek/class/ui/area.lua
--- a/tek/class/ui/area.lua	Mon Apr 21 11:04:52 2008 +0200
+++ b/tek/class/ui/area.lua	Tue Apr 22 00:16:04 2008 +0200
@@ -37,7 +37,7 @@ local floor = math.floor
 local floor = math.floor
 
 module("tek.class.ui.area", tek.class.ui.element)
-_VERSION = "Area 5.20"
+_VERSION = "Area 6.0"
 local Area = _M
 
 -------------------------------------------------------------------------------
@@ -91,6 +91,8 @@ function Area.init(self)
 	self.MinHeight = self.MinHeight or 0
 	-- Minimum width of the element:
 	self.MinWidth = self.MinWidth or 0
+	-- Mode of behavior ("inert", "toggle", "touch", "button"):
+	self.Mode = self.Mode or "inert"
 	-- Indicates whether the element needs to be redrawn:
 	self.Redraw = false
 	-- Selected state of the element (defined, but not handled by Area):
@@ -376,28 +378,6 @@ end
 end
 
 -------------------------------------------------------------------------------
---	self = area:getHiliteByXY(x, y): Returns itself if the element covers
---	the specified coordinate and is hiliteable. Note: As an Area is not
---	hiliteable, this implementation always returns '''nil'''. See also
---	Gadget:getHiliteByXY().
--------------------------------------------------------------------------------
-
-function Area:getHiliteByXY()
-	return false
-end
-
--------------------------------------------------------------------------------
---	self = area:getSelectedByXY(x, y): Returns itself if the element covers
---	the specified coordinate and can be activated. Note: As an Area cannot
---	be activated, this implementation always returns '''nil'''. See also
---	Gadget:getSelectedByXY().
--------------------------------------------------------------------------------
-
-function Area:getSelectedByXY()
-	return false
-end
-
--------------------------------------------------------------------------------
 --	msg = area:passMsg(msg): This function filters an input message.
 --	Afer processing, it is free to return the message unmodified (thus
 --	passing it to the next message handler), to return a copy that has
@@ -410,14 +390,6 @@ end
 end
 
 -------------------------------------------------------------------------------
---	checkFocus(): Returns true if the element can receive the focus.
--------------------------------------------------------------------------------
-
-function Area:checkFocus()
-	return false
-end
-
--------------------------------------------------------------------------------
 --	setState:
 -------------------------------------------------------------------------------
 
diff -r 4e62c68aad7e -r 097c04f6117d tek/class/ui/canvas.lua
--- a/tek/class/ui/canvas.lua	Mon Apr 21 11:04:52 2008 +0200
+++ b/tek/class/ui/canvas.lua	Tue Apr 22 00:16:04 2008 +0200
@@ -20,7 +20,7 @@ local overlap = ui.Region.overlapCoords
 local overlap = ui.Region.overlapCoords
 
 module("tek.class.ui.canvas", tek.class.ui.frame)
-_VERSION = "Canvas 1.11"
+_VERSION = "Canvas 1.12"
 local Canvas = _M
 
 local DEF_CANVASAREA_MARGIN = { 0, 0, 0, 0 }
@@ -274,24 +274,6 @@ end
 end
 
 -------------------------------------------------------------------------------
---	getHiliteByXY:
--------------------------------------------------------------------------------
-
-function Canvas:getHiliteByXY(x, y)
-	local sx, sy = self:checkArea(x, y)


More information about the tekui-devel mailing list