+ text = t;
+ edit_pos = text.size();
+
+ if(multiline)
+ check_view_range();
+
+ rebuild();
+}
+
+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));
+ reposition_slider();
+ }
+ check_view_range();
+ }
+}
+
+void Entry::rebuild_special(const Part &part, CachedPart &cache)
+{
+ if(part.get_name()=="text")
+ text.build(part, geom, first_row, cache);
+ else if(part.get_name()=="cursor")
+ {
+ const Graphic *graphic = part.get_graphic(state);
+ if(!text_part || !graphic)
+ {
+ cache.texture = 0;
+ return;
+ }
+
+ unsigned row, col;
+ text.offset_to_coords(edit_pos, row, col);
+
+ if(row<first_row || row>=first_row+visible_rows)
+ {
+ cache.texture = 0;
+ return;
+ }
+
+ Geometry rgeom = text.coords_to_geometry(*text_part, geom, first_row, row, col);
+
+ cache.texture = graphic->get_texture();
+ cache.clear_mesh();
+
+ GL::MeshBuilder bld(*cache.mesh);
+ bld.matrix() *= GL::Matrix::translation(rgeom.x, rgeom.y, 0);
+ graphic->build(part.get_geometry().w, part.get_geometry().h, bld);
+ }
+}
+
+void Entry::render_special(const Part &part, GL::Renderer &renderer) const
+{
+ if(part.get_name()=="slider" && multiline)
+ slider->render(renderer);