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

Method Select

core/tree.go:677–686  ·  view source on GitHub ↗

Select selects this node (if not already selected). You must use this method to update global selection list.

()

Source from the content-addressed store, hash-verified

675// Select selects this node (if not already selected).
676// You must use this method to update global selection list.
677func (tr *Tree) Select() {
678 if !tr.StateIs(states.Selected) {
679 tr.SetSelected(true)
680 tr.Style()
681 sl := tr.GetSelectedNodes()
682 sl = append(sl, tr.This.(Treer))
683 tr.SetSelectedNodes(sl)
684 tr.NeedsRender()
685 }
686}
687
688// Unselect unselects this node (if selected).
689// You must use this method to update global selection list.

Callers 4

selectUpdateMethod · 0.95
addStyleMethod · 0.80
OpenURLMethod · 0.80
SelectAllMethod · 0.80

Calls 6

StyleMethod · 0.95
GetSelectedNodesMethod · 0.95
SetSelectedNodesMethod · 0.95
StateIsMethod · 0.80
NeedsRenderMethod · 0.80
SetSelectedMethod · 0.45

Tested by

no test coverage detected