Current File : //usr/local/apps/python3/lib/python3.11/idlelib/__pycache__/searchengine.cpython-311.opt-1.pyc |
�
�Ke� � � � 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�
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 �>/usr/local/apps/python3/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% s � ��{��� � � r c �: � | j � |� � d S r )r �set�r �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'