python (3.12.0)

(root)/
lib/
python3.12/
idlelib/
__pycache__/
tooltip.cpython-312.opt-1.pyc

̑eGdZddlGddZGddeZGddeZd	Zed
k(r ddlmZedd
dddl	m
Z
e
eyy)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
y	)
TooltipBasez abstract base class for tooltipsc ||_d|_y)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.12.0/bootstrap/lib/python3.12/idlelib/tooltip.py__init__zTooltipBase.__init__
s+c$|jyNhidetipr	s r
__del__zTooltipBase.__del__src|jryt|jx|_}|jd	|jjdd|jdd|j|j|jj|jjy#t$rY`wxYw)zdisplay the tooltipNz!::tk::unsupported::MacWindowStylestylehelpnoActivates)rToplevelrwm_overrideredirecttkcall_wTclErrorposition_windowshowcontentsupdate_idletasksliftr	tws  r
showtipzTooltipBase.showtips>>&t'9'9::
q!	
EEJJ:GRUU}
.
	
'')
		s)B::	CCc|j\}}|jj|z}|jj|z}|jjd||fzy)z&(re)-set the tooltip's screen position+%d+%dN)get_positionrwinfo_rootxwinfo_rootyrwm_geometry)r	xyroot_xroot_ys     r
rzTooltipBase.position_window/sb  "1##//1A5##//1A5""8vv.>#>?rc@d|jjdzfS)z(choose a screen position for the tooltipr)rwinfo_heightrs r
r'zTooltipBase.get_position6s#4%%224q888rct)z$content display hook for sub-classes)NotImplementedErrorrs r
rzTooltipBase.showcontentsAs
"!rcp|j}d|_|r	|jyy#t$rYywxYwzhide the tooltipN)rdestroyrr"s  r
rzTooltipBase.hidetipFs>^^





s)	55N)__name__
__module____qualname____doc__rrr$rr'rrrr
rr
s)**@	9"
	rrcTeZdZdZd	fd	ZfdZd
dZd
dZdZdZ	fdZ
xZS)OnHoverTooltipBasez?abstract base class for tooltips, with delayed on-hover displaycBt||||_d|_|jjd|j|_|jjd|j|_	|jjd|j|_
y)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	rrC	__class__s   r
rzOnHoverTooltipBase.__init__Us	'&&&++It7G7GH	&&++It7G7GH	&&++J8H8HI	rc&	|jjd|j|jjd|j|jjd|jt|y#t
$rYwxYw)Nr?r@rA)runbindrGrIrJrrBrr	rKs r
rzOnHoverTooltipBase.__del__gsv	%%i;%%i;%%j$))<			sA2B	BBc^|jr|jy|jy)z$event handler to display the tooltipN)rCscheduler$r	events  r
rFzOnHoverTooltipBase._show_eventpsMMOLLNrc$|jy)z!event handler to hide the tooltipNrrQs  r
rHzOnHoverTooltipBase._hide_eventwsrc|j|jj|j|j|_y)z*schedule the future display of the tooltipN)
unschedulerafterrCr$rDrs r
rPzOnHoverTooltipBase.schedule{s4++11$2B2B26,,@rcf|j}d|_|r|jj|yy)z(cancel the future display of the tooltipN)rDrafter_cancel)r	after_ids  r
rUzOnHoverTooltipBase.unschedules.>>++H5rcb	|jt|
y#t$rYwxYwr5)rUrrBrrNs r
rzOnHoverTooltipBase.hidetips2	OO			s"	..ir)r7r8r9r:rrrFrHrPrUr
__classcell__rKs@r
r=r=Rs0IJ$@6rr=c*eZdZdZdfd	ZdZxZS)HovertipzAA tooltip that pops up when a mouse hovers over an anchor widget.c6t|||||_y)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.
        rCN)rBrtext)r	rrbrCrKs    r
rzHovertip.__init__s	K@	rc~t|j|jtdtd}|jy)Nz#ffffe0r)rbjustify
backgroundreliefborderwidth)LabelrrbLEFTSOLIDpack)r	labels  r
rzHovertip.showcontentss+dnn499d!*5aI

rr[)r7r8r9r:rrr\r]s@r
r_r_sGrr_ct|}|jdtt|j	jddd\}}|j	d||dzfzt
|d}|jt|d}|jt|d	d
t|d}|jt|d
dy)NzTest tooltip+rr&zPlace your mouse over buttons)rbz"Button 1 -- 1/2 second hover delayz!This is tooltip text for button1.irazButton 2 -- no hover delayz!This is tooltip
text for button2.)
rtitlemapintgeometrysplitrhrkButtonr_)parenttopr+r,rlbutton1button2s       r
_tooltiprzs
6
CIInsFOO%++C045DAqLLQCL()#;<E	JJLSCDGLLNW9sKS;<GLLNW:Mr__main__)mainzidlelib.idle_test.test_tooltipF)	verbosityexit)runN)r:tkinterrr=r_rzr7unittestr|idlelib.idle_test.htestrr;rr
<module>rseEEP<<~!*Nz	)QUC+Mr