Modifying Source Tree
(e events.Event)
| 1186 | // Modifying Source Tree |
| 1187 | |
| 1188 | func (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 | |
| 1198 | func (tr *Tree) contextMenuReadOnly(m *Scene) { |
| 1199 | tri := tr.This.(Treer) |