changeset 105:97997a544ac0

Add a couple TODOs and clean up a logging statement.
author Jordan Miner <jminer7@gmail.com>
date Sat, 24 Nov 2012 10:21:50 -0600
parents 5c8c1c2e12c0
children acdbb30fee7e
files dynamin/gui/windows_window.d dynamin/painting/text_layout.d
diffstat 2 files changed, 10 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/dynamin/gui/windows_window.d	Fri Jul 06 18:39:45 2012 -0500
+++ b/dynamin/gui/windows_window.d	Sat Nov 24 10:21:50 2012 -0600
@@ -1026,3 +1026,6 @@
 	return DefWindowProc(hwnd, uMsg, wParam, lParam);
 }
 
+// TODO: backend tests
+// test that setting window.content.size doesn't include borders (I just saw this bug)
+
--- a/dynamin/painting/text_layout.d	Fri Jul 06 18:39:45 2012 -0500
+++ b/dynamin/painting/text_layout.d	Sat Nov 24 10:21:50 2012 -0600
@@ -642,7 +642,12 @@
 			throw new Exception("index must be at a valid code point, not inside one");
 	}
 
+	// {{{ layout()
 	protected void layout(Graphics g) {
+		if(layoutBoxes.length == 0)
+			throw new Exception("layoutBoxes must be set");
+		// TODO: need to be able to set just one rect, not an array of layoutBoxes
+
 		backend_preprocess(g);
 
 		version(TextLayoutDebug)
@@ -698,6 +703,7 @@
 		}
 		// if wrapping around an object, a tab should go on the other side of the object
 	}
+	// }}}
 
 	struct LayoutProgress {
 		int runIndex = 0;
@@ -1316,7 +1322,7 @@
 		assert(startAct >= 0);
 		if(lengthAct == -1)
 			lengthAct = t.text.length - startAct;
-		Stdout.format("s {0} l {1} s2 {2} l2 {3}", start, length, startAct, lengthAct).newline;
+		Stdout.format("test start: {0} len: {1} startAct: {2} lenAct: {3}", start, length, startAct, lengthAct).newline;
 		assert(start == startAct && length == lengthAct);
 	}
 	void assertLinePosition(TextLayout t, int line, float x, float y) {