ui/wpf/UIwrapper/UIwrapper/menu.cpp

changeset 0
804d8803eade
equal deleted inserted replaced
-1:000000000000 0:804d8803eade
1
2 #include "stdafx.h"
3 #include <stdio.h>
4
5 #include "menu.h"
6
7 #using "UIcore.dll"
8
9 UI_EXPORT void __stdcall UImenu(char *label) {
10 UI::Application::GetInstance()->Menu->AddMenu(gcnew String(label));
11 }
12
13 UI_EXPORT void __stdcall UIsubmenu(char *label) {
14 UI::Application::GetInstance()->Menu->AddSubMenu(gcnew String(label));
15 }
16
17 UI_EXPORT void __stdcall UIsubmenu_end() {
18 UI::Application::GetInstance()->Menu->EndSubMenu();
19 }
20
21
22 UI_EXPORT void __stdcall UImenuitem(char *label, UIcallback f, void *eventdata) {
23 ObjEventWrapper ^e = gcnew ObjEventWrapper(f, eventdata);
24 UI::Application::GetInstance()->Menu->AddMenuItem(gcnew String(label), e->GetAction());
25 }
26

mercurial