simvx.core.ui.text_selection¶
Selection, clipboard and word boundaries shared by the text-editing widgets.
TextEdit places its caret at a character offset and MultiLineTextEdit
at a (line, column) pair. Both order with <, so one set of selection
and clipboard methods serves both: a widget supplies its caret as _caret
and the two text operations _text_between and _remove_between.
Module Contents¶
Classes¶
Selection and clipboard for a text widget whose caret positions order with |
Data¶
API¶
- simvx.core.ui.text_selection.__all__¶
[‘TextSelectionMixin’]
- class simvx.core.ui.text_selection.TextSelectionMixin¶
Selection and clipboard for a text widget whose caret positions order with
<.The selection runs from
_select_start, the anchor, to_select_end, which follows the caret; None at either end means nothing is selected. A widget using it provides_caret(read and assigned),_text_between,_remove_between,insertand atext_changedsignal.- copy() None¶
Copy the selected text to the clipboard.
- cut() None¶
Copy the selected text to the clipboard and remove it.
- paste() None¶
Insert the clipboard’s text at the caret, replacing the selection.