MyGUI 3.2.2

- Main Page
- Related Pages
- Namespaces
- Data Structures
- Files
- Examples

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