mirror of
https://github.com/ultimatepp/ultimatepp.git
synced 2026-05-15 14:16:07 -06:00
32 lines
487 B
C++
32 lines
487 B
C++
#include <CtrlLib/CtrlLib.h>
|
|
|
|
using namespace Upp;
|
|
|
|
struct MyAppWindow : TopWindow {
|
|
MenuBar menu;
|
|
|
|
MyAppWindow() {
|
|
Title("My application with menu").Sizeable();
|
|
AddFrame(menu);
|
|
menu.Set(
|
|
[=](Bar& bar) {
|
|
bar.Sub("Menu",
|
|
[=](Bar& bar) {
|
|
bar.Add("Exit",
|
|
[=] {
|
|
if(PromptOKCancel("Exit MyApp?"))
|
|
Break();
|
|
}
|
|
);
|
|
}
|
|
);
|
|
}
|
|
);
|
|
}
|
|
};
|
|
|
|
GUI_APP_MAIN
|
|
{
|
|
MyAppWindow app;
|
|
app.Run();
|
|
}
|