Cut, copy and paste =================== .. method:: gtkscintilla.Scintilla.cut() .. method:: gtkscintilla.Scintilla.copy() .. method:: gtkscintilla.Scintilla.paste() .. method:: gtkscintilla.Scintilla.clear() .. method:: gtkscintilla.Scintilla.can_paste() .. method:: gtkscintilla.Scintilla.copy_allow_line() These commands perform the standard tasks of cutting and copying data to the clipboard, pasting from the clipboard into the document, and clearing the document. :meth:`~gtkscintilla.Scintilla.can_paste` returns *True* if the document isn't read-only and if the selection doesn't contain protected text. If you need a "can copy" or "can cut", use :meth:`~gtkscintilla.Scintilla.get_selection_start` :meth:`~gtkscintilla.Scintilla.get_selection_end`, which will be non-zero if you can copy or cut to the clipboard. .. warning:: GTK+ does not really support :meth:`~gtkscintilla.Scintilla.can_paste` and always returns *True* unless the document is read-only. .. warning:: On X, the clipboard is asynchronous and may require several messages between the destination and source applications. Data from :meth:`~gtkscintilla.Scintilla.paste` will not arrive in the document immediately. :meth:`gtkscintilla.Scintilla.copy_allow_line` works the same as :meth:`~gtkscintilla.Scintilla.copy` except that if the selection is empty then the current line is copied. .. method:: gtkscintilla.Scintilla.copy_range(start, end) .. method:: gtkscintilla.Scintilla.copy_text(text) :meth:`~gtkscintilla.Scintilla.copy_range` copies a range of text from the document to the system clipboard and :meth:`gtkscintilla.Scintilla.copy_text` copies a supplied piece of text to the system clipboard. .. This 2 methods are windows only .. method:: gtkscintilla.Scintilla.set_paste_convert_endings(convert) .. method:: gtkscintilla.Scintilla.get_paste_convert_endings() If this property is set then when text is pasted any line ends are converted to match the document's end of line mode as set with SET_EOL_MODE. Currently only changeable on Windows. On GTK+ pasted text is always converted.