Mercurial > projects > mde
diff mde/gui/widget/AParentWidget.d @ 172:0dd49f333189
Implemented "void setContent (IContent)".
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Wed, 29 Jul 2009 20:28:22 +0200 |
parents | 7f7b2011b759 |
children | a1ba9157510e |
line wrap: on
line diff
--- a/mde/gui/widget/AParentWidget.d Sun Jul 26 11:04:17 2009 +0200 +++ b/mde/gui/widget/AParentWidget.d Wed Jul 29 20:28:22 2009 +0200 @@ -217,10 +217,14 @@ * * Intended to manage a context menu for WidgetManager, and not to work quite * like a regular IPPW. + * + * Doesn't implement all the IChildWidget methods that would be relevent, + * because it's not used like a regular widget. *****************************************************************************/ class PopupHandlerWidget : APopupParentWidget { this (IWidgetManager mgr, IParentWidget parent, widgetID id, char[] subWidg, IContent c) { + assert (parent is mgr); // we're not meant to be used like a normal widget super (mgr, parent, id); popup = mgr.makeWidget (this, subWidg, c); @@ -233,8 +237,7 @@ /// Open a context menu void openMenu (IChildWidget underMouse, Content contextContent) { if (mAIPPW != MenuPosition.INACTIVE) return; // already in use - //TODO: - //subWidgets[0].setContent (contextContent); + subWidgets[0].setContent = contextContent; parentIPPW.addChildIPPW (this); // For context menus, don't set parentIPPW.menuActive like for clicked menus: menuActive = mgr.positionPopup (underMouse, popup);