• File: zoomheight.cpython-37.pyc
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/opt/alt/python37/lib64/python3.7/idlelib/__pycache__/zoomheight.cpython-37.pyc
  • Date Modified: 10/26/2026 8:08 PM
  • File size: 2.73 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit
B

Njk@spdZddlZddlZddlZGdddeZGdddZddZd	d
Ze	dkrlddl
mZed
ddddS)z Zoom a window to maximum height.Nc@seZdZdS)WmInfoGatheringErrorN)__name__
__module____qualname__rr7/opt/alt/python37/lib64/python3.7/idlelib/zoomheight.pyrsrc@s2eZdZiZddZd
ddZddZdd	ZdS)
ZoomHeightcCs||_|jj|_dS)N)editwintop)selfr	rrr__init__szZoomHeight.__init__NcCsD|}|dkr|jn$|r$dnd}|jjdd|dddS)NZRestoreZZoomZoptionsz* Heightz Height)ZmenuindexZlabelbreak)zoom_heightr
Zbellr	Zupdate_menu_label)rZeventzoomedZmenu_statusrrrzoom_height_events
zZoomHeight.zoom_height_eventcCs||j}t|\}}}}|dkr&dSy|\}}Wntk
rJdSX||krjt|||||fdS|ddSdS)NnormalTF)r
get_window_geometrywm_stateget_max_height_and_y_coordrset_window_geometrywm_geometry)rr
widthZheightxy	maxheightmaxyrrrr!s
zZoomHeight.zoom_heightcCs|j}||f}||jkr|}y|dWntjk
rTtdYnX|t	|\}}}}t
jdkr|d}|}|d|t	|}	|	dd|f}
t
||
||}|||7}||f|j|<t
||	|||j|S)Nrz_Failed getting geometry of maximized windows, because the "zoomed" window state is unavailable.Zwin32rr)r
Zwinfo_screenwidthZwinfo_screenheight_max_height_and_y_coordsrtkinterZTclErrorrupdatersysplatformZwinfo_rootyr)rr
Zscreen_dimensionsZ
orig_stateZmaxwidthrZmaxxrZmaxrootyZ	orig_geomZ
max_y_geomZmax_y_geom_rootyrrrr<s6






z%ZoomHeight.get_max_height_and_y_coord)N)rrrrrrrrrrrrrs

rcCs&|}td|}ttt|S)Nz(\d+)x(\d+)\+(-?\d+)\+(-?\d+))rrematchtuplemapintgroups)r
ZgeommrrrrnsrcCs|dj|dS)Nz{:d}x{:d}+{:d}+{:d})rformat)r
Zgeometryrrrrtsr__main__)mainz!idlelib.idle_test.test_zoomheightF)	verbosityexit)__doc__r$r"r 	ExceptionrrrrrZunittestr-rrrr<module>sb