comparison mde/gui/widget/miscContent.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 5de5810e3516
children 42e241e7be3e
comparison
equal deleted inserted replaced
100:0ea4a3e651ae 101:71f0f1f83620
26 26
27 /// Chooses the most appropriate content editing widget 27 /// Chooses the most appropriate content editing widget
28 IChildWidget editContent (IWidgetManager mgr, widgetID id, WidgetData data, IContent c) { 28 IChildWidget editContent (IWidgetManager mgr, widgetID id, WidgetData data, IContent c) {
29 if (cast(BoolContent) c) 29 if (cast(BoolContent) c)
30 return new BoolContentWidget(mgr,id,data,c); 30 return new BoolContentWidget(mgr,id,data,c);
31 else if (cast(TextContent) c) 31 else if (cast(ValueContent) c)
32 return new TextContentWidget(mgr,id,data,c); 32 return new ValueContentWidget(mgr,id,data,c);
33 else // generic uneditable option 33 else // generic uneditable option
34 return new DisplayContentWidget(mgr,id,data,c); 34 return new DisplayContentWidget(mgr,id,data,c);
35 } 35 }
36 36
37 /// Just displays the content 37 /// Just displays the content