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);
MyGUI::newDelegate
delegates::DelegateFunction< Args... > * newDelegate(void(*_func)(Args... args))
Definition MyGUI_Delegate.h:100

usage