3 This file is part of libmspgltk
4 Copyright © 2007-2010 Mikko Rasa, Mikkosoft Productions
5 Distributed under the LGPL
8 #ifndef MSP_GLTK_ENTRY_H_
9 #define MSP_GLTK_ENTRY_H_
11 #include "container.h"
25 text The current text of the widget. Graphics are ignored.
26 cursor Indicates the current input position. Fill_x is ignored.
27 slider A vertical slider for multiline entries.
29 class Entry: virtual public Widget, private Container
32 class Loader: public Widget::Loader
43 unsigned visible_rows;
44 const Part *text_part;
48 sigc::signal<void> signal_enter;
50 Entry(const Resources &, const std::string & =std::string());
52 void set_text(const std::string &);
53 const std::string &get_text() const { return text.get(); }
54 void set_multiline(bool);
55 bool is_multiline() const { return multiline; }
57 virtual void key_press(unsigned, unsigned, wchar_t);
59 virtual const char *get_class() const { return "entry"; }
60 virtual void render_special(const Part &) const;
62 virtual void on_geometry_change();
63 virtual void on_style_change();
64 void reposition_slider();
65 void slider_value_changed(double);
66 void check_view_range();