mirror of
https://github.com/RGBCube/serenity
synced 2025-05-23 15:15:07 +00:00
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.
This commit is contained in:
parent
a6fdc17f3f
commit
b671577223
24 changed files with 1178 additions and 1 deletions
26
Base/res/devel/templates/cpp-gui/main.cpp
Normal file
26
Base/res/devel/templates/cpp-gui/main.cpp
Normal file
|
@ -0,0 +1,26 @@
|
|||
#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();
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue