`dZddlmZddlmZddlmZdZdZdZ dZ Gd d eZ d Z e d k(r dd lmZedddddlmZee yy)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|j}tj|}t|dst |||_|j S)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 5/opt/alt/python312/lib64/python3.12/idlelib/search.py_setupr sD ::s+H # *X %rr c ddlm}m}ddlm}m}||}|j dtt|jjddd\}}|jd||d zfz||}|j||d  j jd d  fd} ||d| } | jy)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. cjdddtjjdddy)Nr(r)r*)r2rrr1rsr show_findz!_search_dialog..show_finds5 UE5)t $ ue,rzSearch (selection ignored))r command) tkinterrGrH tkinter.ttkrIrJtitlemapintgeometrysplitpackr+) parentrGrHrIrJtopxyframerQbuttonr s @r_search_dialogras&) 6 CII!" sFOO%++C04 5DAqLLQCL() #JE JJL  7DIIKKK78- E rlsh  /   ( ) -F%#F%R2 z (AEB+ r