# HG changeset patch # User Jordan Miner # Date 1353774110 21600 # Node ID 97997a544ac07f48a120d240e66b91e36b83b234 # Parent 5c8c1c2e12c045f673963d7b358c547851ace35c Add a couple TODOs and clean up a logging statement. diff -r 5c8c1c2e12c0 -r 97997a544ac0 dynamin/gui/windows_window.d --- 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) + diff -r 5c8c1c2e12c0 -r 97997a544ac0 dynamin/painting/text_layout.d --- 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) {