comparison mde/gui/widget/layout.d @ 172:0dd49f333189

Implemented "void setContent (IContent)".
author Diggory Hardy <diggory.hardy@gmail.com>
date Wed, 29 Jul 2009 20:28:22 +0200
parents da8d3091fdaf
children 3d58adc17d20
comparison
equal deleted inserted replaced
171:7f7b2011b759 172:0dd49f333189
78 foreach (widget; subWidgets) // recurse on subwidgets 78 foreach (widget; subWidgets) // recurse on subwidgets
79 widget.saveChanges (); 79 widget.saveChanges ();
80 80
81 mgr.dimData (id, col.width ~ row.width); 81 mgr.dimData (id, col.width ~ row.width);
82 return true; 82 return true;
83 }
84
85 override void setContent (IContent c) {
86 // Pass the content on to sub-widgets, in case they want it
87 foreach (widg; subWidgets)
88 widg.setContent = c;
83 } 89 }
84 protected: 90 protected:
85 } 91 }
86 92
87 93
116 } 122 }
117 } 123 }
118 124
119 override IContent content () { 125 override IContent content () {
120 return cList; 126 return cList;
127 }
128 override void setContent (IContent) {
129 logger.warn ("ContentListWidget: resetting content is not yet supported");
121 } 130 }
122 131
123 override bool dropContent (IContent content) { 132 override bool dropContent (IContent content) {
124 if (cList.set (content)) 133 if (cList.set (content))
125 return true; 134 return true;