X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fentry.cpp;h=5aadbc262d355805e3b4fe338714a2a0bb8d4311;hb=81c4024fb6acf37df702a803dc4efdf82a81525a;hp=7ee7a32cdd9e6f8cecb77a2297e55b61fa0a5a07;hpb=771764f735ffe01cb170a10b24eb7dfc2a81b34d;p=libs%2Fgltk.git diff --git a/source/entry.cpp b/source/entry.cpp index 7ee7a32..5aadbc2 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -13,20 +13,7 @@ using namespace std; namespace Msp { namespace GLtk { -Entry::Entry(const string &t): - text(), - multiline(false), - edit_width(10), - edit_height(1), - edit_pos(0), - first_row(0), - visible_rows(1), - text_part(0), - slider(0), - got_key_press(false), - cursor_blink(true), - selection_active(false), - selection_pos(0) +Entry::Entry(const string &t) { input_type = INPUT_TEXT; set_text(t); @@ -356,7 +343,7 @@ void Entry::on_style_change() if(!style) { - text_part = 0; + text_part = nullptr; return; } @@ -481,7 +468,7 @@ void Entry::check_view_range() if(!multiline || !text_part) return; - visible_rows = text.get_visible_lines(*text_part, geom, 0); + visible_rows = text.get_visible_lines(*text_part, geom, nullptr); unsigned row, col; text.offset_to_coords(edit_pos, row, col);