1 #ifndef MSP_GLTK_DIALOG_H_
2 #define MSP_GLTK_DIALOG_H_
12 A Dialog is used for temporary interaction with the user. When any of the
13 Dialog's action buttons are clicked, it will emit a signal and delete itself.
15 class Dialog: public Panel
18 class Loader: public DataFile::DerivedObjectLoader<Dialog, Panel::Loader>
21 Loader(Dialog &, WidgetMap &);
23 void action_button(const std::string &, int);
26 sigc::signal<void, int> signal_response;
34 virtual const char *get_class() const { return "dialog"; }
36 /** Adds an action button to the dialog. Pressing the button will invoke
37 response handlers and delete the dialog. */
38 void add_button(Button &, int);
40 /** Sets the modality of the dialog. When modal, the user can't navigate
41 away from the dialog. */
44 virtual void button_release(int, int, unsigned);
45 virtual bool key_release(unsigned, unsigned);
46 virtual bool navigate(Navigation);
51 /** Called when an action button is pressed. */
52 virtual void on_response(int) { }