Mercurial > projects > mde
comparison mde/gui/WidgetManager.d @ 116:5ee69b3ed9c9
Partial implementation of infinite widget recursion protection; some cleanup.
Implemented recursion protection which only allowed unsafe widgets to be instantiated once; realised this was far too restrictive (multiple sibling instances are needed) and a check against parent widgets would be needed. Could be implemented by passing widgets a reference to parents.
Removed ButtonWidget aka First interactible widget.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Sun, 21 Dec 2008 12:03:50 +0000 |
parents | 1b1e2297e2fc |
children | aba2dd815a1f |
comparison
equal
deleted
inserted
replaced
115:1b1e2297e2fc | 116:5ee69b3ed9c9 |
---|---|
521 //BEGIN IWidgetManager methods | 521 //BEGIN IWidgetManager methods |
522 override IChildWidget makeWidget (widgetID id, IContent content = null) { | 522 override IChildWidget makeWidget (widgetID id, IContent content = null) { |
523 debug (mdeWidgets) logger.trace ("Creating widget \""~id~'"'); | 523 debug (mdeWidgets) logger.trace ("Creating widget \""~id~'"'); |
524 return createWidget (this, id, curData[id], content); | 524 return createWidget (this, id, curData[id], content); |
525 } | 525 } |
526 override IChildWidget makeWidget (widgetID id, WidgetData data, IContent content = null) { | |
527 debug (mdeWidgets) logger.trace ("Creating widget \""~id~'"'); | |
528 return createWidget (this, id, data, content); | |
529 } | |
530 | 526 |
531 override wdims dimData (widgetID id) { | 527 override wdims dimData (widgetID id) { |
532 return curData.dims (id); | 528 return curData.dims (id); |
533 } | 529 } |
534 override void setData (widgetID id, WidgetData d) { | 530 override void setData (widgetID id, WidgetData d) { |