diff -r 000000000000 -r 2483f517c562 ui/wpf/UIwrapper/UIwrapper/menu.cpp --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/ui/wpf/UIwrapper/UIwrapper/menu.cpp Sun Jan 21 16:30:18 2024 +0100 @@ -0,0 +1,26 @@ + +#include "stdafx.h" +#include + +#include "menu.h" + +#using "UIcore.dll" + +UI_EXPORT void __stdcall UImenu(char *label) { + UI::Application::GetInstance()->Menu->AddMenu(gcnew String(label)); +} + +UI_EXPORT void __stdcall UIsubmenu(char *label) { + UI::Application::GetInstance()->Menu->AddSubMenu(gcnew String(label)); +} + +UI_EXPORT void __stdcall UIsubmenu_end() { + UI::Application::GetInstance()->Menu->EndSubMenu(); +} + + +UI_EXPORT void __stdcall UImenuitem(char *label, UIcallback f, void *eventdata) { + ObjEventWrapper ^e = gcnew ObjEventWrapper(f, eventdata); + UI::Application::GetInstance()->Menu->AddMenuItem(gcnew String(label), e->GetAction()); +} +