1 #define MODULE_NAME "HelloForm"
5 class HelloForm : public Window
10 CONSTRUCT(HelloForm, Window)
12 caption = $("Sample App using Ecere Toolkit/C++ Bindings");
13 borderStyle = sizable;
14 clientSize = { 640, 480 };
18 background = formColor;
19 font = { "Arial", 30 };
22 button.position = { 200, 200 };
23 button.caption = $("Yay!!");
24 button.notifyClicked = [](Window & owner, Button & btn, int x, int y, Modifiers mods)
26 HelloForm & self = (HelloForm &)owner;
28 msgBox.caption = self.button.caption;
29 msgBox.contents = $("C++ Bindings!");
35 static Class * class_registration(Class * _class)
37 Window::class_registration(_class);
38 register_onRedraw(_class, [](Window & w, Surface surface) { surface.writeTextf(100, 100, $("Class Method!")); });
39 HelloForm::_class.destructor = [](HelloForm & self) { printf("It's the end my friend!\n"); };
46 REGISTER_CLASS_DEF(HelloForm, Window, app);