Hi,

does anyone have a hint on the code needed to copy the current selection from one buffer and paste it into another buffer, without affecting the user's clipboard ?

On a related note, what is the "Cut stack" ?

Also, is it true that all of these paste methods [1] (from CutAndPaste.h) work only in text mode ?

What is the simplest way to copy a segment of LyX text (inclusive of maths and whatever may be there), and paste it into another LyX buffer, just emulating C-c followed by C-v ?

Thanks,

    T.

[1]
/// Paste the current selection at \p cur
/// Does handle undo. Does only work in text, not mathed.
void pasteSelection(Cursor & cur, ErrorList &);
/// Replace the current selection with the clipboard contents as text
/// (internal or external: which is newer).
/// Does handle undo. Does only work in text, not mathed.
void pasteClipboardText(Cursor & cur, ErrorList & errorList,
    bool asParagraphs = true);
/// Replace the current selection with the clipboard contents as graphic.
/// Does handle undo. Does only work in text, not mathed.
void pasteClipboardGraphics(Cursor & cur, ErrorList & errorList,
    Clipboard::GraphicsType preferedType = Clipboard::AnyGraphicsType);
/// Replace the current selection with cut buffer \c sel_index
/// Does handle undo. Does only work in text, not mathed.
void pasteFromStack(Cursor & cur, ErrorList & errorList, size_t sel_index);
/// Paste the clipboard as simple text, removing any formatting
void pasteSimpleText(Cursor & cur, bool asParagraphs);

/// Paste the paragraph list \p parlist at the position given by \p cur.
/// Does not handle undo. Does only work in text, not mathed.
void pasteParagraphList(Cursor & cur, ParagraphList const & parlist,
            DocumentClass const * const textclass, ErrorList & errorList);

Reply via email to