]> git.tdb.fi Git - libs/gltk.git/blob - source/entry.h
2c9c31448cd4f2c6c3b6403297956109427b412e
[libs/gltk.git] / source / entry.h
1 #ifndef MSP_GLTK_ENTRY_H_
2 #define MSP_GLTK_ENTRY_H_
3
4 #include "widget.h"
5
6 namespace Msp {
7 namespace GLtk {
8
9 class Entry: public Widget
10 {
11 public:
12         Entry(const Resources &, const std::string & =std::string());
13         void set_text(const std::string &);
14         const std::string &get_text() const { return text; }
15         void key_press(unsigned, unsigned, wchar_t);
16         void focus_in();
17         void focus_out();
18 private:
19         std::string text;
20         unsigned edit_pos;
21
22         const char *get_class() const { return "entry"; }
23         void render_part(const Part &) const;
24 };
25
26 } // namespace GLtk
27 } // namespace Msp
28
29 #endif
30