• File: CallTipWindow.pyo
  • Full Path: /home3/farmfre2/public_html/ALFA_DATA/alfasymlink/root/proc/self/root/proc/self/root/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyo
  • Date Modified: 10/26/2026 8:10 PM
  • File size: 6.14 KB
  • MIME-type: text/x-bytecode.python
  • Charset: 8 bit

jc@sdZddlmZmZmZmZmZdZdZdZ	dZ
d	Zd
ZdddYZ
d
ZedkrddlmZeendS(sA 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_righttCallTipcBsJeZdZdZdZddZdZdZdZ	RS(cCsO||_d|_|_d|_|_d|_d|_|_d|_	dS(N(
twidgettNonet	tipwindowtlabelt	parenlinetparencoltlastlinethideidtcheckhideidtcheckhide_after_id(tselfR((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyt__init__s		cCs(t|jjdjdd}||jkr8dS||_|jjd||jkr|jjd|j|jf}n|jjd|}|st	|jjd}d|d<d|d<n|d|jj
d}|d|d	|jj}|jj
d
||fdS(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((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pytposition_windows %	

cCs||_|js|jr dS|jjt|tt|jj|jd\|_	|_
t|j|_}|j|j
dy#|jjdd|jddWntk
rnXt|d|jd	td
ddtd
dd|jd|_|jj|j|j|jjt|j|_x!tD]}|jjt|qGW|jjt |j|jjt!|j"|_#x!t$D]}|jjt!|qWdS(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
tpacktupdate_idletaskstlifttbindtCHECKHIDE_VIRTUAL_EVENT_NAMEtcheckhide_eventRtCHECKHIDE_SEQUENCESt	event_addtaftertCHECKHIDE_TIMEtHIDE_VIRTUAL_EVENT_NAMEt
hide_eventRtHIDE_SEQUENCES(RR&t	parenleftt
parenrightttwtseq((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pytshowtip/s:	-







cCs|js
dStt|jjdjd\}}||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<R8(RteventRtcurcol((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyR8Xs	*

cCs|js
dS|jdS(N(R	RG(RRI((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyR>js	cCs|js
dSx!tD]}|jjt|qW|jjt|jd|_x!tD]}|jjt	|qWW|jjt	|j
d|_
|jjd|_|jjd|_|jj
td|_|_|_dS(N(R	R9Rtevent_deleteR7tunbindRRR?R=RR
tdestroyt
mark_unsetR-RRR
(RRC((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyRGps 	
	
	
	
	cCs
t|jS(N(tboolR	(R((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyt	is_activesN(
t__name__t
__module__RR"RDRR8R>RGRP(((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyRs			)		c	s ddlm}m}m}m}||}|jd|jd|jd|jdf||}|j	d|d|d	d
|j
dd|jt|fd
}fd}|j
dd|j
dd|jd||jd||jdS(Ni(RtTextRtBOTHs
Test calltipss
200x100+%d+%diitsidetfilltexpandiRsstring.splitcsjddddS(Ns(s=Hello world)Rtend(RD(RI(tcalltip(s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pytcalltip_showscsjdS(N(RG(RI(RY(s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pytcalltip_hidess<<calltip-show>>t(s<<calltip-hide>>t)(tTkinterRRSRRTttitletgeometryRRR3RtupdateRR:R6t	focus_set(	tparentRRSRRTttopR&RZR[((RYs:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyt_calltip_windows""

t__main__(trunN(s<Key-Escape>s
<FocusOut>(s<KeyRelease>s<ButtonRelease>((t__doc__R^RRRRRR=R?R7R9R<R-RReRQtidlelib.idle_test.htestRg(((s:/opt/alt/python27/lib64/python2.7/idlelib/CallTipWindow.pyt<module>s(y