Mercurial > projects > mde
diff mde/gui/widget/AParentWidget.d @ 174:3d58adc17d20
Temporary commit to allow backup
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Mon, 31 Aug 2009 13:54:23 +0200 |
parents | a1ba9157510e |
children | af40e9679436 |
line wrap: on
line diff
--- a/mde/gui/widget/AParentWidget.d Sat Aug 08 15:53:10 2009 +0200 +++ b/mde/gui/widget/AParentWidget.d Mon Aug 31 13:54:23 2009 +0200 @@ -58,7 +58,7 @@ return c; } - override bool saveChanges () { + public override bool saveChanges () { bool c = false; foreach (w; subWidgets) c |= w.saveChanges; @@ -74,30 +74,30 @@ } // Parents taking a content should override, only throwing if both the - // widget id and the content are the same (as its it and content). - override void recursionCheck (widgetID wID, IContent c) { + // widget id and the content are the same (as its id and content). + public override void recursionCheck (widgetID wID, IContent c) { debug assert (id !is null && parent !is null, "recursionCheck called before parent and id set"); - if (wID == id) + if (wID is id) throw new WidgetRecursionException (wID); parent.recursionCheck (wID, c); } - IPopupParentWidget getParentIPPW () { + public override IPopupParentWidget getParentIPPW () { return parent.getParentIPPW; } // Most parent widgets need to implement these, although not all // They must at a minimum make sure widget's size is at least nmw by nmh. - override void minWChange (IChildWidget widget, wdim nmw) { + public override void minWChange (IChildWidget widget, wdim nmw) { if (widget.width < nmw) widget.setWidth (nmw, -1); } - override void minHChange (IChildWidget widget, wdim nmh) { + public override void minHChange (IChildWidget widget, wdim nmh) { if (widget.height < nmh) widget.setHeight (nmh, -1); } - debug override void logWidgetSize () { + debug public override void logWidgetSize () { super.logWidgetSize; foreach (widg; subWidgets) widg.logWidgetSize; @@ -191,12 +191,17 @@ childIPPW.drawPopup; } - debug invariant () { + debug invariant { // True as long as removedIPPW gets called: - if (!parentIPPW.isChild (this)) { + /+TODO: + if (!parentIPPW.isChild (this)) { assert (childIPPW is null, "APPW: childIPPW"); assert (mAIPPW is false, "APPW: mAIPPW"); - } + }+/ + } + + debug override bool isChild (IPopupParentWidget ippw) { + return ippw is childIPPW; } protected: @@ -207,10 +212,6 @@ mgr.positionPopup (this, popup); }+/ - debug override bool isChild (IPopupParentWidget ippw) { - return ippw is childIPPW; - } - IPopupParentWidget parentIPPW; IPopupParentWidget childIPPW; IChildWidget popup;