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

Class _Root

Lib/turtle.py:429–451  ·  view source on GitHub ↗

Root class for Screen based on Tkinter.

Source from the content-addressed store, hash-verified

427
428
429class _Root(TK.Tk):
430 """Root class for Screen based on Tkinter."""
431 def __init__(self):
432 TK.Tk.__init__(self)
433
434 def setupcanvas(self, width, height, cwidth, cheight):
435 self._canvas = ScrolledCanvas(self, width, height, cwidth, cheight)
436 self._canvas.pack(expand=1, fill="both")
437
438 def _getcanvas(self):
439 return self._canvas
440
441 def set_geometry(self, width, height, startx, starty):
442 self.geometry("%dx%d%+d%+d"%(width, height, startx, starty))
443
444 def ondestroy(self, destroy):
445 self.wm_protocol("WM_DELETE_WINDOW", destroy)
446
447 def win_width(self):
448 return self.winfo_screenwidth()
449
450 def win_height(self):
451 return self.winfo_screenheight()
452
453Canvas = TK.Canvas
454

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…