3 This file is part of libmspgltk
4 Copyright © 2007-2011 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
38 sigc::signal<void> signal_enter;
45 unsigned visible_rows;
46 const Part *text_part;
50 Entry(const std::string & = std::string());
52 virtual const char *get_class() const { return "entry"; }
54 virtual void autosize();
56 void set_text(const std::string &);
57 const std::string &get_text() const { return text.get(); }
58 void set_multiline(bool);
59 bool is_multiline() const { return multiline; }
62 virtual void render_special(const Part &) const;
65 virtual void key_press(unsigned, unsigned, wchar_t);
67 virtual void on_geometry_change();
68 virtual void on_style_change();
70 void reposition_slider();
71 void check_view_range();
72 void slider_value_changed(double);