eSrSSKJr SSKJr SSKJr SrSrSr Sr "S S \5r S r \ S :XaSS KJr \"SSSS9 SSKJr \"\ 5 gg)zSearch dialog for Find, Find Again, and Find Selection functionality. Inherits from SearchDialogBase for GUI and uses searchengine to prepare search pattern. )TclError) searchengine)SearchDialogBasecUR5n[R"U5n[US5(d[ X5UlUR $)zReturn the new or existing singleton SearchDialog instance. The singleton dialog saves user entries and preferences across instances. Args: text: Text widget containing the text to be searched. _searchdialog)_rootrgethasattr SearchDialogr)textrootengines 4/opt/imh/python3.13/lib/python3.13/idlelib/search.py_setupr sE ::z%Dialog for finding a pattern in text.cf[R"U5 URSURSS9 g)z=Create the base search dialog and add a button for Find Next.z Find NextT)isdefN)rcreate_widgets make_buttondefault_command)selfs rr!SearchDialog.create_widgetsAs+''- d&:&:$GrNczURR5(dgURUR5 g)z3Handle the Find Next button as the default command.N)rgetprogrr )r$events rr#SearchDialog.default_commandGs({{""$$   "rcURR5(dURU5 gURR5(dgURR U5nU(aUup4UR 5upVSX54-nSX64-nUR S5n UR S5n X:XaX:XaUR5 gURSSS5 URSXx5 URSURR5=(a U=(d U5 URS5 g UR5 g![a Nf=f) aRepeat the last search. If no search was previously run, open a new search dialog. In this case, no search is done. If a search was previously run, the search dialog won't be shown and the options from the previous search (including the search pattern) will be used to find the next occurrence of the pattern. Next is relative based on direction. Position the window to display the located occurrence in the text. Return True if the search was successful and False otherwise. Fz%d.%drrsel1.0endinsertT)rgetpatrr' search_textspanindexbellr tag_removetag_addmark_setisbacksee) r$r reslinemijfirstlastselfirstsellasts rrSearchDialog.find_againMs) {{!!## IIdO{{""$$kk%%d+ GD668DAti'EdY&D ::k2**Z0$IIK  OOE5% 0 LL , MM(DKK$6$6$8$BU$Jd K HHX  IIK  ss+H # *X %rr c^ SSKJnJn SSKJnJn U"U5nUR S5 [[UR5RS5SS5upgURSXgS -4-5 U"U5nUR5 U"US S 9m T R5 T RS S 5 U 4Sjn U"USU S9n U R5 g)zDisplay search test box.r)ToplevelText)FrameButtonzTest SearchDialog+Nz+%d+%dgray)inactiveselectbackgroundr.z}This is a sample string. This is a sample string. This is a sample string. This is a sample string. This is a sample string. c>TRSSS5 [T5RT5 TRSSS5 g)Nr+r,r-)r5rrr4rsr show_find!_search_dialog..show_finds5 UE5)t $ ue,rzSearch (selection ignored))r command) tkinterrNrO tkinter.ttkrPrQtitlemapintgeometrysplitpackr.) parentrNrOrPrQtopxyframerXbuttonr s @r_search_dialogris&) 6 CII!" sFOO%++C04 5DALLQCL() #JE JJL  7DIIKKK78- E rtsh  /   ( ) -F%#F%R2 z (AEB+ r