ó {fc@s›dZddlmZmZmZmZmZdZdZdZ dZ d Z d Z d dd „ƒ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<>s s s<>s sidtcalltipwindowregion_righttCallTipcBsJeZd„Zd„Zd„Zdd„Zd„Zd„Zd„Z RS(cCsO||_d|_|_d|_|_d|_d|_|_d|_ dS(N( twidgettNonet tipwindowtlabelt parenlinetparencoltlastlinethideidt checkhideidtcheckhide_after_id(tselfR((s-/usr/lib64/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(R R.RRRRR R tcompareR-thidetipR"RRt after_cancelR;R<R8(RteventRtcurcol((s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyR8Xs *  cCs|js dS|jƒdS(N(R RG(RRI((s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyR>js cCsê|js dSx!tD]}|jjt|ƒqW|jjt|jƒd|_x!tD]}|jjt |ƒqWW|jjt |j ƒd|_ |j j ƒd|_ |jj ƒd|_|jj tƒd|_|_|_dS(N(R R9Rt event_deleteR7tunbindRRR?R=RR tdestroyt mark_unsetR-R R R (RRC((s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyRGps          cCs t|jƒS(N(tboolR (R((s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyt is_active…sN( t__name__t __module__RR"RDRR8R>RGRP(((s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyRs   )   c s ddlm}m}m}m}||ƒ}|jdƒ|jd|jƒd|jƒdfƒ||ƒ}|j d|d|d d ƒ|j d d ƒ|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(RD(RI(tcalltip(s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyt calltip_show–scsˆjƒdS(N(RG(RI(RY(s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyt calltip_hide˜ss<>t(s<>t)(tTkinterRRSRRTttitletgeometryRRR3RtupdateRR:R6t focus_set( tparentRRSRRTttopR&RZR[((RYs-/usr/lib64/python2.7/idlelib/CallTipWindow.pyt_calltip_window‰s""     t__main__(trunN(s s (s s((t__doc__R^RRRRRR=R?R7R9R<R-RReRQtidlelib.idle_test.htestRg(((s-/usr/lib64/python2.7/idlelib/CallTipWindow.pyts(y