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

Method moveHomeEvent

core/tree.go:1043–1049  ·  view source on GitHub ↗

moveHomeEvent moves the selection up to top of the tree, using given select mode (from keyboard modifiers) and emits select event for newly selected item

(selMode events.SelectModes)

Source from the content-addressed store, hash-verified

1041// using given select mode (from keyboard modifiers)
1042// and emits select event for newly selected item
1043func (tr *Tree) moveHomeEvent(selMode events.SelectModes) *Tree {
1044 tr.root.selectUpdate(selMode)
1045 tr.root.SetFocus()
1046 tr.root.ScrollToThis()
1047 tr.root.sendSelectEvent()
1048 return tr.root
1049}
1050
1051// moveEndEvent moves the selection to the very last node in the tree,
1052// using given select mode (from keyboard modifiers)

Callers 1

InitMethod · 0.95

Calls 4

SetFocusMethod · 0.80
ScrollToThisMethod · 0.80
sendSelectEventMethod · 0.80
selectUpdateMethod · 0.45

Tested by

no test coverage detected