]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/input.h
Convert designer to use mspgltk for UI
[r2c2.git] / source / designer / input.h
index 9a4dbccd565a4c8580b48e3d58a51774ac700840..2bcd16c96571a9fe0b10d88d5a6845601fd49f52 100644 (file)
@@ -10,10 +10,11 @@ Distributed under the GPL
 
 #include <string>
 #include <sigc++/sigc++.h>
+#include <msp/gltk/entry.h>
 
 class Designer;
 
-class Input
+class Input: public Msp::GLtk::Panel
 {
 public:
        sigc::signal<void> signal_accept;
@@ -21,15 +22,13 @@ public:
 
 private:
        Designer &designer;
-       std::string title;
-       std::string text;
-       unsigned pos;
+       Msp::GLtk::Entry *entry;
 
 public:
        Input(Designer &, const std::string &, const std::string & =std::string());
-       const std::string &get_text() { return text; }
-       void key_press(unsigned, unsigned, wchar_t);
-       void render();
+       const std::string &get_text() const;
+private:
+       virtual void key_press(unsigned, unsigned, wchar_t);
 };
 
 #endif