X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fentry.cpp;h=43dad5e7de46dbcb69569427c083352eee0aabac;hb=6d73e04329fc3752552773e4d11d7374caf779f6;hp=cee23b02372904317419fc294a17f783fa457589;hpb=18a5af8e80903eb9738cefe03825595877fbf447;p=libs%2Fgltk.git diff --git a/source/entry.cpp b/source/entry.cpp index cee23b0..43dad5e 100644 --- a/source/entry.cpp +++ b/source/entry.cpp @@ -125,7 +125,7 @@ void Entry::render_special(const Part &part, GL::Renderer &renderer) const slider->render(renderer); } -void Entry::key_press(unsigned key, unsigned) +bool Entry::key_press(unsigned key, unsigned) { got_key_press = true; if(key==Input::KEY_LEFT) @@ -170,16 +170,23 @@ void Entry::key_press(unsigned key, unsigned) else signal_enter.emit(); } + else + return false; + + return true; } -void Entry::character(wchar_t ch) +bool Entry::character(wchar_t ch) { if(got_key_press && ch>=' ') { text.insert(edit_pos, StringCodec::encode(StringCodec::ustring(1, ch))); ++edit_pos; rebuild(); + return true; } + + return false; } void Entry::focus_out()