Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/idlelib/ToolTip.pyc

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@sddlTddd��YZdefd��YZdefd��YZd�Zed	kr{dd
lmZee�ndS(
i�(t*tToolTipBasecBsYeZd�Zd	d�Zd	d�Zd�Zd�Zd�Zdd�Z	d�Z
RS(
cCs�||_d|_d|_d|_|_|jjd|j�|_|jjd|j	�|_
|jjd|j	�|_dS(Nis<Enter>s<Leave>s
<ButtonPress>(tbuttontNonet	tipwindowtidtxtytbindtentert_id1tleavet_id2t_id3(tselfR((s%/sys/lib/python2.7/idlelib/ToolTip.pyt__init__
s			cCs|j�dS(N(tschedule(Rtevent((s%/sys/lib/python2.7/idlelib/ToolTip.pyR	scCs|j�|j�dS(N(t
unschedulethidetip(RR((s%/sys/lib/python2.7/idlelib/ToolTip.pyRs
cCs)|j�|jjd|j�|_dS(Ni�(RRtaftertshowtipR(R((s%/sys/lib/python2.7/idlelib/ToolTip.pyRs
cCs/|j}d|_|r+|jj|�ndS(N(RRRtafter_cancel(RR((s%/sys/lib/python2.7/idlelib/ToolTip.pyRs		cCs�|jr
dS|jj�d}|jj�|jj�d}t|j�|_}|jd�|jd||f�|j�dS(Niis+%d+%d(	RRtwinfo_rootxtwinfo_rootytwinfo_heighttTopleveltwm_overrideredirecttwm_geometrytshowcontents(RRRttw((s%/sys/lib/python2.7/idlelib/ToolTip.pyR$s	 
sYour text herecCs;t|jd|dtdddtdd�}|j�dS(Nttexttjustifyt
backgrounds#ffffe0trelieftborderwidthi(tLabelRtLEFTtSOLIDtpack(RRtlabel((s%/sys/lib/python2.7/idlelib/ToolTip.pyR2scCs)|j}d|_|r%|j�ndS(N(RRtdestroy(RR((s%/sys/lib/python2.7/idlelib/ToolTip.pyR8s		N(t__name__t
__module__RRR	RRRRRR(((s%/sys/lib/python2.7/idlelib/ToolTip.pyRs					tToolTipcBseZd�Zd�ZRS(cCstj||�||_dS(N(RRR(RRR((s%/sys/lib/python2.7/idlelib/ToolTip.pyR?scCstj||j�dS(N(RRR(R((s%/sys/lib/python2.7/idlelib/ToolTip.pyRBs(R*R+RR(((s%/sys/lib/python2.7/idlelib/ToolTip.pyR,>s	tListboxToolTipcBseZd�Zd�ZRS(cCstj||�||_dS(N(RRtitems(RRR.((s%/sys/lib/python2.7/idlelib/ToolTip.pyRFscCsGt|jdd�}|j�x!|jD]}|jt|�q)WdS(NR!s#ffffe0(tListboxRR'R.tinserttEND(Rtlistboxtitem((s%/sys/lib/python2.7/idlelib/ToolTip.pyRIs
(R*R+RR(((s%/sys/lib/python2.7/idlelib/ToolTip.pyR-Es	c	Cs�t�}|jd�ttttjd|j����\}}}}|jd||df�t|dd�}|j	�t
|dd�}t
|dd�}|j	�|j	�t|d	�t|d
ddd
g�|j
�dS(NsTest tooltips[x+]s+%d+%di�RsPlace your mouse over buttonssButton 1sButton 2s!This is tooltip text for button1.sThis iss
multiple linestooltip textsfor button2(tTkttitletlisttmaptinttretsplittgeometryR$R'tButtonR,R-tmainloop(	tparenttroottwidththeightRRR(tbutton1tbutton2((s%/sys/lib/python2.7/idlelib/ToolTip.pyt_tooltipOs	
3




t__main__(trunN((tTkinterRR,R-RDR*tidlelib.idle_test.htestRF(((s%/sys/lib/python2.7/idlelib/ToolTip.pyt<module>s
6
	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].