ui/wpf/UIwrapper/UIwrapper/menu.cpp

changeset 81
5eb765a7a793
child 82
0cdb8089a29f
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/ui/wpf/UIwrapper/UIwrapper/menu.cpp	Sun Jan 25 15:01:04 2015 +0100
@@ -0,0 +1,17 @@
+
+#include "stdafx.h"
+#include <stdio.h>
+
+#include "menu.h"
+
+#using "UIcore.dll"
+
+UI_EXPORT void __stdcall UImenu(char *label) {
+	UI::Application::GetInstance()->AppMenu->AddMenu(gcnew String(label));
+}
+
+
+UI_EXPORT void __stdcall UImenuitem(char *label, UIcallback f, void *userdata) {
+	EventWrapper ^e = gcnew EventWrapper(f, userdata);
+	UI::Application::GetInstance()->AppMenu->AddMenuItem(gcnew String(label), e->GetAction());
+}

mercurial