1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-23 19:35:08 +00:00
serenity/Base/res/devel/templates/cpp-gui/main.cpp
Brian Gianforcaro 898e9492f7 Base: clang-format the cpp-gui template project.
I noticed this was miss-formated when fixing up the clang-format
error in a different PR. I just ran `pre-commit run --all-files`
2021-04-25 01:13:59 +02:00

26 lines
615 B
C++

#include <LibGUI/Application.h>
#include <LibGUI/Button.h>
#include <LibGUI/MessageBox.h>
#include <LibGUI/Window.h>
#include <stdio.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();
}