X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdialog.h;h=6209ab29c4fa42ebe00678ffb170a8b4b0206da4;hb=HEAD;hp=285478ebb570ddead2d12deae299805dd595ecee;hpb=d10d1de6d17c285c63d7b3cea549017aaa1ddb01;p=libs%2Fgltk.git diff --git a/source/dialog.h b/source/dialog.h index 285478e..6209ab2 100644 --- a/source/dialog.h +++ b/source/dialog.h @@ -11,7 +11,7 @@ class Button; /** A Dialog is used for temporary interaction with the user. When any of the -Dialog's action buttons are clicked, it will emit a signal and delete itself. +Dialog's action buttons are clicked, it will emit a signal and hide itself. */ class MSPGLTK_API Dialog: public Panel { @@ -20,37 +20,69 @@ public: { public: Loader(Dialog &, WidgetMap &); + private: void action_button(const std::string &, int); }; sigc::signal signal_response; -private: - bool stale = false; - -public: const char *get_class() const override { return "dialog"; } /** Adds an action button to the dialog. Pressing the button will invoke response handlers and delete the dialog. */ void add_button(Button &, int); + void add_button(std::unique_ptr