Back to index

python3.2  3.2.2
Classes | Functions
idlelib.ZoomHeight Namespace Reference

Classes

class  ZoomHeight

Functions

def zoom_height

Function Documentation

Definition at line 23 of file ZoomHeight.py.

00023 
00024 def zoom_height(top):
00025     geom = top.wm_geometry()
00026     m = re.match(r"(\d+)x(\d+)\+(-?\d+)\+(-?\d+)", geom)
00027     if not m:
00028         top.bell()
00029         return
00030     width, height, x, y = map(int, m.groups())
00031     newheight = top.winfo_screenheight()
00032     if sys.platform == 'win32':
00033         newy = 0
00034         newheight = newheight - 72
00035 
00036     elif macosxSupport.runningAsOSXApp():
00037         # The '88' below is a magic number that avoids placing the bottom
00038         # of the window below the panel on my machine. I don't know how
00039         # to calculate the correct value for this with tkinter.
00040         newy = 22
00041         newheight = newheight - newy - 88
00042 
00043     else:
00044         #newy = 24
00045         newy = 0
00046         #newheight = newheight - 96
00047         newheight = newheight - 88
00048     if height >= newheight:
00049         newgeom = ""
00050     else:
00051         newgeom = "%dx%d+%d+%d" % (width, newheight, x, newy)
00052     top.wm_geometry(newgeom)

Here is the call graph for this function:

Here is the caller graph for this function: