Mercurial > projects > mde
diff mde/gui/widget/textContent.d @ 101:71f0f1f83620
Some path adjustments for windows (untested) and fonts. All types of option can be edited.
paths: support for getting the full path for a font when just the file name is entered, in order to unify usage on windows and linux.
paths: Used getSpecialPath for some windows paths; needs testing.
Content: Moved line-editing code to abstract ValueContent class and added some conversion functions, so that any type of ValueContent can be edited as text.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sun, 16 Nov 2008 17:03:47 +0000 |
parents | 0ea4a3e651ae |
children | 42e241e7be3e |
line wrap: on
line diff
--- a/mde/gui/widget/textContent.d Sat Nov 15 17:39:14 2008 +0000 +++ b/mde/gui/widget/textContent.d Sun Nov 16 17:03:47 2008 +0000 @@ -31,14 +31,14 @@ } } - -class TextContentWidget : ATextWidget +/// Capable of editing any ValueContent class +class ValueContentWidget : ATextWidget { this (IWidgetManager mgr, widgetID id, WidgetData data, IContent c) { WDCheck(data, 1); - content = cast(TextContent) c; - if (!content) content = new TextContent (null, null); - //throw new ContentException (); + content = cast(ValueContent) c; + if (!content) //content = new TextContent (null, null); + throw new ContentException (); adapter = mgr.renderer.getAdapter (content.toString(0)); super (mgr, id, data); } @@ -63,5 +63,5 @@ } protected: - TextContent content; + ValueContent content; }