Mercurial > projects > mde
diff mde/gui/widget/textContent.d @ 111:1655693702fc
Resolved ticket #4, allowing widgets to reload strings and recalculate sizes mid-run.
Removed prefinalize and finalize and added setup as the new second initialization phase, which can be re-run.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 06 Dec 2008 17:41:42 +0000 |
parents | 08651e8a8c51 |
children | fe061009029d |
line wrap: on
line diff
--- a/mde/gui/widget/textContent.d Fri Dec 05 11:29:39 2008 +0000 +++ b/mde/gui/widget/textContent.d Sat Dec 06 17:41:42 2008 +0000 @@ -38,7 +38,8 @@ WDMinCheck(data, 1); content = c; if (!content) throw new ContentException (); - adapter = mgr.renderer.getAdapter (content.toString(0)); + adapter = mgr.renderer.getAdapter (); + adapter.text = content.toString(0); super (mgr, id, data); } @@ -54,10 +55,14 @@ content = cast(AStringContent) c; if (!content) //content = new TextContent (null, null); throw new ContentException (); - adapter = mgr.renderer.getAdapter (content.toString(0)); - super (mgr, id, data); + adapter = mgr.renderer.getAdapter (); + adapter.text = content.toString(0); + super (mgr, id, data); } + bool isWSizable () { return true; } + bool isHSizable () { return true; } + /** On click, request keyboard input. */ int clickEvent (wdabs, wdabs, ubyte, bool state) { adapter.index = content.editIndex;