5 #include "menu.h" |
5 #include "menu.h" |
6 |
6 |
7 #using "UIcore.dll" |
7 #using "UIcore.dll" |
8 |
8 |
9 UI_EXPORT void __stdcall UImenu(char *label) { |
9 UI_EXPORT void __stdcall UImenu(char *label) { |
10 UI::Application::GetInstance()->AppMenu->AddMenu(gcnew String(label)); |
10 UI::Application::GetInstance()->Menu->AddMenu(gcnew String(label)); |
11 } |
11 } |
12 |
12 |
13 UI_EXPORT void __stdcall UIsubmenu(char *label) { |
13 UI_EXPORT void __stdcall UIsubmenu(char *label) { |
14 UI::Application::GetInstance()->AppMenu->AddSubMenu(gcnew String(label)); |
14 UI::Application::GetInstance()->Menu->AddSubMenu(gcnew String(label)); |
15 } |
15 } |
16 |
16 |
17 UI_EXPORT void __stdcall UIsubmenu_end() { |
17 UI_EXPORT void __stdcall UIsubmenu_end() { |
18 UI::Application::GetInstance()->AppMenu->EndSubMenu(); |
18 UI::Application::GetInstance()->Menu->EndSubMenu(); |
19 } |
19 } |
20 |
20 |
21 |
21 |
22 UI_EXPORT void __stdcall UImenuitem(char *label, UIcallback f, void *eventdata) { |
22 UI_EXPORT void __stdcall UImenuitem(char *label, UIcallback f, void *eventdata) { |
23 ObjEventWrapper ^e = gcnew ObjEventWrapper(f, eventdata); |
23 ObjEventWrapper ^e = gcnew ObjEventWrapper(f, eventdata); |
24 UI::Application::GetInstance()->AppMenu->AddMenuItem(gcnew String(label), e->GetAction()); |
24 UI::Application::GetInstance()->Menu->AddMenuItem(gcnew String(label), e->GetAction()); |
25 } |
25 } |
26 |
26 |