3 This file is part of libmspgltk
4 Copyright © 2010-2011 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GLTK_DIALOG_H_
9 #define MSP_GLTK_DIALOG_H_
19 A Dialog is used for temporary interaction with the user. When any of the
20 Dialog's action buttons are clicked, it will emit a signal and delete itself.
22 class Dialog: public Panel
25 sigc::signal<void, int> signal_response;
33 /** Adds an action button to the dialog. Pressing the button will invoke
34 response handlers and delete the dialog. */
35 void add_button(Button &, int);
37 virtual void button_release(int, int, unsigned);
38 virtual void key_release(unsigned, unsigned);
42 /** Called when an action button is pressed. */
43 virtual void on_response(int) { }