python (3.11.7)

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

edZddlmZddlmZddlmZdZdZdZ	dZ
Gd	d
eZdZe
dkr'dd
lmZedddddlmZeedSdS)zSearch dialog for Find, Find Again, and Find Selection
   functionality.

   Inherits from SearchDialogBase for GUI and uses searchengine
   to prepare search pattern.
)TclError)searchengine)SearchDialogBasec|}tj|}t|dst	|||_|jS)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   B/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/idlelib/search.py_setuprsN::<<D

d
#
#F6?++:+D&99ct|dd}t|||S)a
Open the search dialog.

    Module-level function to access the singleton SearchDialog
    instance and open the dialog.  If text is selected, it is
    used as the search phrase; otherwise, the previous entry
    is used.  No search is done with this command.
    	sel.firstsel.last)r	ropen)rpats  rfindrs3((;

+
+C$<<T3'''rcFt||S)aSRepeat the search for the last pattern and preferences.

    Module-level function to access the singleton SearchDialog
    instance to search again using the user entries and preferences
    from the last dialog.  If there was no prior search, open the
    search dialog; otherwise, perform the search without showing the
    dialog.
    )r
find_againrs rrr&s$<<""4(((rcFt||S)aSearch for the selected pattern in the text.

    Module-level function to access the singleton SearchDialog
    instance to search using the selected text.  With a text
    selection, perform the search without displaying the dialog.
    Without a selection, use the prior entry as the search phrase
    and don't display the dialog.  If there has been no prior
    search, open the search dialog.
    )rfind_selectionrs rrr1s$<<&&t,,,rc,eZdZdZdZddZdZdZdS)rz%Dialog for finding a pattern in text.chtj||d|jddS)z=Create the base search dialog and add a button for Find Next.z	Find NextT)isdefN)rcreate_widgetsmake_buttondefault_command)selfs rr zSearchDialog.create_widgetsAs7'---d&:$GGGGGrNcp|jsdS||jdS)z3Handle the Find Next button as the default command.N)rgetprogrr)r#events  rr"zSearchDialog.default_commandGs7{""$$	F	"""""rc|js||dS|jsdS|j|}|r|\}}|\}}d||fz}d||fz}	|d}	|d}
|	|kr|
|kr|dSn#t$rYnwxYw|	ddd|
d|||d|jr|p||
dd	S|dS)
a2Repeat 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           rrzSearchDialog.find_againMs {!!##	IIdOOO5{""$$	5k%%d++	GD!6688DAqtQi'EdAY&D
::k22**Z00u$$DIIKKK 5



OOE5%000LLt,,,MM(DK$6$6$8$8$BU$JdKKKHHX4IIKKK5sA
C  
C-,C-c|dd}|r|j|||S)a/Search for selected text with previous dialog preferences.

        Instead of using the same pattern for searching (as Find
        Again does), this first resets the pattern to the currently
        selected text.  If the selected text isn't changed, then use
        the prior search phrase.
        rr)r	rsetcookedpatr)r#rrs   rrzSearchDialog.find_selectionysGhh{J//	*K$$S)))t$$$r)N)__name__
__module____qualname____doc__r r"rrrrrr>s_++HHH####***X%%%%%rrc&ddlm}m}ddlm}m}||}|dtt|	
ddd\}}|	d||d	zfz||}|||d
dd
fd}	||d|	}
|
dS)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.
cdddtddddS)Nr(r)r*)r2rrr1rsr	show_findz!_search_dialog.<locals>.show_findsOUE5)))t$ue,,,,,rzSearch (selection ignored))rcommand)
tkinterrGrHtkinter.ttkrIrJtitlemapintgeometrysplitpackr+)parentrGrHrIrJtopxyframerQbuttonrs           @r_search_dialogras;&&&&&&&&))))))))
(6

CII!"""sFOO%%++C00455DAqLLQCL()))E#JJE	JJLLL4777DIIKKKKK7888-----
VE <i
P
P
PF
KKMMMMMr__main__)mainzidlelib.idle_test.test_searchF)	verbosityexit)runN)rDrSridlelibridlelib.searchbaserrrrrrrarAunittestrcidlelib.idle_test.htestrgrErr<module>rls-      //////
 
 
 	(	(	(	)	)	)
-
-
-F%F%F%F%F%#F%F%F%R2zD	(AEBBBB++++++Cr