+ text = t;
+ edit_pos = text.size();
+
+ if(multiline)
+ check_view_range();
+
+ rebuild();
+}
+
+void Entry::set_edit_size(unsigned w, unsigned h)
+{
+ edit_width = w;
+ edit_height = h;
+ signal_autosize_changed.emit();
+}
+
+void Entry::set_multiline(bool m)
+{
+ multiline = m;
+ if(multiline)
+ {
+ if(!slider)
+ {
+ slider = new VSlider;
+ add(*slider);
+ slider->set_step(1);
+ slider->signal_value_changed.connect(sigc::mem_fun(this, &Entry::slider_value_changed));
+ rebuild();
+ }
+ check_view_range();
+ }
+}
+
+void Entry::rebuild_special(const Part &part)
+{
+ if(part.get_name()=="text")
+ text.build(part, state, geom, first_row, part_cache);
+ else if(part.get_name()=="cursor")
+ {
+ const Graphic *graphic = part.get_graphic(state);
+ if(!text_part || !graphic || !graphic->get_texture())
+ return;
+
+ unsigned row, col;
+ text.offset_to_coords(edit_pos, row, col);
+
+ if(row<first_row || row>=first_row+visible_rows)
+ return;
+
+ Geometry rgeom = text.coords_to_geometry(*text_part, geom, first_row, row, col);
+
+ GL::MeshBuilder bld(part_cache.create_mesh(part, *graphic->get_texture()));
+ bld.matrix() *= GL::Matrix::translation(rgeom.x, rgeom.y, 0);
+ graphic->build(part.get_geometry().w, part.get_geometry().h, bld);
+ }
+ else if(part.get_name()=="slider")
+ {
+ if(multiline)
+ {
+ reposition_child(*slider, part);
+ Widget::rebuild_special(part);
+ }
+ }
+ else
+ Widget::rebuild_special(part);
+}
+
+void Entry::render_special(const Part &part, GL::Renderer &renderer) const
+{
+ if(part.get_name()=="slider" && multiline)
+ slider->render(renderer);