+ if(nav==NAV_LEFT)
+ {
+ if(edit_pos>0)
+ set_edit_position(edit_pos-1);
+ }
+ else if(nav==NAV_RIGHT)
+ {
+ if(edit_pos<text.size())
+ set_edit_position(edit_pos+1);
+ }
+ else if(nav==NAV_DOWN && multiline)
+ {
+ unsigned row, col;
+ text.offset_to_coords(edit_pos, row, col);
+ set_edit_position(text.coords_to_offset(row+1, col));
+ }
+ else if(nav==NAV_UP && multiline)
+ {
+ unsigned row, col;
+ text.offset_to_coords(edit_pos, row, col);
+ set_edit_position(row>0 ? text.coords_to_offset(row-1, col) : 0);
+ }
+ else if(nav==NAV_ACCEPT && !signal_enter.empty())
+ signal_enter.emit();
+ else
+ return false;
+
+ return true;
+}
+
+void Entry::animate(const Time::TimeDelta &)
+{
+ cursor_blink = !cursor_blink;
+ rebuild();
+}