AlkantarClanX12
Current Path : /opt/alt/python35/lib64/python3.5/idlelib/__pycache__/ |
Current File : //opt/alt/python35/lib64/python3.5/idlelib/__pycache__/SearchDialogBase.cpython-35.pyc |
��Yfa � @ s| d Z d d l m Z m Z m Z m Z m Z m Z m Z Gd d � d � Z e d k rx d d l Z e j d d d �d S) zBDefine SearchDialogBase used by Search, Replace, and Grep dialogs.� )�Toplevel�Frame�Entry�Label�Button�Checkbutton�Radiobuttonc @ s� e Z d Z d Z d Z d Z d Z d d � Z d d d � Z d d d � Z d d � Z d d � Z d d � Z d d d � Z d d � Z d d � Z d d d � Z d d � Z d S)�SearchDialogBaseay Create most of a 3 or 4 row, 3 column search dialog. The left and wide middle column contain: 1 or 2 labeled text entry lines (make_entry, create_entries); a row of standard Checkbuttons (make_frame, create_option_buttons), each of which corresponds to a search engine Variable; a row of dialog-specific Check/Radiobuttons (create_other_buttons). The narrow right column contains command buttons (make_button, create_command_buttons). These are bound to functions that execute the command. Except for command buttons, this base class is not limited to items common to all three subclasses. Rather, it is the Find dialog minus the "Find Next" command, its execution function, and the default_command attribute needed in create_widgets. The other dialogs override attributes and methods, the latter to replace and add widgets. z Search DialogZSearch� c C s | | _ | | _ d | _ d S)a' Initialize root, engine, and top attributes. top (level widget): set in create_widgets() called from open(). text (Text searched): set in open(), only used in subclasses(). ent (ry): created in make_entry() called from create_entry(). row (of grid): 0 in create_widgets(), +1 in make_entry/frame(). default_command: set in subclasses, used in create_widgers(). title (of dialog): class attribute, override in subclasses. icon (of dialog): ditto, use unclear if cannot minimize dialog. N)�root�engine�top)�selfr r � r �=/opt/alt/python35/lib64/python3.5/idlelib/SearchDialogBase.py�__init__ s zSearchDialogBase.__init__Nc C s� | | _ | j s | j � n | j j � | j j � | re | j j d d � | j j d | � | j j � | j j d d � | j j d � | j j � d S)z6Make dialog visible on top of others and ready to use.r �endN)�textr �create_widgetsZ deiconifyZtkraise�entZdelete�insertZ focus_setZselection_rangeZicursorZgrab_set)r r Zsearchphraser r r �open/ s zSearchDialogBase.openc C s'