Mercurial > projects > mde
comparison mde/gui/widget/contentFunctions.d @ 163:24d77c52243f
Provided sensible conversions for setting the value of one AStringContent from another, along with unittest.
Updated layout and Translation unittests to run.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sat, 23 May 2009 15:47:32 +0200 |
parents | 2ac3e0012788 |
children | bb2f1a76346d |
comparison
equal
deleted
inserted
replaced
162:2476790223b8 | 163:24d77c52243f |
---|---|
49 // Note: SAFE_RECURSION enabled | 49 // Note: SAFE_RECURSION enabled |
50 if (c is null) throw new ContentException; | 50 if (c is null) throw new ContentException; |
51 if (cast(AStringContent) c) { | 51 if (cast(AStringContent) c) { |
52 if (cast(EnumContent) c) // can be PopupMenuWidget or ContentListWidget | 52 if (cast(EnumContent) c) // can be PopupMenuWidget or ContentListWidget |
53 return new PopupMenuWidget(mgr,parent,id,data,c); | 53 return new PopupMenuWidget(mgr,parent,id,data,c); |
54 if (cast(BoolContent) c) | 54 // if (cast(BoolContent) c) |
55 return new BoolContentWidget(mgr,parent,id,data,c); | 55 // return new BoolContentWidget(mgr,parent,id,data,c); |
56 return new AStringContentWidget(mgr,parent,id,data,c); | 56 return new AStringContentWidget(mgr,parent,id,data,c); |
57 } | 57 } |
58 if (cast(IContentList) c) | 58 if (cast(IContentList) c) |
59 return new ContentListWidget(mgr,parent,id,data,c); | 59 return new ContentListWidget(mgr,parent,id,data,c); |
60 // Normally only EventContents are used for buttons, but any Content can be: | 60 // Normally only EventContents are used for buttons, but any Content can be: |