-/* $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);
+ virtual void on_response(int);
};
#endif