mirror of
https://github.com/RGBCube/serenity
synced 2025-05-28 07:55:07 +00:00
LibGUI: Convert GWindow to ObjectPtr
This commit is contained in:
parent
70412c7d4f
commit
7584480f62
25 changed files with 37 additions and 37 deletions
|
@ -17,7 +17,7 @@
|
|||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
|
||||
static GWindow* make_toolbox_window();
|
||||
static ObjectPtr<GWindow> make_toolbox_window();
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ int main(int argc, char** argv)
|
|||
}));
|
||||
menubar->add_menu(move(file_menu));
|
||||
|
||||
auto* window = new GWindow;
|
||||
auto window = GWindow::construct();
|
||||
window->set_title(form1->name());
|
||||
window->set_rect(120, 200, 640, 400);
|
||||
window->set_main_widget(form1);
|
||||
|
@ -62,7 +62,7 @@ int main(int argc, char** argv)
|
|||
|
||||
app.set_menubar(move(menubar));
|
||||
|
||||
auto* toolbox = make_toolbox_window();
|
||||
auto toolbox = make_toolbox_window();
|
||||
toolbox->show();
|
||||
|
||||
propbox->show();
|
||||
|
@ -74,9 +74,9 @@ int main(int argc, char** argv)
|
|||
return app.exec();
|
||||
}
|
||||
|
||||
GWindow* make_toolbox_window()
|
||||
ObjectPtr<GWindow> make_toolbox_window()
|
||||
{
|
||||
auto* window = new GWindow;
|
||||
auto window = GWindow::construct();
|
||||
window->set_title("Widgets");
|
||||
window->set_rect(20, 200, 80, 300);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue