comparison mde/gui/widget/TextWidget.d @ 99:5de5810e3516

Implemented an editable TextContent widget; it's now possible to edit text options using the GUI. The widget supports moving the text entry-point using arrows and home/end, but there's no visual indicator or edit-point setting using the mouse.
author Diggory Hardy <diggory.hardy@gmail.com>
date Fri, 14 Nov 2008 12:44:32 +0000
parents dbf332403c6e
children 42e241e7be3e
comparison
equal deleted inserted replaced
98:49e7cfed4b34 99:5de5810e3516
74 74
75 /// Basic widget displaying a label from a content. 75 /// Basic widget displaying a label from a content.
76 class ContentLabelWidget : ATextWidget 76 class ContentLabelWidget : ATextWidget
77 { 77 {
78 this (IWidgetManager mgr, widgetID id, WidgetData data, IContent c) { 78 this (IWidgetManager mgr, widgetID id, WidgetData data, IContent c) {
79 debug assert (c, "content is null (code error)");
80 WDCheck (data, 3, 0); 79 WDCheck (data, 3, 0);
81 content = c; 80 content = c;
82 if (!content) throw new ContentException (); 81 if (!content) throw new ContentException ();
83 index = data.ints[1]; 82 index = data.ints[1];
84 adapter = mgr.renderer.getAdapter (content.toString(index), data.ints[2]); 83 adapter = mgr.renderer.getAdapter (content.toString(index), data.ints[2]);