python (3.11.7)

(root)/
lib/
python3.11/
idlelib/
__pycache__/
tooltip.cpython-311.pyc

eGdZddlTGddZGddeZGddeZd	Zed
kr'ddlmZedd
dddl	m
Z
e
edSdS)zTools for displaying tool-tips.

This includes:
 * an abstract base-class for different kinds of tooltips
 * a simple text-only Tooltip class
)*c<eZdZdZdZdZdZdZdZdZ	dZ
d	S)
TooltipBasez abstract base class for tooltipsc"||_d|_dS)zCreate a tooltip.

        anchor_widget: the widget next to which the tooltip will be shown

        Note that a widget will only be shown when showtip() is called.
        N)
anchor_widget	tipwindow)selfrs  C/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/idlelib/tooltip.py__init__zTooltipBase.__init__
s+c.|dSNhidetipr	s r
__del__zTooltipBase.__del__src|jrdSt|jx|_}|d	|jdd|jddn#t$rYnwxYw||	|j
|jdS)zdisplay the tooltipNz!::tk::unsupported::MacWindowStylestylehelpnoActivates)rToplevelrwm_overrideredirecttkcall_wTclErrorposition_windowshowcontentsupdate_idletasksliftr	tws  r
showtipzTooltipBase.showtips>	F&t'9:::
q!!!	
EJJ:GRU}
.
.
.
.			D		
'')))s#A
A,+A,c|\}}|j|z}|j|z}|jd||fzdS)z&(re)-set the tooltip's screen position+%d+%dN)get_positionrwinfo_rootxwinfo_rootyrwm_geometry)r	xyroot_xroot_ys     r
rzTooltipBase.position_window/so  ""1#//11A5#//11A5""8vv.>#>?????rc>d|jdzfS)z(choose a screen position for the tooltipr)rwinfo_heightrs r
r'zTooltipBase.get_position6s#4%2244q888rct)z$content display hook for sub-classes)NotImplementedErrorrs r
rzTooltipBase.showcontentsAs
"!rcv|j}d|_|r(	|dS#t$rYdSwxYwdSzhide the tooltipN)rdestroyrr"s  r
rzTooltipBase.hidetipFs\^
	






		s(
66N)__name__
__module____qualname____doc__rrr$rr'rrrr
rr
s***@@@	9	9	9"""
					rrcTeZdZdZdfd	ZfdZddZddZdZd	Z	fd
Z
xZS)
OnHoverTooltipBasez?abstract base class for tooltips, with delayed on-hover displaycDt|||_d|_|jd|j|_|jd|j|_	|jd|j|_
dS)aqCreate a tooltip with a mouse hover delay.

        anchor_widget: the widget next to which the tooltip will be shown
        hover_delay: time to delay before showing the tooltip, in milliseconds

        Note that a widget will only be shown when showtip() is called,
        e.g. after hovering over the anchor widget with the mouse for enough
        time.
        N<Enter><Leave><Button>)superrhover_delay	_after_idrbind_show_event_id1_hide_event_id2_id3)r	rrD	__class__s   r
rzOnHoverTooltipBase.__init__Us	'''&&++It7GHH	&++It7GHH	&++J8HII			rc,	|jd|j|jd|j|jd|jn#t
$rYnwxYwt
dS)Nr@rArB)runbindrHrJrKrrCrr	rLs r
rzOnHoverTooltipBase.__del__gs	%%i;;;%%i;;;%%j$)<<<<			D	
sA A$$
A10A1Nch|jr|dS|dS)z$event handler to display the tooltipN)rDscheduler$r	events  r
rGzOnHoverTooltipBase._show_eventps/	MMOOOOOLLNNNNNrc.|dS)z!event handler to hide the tooltipNrrRs  r
rIzOnHoverTooltipBase._hide_eventwsrc||j|j|j|_dS)z*schedule the future display of the tooltipN)
unschedulerafterrDr$rErs r
rQzOnHoverTooltipBase.schedule{s<+11$2B26,@@rc^|j}d|_|r|j|dSdS)z(cancel the future display of the tooltipN)rErafter_cancel)r	after_ids  r
rVzOnHoverTooltipBase.unschedules?>	6++H55555	6	6rc	|n#t$rYnwxYwtdSr5)rVrrCrrOs r
rzOnHoverTooltipBase.hidetipsU	OO			D	
s
%%r>r)r7r8r9r:rrrGrIrQrVr
__classcell__rLs@r
r=r=RsIIJJJJJJ$@@@666rr=c*eZdZdZdfd	ZdZxZS)HovertipzAA tooltip that pops up when a mouse hovers over an anchor widget.r>c\t||||_dS)avCreate a text tooltip with a mouse hover delay.

        anchor_widget: the widget next to which the tooltip will be shown
        hover_delay: time to delay before showing the tooltip, in milliseconds

        Note that a widget will only be shown when showtip() is called,
        e.g. after hovering over the anchor widget with the mouse for enough
        time.
        rDN)rCrtext)r	rrcrDrLs    r
rzHovertip.__init__s-	K@@@			rct|j|jtdtd}|dS)Nz#ffffe0r)rcjustify
backgroundreliefborderwidth)LabelrrcLEFTSOLIDpack)r	labels  r
rzHovertip.showcontentss;dn49d!*5aIII

rr\)r7r8r9r:rrr]r^s@r
r`r`sRGGrr`c8t|}|dtt|ddd\}}|d||dzfzt
|d}|t|d}|t|d	d
t|d}|t|d
ddS)NzTest tooltip+rr&zPlace your mouse over buttons)rcz"Button 1 -- 1/2 second hover delayz!This is tooltip text for button1.irbzButton 2 -- no hover delayz!This is tooltip
text for button2.)
rtitlemapintgeometrysplitrirlButtonr`)parenttopr+r,rmbutton1button2s       r
_tooltipr{s
6

CIInsFOO%%++C00455DAqLLQCL()))#;<<<E	JJLLLSCDDDGLLNNNW9sKKKKS;<<<GLLNNNW:MMMMMMr__main__)mainzidlelib.idle_test.test_tooltipF)	verbosityexit)runN)r:tkinterrr=r`r{r7unittestr}idlelib.idle_test.htestrr;rr
<module>rsEEEEEEEEP<<<<<<<<~!*NNNzD	)QUCCCC++++++CMMMMMr