X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fdialog.h;h=6209ab29c4fa42ebe00678ffb170a8b4b0206da4;hb=HEAD;hp=3eb3f98d2845cbe77a68f592ce418dc38103597d;hpb=56c41b294aa47a38ac3e1be70d4868f260cb4274;p=libs%2Fgltk.git diff --git a/source/dialog.h b/source/dialog.h index 3eb3f98..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,39 +20,69 @@ public: { public: Loader(Dialog &, WidgetMap &); + private: void action_button(const std::string &, int); }; sigc::signal signal_response; -private: - bool stale; - -public: - Dialog(); - - virtual const char *get_class() const { return "dialog"; } + 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