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

Method pasteMenu

core/list.go:1376–1383  ·  view source on GitHub ↗

pasteMenu performs a paste from the clipboard using given data -- pops up a menu to determine what specifically to do

(md mimedata.Mimes, idx int)

Source from the content-addressed store, hash-verified

1374// pasteMenu performs a paste from the clipboard using given data -- pops up
1375// a menu to determine what specifically to do
1376func (lb *ListBase) pasteMenu(md mimedata.Mimes, idx int) {
1377 lb.unselectAllIndexes()
1378 mf := func(m *Scene) {
1379 lb.makePasteMenu(m, md, idx, events.DropCopy, nil)
1380 }
1381 pos := lb.indexPos(idx)
1382 NewMenu(mf, lb.This.(Widget), pos).Run()
1383}
1384
1385// PasteAssign assigns mime data (only the first one!) to this idx
1386func (lb *ListBase) PasteAssign(md mimedata.Mimes, idx int) {

Callers 1

pasteIndexMethod · 0.95

Calls 5

unselectAllIndexesMethod · 0.95
makePasteMenuMethod · 0.95
indexPosMethod · 0.95
NewMenuFunction · 0.85
RunMethod · 0.45

Tested by

no test coverage detected