Xh2ˉjdZddlZddlZddlZGddeZGddZdZdZe d k(rdd l m Z e d d d yy)z Zoom a window to maximum height.Nc eZdZy)WmInfoGatheringErrorN)__name__ __module__ __qualname__9/opt/alt/python312/lib64/python3.12/idlelib/zoomheight.pyrrsr rc*eZdZiZdZddZdZdZy) ZoomHeightcH||_|jj|_yN)editwintop)selfrs r __init__zZoomHeight.__init__s <<##r Nc|j}||jjy|rdnd}|jj dd|dy)NRestoreZoomoptionsz* Heightz Height)menuindexlabelbreak) zoom_heightrbellrupdate_menu_label)reventzoomed menu_statuss r zoom_height_eventzZoomHeight.zoom_height_events]!!# > HHMMO  (.)6K LL * * 4?=1H + Jr c|j}t|\}}}}|jdk7ry |j\}}||k7rt |||||fy|j dy#t$rYywxYw)NnormalTF)rget_window_geometrywm_stateget_max_height_and_y_coordrset_window_geometry wm_geometry)rrwidthheightxy maxheightmaxys r rzZoomHeight.zoom_height!shh1#6vq! <<>X % "==?OIt Y  eY4%@ A OOB $  sA-- A98A9c|j}|j|jf}||jvr|j } |j d|jt|\}}}}tjdk(rd}|j}|j d|jt|} | dd|fz} t|| |j|j} ||| z z }||f|j|<t|| |j ||j|S#t j $r tdwxYw)Nrz_Failed getting geometry of maximized windows, because the "zoomed" window state is unavailable.win32rr#)rwinfo_screenwidthwinfo_screenheight_max_height_and_y_coordsr&tkinterTclErrorrupdater%sysplatform winfo_rootyr() rrscreen_dimensions orig_statemaxwidthr.maxxr/maxrooty orig_geom max_y_geommax_y_geom_rootys r r'z%ZoomHeight.get_max_height_and_y_coord<sfhh 224 3357 D$A$A AJ A X& JJL.A#.F +Hit||w&(H LL " JJL+C0I"2A$0J Z 0 JJL"0  $44 4I?H$D ) )*; < Y / LL $,,->??I## A+@AA As EE'r)rrrr5rr!rr'rr r r r s "$ 6/@r r c|j}tjd|}tt t |j S)Nz(\d+)x(\d+)\+(-?\d+)\+(-?\d+))r)rematchtuplemapintgroups)rgeomms r r%r%ns7 ?? D 148A S!((*% &&r c@|jdj|y)Nz{:d}x{:d}+{:d}+{:d})r)format)rgeometrys r r(r(tsOO0)00(;rXsU"  9 _@_@D' = z ,Fr