[tekui-devel] tekui: Area.Width, Area.Height added, Area.HAlign keys are "left...

Timm S. Mueller tmueller at neoscientists.org
Sat Apr 12 15:53:53 CEST 2008


details:   http://hg.teklib.org/tekui/rev/b70fdccdfb34
changeset: 422:b70fdccdfb34
user:      Timm S. Mueller <tmueller at neoscientists.org>
date:      Fri Apr 11 01:28:23 2008 +0200
description:
Area.Width, Area.Height added, Area.HAlign keys are "left", "center", "right",
Area.VAlign keys are "top", "center", "bottom"; Text.TextAlign attribute
renamed to TextHAlign, keys are "left", "center", "right"; Layouter adapted;
Spacer.init() removed

diffs (truncated from 520 to 100 lines):

diff -r cd2ce9f795b7 -r b70fdccdfb34 tek/app/ui/alignment.lua
--- a/tek/app/ui/alignment.lua	Fri Apr 11 00:26:58 2008 +0200
+++ b/tek/app/ui/alignment.lua	Fri Apr 11 01:28:23 2008 +0200
@@ -21,9 +21,9 @@ ui.Application:new
 					Legend = "Align Horizontal",
 					Children =
 					{
-						ui.text:new { Label = "Begin", Mode = "button", Width = "auto", Height = "free", HAlign = 0 },
-						ui.text:new { Label = "Center", Mode = "button", Width = "auto", Height = "free", HAlign = 1 },
-						ui.text:new { Label = "End", Mode = "button", Width = "auto", Height = "free", HAlign = 2 },
+						ui.text:new { Label = "Begin", Mode = "button", Width = "auto", Height = "free", HAlign = "left" },
+						ui.text:new { Label = "Center", Mode = "button", Width = "auto", Height = "free", HAlign = "center" },
+						ui.text:new { Label = "End", Mode = "button", Width = "auto", Height = "free", HAlign = "right" },
 					},
 				},
 				ui.group:new
@@ -33,9 +33,9 @@ ui.Application:new
 					Legend = "Align Vertical",
 					Children =
 					{
-						ui.text:new { Label = "Begin", Mode = "button", Width = "free", Height = "auto", VAlign = 0 },
-						ui.text:new { Label = "Center", Mode = "button", Width = "free", Height = "auto", VAlign = 1 },
-						ui.text:new { Label = "End", Mode = "button", Width = "free", Height = "auto", VAlign = 2 },
+						ui.text:new { Label = "Begin", Mode = "button", Width = "free", Height = "auto", VAlign = "top" },
+						ui.text:new { Label = "Center", Mode = "button", Width = "free", Height = "auto", VAlign = "center" },
+						ui.text:new { Label = "End", Mode = "button", Width = "free", Height = "auto", VAlign = "bottom" },
 					},
 				},
 			},
diff -r cd2ce9f795b7 -r b70fdccdfb34 tek/app/ui/bashing.lua
--- a/tek/app/ui/bashing.lua	Fri Apr 11 00:26:58 2008 +0200
+++ b/tek/app/ui/bashing.lua	Fri Apr 11 01:28:23 2008 +0200
@@ -7,9 +7,9 @@ ui.application:new {
 		ui.window:new {
 			GridW = 2,
 			Children = {
-				ui.lissa:new { MaxWidth = 400, VAlign = 2 },
+				ui.lissa:new { MaxWidth = 400, VAlign = "bottom" },
 				ui.lissa:new { MaxHeight = 400 },
-				ui.lissa:new { MaxHeight = 400, HAlign = 2 },
+				ui.lissa:new { MaxHeight = 400, HAlign = "right" },
 				ui.lissa:new { MaxWidth = 400 },
 			},
 		},
diff -r cd2ce9f795b7 -r b70fdccdfb34 tek/app/ui/demo.lua
--- a/tek/app/ui/demo.lua	Fri Apr 11 00:26:58 2008 +0200
+++ b/tek/app/ui/demo.lua	Fri Apr 11 01:28:23 2008 +0200
@@ -74,7 +74,7 @@ ui.Application:new
 						ui.Group:new
 						{
 							Height = "auto",
-							VAlign = 1,
+							VAlign = "center",
 							Children =
 							{
 								ui.Slider:new { HFreedom = true },
diff -r cd2ce9f795b7 -r b70fdccdfb34 tek/app/ui/gridalign.lua
--- a/tek/app/ui/gridalign.lua	Fri Apr 11 00:26:58 2008 +0200
+++ b/tek/app/ui/gridalign.lua	Fri Apr 11 01:28:23 2008 +0200
@@ -44,13 +44,13 @@ ui.application:new
 							Children =
 							{
 								ui.RadioButton:new { Label = "Left",
-									onPress = function(self) setouter(self, "HAlign", 0) end
+									onPress = function(self) setouter(self, "HAlign", "left") end
 								},
 								ui.RadioButton:new { Label = "Center", Selected = true,
-									onPress = function(self) setouter(self, "HAlign", 1) end
+									onPress = function(self) setouter(self, "HAlign", "center") end
 								},
 								ui.RadioButton:new { Label = "Right",
-									onPress = function(self) setouter(self, "HAlign", 2) end
+									onPress = function(self) setouter(self, "HAlign", "right") end
 								},
 							},
 						},
@@ -61,13 +61,13 @@ ui.application:new
 							Children =
 							{
 								ui.RadioButton:new { Label = "Top",
-									onPress = function(self) setouter(self, "VAlign", 0) end
+									onPress = function(self) setouter(self, "VAlign", "top") end
 								},
 								ui.RadioButton:new { Label = "Center", Selected = true,
-									onPress = function(self) setouter(self, "VAlign", 1) end
+									onPress = function(self) setouter(self, "VAlign", "center") end
 								},
 								ui.RadioButton:new { Label = "Bottom",
-									onPress = function(self) setouter(self, "VAlign", 2) end
+									onPress = function(self) setouter(self, "VAlign", "bottom") end
 								},
 							},
 						},
@@ -77,8 +77,8 @@ ui.application:new
 				{
 					Legend = "Grids",
 					GridW = 2,
-					VAlign = 2,
-					HAlign = 2,
+					VAlign = "bottom",


More information about the tekui-devel mailing list