WPopupMenu interface enhancement
It would be great if WPopupMenu had a pair of methods like this:
WPopupMenuItem* addItem( const WString& text, Func callback );
WPopupMenuItem* addItem( const std::string& iconPath, const WString& text, Func callback );
My use case is to create menu items dynamically, where each item should invoke a function with a specific parameter. I can define a struct and use setData, but I really don't want to use void* if I can avoid it. boost::bind lets me have one callback method with the parameter bound at the time the item is created.
The implementation is of course trivial, and I've added them in my local repository so I know it works.
No data to display