python (3.11.7)
    e                         d Z ddlZddlmZmZmZ ddlmZ d Z G d d          Zd Z	d	 Z
d
 Zedk    rddl
mZ  ed
d           dS dS )z'Define SearchEngine for search dialogs.    N)	StringVar
BooleanVarTclError)
messageboxc                 X    t          | d          st          |           | _        | j        S )zReturn the singleton SearchEngine instance for the process.
    The single SearchEngine saves settings between dialog instances.
    If there is not a SearchEngine already, make one.
    
_searchengine)hasattrSearchEnginer   )roots    H/BuggyBox/python/3.11.7/bootstrap/lib/python3.11/idlelib/searchengine.pygetr
      s/     4)) 0)$//    c                   t    e Zd ZdZd Zd Zd Zd Zd Zd Z	d Z
d	 Zd
 Zd Z
d ZddZddZddZddZd
S )r
   z<Handles searching a text widget for Find, Replace, and Grep.c                    || _         t          |d          | _        t          |d          | _        t          |d          | _        t          |d          | _        t          |d          | _        t          |d          | _        dS )zInitialize Variables that save search state.
        The dialogs bind these to the UI elements present in the dialogs.
         FTN)	r   r   patvarr   revarcasevarwordvarwrapvarbackvar)selfr   s     r   __init__zSearchEngine.__init__   su    
 	b))e,,
!$..!$..!$--!$..r   c                 4    | j                                         S N)r   r
   r   s    r   getpatzSearchEngine.getpat%   s    {   r   c                 :    | j                             |           d S r   )r   setr   pats     r   setpatzSearchEngine.setpat(   s    r   c                 4    | j                                         S r   )r   r
   r   s    r   isrezSearchEngine.isre+   s    z~~r   c                 4    | j                                         S r   )r   r
   r   s    r   iscasezSearchEngine.iscase.       |!!!r   c                 4    | j                                         S r   )r   r
   r   s    r   iswordzSearchEngine.isword1   r'