#include <egt/ui> #include <iostream> using namespace std; using namespace egt; int main(int argc, const char ** argv) { Application app; TopWindow window; Button button(window, "Press Me"); center(button); // event handling button.on_event([ & ](Event & event) { if (event.id() == EventId::pointer_click) { cout << "clicked!" << endl; } }); window.show(); return app.run(); }