Mercurial > projects > mde
comparison mde/gui/widget/contentFunctions.d @ 138:3468e9bfded1
Popup widgets: are simpler to use and can show content fields like DisplayContentWidget.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 07 Feb 2009 13:28:52 +0000 |
parents | 9f035cd139c6 |
children | 2ac3e0012788 |
comparison
equal
deleted
inserted
replaced
137:9f035cd139c6 | 138:3468e9bfded1 |
---|---|
47 IChildWidget editContent (IWidgetManager mgr, IParentWidget parent, widgetID id, WidgetData data, IContent c) { | 47 IChildWidget editContent (IWidgetManager mgr, IParentWidget parent, widgetID id, WidgetData data, IContent c) { |
48 // Note: SAFE_RECURSION enabled | 48 // Note: SAFE_RECURSION enabled |
49 if (c is null) throw new ContentException; | 49 if (c is null) throw new ContentException; |
50 if (cast(AStringContent) c) { | 50 if (cast(AStringContent) c) { |
51 if (cast(EnumContent) c) // can be PopupMenuWidget or ContentListWidget | 51 if (cast(EnumContent) c) // can be PopupMenuWidget or ContentListWidget |
52 return new ContentListWidget(mgr,parent,id,data,c); | 52 return new PopupMenuWidget(mgr,parent,id,data,c); |
53 if (cast(BoolContent) c) | 53 if (cast(BoolContent) c) |
54 return new BoolContentWidget(mgr,parent,id,data,c); | 54 return new BoolContentWidget(mgr,parent,id,data,c); |
55 return new AStringContentWidget(mgr,parent,id,data,c); | 55 return new AStringContentWidget(mgr,parent,id,data,c); |
56 } | 56 } |
57 if (cast(IContentList) c) | 57 if (cast(IContentList) c) |