ui/wpf/UIwrapper/UIwrapper/controls.cpp

changeset 83
a38aec91bd66
child 88
04c81be1c5a0
equal deleted inserted replaced
82:0cdb8089a29f 83:a38aec91bd66
1
2
3 #include "stdafx.h"
4 #include <stdio.h>
5
6 #include "controls.h"
7
8 #using "UIcore.dll"
9
10 UI_EXPORT void* __stdcall UIbutton(gcroot<UI::Container^> *container, char *label, UIcallback f, void *eventdata) {
11 gcroot<Button^> *button = new gcroot<Button^>();
12
13 EventWrapper ^evt = gcnew EventWrapper(f, eventdata);
14 RoutedEventHandler ^handler = gcnew RoutedEventHandler(evt, &EventWrapper::Callback);
15
16 *button = UI::Controls::Button(*container, gcnew String(label), handler);
17 return button;
18 }

mercurial