Jean-Marc Lasgouttes wrote:
"Abdelrazak" == Abdelrazak Younes <[EMAIL PROTECTED]> writes:
Abdelrazak> Nothing wrong per see. But Andre (and I think I agree with
Abdelrazak> him) thinks that we should decorrelate the model and the
Abdelrazak> view. Passing a BufferView (the view) and a DocIterator
Abdelrazak> (the model independent from the view) make explicit the
Abdelrazak> fact that we need both in this function. Passing Cursor
Abdelrazak> would hide that fact.
No, passing a cursor exactly shows that we need both the model and the
view.
That's an interesting way of seeing it.
I would rather aggressively change LCursor to DocIterator in all
methods that are not buffervew-dependent, so that passing LCursor is a
clear indication that we depend on the view.
Agreed, but this work does not preclude the other.
In the new getPos, you pass 3 parameters that all should com from one
cursor. This is wrong, especially since the method os useful to find
the position of a cursor.
IMHO, what is wrong really is this cursorPos() method. IIUC an inset is
a model of some part of the LyX document. As such it should be
independent of the cursor position. It is fine if the inset returns its
metrics but that's it. All the rest should covered externally to the inset.
Abdel.