Current File : //opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyo
�
��Wc@s�dZddlmZmZmZmZmZdZdZdZ	dZ
d	Zd
Zddd��YZ
d
�Zedkr�ddlmZee�ndS(s�A CallTip window class for Tkinter/IDLE.

After ToolTip.py, which uses ideas gleaned from PySol
Used by the CallTips IDLE extension.
i����(tTopleveltLabeltLEFTtSOLIDtTclErrors<<calltipwindow-hide>>s<Key-Escape>s
<FocusOut>s<<calltipwindow-checkhide>>s<KeyRelease>s<ButtonRelease>idtcalltipwindowregion_righttCallTipcBsJeZd�Zd�Zd�Zdd�Zd�Zd�Zd�Z	RS(cCsO||_d|_|_d|_|_d|_d|_|_d|_	dS(N(
twidgettNonet	tipwindowtlabelt	parenlinetparencoltlastlinethideidtcheckhideidtcheckhide_after_id(tselfR((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyt__init__s		cCs(t|jjd�jd�d�}||jkr8dS||_|jjd�||jkr�|jjd|j|jf�}n|jjd|�}|s�t	|jjd��}d|d<d|d<n|d|jj
�d}|d|d	|jj�}|jj
d
||f�dS(s;Check if needs to reposition the window, and if so - do it.tinsertt.iNs%d.%ds%d.0iiis+%d+%d(tintRtindextsplitR
tseeRtbboxRtlisttwinfo_rootxtwinfo_rootyR	twm_geometry(Rtcurlinetboxtxty((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pytposition_windows %	

cCs�||_|js|jr dS|jjt|�tt|jj|�jd��\|_	|_
t|j�|_}|j�|j
d�y#|jjdd|jdd�Wntk
r�nXt|d|jd	td
ddtd
dd|jd�|_|jj�|j�|jjt|j�|_x!tD]}|jjt|�q=W|jjt|j�|jjt |j!�|_"x!t#D]}|jjt |�q�WdS(sMShow the calltip, bind events which will close it and reposition it.
        NRis!::tk::unsupported::MacWindowStyletstylethelptnoActivatesttexttjustifyt
backgrounds#ffffe0trelieftborderwidthtfont($R&R	Rtmark_sett
MARK_RIGHTtmapRRRRRRR"twm_overrideredirectttktcallt_wRRRRR
tpacktlifttbindtCHECKHIDE_VIRTUAL_EVENT_NAMEtcheckhide_eventRtCHECKHIDE_SEQUENCESt	event_addtaftertCHECKHIDE_TIMEtHIDE_VIRTUAL_EVENT_NAMEt
hide_eventRtHIDE_SEQUENCES(RR&t	parenleftt
parenrightttwtseq((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pytshowtip/s8	-






cCs�|js
dStt|jjd�jd��\}}||jks|||jkrd||jks||jjddt	�r�|j
�nJ|j�|jdk	r�|jj|j�n|jjt|j�|_dS(NRRt>(R	R.RRRRRRtcompareR-thidetipR"RRtafter_cancelR:R;R7(RteventRtcurcol((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyR7Ws	*

cCs|js
dS|j�dS(N(R	RF(RRH((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyR=is	cCs�|js
dSx!tD]}|jjt|�qW|jjt|j�d|_x!tD]}|jjt	|�qWW|jjt	|j
�d|_
|jj�d|_|jj�d|_|jj
t�d|_|_|_dS(N(R	R8Rtevent_deleteR6tunbindRRR>R<RR
tdestroyt
mark_unsetR-RRR
(RRB((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyRFos 	
	
	
	
	cCs
t|j�S(N(tboolR	(R((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyt	is_active�sN(
t__name__t
__module__RR"RCRR7R=RFRO(((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyRs			(		c	s ddlm}m}m}m}||�}|jd�|jd|j�d|j�df�||�}|j	d|d|d	d
�|j
dd�|j�t|���fd
�}�fd�}|j
dd�|j
dd�|jd|�|jd|�|j�dS(Ni����(RtTextRtBOTHs
Test calltipss
200x100+%d+%di�i�tsidetfilltexpandiRsstring.splitcs�jddd�dS(Ns(s=Hello world)Rtend(RC(RH(tcalltip(sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pytcalltip_show�scs�j�dS(N(RF(RH(RX(sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pytcalltip_hide�ss<<calltip-show>>t(s<<calltip-hide>>t)(tTkinterRRRRRSttitletgeometryRRR3RtupdateRR9R5t	focus_set(	tparentRRRRRSttopR&RYRZ((RXsn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyt_calltip_window�s""

t__main__(trunN(s<Key-Escape>s
<FocusOut>(s<KeyRelease>s<ButtonRelease>((t__doc__R]RRRRRR<R>R6R8R;R-RRdRPtidlelib.idle_test.htestRf(((sn/builddir/build/BUILDROOT/imh-python-2.7.12-1.el7.x86_64/opt/imh-python/lib/python2.7/idlelib/CallTipWindow.pyt<module>s(x