1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 18:05:08 +00:00
serenity/Base/res/devel/templates/cpp-gui/main.cpp
Nick Vella b671577223 HackStudio: Project templates and New Project dialog
This commit adds a simple project template system to HackStudio,
as well as a pretty New Project dialog, inspired by early VS.NET
and MS Office.
2021-02-13 19:49:30 +01:00

26 lines
615 B
C++

#include <stdio.h>
#include <LibGUI/Application.h>
#include <LibGUI/Window.h>
#include <LibGUI/Button.h>
#include <LibGUI/MessageBox.h>
int main(int argc, char** argv)
{
auto app = GUI::Application::construct(argc, argv);
auto window = GUI::Window::construct();
window->set_title("Hello friends!");
window->resize(200, 100);
auto button = GUI::Button::construct();
button->set_text("Click me!");
button->on_click = [&](auto) {
GUI::MessageBox::show(window, "Hello friends!", ":^)");
};
window->set_main_widget(button);
window->show();
return app->exec();
}