Sindbad~EG File Manager
�
RԚg� � � � d Z ddlZej e_ ddlmZmZmZ ddlmZ d� Z G d� d� � Z
d� Zd � Zd
� Z
edk rddlmZ ed
d�� � dS dS )z'Define SearchEngine for search dialogs.� N)� StringVar�
BooleanVar�TclError)�
messageboxc �X � t | d� � st | � � | _ | j S )z�Return 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)�hasattr�SearchEnginer )�roots �1/usr/local/lib/python3.11/idlelib/searchengine.py�getr
s/ � � �4��)�)� 0�)�$�/�/������ c �t � e Zd ZdZd� Zd� Zd� Zd� Zd� Zd� Z d� Z
d � Zd
� Zd� Z
d� Zdd�Zdd�Zdd�Zdd�Zd
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 )z�Initialize Variables that save search state.
The dialogs bind these to the UI elements present in the dialogs.
� FTN) r r �patvarr �revar�casevar�wordvar�wrapvar�backvar)�selfr s r �__init__zSearchEngine.__init__ su � �
�� ���b�)�)�����e�,�,��
�!�$��.�.���!�$��.�.���!�$��-�-���!�$��.�.����r c �4 � | j � � � S �N)r r
�r s r �getpatzSearchEngine.getpat&