comparison dynamin/gui/container.d @ 35:ee9a564d2814

Allow more use of Containers versus Panels.
author Jordan Miner <jminer7@gmail.com>
date Mon, 27 Jul 2009 01:35:35 -0500
parents ccc108b25a0a
children c138461bf845
comparison
equal deleted inserted replaced
34:e4d290aaa7ed 35:ee9a564d2814
235 child.parent = null; 235 child.parent = null;
236 repaint(); 236 repaint();
237 //ControlRemoved(EventArgs e); // TODO: add event 237 //ControlRemoved(EventArgs e); // TODO: add event
238 } 238 }
239 239
240 protected int opApply(int delegate(inout Control item) dg) { 240 int opApply(int delegate(inout Control item) dg) {
241 for(uint i = 0; i < _children.count; ++i) { 241 for(uint i = 0; i < _children.count; ++i) {
242 auto tmp = _children[i]; 242 auto tmp = _children[i];
243 if(int result = dg(tmp)) 243 if(int result = dg(tmp))
244 return result; 244 return result;
245 } 245 }
246 return 0; 246 return 0;
247 } 247 }
248 protected int opApply(int delegate(inout uint index, inout Control item) dg) { 248 int opApply(int delegate(inout uint index, inout Control item) dg) {
249 for(uint i = 0; i < _children.count; ++i) { 249 for(uint i = 0; i < _children.count; ++i) {
250 auto tmp = _children[i]; 250 auto tmp = _children[i];
251 if(int result = dg(i, tmp)) 251 if(int result = dg(i, tmp))
252 return result; 252 return result;
253 } 253 }