[tekui-devel] tekui: Now uses element:canFocus() do determine if an element ca...
Timm S. Mueller
tmueller at neoscientists.org
Wed Mar 19 18:40:56 CET 2008
details: http://hg.teklib.org/tekui/rev/24e3b312e68c
changeset: 366:24e3b312e68c
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Sun Mar 16 14:04:13 2008 +0100
description:
Now uses element:canFocus() do determine if an element can receive focus
diffs (68 lines):
diff -r 89b6572d5c4f -r 24e3b312e68c tek/class/ui/area.lua
--- a/tek/class/ui/area.lua Sat Mar 15 02:52:23 2008 +0100
+++ b/tek/class/ui/area.lua Sun Mar 16 14:04:13 2008 +0100
@@ -30,7 +30,7 @@ local floor = math.floor
local floor = math.floor
module("tek.class.ui.area", tek.class.ui.element)
-_VERSION = "Area 4.3"
+_VERSION = "Area 4.4"
local Area = _M
-------------------------------------------------------------------------------
@@ -354,3 +354,10 @@ function Area:filterInput(msg, element)
return msg
end
end
+
+-------------------------------------------------------------------------------
+-- canFocus(): Returns true if the element can receive the focus.
+-------------------------------------------------------------------------------
+
+function Area:canFocus()
+end
diff -r 89b6572d5c4f -r 24e3b312e68c tek/class/ui/gadget.lua
--- a/tek/class/ui/gadget.lua Sat Mar 15 02:52:23 2008 +0100
+++ b/tek/class/ui/gadget.lua Sun Mar 16 14:04:13 2008 +0100
@@ -22,7 +22,7 @@ local Frame = ui.Frame
local Frame = ui.Frame
module("tek.class.ui.gadget", tek.class.ui.frame)
-_VERSION = "Gadget 1.5"
+_VERSION = "Gadget 1.6"
local Gadget = _M
@@ -173,3 +173,11 @@ end
function Gadget:endMove()
end
+
+-------------------------------------------------------------------------------
+-- canFocus(): Returns true if the element can receive the focus.
+-------------------------------------------------------------------------------
+
+function Gadget:canFocus()
+ return not self.Disabled
+end
diff -r 89b6572d5c4f -r 24e3b312e68c tek/class/ui/window.lua
--- a/tek/class/ui/window.lua Sat Mar 15 02:52:23 2008 +0100
+++ b/tek/class/ui/window.lua Sun Mar 16 14:04:13 2008 +0100
@@ -20,7 +20,7 @@ local insert, remove, sort = table.inser
local insert, remove, sort = table.insert, table.remove, table.sort
module("tek.class.ui.window", tek.class.ui.group)
-_VERSION = "Window 1.13"
+_VERSION = "Window 1.14"
-------------------------------------------------------------------------------
-- Constants & Class data:
@@ -475,7 +475,7 @@ function Window:getNextElement(e, delta)
if e == olde then
return olde
end
- if e:getHiliteByXY(e.Rect[1], e.Rect[2]) then
+ if e:getFocus() then
return e
end
end
More information about the tekui-devel
mailing list