mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-07 00:19:27 +00:00
Base: Remove the cpp-gui HackStudio template
This template is essentially an older version of the serenity-application template, it does not compile anymore and is therefore entirely redundant.
This commit is contained in:
parent
5ebc741594
commit
7a0fae7be1
|
@ -1,5 +0,0 @@
|
|||
[HackStudioTemplate]
|
||||
Name=Graphical Application (C++)
|
||||
Description=Template for creating a basic C++ graphical application.
|
||||
Priority=90
|
||||
IconName32x=cpp-gui
|
|
@ -1,22 +0,0 @@
|
|||
#!/bin/Shell
|
||||
|
||||
echo > $2/Makefile <<-EOF
|
||||
PROGRAM = $1
|
||||
OBJS = main.o
|
||||
CXXFLAGS = -g -std=c++2a
|
||||
LDFLAGS = -lgui -lgcc_s
|
||||
|
||||
all: \$(PROGRAM)
|
||||
|
||||
\$(PROGRAM): \$(OBJS)
|
||||
\$(CXX) \$(LDFLAGS) -o \$@ \$(OBJS)
|
||||
|
||||
%.o: %.cpp
|
||||
\$(CXX) \$(CXXFLAGS) -o \$@ -c \$<
|
||||
|
||||
clean:
|
||||
rm \$(OBJS) \$(PROGRAM)
|
||||
|
||||
run:
|
||||
./\$(PROGRAM)
|
||||
EOF
|
|
@ -1,26 +0,0 @@
|
|||
#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!"sv, ":^)"sv);
|
||||
};
|
||||
|
||||
window->set_main_widget(button);
|
||||
|
||||
window->show();
|
||||
|
||||
return app->exec();
|
||||
}
|
Loading…
Reference in a new issue