Abdelrazak Younes schreef:
On 04/05/2009 00:06, Vincent van Ravesteijn wrote:
Abdelrazak Younes schreef:
On 03/05/2009 23:36, Vincent van Ravesteijn wrote:
Yes. And that's how the outline lfuns work by the way.
How ?
By looking backward for the first section heading.
Would be nice to make those lfuns reuse the shiny new
LFUN_SECTION_SELECT by the way.
Well, the shiny new LFUN_SECTION_SELECT uses code from the outline
lfuns.
I tried to implement the copy and cut operations, but that became
quite difficult. I need somehow to add some functions to
CutAndPaste, but I'm not quite confident that I understand all
mechanisms good enough to determine which functions to make public
and/or which functions to add.
I am not sure you have to add anything. Once something is selected,
you can copy or cut it easily; you don't need special support for
"section selection", a selection is a selection. Or maybe I am
missing what you are missing?
Abdel.
I don't want to select anything, as this will force the cursor to
move. That's something I generally try to avoid when using the
outline context menu. The outline lfuns uses a ParagraphList to move
the sections. It would be straightforward to copy this list to the
clipboard, like putClipboard( ParagraphList const & pl, ...) does.
But, I am not sure how to do this exactly.
This is a worthy goal and I agree it's generally better to avoid using
the BufferView Cursor and that's why I factorized the outline lfuns to
work with PragraphList. But, in this case, as with the outline lfuns,
you want to give a visual feedback to the user, don't you?
We do want to give feedback in the case of section-select, but we won't
in the case of section-copy, as it is likely that the user wants to
insert it at the place of the cursor.
Now, I stumbled over another bug. I can no longer move down the second
chapter of the User's Guide with the already existing down button of the
outliner. LyX will crash instead. It has no relation with the context
menu stuff, I think.
Vincent