Hacked By AnonymousFox

Current Path : /opt/alt/python37/lib64/python3.7/idlelib/__pycache__/
Upload File :
Current File : //opt/alt/python37/lib64/python3.7/idlelib/__pycache__/tooltip.cpython-37.opt-2.pyc

B

YI~d��@szddlTGdd�de�ZGdd�de�ZGdd�de�Zdd	�Zed
krvddlmZedd
dd�ddl	m
Z
e
e�dS)�)�*c@sDeZdZdd�Zdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dS)�TooltipBasecCs||_d|_dS)N)�
anchor_widget�	tipwindow)�selfr�r�4/opt/alt/python37/lib64/python3.7/idlelib/tooltip.py�__init__
szTooltipBase.__init__cCs|��dS)N)�hidetip)rrrr�__del__szTooltipBase.__del__cCs||jr
dSt|j�|_}|�d�y|j�dd|jdd�Wntk
rRYnX|��|�	�|j�
�|j��dS)N�z!::tk::unsupported::MacWindowStyleZstyle�helpZnoActivates)r�ToplevelrZwm_overrideredirectZtkZcallZ_w�TclError�position_window�showcontentsZupdate_idletasksZlift)r�twrrr�showtips

zTooltipBase.showtipcCs@|��\}}|j��|}|j��|}|j�d||f�dS)Nz+%d+%d)�get_positionrZwinfo_rootxZwinfo_rootyrZwm_geometry)r�x�yZroot_xZroot_yrrrr/szTooltipBase.position_windowcCsd|j��dfS)N�r)rZwinfo_height)rrrrr6s	zTooltipBase.get_positioncCst�dS)N)�NotImplementedError)rrrrrAszTooltipBase.showcontentscCs6|j}d|_|r2y|��Wntk
r0YnXdS)N)rZdestroyr)rrrrrr
FszTooltipBase.hidetipN)
�__name__�
__module__�__qualname__r	rrrrrr
rrrrr
s
rcsZeZdZd�fdd�	Z�fdd�Zddd�Zdd	d
�Zdd�Zd
d�Z�fdd�Z	�Z
S)�OnHoverTooltipBase��csVtt|��|�||_d|_|j�d|j�|_|j�d|j	�|_
|j�d|j	�|_dS)Nz<Enter>z<Leave>z<Button>)�superrr	�hover_delay�	_after_idrZbind�_show_event�_id1�_hide_event�_id2�_id3)rrr)�	__class__rrr	Us
zOnHoverTooltipBase.__init__cs\y4|j�d|j�|j�d|j�|j�d|j�Wntk
rHYnXtt|���dS)Nz<Enter>z<Leave>z<Button>)	rZunbindr"r$r%rrrr)r)r&rrrgszOnHoverTooltipBase.__del__NcCs|jr|��n|��dS)N)r�scheduler)r�eventrrrr!ps
zOnHoverTooltipBase._show_eventcCs|��dS)N)r
)rr(rrrr#wszOnHoverTooltipBase._hide_eventcCs |��|j�|j|j�|_dS)N)�
unschedulerZafterrrr )rrrrr'{s
zOnHoverTooltipBase.schedulecCs |j}d|_|r|j�|�dS)N)r rZafter_cancel)rZafter_idrrrr)�szOnHoverTooltipBase.unschedulecs4y|��Wntk
r YnXtt|���dS)N)r)rrrr
)r)r&rrr
�s
zOnHoverTooltipBase.hidetip)r)N)N)rrrr	rr!r#r'r)r
�
__classcell__rr)r&rrRs	

rcs&eZdZd�fdd�	Zdd�Z�ZS)�Hovertip��cstt|�j||d�||_dS)N)r)rr+r	�text)rrr-r)r&rrr	�s
zHovertip.__init__cCs$t|j|jtdtdd�}|��dS)Nz#ffffe0r)r-ZjustifyZ
backgroundZreliefZborderwidth)�Labelrr-ZLEFTZSOLID�pack)r�labelrrrr�szHovertip.showcontents)r,)rrrr	rr*rr)r&rr+�s
r+cCs�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�+rz+%d+%d�zPlace your mouse over buttons)r-z"Button 1 -- 1/2 second hover delayz!This is tooltip text for button1.i�)rzButton 2 -- no hover delayz!This is tooltip
text for button2.)
r�title�map�intZgeometry�splitr.r/ZButtonr+)�parent�toprrr0Zbutton1Zbutton2rrr�_tooltip�s
 r9�__main__)�mainzidlelib.idle_test.test_tooltip�F)�	verbosity�exit)�runN)Ztkinter�objectrrr+r9rZunittestr;Zidlelib.idle_test.htestr?rrrr�<module>sH?

Hacked By AnonymousFox1.0, Coded By AnonymousFox