X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fentry.cpp;h=f21aacbd07beff04c64aae4be124bdfab4e138fd;hb=b61361ee9f1f049fb3c22a38f68c757c7ca54cd0;hp=9129e1b0ebbdd90bef2b641629b271a9fe618f0b;hpb=d2d5b4c4dedf90a42dd2baff8334318b1d000f64;p=libs%2Fgltk.git diff --git a/source/entry.cpp b/source/entry.cpp index 9129e1b..f21aacb 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -102,7 +102,7 @@ void Entry::set_multiline(bool m) void Entry::rebuild_special(const Part &part) { if(part.get_name()=="text") - text.build(part, geom, first_row, part_cache); + text.build(part, state, geom, first_row, part_cache); else if(part.get_name()=="cursor") { const Graphic *graphic = part.get_graphic(state); @@ -279,5 +279,18 @@ void Entry::slider_value_changed(double value) first_row = text.get_n_lines()-visible_rows-static_cast(value); } + +Entry::Loader::Loader(Entry &e): + DataFile::DerivedObjectLoader(e) +{ + add("edit_size", &Entry::edit_width, &Entry::edit_height); + add("multiline", &Loader::multiline); +} + +void Entry::Loader::multiline(bool m) +{ + obj.set_multiline(m); +} + } // namespace GLtk } // namespace Msp