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

Method ContextMenuPos

core/tree.go:1188–1196  ·  view source on GitHub ↗

Modifying Source Tree

(e events.Event)

Source from the content-addressed store, hash-verified

1186// Modifying Source Tree
1187
1188func (tr *Tree) ContextMenuPos(e events.Event) (pos image.Point) {
1189 if e != nil {
1190 pos = e.WindowPos()
1191 return
1192 }
1193 pos.X = tr.Geom.TotalBBox.Min.X + int(tr.Indent.Dots)
1194 pos.Y = (tr.Geom.TotalBBox.Min.Y + tr.Geom.TotalBBox.Max.Y) / 2
1195 return
1196}
1197
1198func (tr *Tree) contextMenuReadOnly(m *Scene) {
1199 tri := tr.This.(Treer)

Callers 2

pasteMenuMethod · 0.95
DragDropMethod · 0.95

Calls 1

WindowPosMethod · 0.65

Tested by

no test coverage detected