mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 22:02:49 -06:00
19 lines
391 B
C++
19 lines
391 B
C++
#include "AppWindow.h"
|
|
|
|
using namespace Upp;
|
|
|
|
AppWindow::AppWindow()
|
|
{
|
|
Title("App Window");
|
|
SetRect(0, 0, 250, 250);
|
|
button.SetLabel("Hello world!");
|
|
button << [=] { OnButtonClick(); };
|
|
Add(button.HSizePos(25, 25).VSizePos(75, 75));
|
|
}
|
|
|
|
void AppWindow::OnButtonClick()
|
|
{
|
|
if(PromptYesNo("Button was clicked. Do you want to quit?")) {
|
|
Break();
|
|
}
|
|
}
|