]> git.tdb.fi Git - r2c2.git/blob - source/designer/input.h
9a4dbccd565a4c8580b48e3d58a51774ac700840
[r2c2.git] / source / designer / input.h
1 /* $Id$
2
3 This file is part of the MSP Märklin suite
4 Copyright © 2006-2008 Mikkosoft Productions, Mikko Rasa
5 Distributed under the GPL
6 */
7
8 #ifndef INPUT_H_
9 #define INPUT_H_
10
11 #include <string>
12 #include <sigc++/sigc++.h>
13
14 class Designer;
15
16 class Input
17 {
18 public:
19         sigc::signal<void> signal_accept;
20         sigc::signal<void> signal_cancel;
21
22 private:
23         Designer &designer;
24         std::string title;
25         std::string text;
26         unsigned pos;
27
28 public:
29         Input(Designer &, const std::string &, const std::string & =std::string());
30         const std::string &get_text() { return text; }
31         void key_press(unsigned, unsigned, wchar_t);
32         void render();
33 };
34
35 #endif