[tekui-devel] tekui: Input system renewed and simplified: removed dynamic inpu...
Timm S. Mueller
tmueller at neoscientists.org
Fri Apr 18 02:51:54 CEST 2008
details: http://hg.teklib.org/tekui/rev/50b4cbd0bdcb
changeset: 433:50b4cbd0bdcb
user: Timm S. Mueller <tmueller at neoscientists.org>
date: Fri Apr 18 01:13:15 2008 +0200
description:
Input system renewed and simplified: removed dynamic input handlers,
simplified message processing, all classes in the lineage of Gadget can now
implement their own passMsg() function; PopItem: PopupWindow is now a proper
local class; Filerequester example added
diffs (truncated from 1510 to 100 lines):
diff -r 12ce6c00340c -r 50b4cbd0bdcb tek/app/ui/filereq.lua
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/tek/app/ui/filereq.lua Fri Apr 18 01:13:15 2008 +0200
@@ -0,0 +1,85 @@
+#!/usr/bin/env lua
+
+require "tek.lib.debug".level = 4
+local ui = require "tek.lib.ui"
+
+-- app = ui.Application:new
+-- {
+-- Children =
+-- {
+-- ui.Window:new
+-- {
+-- Children =
+-- {
+-- ui.List:new { Text = "Hallo" }
+-- }
+-- }
+-- }
+-- }:run()
+
+
+
+
+ui.Application:new
+{
+ Children =
+ {
+ ui.Window:new
+ {
+ Title = "File requester",
+ Direction = "vertical",
+ WinWidth = 400,
+ WinHeight = 500,
+ Children =
+ {
+ ui.Group:new
+ {
+ Children =
+ {
+-- ui.List:new { Text = "Hallo", HSliderMode = "off", Weight = 0x0 },
+ ui.Handle:new
+ {
+ Mode = "button",
+ Notifications =
+ {
+ ["Pressed"] =
+ {
+ [false] =
+ {
+ {
+ ui.NOTIFY_SELF, function(self)
+ print "Hallo!"
+ end
+ }
+ }
+ }
+ }
+ },
+ ui.List:new { Text = "Hallo", HSliderMode = "off" },
+ }
+ },
+ ui.Group:new
+ {
+ Width = "fill",
+ GridW = 3,
+ Children =
+ {
+ ui.Text:new { Mode = "caption", Label = "Dir.", Width = "fill", Height = "fill" },
+ ui.TextInput:new { Label = "Directory" },
+ ui.Text:new { Mode = "button", Label = "Reload", Width = "auto" },
+
+ ui.Text:new { Mode = "caption", Label = "File", Width = "fill", Height = "fill" },
+ ui.TextInput:new { Label = "File" },
+ ui.Text:new { Mode = "button", Label = "Hidden", Width = "auto" },
+
+ ui.Text:new { Mode = "button", Label = "Open", Width = "auto" },
+ ui.Text:new { Width = "fill", Height = "fill", Label = "10 files, 10 dirs, 10 hidden" },
+ ui.Text:new { Mode = "button", Label = "Cancel", Width = "auto" },
+ }
+ }
+ }
+ }
+ }
+}:run()
+
+
diff -r 12ce6c00340c -r 50b4cbd0bdcb tek/app/ui/pop.lua
--- a/tek/app/ui/pop.lua Wed Apr 16 16:00:37 2008 +0200
+++ b/tek/app/ui/pop.lua Fri Apr 18 01:13:15 2008 +0200
@@ -116,6 +116,31 @@ local success, state = ui.application:ne
},
},
+ ui.popitem:new
+ {
+ Label = "Radiotest",
+ Children =
More information about the tekui-devel
mailing list