eSrSSKJrJrJrJr SSKJr SrSr Sr Sr Sr S r "S S \5rS r\S :XaSSKJr \"SSSS9 SSKJr \"\5 gg)zvA call-tip window class for Tkinter/IDLE. After tooltip.py, which uses ideas gleaned from PySol. Used by calltip.py. )LabelLEFTSOLIDTclError) TooltipBasez<>)z z z<>)z zdcalltipwindowregion_rightcx^\rSrSrSrU4SjrSrU4SjrU4SjrSr SSjr S r U4S jr S r S rS rU=r$) CalltipWindowz+A call-tip widget for tkinter text widgets.c>[TU]U5 S=UlUlS=Ul=UlUlS=UlUlSUl g)zmCreate a call-tip; shown by showtip(). text_widget: a Text widget with code for which call-tips are desired N) super__init__labeltext parenlineparencollastlinehideid checkhideidcheckhide_after_id)self text_widget __class__s 7/opt/imh/python3.13/lib/python3.13/idlelib/calltip_w.pyrCalltipWindow.__init__sL %!%% TY9===)-- d&"&c[URRS5RS5S5nXR:XaURUR 4nOUS4nURR SU-5nU(d.[URR S55nSUS'SUS'USS-USUS-4$)z$Choose the position of the call-tip.insert.rz%d.%d)int anchor_widgetindexsplitrrbboxlist)rcurline anchor_indexboxs r get_positionCalltipWindow.get_position#sd((..x8>>sCAFG nn $ NNDMM:L#Q[URRS5RS5S5nXR:XagXlURR S5 [ TU]5 g)z Reposition the window if needed.rr rN)r$r%r&r'rseerposition_window)rr*rs rr1CalltipWindow.position_window2s_d((..x8>>sCAFG mm #   x( !rc^>XlUR(dUR(dgURR[U5 [ [ URRU5RS55uUl Ul [TU]15 UR5 g)a7Show the call-tip, bind events which will close it and reposition it. text: the text to display in the call-tip parenleft: index of the opening parenthesis in the text widget parenright: index of the closing parenthesis in the text widget, or the end of the line if there is no closing parenthesis Nr )r tipwindowr%mark_set MARK_RIGHTmapr$r&r'rrrshowtip _bind_events)rr parenleft parenrightrs rr8CalltipWindow.showtip;s} >>  ##J ;(+ ##)))4::3?)A%   rc [URUR[SS[SUR SS9UlUR R5 g)zCreate the call-tip widget.z#ffffd0blackr"font)rjustify background foregroundrelief borderwidthr?N)rr4rrrr%rpack)rs r showcontentsCalltipWindow.showcontentsPsD4>> 4&/G"'Q $ 2 26 :<  rcFUR(dg[[URR S5R S55up#X R :dDX R :XaX0R::d&URRSS[5(aUR5 gUR5 URb%URRUR5 URR[UR 5Ul g)z4Handle CHECK_HIDE_EVENT: call hidetip or reschedule.Nrr >break)r4r7r$r%r&r'rrcomparer6hidetipr1r after_cancelafterCHECKHIDE_TIMEcheckhide_event)reventr*curcols rrPCalltipWindow.checkhide_eventXs~~c4#5#5#;#;H#E#K#KC#PQ ^^ # ~~ %&MM*A    % %hZ @ @ LLN   " " .    + +D,C,C D    $ $^T5I5I J rcHUR(dgUR5 g)z%Handle HIDE_EVENT by calling hidetip.NrJ)r4rL)rrQs r hide_eventCalltipWindow.hide_eventss~~ rc>UR(dgURR5 SUlS=Ul=UlUlURR[5 UR5 [TU]55 g![a Nhf=f![a N=B>cURR[UR5Ul[ H#nURR [U5 M% URR[UR5 URR[UR5Ul [H#nURR [U5 M% g)zBind event handlers.N) r%bindCHECKHIDE_EVENTrPrCHECKHIDE_SEQUENCES event_addrNrO HIDE_EVENTrUrHIDE_SEQUENCESrseqs rr9CalltipWindow._bind_eventss--22?373G3GI&C    ( (# >'   1E1EF((--j.2oo? !C    ( (S 9"rc|[H#nURR[U5 M% URR [UR 5 SUl[ H#nURR[U5 M% URR [UR5 SUlg)zUnbind event handlers.N) r`r% event_deleter_unbindrrcrbrrds rrZCalltipWindow._unbind_eventss&C    + +OS A' !!/43C3CD!C    + +J <" !!*dkk: r)rrrrrrrrN)__name__ __module__ __qualname____firstlineno____doc__rr-r1r8rFrPrUrLr9rZ__static_attributes__ __classcell__)rs@rr r s=5 ' +"*62 :  rr c>^ SSKJnJnJnJn U"U5nUR S5 [ [UR5RS5SS5upgURSUS-US-4-5 U"U5nURX4SS 9 URS S 5 UR5 [U5m U 4S jn U 4S jn URSS5 URSS5 URSU 5 URSU 5 UR!5 g)Nr)ToplevelTextrBOTHzTest call-tips+r"z 250x100+%d+%d)sidefillexpandrz string.splitc,>TRSSS5 g)Nz(s='Hello world')rend)r8rQcalltips r calltip_show%_calltip_window..calltip_shows+Xu=rc&>TR5 grk)rLrs r calltip_hide%_calltip_window..calltip_hides rz<>(z<>))tkinterrtrurrvtitler7r$geometryr'rErupdater rar^ focus_set) parentrtrurrvtopxyrrrrs @r_calltip_windowrs22 6 CII sFOO%++C04 5DALLAGQW#556 9DII41I-KK.)JJLD!G>NN%s+NN%s+II ,/II ,/NNr__main__)mainz idlelib.idle_test.test_calltip_wr!F) verbosityexit)runN)rprrrrridlelib.tooltiprrbrcr_r`rOr6r rrlunittestridlelib.idle_test.htestrrrrsr 10' % //9 ( VKVr2 z +quE+ r