Debian Codegraph @

Wrappers/DoxygenWrapper/Data/Export_Templates/DelegateEvent1.txt

raw
1  namespace Scope#{ThisName}Event_#{DelegateName}
2 {
3 typedef void (MYGUICALLBACK *ExportHandle)(
4 #{OriginalTypeName1});
5 ExportHandle mExportHandle = nullptr;
6
7 void OnEvent(
8 #{OriginalTypeName1} #{ValueName1})
9 {
10 mExportHandle(
11 #{ValueName1});
12 }
13
14 MYGUIEXPORT void MYGUICALL Export#{ThisName}Event_Delegate#{DelegateName}(ExportHandle _delegate)
15 {
16 mExportHandle = _delegate;
17 }
18 MYGUIEXPORT void MYGUICALL Export#{ThisName}Event_Advise#{DelegateName}(MyGUI::Widget* _widget, bool _advise)
19 {
20 static_cast<MyGUI::#{ThisType}*>(_widget)->event#{DelegateName} = _advise ? MyGUI::newDelegate(OnEvent) : nullptr;
21 }
22 }