Root class for Screen based on Tkinter.
| 427 | |
| 428 | |
| 429 | class _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 | |
| 453 | Canvas = TK.Canvas |
| 454 |
no outgoing calls
no test coverage detected
searching dependent graphs…