HEX
Server: LiteSpeed
System: Linux kapuas.iixcp.rumahweb.net 5.14.0-427.42.1.el9_4.x86_64 #1 SMP PREEMPT_DYNAMIC Fri Nov 1 14:58:02 EDT 2024 x86_64
User: mirz4654 (1666)
PHP: 8.1.33
Disabled: system,exec,escapeshellarg,escapeshellcmd,passthru,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,shell_exec,popen,pclose,dl,pfsockopen,leak,apache_child_terminate,posix_kill,posix_mkfifo,posix_setsid,posix_setuid,posix_setpgid,ini_alter,show_source,define_syslog_variables,symlink,syslog,openlog,openlog,closelog,ocinumcols,listen,chgrp,apache_note,apache_setenv,debugger_on,debugger_off,ftp_exec,dll,ftp,myshellexec,socket_bind,mail,posix_getwpuid
Upload Files
File: //opt/alt/python37/lib64/python3.7/idlelib/__pycache__/zoomheight.cpython-37.pyc
B

78VvZȠ��@spdZddlZddlZddlZGdd�de�ZGdd�d�Zdd�Zd	d
�Ze	dkrlddl
mZed
ddd�dS)z Zoom a window to maximum height.�Nc@seZdZdS)�WmInfoGatheringErrorN)�__name__�
__module__�__qualname__�rr�7/opt/alt/python37/lib64/python3.7/idlelib/zoomheight.pyrsrc@s2eZdZiZdd�Zd
dd�Zdd�Zdd	�ZdS)�
ZoomHeightcCs||_|jj|_dS)N)�editwin�top)�selfr	rrr�__init__szZoomHeight.__init__NcCsD|��}|dkr|j��n$|r$dnd}|jjdd|�d�d�dS)NZRestoreZZoomZoptionsz* Heightz Height)Zmenu�indexZlabel�break)�zoom_heightr
Zbellr	Zupdate_menu_label)rZevent�zoomedZmenu_statusrrr�zoom_height_events
zZoomHeight.zoom_height_eventcCs||j}t|�\}}}}|��dkr&dSy|��\}}Wntk
rJdSX||krjt|||||f�dS|�d�dSdS)N�normalT�F)r
�get_window_geometry�wm_state�get_max_height_and_y_coordr�set_window_geometry�wm_geometry)rr
�widthZheight�x�y�	maxheight�maxyrrrr!s
zZoomHeight.zoom_heightcCs|j}|��|��f}||jkr�|��}y|�d�Wntjk
rTtd��YnX|��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_coordsr�tkinterZTclErrorr�updater�sys�platformZwinfo_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&|��}t�d|�}ttt|����S)Nz(\d+)x(\d+)\+(-?\d+)\+(-?\d+))r�re�match�tuple�map�int�groups)r
Zgeom�mrrrrnsrcCs|�dj|��dS)Nz{:d}x{:d}+{:d}+{:d})r�format)r
Zgeometryrrrrtsr�__main__)�mainz!idlelib.idle_test.test_zoomheight�F)�	verbosity�exit)�__doc__r$r"r �	ExceptionrrrrrZunittestr-rrrr�<module>sb