#include <string>
#include <sigc++/sigc++.h>
+#include <msp/gltk/dialog.h>
+#include <msp/gltk/entry.h>
class Designer;
-class Input
+class InputDialog: public Msp::GLtk::Dialog
{
public:
- sigc::signal<void> signal_accept;
- sigc::signal<void> signal_cancel;
+ sigc::signal<void, const std::string &> signal_accept;
- Input(Designer &, const std::string &, const std::string & ="");
- const std::string &get_text() { return text; }
- void key_press(unsigned, unsigned, wchar_t);
- void render();
private:
- Designer &designer;
- std::string title;
- std::string text;
- unsigned pos;
+ Designer &designer;
+ Msp::GLtk::Entry *entry;
+
+public:
+ InputDialog(Designer &, const std::string &, const std::string & =std::string());
+private:
+ virtual void key_press(unsigned, unsigned);
+ virtual void on_response(int);
};
#endif