Mercurial > dwindows
comparison dwtestoo.cpp @ 2861:ef7a414f9b71
Add initial C++ binding header and example program.
Still trying to figure out how it will work, but it is loosely
based on GTK-- and when complete dwtestoo will replicate dwtest.
Added support for building dwtestoo on Unix and Mac.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Thu, 15 Dec 2022 12:42:34 +0000 |
parents | |
children | 939fbceec13f |
comparison
equal
deleted
inserted
replaced
2860:9daee9d58956 | 2861:ef7a414f9b71 |
---|---|
1 #include <dw.hpp> | |
2 | |
3 class MyWindow : public DW::Window | |
4 { | |
5 public: | |
6 MyWindow(); | |
7 }; | |
8 | |
9 MyWindow::MyWindow() | |
10 { | |
11 SetText("Basic application"); | |
12 SetSize(200, 200); | |
13 } | |
14 | |
15 int main(int argc, char* argv[]) | |
16 { | |
17 DW::App *app = new DW::App(argc, argv, "org.dbsoft.dwindows.dwtestoo"); | |
18 MyWindow *window = new MyWindow(); | |
19 | |
20 window->Show(); | |
21 | |
22 app->Main(); | |
23 app->Exit(0); | |
24 | |
25 return 0; | |
26 } |