1 #ifndef MSP_GLTK_ENTRY_H_
2 #define MSP_GLTK_ENTRY_H_
18 text The current text of the widget. Graphics are ignored.
19 cursor Indicates the current input position. Fill_x is ignored.
20 slider A vertical slider for multiline entries.
22 class Entry: virtual public Widget, private Container
25 class Loader: public DataFile::DerivedObjectLoader<Entry, Widget::Loader>
35 sigc::signal<void> signal_enter;
44 unsigned visible_rows;
45 const Part *text_part;
49 bool selection_active;
50 unsigned selection_pos;
53 Entry(const std::string & = std::string());
55 virtual const char *get_class() const { return "entry"; }
58 virtual void autosize_special(const Part &, Geometry &) const;
61 void set_text(const std::string &);
62 const std::string &get_text() const { return text.get(); }
64 /** Sets the minimum size of the editing area, in characters and rows. This
65 only affects autosizing. */
66 void set_edit_size(unsigned w, unsigned h);
68 void set_multiline(bool);
69 bool is_multiline() const { return multiline; }
72 virtual void rebuild_special(const Part &);
73 virtual void render_special(const Part &, GL::Renderer &) const;
76 virtual void touch_press(int, int, unsigned);
77 virtual bool key_press(unsigned, unsigned);
78 virtual bool character(wchar_t);
79 virtual void focus_in();
80 virtual void focus_out();
81 virtual bool navigate(Navigation);
82 virtual void animate(const Time::TimeDelta &);
84 virtual void on_geometry_change();
85 virtual void on_style_change();
87 void move_edit_position(Navigation, bool);
88 void set_edit_position(unsigned, bool);
89 void erase_selection();
90 void check_cursor_blink();
91 void check_view_range();
92 void slider_value_changed(double);