--- /dev/null
+/* $Id$
+
+This file is part of libmspgltk
+Copyright © 2010 Mikko Rasa, Mikkosoft Productions
+Distributed under the LGPL
+*/
+
+#ifndef MSP_GLTK_DIALOG_H_
+#define MSP_GLTK_DIALOG_H_
+
+#include "panel.h"
+
+namespace Msp {
+namespace GLtk {
+
+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.
+*/
+class Dialog: public Panel
+{
+private:
+ bool stale;
+
+public:
+ sigc::signal<void, int> signal_response;
+
+ Dialog(const Resources &);
+
+ /** Adds an action button to the dialog. Pressing the button will invoke
+ response handlers and delete the dialog. */
+ void add_button(Button &, int);
+
+ virtual void button_release(int, int, unsigned);
+ virtual void key_release(unsigned, unsigned);
+protected:
+ void response(int);
+
+ /** Called when an action button is pressed. */
+ virtual void on_response(int) { }
+};
+
+} // namespace GLtk
+} // namespace Msp
+
+#endif