1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 07:47:35 +00:00

Applications+Demos+LibGUI: Migrate to fallible WizardDialogs and Pages

And port page text to String. Also removes WizardDialog::show() helper
as all current implementations prefer to derive their own Dialog.
This commit is contained in:
thankyouverycool 2023-06-08 07:46:11 -04:00 committed by Andreas Kling
parent 96e60c98cf
commit caa8f43dbe
12 changed files with 178 additions and 115 deletions

View file

@ -14,15 +14,20 @@
namespace GUI {
class WizardPage : public AbstractWizardPage {
C_OBJECT(WizardPage);
C_OBJECT_ABSTRACT(WizardPage);
static ErrorOr<NonnullRefPtr<WizardPage>> create(StringView title, StringView subtitle);
Widget& body_widget() { return *m_body_widget; };
void set_page_title(DeprecatedString const& text);
void set_page_subtitle(DeprecatedString const& text);
void set_page_title(String);
void set_page_subtitle(String);
protected:
virtual ErrorOr<void> build(String title, String subtitle);
private:
explicit WizardPage(DeprecatedString const& title_text, DeprecatedString const& subtitle_text);
WizardPage() = default;
RefPtr<Widget> m_body_widget;