MCPcopy Create free account
hub / github.com/cogentcore/core / selectModeToggle

Method selectModeToggle

core/textfield.go:882–891  ·  view source on GitHub ↗

selectModeToggle toggles the SelectMode, updating selection with cursor movement

()

Source from the content-addressed store, hash-verified

880
881// selectModeToggle toggles the SelectMode, updating selection with cursor movement
882func (tf *TextField) selectModeToggle() {
883 if tf.selectMode {
884 tf.selectMode = false
885 } else {
886 tf.selectMode = true
887 tf.selectInit = tf.cursorPos
888 tf.selectStart = tf.cursorPos
889 tf.selectEnd = tf.selectStart
890 }
891}
892
893// shiftSelect sets the selection start if the shift key is down but wasn't previously.
894// If the shift key has been released, the selection info is cleared.

Callers 3

InitMethod · 0.95
shiftSelectMethod · 0.95
handleKeyEventsMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected