MyGUI  3.2.1
Delegate usage

General information about creating delegate for event :

void anyFunc(...) { } // global function
class AnyClass
{
public:
static void anyStaticMethod(...) { } // static class method
void anyMethod(...) { } // class method
};
AnyClass anyObject; // class instance

delegate creating:

eventAny = MyGUI::newDelegate(anyFunc);
eventAny = MyGUI::newDelegate(AnyClass::anyStaticMethod);
eventAny = MyGUI::newDelegate(&anyObject, &AnyClass::anyMethod);

usage