|
2 | 2 | #include <LibGUI/GWidget.h>
|
3 | 3 | #include <LibGUI/GBoxLayout.h>
|
4 | 4 | #include <LibGUI/GApplication.h>
|
5 |
| -#include <LibGUI/GStatusBar.h> |
6 |
| -#include <LibGUI/GToolBar.h> |
7 | 5 | #include <LibGUI/GMenuBar.h>
|
8 |
| -#include <LibGUI/GTextEditor.h> |
9 | 6 | #include <LibGUI/GAction.h>
|
10 |
| -#include <LibGUI/GFontDatabase.h> |
11 |
| -#include <LibCore/CFile.h> |
12 |
| -#include <AK/StringBuilder.h> |
| 7 | +#include <LibGUI/GButton.h> |
13 | 8 | #include "VBForm.h"
|
14 | 9 | #include "VBWidget.h"
|
15 | 10 | #include <unistd.h>
|
@@ -68,6 +63,26 @@ GWindow* make_toolbox_window()
|
68 | 63 |
|
69 | 64 | auto* widget = new GWidget;
|
70 | 65 | widget->set_fill_with_background_color(true);
|
| 66 | + widget->set_layout(make<GBoxLayout>(Orientation::Vertical)); |
71 | 67 | window->set_main_widget(widget);
|
| 68 | + |
| 69 | + auto* button_button = new GButton(widget); |
| 70 | + button_button->set_caption("Button"); |
| 71 | + button_button->on_click = [] (GButton&) { |
| 72 | + if (auto* form = VBForm::current()) |
| 73 | + form->insert_widget(WidgetType::GButton); |
| 74 | + }; |
| 75 | + auto* spinbox_button = new GButton(widget); |
| 76 | + spinbox_button->set_caption("SpinBox"); |
| 77 | + spinbox_button->on_click = [] (GButton&) { |
| 78 | + if (auto* form = VBForm::current()) |
| 79 | + form->insert_widget(WidgetType::GSpinBox); |
| 80 | + }; |
| 81 | + auto* editor_button = new GButton(widget); |
| 82 | + editor_button->set_caption("TextEditor"); |
| 83 | + editor_button->on_click = [] (GButton&) { |
| 84 | + if (auto* form = VBForm::current()) |
| 85 | + form->insert_widget(WidgetType::GTextEditor); |
| 86 | + }; |
72 | 87 | return window;
|
73 | 88 | }
|
0 commit comments