/* * Copyright (c) 2018-2022, Andreas Kling * * SPDX-License-Identifier: BSD-2-Clause */ #include #include #include #include #include #include #include #include namespace GUI { int MessageBox::show(Window* parent_window, StringView text, StringView title, Type type, InputType input_type) { auto box = MessageBox::construct(parent_window, text, title, type, input_type); if (parent_window) box->set_icon(parent_window->icon()); return box->exec(); } int MessageBox::show_error(Window* parent_window, StringView text) { return show(parent_window, text, "Error", GUI::MessageBox::Type::Error, GUI::MessageBox::InputType::OK); } int MessageBox::ask_about_unsaved_changes(Window* parent_window, StringView path, Optional