[tekui-devel] tekui: Window, Group, Slider: Various refreshing bugs corrected ...

Timm S. Mueller tmueller at schulze-mueller.de
Fri Jul 4 15:38:05 CEST 2008


details:   http://hg.teklib.org/tekui/rev/c6cfe5d1fa42
changeset: 3:c6cfe5d1fa42
user:      Timm S. Mueller <tmueller at schulze-mueller.de>
date:      Fri Jul 04 15:37:11 2008 +0200
description:
Window, Group, Slider: Various refreshing bugs corrected (double and missing
repaints); Area:rethinkLayout(), Window:addLayoutGroup() now take a numerical
'damage' argument; Canvas:onSetChild() added; Group:layout() now returns true
only if group geometry changed; ScrollGroup: cleanup; Slider: knobs are no
longer repainted unconditionally

diffs (truncated from 717 to 100 lines):

diff -r dcea1cc4204d -r c6cfe5d1fa42 bin/dynamic.lua
--- a/bin/dynamic.lua	Mon Jun 30 13:50:31 2008 +0200
+++ b/bin/dynamic.lua	Fri Jul 04 15:37:11 2008 +0200
@@ -154,9 +154,9 @@ ui.application:new
 									ui.NOTIFY_SELF, ui.NOTIFY_FUNCTION, function(self, val)
 										local e = self.Application:getElementById("border-button")
 										e.Border = { val, val, val, val }
-										e:rethinkLayout(true)
+										e:rethinkLayout(1)
 										self.Border = { val, val, val, val }
-										self:rethinkLayout(true)
+										self:rethinkLayout(1)
 									end, ui.NOTIFY_VALUE
 								}
 							}
diff -r dcea1cc4204d -r c6cfe5d1fa42 doc/manual.html
--- a/doc/manual.html	Mon Jun 30 13:50:31 2008 +0200
+++ b/doc/manual.html	Fri Jul 04 15:37:11 2008 +0200
@@ -1720,7 +1720,7 @@
 			</p>
 			<hr />
 		</div>
-		<div class="node"><h2><a name="tek.ui.class.text" id="tek.ui.class.text">Text (v11.0)</a></h2>
+		<div class="node"><h2><a name="tek.ui.class.text" id="tek.ui.class.text">Text (v11.1)</a></h2>
 			<div class="definition"><dfn>LINEAGE</dfn>
 				<blockquote>
 					<p>
@@ -1940,7 +1940,7 @@
 			</p>
 			<hr />
 		</div>
-		<div class="node"><h2><a name="tek.ui.class.handle" id="tek.ui.class.handle">Handle (v3.0)</a></h2>
+		<div class="node"><h2><a name="tek.ui.class.handle" id="tek.ui.class.handle">Handle (v3.1)</a></h2>
 			<div class="definition"><dfn>LINEAGE</dfn>
 				<blockquote>
 					<p>
@@ -1995,7 +1995,7 @@
 				<hr />
 			</div>
 		</div>
-		<div class="node"><h2><a name="tek.ui.class.slider" id="tek.ui.class.slider">Slider (v6.4)</a></h2>
+		<div class="node"><h2><a name="tek.ui.class.slider" id="tek.ui.class.slider">Slider (v6.5)</a></h2>
 			<div class="definition"><dfn>LINEAGE</dfn>
 				<blockquote>
 					<p>
@@ -2309,7 +2309,7 @@
 			</p>
 			<hr />
 		</div>
-		<div class="node"><h2><a name="tek.ui.class.area" id="tek.ui.class.area">Area (v9.0)</a></h2>
+		<div class="node"><h2><a name="tek.ui.class.area" id="tek.ui.class.area">Area (v10.0)</a></h2>
 			<div class="definition"><dfn>LINEAGE</dfn>
 				<blockquote>
 					<p>
@@ -2622,16 +2622,26 @@
 			</p>
 			<hr />
 		</div>
-		<div class="node"><h3><a name="Area:rethinkLayout" id="Area:rethinkLayout"><code>Area:rethinkLayout(damage)</code></a></h3>
+		<div class="node"><h3><a name="Area:rethinkLayout" id="Area:rethinkLayout"><code>Area:rethinkLayout([damage])</code></a></h3>
 			<p>
 				This method causes a relayout of the
 				element and possibly the <a href="#tek.ui.class.group">Group</a> in which it
-				resides. While the request bubbles up to the topmost group (the
-				<a href="#tek.ui.class.window">Window</a>), the argument <code>damage</code> (a boolean)
-				can be used to avoid unconditionally marking parent groups as damaged,
-				thus allowing them to be repainted only if their layout actually changed
-				due to modifications in their children.
-			</p>
+				resides. The optional numeric argument <code>damage</code> indicates the kind
+				of damage to apply to the element:
+			</p>
+			<blockquote>
+				<ul>
+					<li style="list-style-type: none">
+						0 - do not mark the element as damaged
+					</li>
+					<li style="list-style-type: none">
+						1 - slate the group (not its contents) for repaint &#091;default&#093;
+					</li>
+					<li style="list-style-type: none">
+						2 - mark the whole group and its contents as damaged
+					</li>
+				</ul>
+			</blockquote>
 			<hr />
 		</div>
 		<div class="node"><h3><a name="Area:onSetWeight" id="Area:onSetWeight"><code>onSetWeight(weight)</code></a></h3>
@@ -3125,7 +3135,7 @@
 				<hr />
 			</div>
 		</div>
-		<div class="node"><h2><a name="tek.ui.class.scrollgroup" id="tek.ui.class.scrollgroup">ScrollGroup (v8.2)</a></h2>
+		<div class="node"><h2><a name="tek.ui.class.scrollgroup" id="tek.ui.class.scrollgroup">ScrollGroup (v8.3)</a></h2>
 			<div class="definition"><dfn>LINEAGE</dfn>
 				<blockquote>
 					<p>
@@ -3354,7 +3364,7 @@
 				<hr />
 			</div>


More information about the tekui-devel mailing list