Do all overlay changes and state tracking in InvalidationHandler
where we get invalidation and selection / cursor messages from
LibreOfficeKit.
Change-Id: I87ccdefedc01e8bd54666b694a9a429a1fc6af76
A double click is a set of 4 events, only one of them was sent, that's
how it worked in gtktiledviewer, but not on Android.
Change-Id: Id0eaef3765d385aab588b834f66b9f4b4f3ccb70
Text handles are usually shown under the current selection or
cursor position. Previously this was done in InvalidationHandler,
now the TextSelectionHandle takes this into account just before
drawing. The reason is that the repositioning needs to be taken
into account when the handle moves to reposition the coordinates
back to original position.
In addition to that, the number of times the move handle update
event is send is now limited to 50ms to reduce stress for the
device (less in queue, less messages via LOKit). This also makes
the handle more fluid and jump around less.
Change-Id: Idc401375c82b3eeac66328d98c80bf3cb7b675ea
The implementation still sends them to the currently active VCL frame,
not to the given document, though.
Change-Id: I6fa2decdea3f949c55287e802cb3373c85664207
With LOEvent CHANGE_HANDLE_POSITION we can report handle (start
and end selelection change and cursor change) to the LOKitThread.
Change-Id: Ia247acc147e54a1f05999a5e55786367c4377091
Overlay can either be in state NONE - no overlay elements should
be shown (this is the deocument reader state), CURSOR - cursor
and the cursor handle are shown, SELECTION - selection and
selection handles are shown. The states can change either by
an invalidation or touch input.
Change-Id: Ia15eb58193675b3799c0014a91f4429a729e30d4
Add support to parse selection rectangles (series of rectangles
separated by ";"). Additionally restructure and clean up the code
in InvalidationHandler to be better readable - better comments,
better variable and method names.
Change-Id: I64d1dc4a806831bd47ca9f14478bec8192035461
TextCursorView is a overlay view on top of document view which
is used to draw the cursor (and blink it too). This also adds
selection rectangles drawing to the same view so both can be drawn
at the same time.
Change-Id: I3ce034d90597bac4569f04ac903a5443c28cb38e
Previously TextCursorView was subclassing ImageView and a drawable
to draw the cursor by scaling the drawable, which is not an ideal
solution. This is now changed so that the TextCursorView is a
proper subclass of View and draws the cursor using canvas.
Change-Id: I27b1ea73911afbfe9eee6bf382db5368ae449308
This fixes the "click into one shape, type something, click into an
other shape" scenario that was already working in gtktiledviewer.
Change-Id: I79c7174274115b2ab61ea4d0f1de4306f5172a64