Mercurial > dwindows
view dwtestoo.cpp @ 2868:5ee1aaa48fc7
C++: The last signal handler change only worked with Clang/LLVM.
Less desirable but cross platform solution, attach all signal handlers on
widget creation, when called if not overridden remove the unused handler.
Started the work of filling in the widget classes and functions.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Sun, 18 Dec 2022 11:40:22 +0000 |
parents | ada74f4d3f39 |
children | c873b6f862b9 |
line wrap: on
line source
#include <dw.hpp> class MyWindow : public DW::Window { public: MyWindow() { SetText("Basic application"); SetSize(200, 200); } virtual int OnDelete() override { DW::App *app = DW::App::Init(); app->MainQuit(); return FALSE; } virtual int OnConfigure(int width, int height) override { return FALSE; } }; int dwmain(int argc, char* argv[]) { DW::App *app = DW::App::Init(argc, argv, "org.dbsoft.dwindows.dwtestoo"); MyWindow *window = new MyWindow(); window->Show(); app->Main(); app->Exit(0); return 0; }