]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/input.h
Remove a queued block reservation if the block is released
[r2c2.git] / source / designer / input.h
index 276ce5ff0d505a8d08557d99fed230e7861fdba8..85a58584a41e11d17989ed9cd584b579a0fc1154 100644 (file)
@@ -3,24 +3,25 @@
 
 #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