ultimatepp/bazaar/GoogleTestUIExample/AppWindow.cpp
klugier 3cf2896c61 Bazaar: Added GoogleTestUIExample.
git-svn-id: svn://ultimatepp.org/upp/trunk@14989 f0d560ea-af0d-0410-9eb7-867de7ffcac7
2020-09-05 18:28:49 +00:00

19 lines
379 B
C++

#include "AppWindow.h"
using namespace Upp;
AppWindow::AppWindow()
{
Title("App Window");
SetRect(0, 0, 200, 200);
button.SetLabel("Hello world!");
button << [=] { OnClick(); };
Add(button.HSizePos(25, 25).VSizePos(50, 50));
}
void AppWindow::OnClick()
{
if(PromptYesNo("Button was clicked. Do you want to quit?")) {
Break();
}
}