ui/wpf/UIwrapper/UIwrapper/menu.cpp

Sun, 29 Sep 2024 19:06:29 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Sun, 29 Sep 2024 19:06:29 +0200
branch
newapi
changeset 318
8d8a31d55dd5
parent 89
9a7e4a335b2b
permissions
-rw-r--r--

fix simple window (libadwaita)


#include "stdafx.h"
#include <stdio.h>

#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());
}

mercurial