ui/wpf/UIwrapper/UIwrapper/menu.cpp

Mon, 17 Jun 2024 21:20:58 +0200

author
Olaf Wintermann <olaf.wintermann@gmail.com>
date
Mon, 17 Jun 2024 21:20:58 +0200
changeset 43
ef01d2c90128
parent 0
2483f517c562
permissions
-rw-r--r--

some minor toolbar adjustments, toolkit icons update


#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