mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 12:48:10 +00:00
FormCompiler: Produce a C++ header file as output.
Also make sure the generated main widget has autofill turned on.
This commit is contained in:
parent
0bf5c6fa3a
commit
3eb6a9a286
1 changed files with 9 additions and 0 deletions
|
@ -34,6 +34,14 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
dbg() << "#pragma once";
|
||||
|
||||
widgets.as_array().for_each([&](auto& value) {
|
||||
const JsonObject& widget_object = value.as_object();
|
||||
auto class_name = widget_object.get("class").to_string();
|
||||
dbg() << "#include <LibGUI/" << class_name << ".h>";
|
||||
});
|
||||
|
||||
dbg() << "struct UI_" << name << " {";
|
||||
dbg() << " GWidget* main_widget;";
|
||||
|
||||
|
@ -53,6 +61,7 @@ int main(int argc, char** argv)
|
|||
dbg() << "{";
|
||||
|
||||
dbg() << " main_widget = new GWidget(nullptr);";
|
||||
dbg() << " main_widget->set_fill_with_background_color(true);";
|
||||
|
||||
widgets.as_array().for_each([&](auto& value) {
|
||||
ASSERT(value.is_object());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue