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__/tooltip.cpython-310.pyc
o

�9j��@s�dZddlTGdd�d�ZGdd�de�ZGdd�de�Zd	d
�Zedkr>ddlmZed
ddd�ddl	m
Z
e
e�dSdS)z�Tools for displaying tool-tips.

This includes:
 * an abstract base-class for different kinds of tooltips
 * a simple text-only Tooltip class
�)�*c@sHeZdZdZdd�Zdd�Zdd�Zdd	�Zd
d�Zdd
�Z	dd�Z
dS)�TooltipBasez abstract base class for tooltipscCs||_d|_dS)z�Create a tooltip.

        anchor_widget: the widget next to which the tooltip will be shown

        Note that a widget will only be shown when showtip() is called.
        N)�
anchor_widget�	tipwindow)�selfr�r�&/usr/lib/python3.10/idlelib/tooltip.py�__init__
s
zTooltipBase.__init__cCs|��dS�N��hidetip�rrrr�__del__szTooltipBase.__del__cCsz|jrdSt|j�|_}|�d�z
|j�dd|jdd�Wn	ty(Ynw|��|�	�|j�
�|j��dS)zdisplay the tooltipN�z!::tk::unsupported::MacWindowStyle�style�help�noActivates)r�Toplevelr�wm_overrideredirect�tk�call�_w�TclError�position_window�showcontents�update_idletasks�lift�r�twrrr�showtips
��
zTooltipBase.showtipcCs@|��\}}|j��|}|j��|}|j�d||f�dS)z&(re)-set the tooltip's screen position�+%d+%dN)�get_positionr�winfo_rootx�winfo_rootyr�wm_geometry)r�x�y�root_x�root_yrrrr/szTooltipBase.position_windowcCsd|j��dfS)z(choose a screen position for the tooltip�r)r�winfo_heightr
rrrr!6s	zTooltipBase.get_positioncCst�)z$content display hook for sub-classes)�NotImplementedErrorr
rrrrAszTooltipBase.showcontentscCs8|j}d|_|rz|��WdStyYdSwdS�zhide the tooltipN)r�destroyrrrrrrFs��zTooltipBase.hidetipN)�__name__�
__module__�__qualname__�__doc__r	rrrr!rrrrrrr
s
rcs^eZdZdZd�fdd�	Z�fdd�Zddd	�Zdd
d�Zdd
�Zdd�Z	�fdd�Z
�ZS)�OnHoverTooltipBasez?abstract base class for tooltips, with delayed on-hover display��csVtt|��|�||_d|_|j�d|j�|_|j�d|j	�|_
|j�d|j	�|_dS)aqCreate a tooltip with a mouse hover delay.

        anchor_widget: the widget next to which the tooltip will be shown
        hover_delay: time to delay before showing the tooltip, in milliseconds

        Note that a widget will only be shown when showtip() is called,
        e.g. after hovering over the anchor widget with the mouse for enough
        time.
        N�<Enter>�<Leave>�<Button>)�superr2r	�hover_delay�	_after_idr�bind�_show_event�_id1�_hide_event�_id2�_id3)rrr8��	__class__rrr	Us
zOnHoverTooltipBase.__init__csZz|j�d|j�|j�d|j�|j�d|j�Wn	ty#Ynwtt|���dS)Nr4r5r6)	r�unbindr<r>r?rr7r2rr
r@rrrgs�zOnHoverTooltipBase.__del__NcCs|jr	|��dS|��dS)z$event handler to display the tooltipN)r8�scheduler�r�eventrrrr;pszOnHoverTooltipBase._show_eventcCs|��dS)z!event handler to hide the tooltipNrrDrrrr=wszOnHoverTooltipBase._hide_eventcCs |��|j�|j|j�|_dS)z*schedule the future display of the tooltipN)�
unscheduler�afterr8rr9r
rrrrC{s

�zOnHoverTooltipBase.schedulecCs$|j}d|_|r|j�|�dSdS)z(cancel the future display of the tooltipN)r9r�after_cancel)r�after_idrrrrF�s
�zOnHoverTooltipBase.unschedulecs2z|��Wn	tyYnwtt|���dSr,)rFrr7r2rr
r@rrr�s�zOnHoverTooltipBase.hidetip�r3r
)r.r/r0r1r	rr;r=rCrFr�
__classcell__rrr@rr2Rs
	
r2cs*eZdZdZd�fdd�	Zdd�Z�ZS)�HovertipzAA tooltip that pops up when a mouse hovers over an anchor widget.r3cstt|�j||d�||_dS)avCreate a text tooltip with a mouse hover delay.

        anchor_widget: the widget next to which the tooltip will be shown
        hover_delay: time to delay before showing the tooltip, in milliseconds

        Note that a widget will only be shown when showtip() is called,
        e.g. after hovering over the anchor widget with the mouse for enough
        time.
        �r8N)r7rLr	�text)rrrNr8r@rrr	�s

zHovertip.__init__cCs$t|j|jtdtdd�}|��dS)Nz#ffffe0r)rN�justify�
background�relief�borderwidth)�LabelrrN�LEFT�SOLID�pack)r�labelrrrr�s�zHovertip.showcontentsrJ)r.r/r0r1r	rrKrrr@rrL�s
rLcCs�t|�}|�d�tt|���d�dd��\}}|�d||df�t|dd�}|��t|dd�}|��t	|d	d
d�t|dd�}|��t	|d
dd�dS)NzTest tooltip�+rr �zPlace your mouse over buttons)rNz"Button 1 -- 1/2 second hover delayz!This is tooltip text for button1.i�rMzButton 2 -- no hover delayz!This is tooltip
text for button2.)
r�title�map�int�geometry�splitrSrV�ButtonrL)�parent�topr%r&rW�button1�button2rrr�_tooltip�s
 rd�__main__)�mainzidlelib.idle_test.test_tooltip�F)�	verbosity�exit)�runN)r1�tkinterrr2rLrdr.�unittestrf�idlelib.idle_test.htestrjrrrr�<module>sH?�

Youez - 2016 - github.com/yon3zu
LinuXploit