Mercurial > projects > mde
view mde/util.d @ 113:9824bee909fd
Popup menu; works for simple menus except that clicking an item doesn't close it.
Revised popup support a bit; EnumContentWidget is broken and due to be replaced.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 19 Dec 2008 10:32:28 +0000 |
parents | 2a364c7d82c9 |
children |
line wrap: on
line source
module mde.util; /// Not my code: http://www.dsource.org/projects/tango/ticket/1174#comment:7 R delegate(T) toDg(R, T...)(R function(T) fp) { if (!fp) return null; struct dg { R opCall(T t) { return (cast(R function(T)) this) (t); } } R delegate(T) t; t.ptr = fp; t.funcptr = &dg.opCall; return t; }