mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 09:58:11 +00:00
LibGUI: Put all classes in the GUI namespace and remove the leading G
This took me a moment. Welcome to the new world of GUI::Widget! :^)
This commit is contained in:
parent
2d39da5405
commit
c5bd9d4ed1
337 changed files with 5400 additions and 4816 deletions
|
@ -35,24 +35,24 @@ int main(int argc, char** argv)
|
|||
return 1;
|
||||
}
|
||||
|
||||
GApplication app(argc, argv);
|
||||
GUI::Application app(argc, argv);
|
||||
|
||||
if (pledge("stdio shared_buffer accept rpath cpath wpath", nullptr) < 0) {
|
||||
perror("pledge");
|
||||
return 1;
|
||||
}
|
||||
|
||||
auto window = GWindow::construct();
|
||||
auto window = GUI::Window::construct();
|
||||
window->set_title("Hex Editor");
|
||||
window->set_rect(20, 200, 640, 400);
|
||||
|
||||
auto hex_editor_widget = HexEditorWidget::construct();
|
||||
window->set_main_widget(hex_editor_widget);
|
||||
|
||||
window->on_close_request = [&]() -> GWindow::CloseRequestDecision {
|
||||
window->on_close_request = [&]() -> GUI::Window::CloseRequestDecision {
|
||||
if (hex_editor_widget->request_close())
|
||||
return GWindow::CloseRequestDecision::Close;
|
||||
return GWindow::CloseRequestDecision::StayOpen;
|
||||
return GUI::Window::CloseRequestDecision::Close;
|
||||
return GUI::Window::CloseRequestDecision::StayOpen;
|
||||
};
|
||||
|
||||
window->show();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue