Sun, 15 Jan 2017 15:08:07 +0100
fixes VS settings
81 | 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) { | |
89
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
83
diff
changeset
|
10 | UI::Application::GetInstance()->Menu->AddMenu(gcnew String(label)); |
81 | 11 | } |
12 | ||
82
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
13 | UI_EXPORT void __stdcall UIsubmenu(char *label) { |
89
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
83
diff
changeset
|
14 | UI::Application::GetInstance()->Menu->AddSubMenu(gcnew String(label)); |
82
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
15 | } |
81 | 16 | |
82
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
17 | UI_EXPORT void __stdcall UIsubmenu_end() { |
89
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
83
diff
changeset
|
18 | UI::Application::GetInstance()->Menu->EndSubMenu(); |
82
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
19 | } |
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
20 | |
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
21 | |
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
22 | UI_EXPORT void __stdcall UImenuitem(char *label, UIcallback f, void *eventdata) { |
83
a38aec91bd66
added box layout and button (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
82
diff
changeset
|
23 | ObjEventWrapper ^e = gcnew ObjEventWrapper(f, eventdata); |
89
9a7e4a335b2b
added toolbar (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
83
diff
changeset
|
24 | UI::Application::GetInstance()->Menu->AddMenuItem(gcnew String(label), e->GetAction()); |
81 | 25 | } |
82
0cdb8089a29f
added event handler for menus (WPF)
Olaf Wintermann <olaf.wintermann@gmail.com>
parents:
81
diff
changeset
|
26 |