On 16/03/14 07:23, Sushant Raikar wrote:
> This is related to gsoc project: Interactive LyX. I wanted to know
> whether it is possible to have multiple cursors in a single
> BufferView in the current Lyx BufferView implementation.
> 
> If so ,is it possible to make such a cursor immune to local
> signals/triggers such as Mouse click or key press.
> 
> The scenario is such that one main cursor will be in control of the
> user, where as the other cursor will be in control of the other end
> user. The first cursor should be immune to any of the LFUN signals
> such as LFUN_UP|DOWN from the other user and vice versa.

Hi,

as per standard multi-view editors design, it is possible to have multiple
views on the same document, where each view would have its own cursor. This
is normally used when you open multiple windows on the same document.

AFAICR, my old bad hack for this feature

  http://www.lyx.org/trac/ticket/7964
  http://www.lyx.org/trac/attachment/ticket/7964/lyx-collaborate-v4.patch

was using exactly this approach: the local view would be visible on screen
and allow interactions with the user, whilst the remote view would not be
visible on screen, but it would copy any action performed remotely by the
other connected user, namely:

- I type in my local (visible) view, LFUN is sent to the remote
  user's remote view, that replays the LFUN onto the document on
  the remote user's LyX, triggering a refresh of the visible view
  local to the remote user, to reflect changes

- remote user types in its local view, LFUN is sent to my remote view,
  that replays the action in my local copy of the document, triggering
  refresh of my local visible view of the document, to reflect changes.

See for example BufferView::addRemoteBufferView() in that old patch, as
well as ::send() and ::try_recv().

        T.

Reply via email to