]> git.tdb.fi Git - r2c2.git/blobdiff - source/designer/input.h
Strip Id tags and copyright notices from files
[r2c2.git] / source / designer / input.h
index 9a4dbccd565a4c8580b48e3d58a51774ac700840..bd9423baa8c19f44bac2baf5ecf220e995602f6c 100644 (file)
@@ -1,35 +1,27 @@
-/* $Id$
-
-This file is part of the MSP Märklin suite
-Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
-Distributed under the GPL
-*/
-
 #ifndef INPUT_H_
 #define INPUT_H_
 
 #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;
 
 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();
+       InputDialog(Designer &, const std::string &, const std::string & =std::string());
+private:
+       virtual void key_press(unsigned, unsigned, wchar_t);
+       virtual void on_response(int);
 };
 
 #endif