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

Method moveUpEvent

core/tree.go:950–958  ·  view source on GitHub ↗

moveUpEvent moves the selection up to previous element in the tree, using given select mode (from keyboard modifiers). Sends select event for newly selected item.

(selMode events.SelectModes)

Source from the content-addressed store, hash-verified

948// using given select mode (from keyboard modifiers).
949// Sends select event for newly selected item.
950func (tr *Tree) moveUpEvent(selMode events.SelectModes) *Tree {
951 nn := tr.moveUp(selMode)
952 if nn != nil && nn != tr {
953 nn.SetFocus()
954 nn.ScrollToThis()
955 tr.sendSelectEvent()
956 }
957 return nn
958}
959
960// treePageSteps is the number of steps to take in PageUp / Down events
961const treePageSteps = 10

Callers 1

InitMethod · 0.95

Calls 4

moveUpMethod · 0.95
sendSelectEventMethod · 0.95
SetFocusMethod · 0.80
ScrollToThisMethod · 0.80

Tested by

no test coverage detected