MCPcopy Index your code
hub / github.com/python/cpython / where

Method where

Lib/tkinter/dnd.py:255–263  ·  view source on GitHub ↗
(self, canvas, event)

Source from the content-addressed store, hash-verified

253 self.canvas.coords(self.id, self.x_orig, self.y_orig)
254
255 def where(self, canvas, event):
256 # where the corner of the canvas is relative to the screen:
257 x_org = canvas.winfo_rootx()
258 y_org = canvas.winfo_rooty()
259 # where the pointer is relative to the canvas widget:
260 x = event.x_root - x_org
261 y = event.y_root - y_org
262 # compensate for initial pointer offset
263 return x - self.x_off, y - self.y_off
264
265 def dnd_end(self, target, event):
266 pass

Callers 4

moveMethod · 0.95
dnd_enterMethod · 0.80
dnd_motionMethod · 0.80
dnd_commitMethod · 0.80

Calls 2

winfo_rootxMethod · 0.80
winfo_rootyMethod · 0.80

Tested by

no test coverage detected