%PDF- %PDF-
Direktori : /usr/local/lib/python3.8/idlelib/__pycache__/ |
Current File : //usr/local/lib/python3.8/idlelib/__pycache__/query.cpython-38.pyc |
U qa: @ s4 d Z ddlZddlZddlZddlZddlmZmZ ddl m Z mZmZm Z mZmZ ddlmZmZmZmZmZ ddl mZ ddlmZ ddlmZ G d d d e ZG dd deZG d d deZG dd deZG dd deZG dd deZ e!dkr0ddl"m#Z# e#dddd ddl$m%Z% e%eee dS )a| Dialogs that query users and verify the answer before accepting. Query is the generic base class for a popup dialog. The user must either enter a valid answer or close the dialog. Entries are validated when <Return> is entered or [Ok] is clicked. Entries are ignored when [Cancel] or [X] are clicked. The 'return value' is .result set to either a valid answer or None. Subclass SectionName gets a name for a new config file section. Configdialog uses it for new highlight theme and keybinding set names. Subclass ModuleName gets a name for File => Open Module. Subclass HelpSource gets menu item and path for additions to Help menu. N) executableplatform)Toplevel StringVar BooleanVarWES)FrameButtonEntryLabelCheckbutton) filedialog)Font) _setup_dialogc sl e Zd ZdZdi dddddZddd Zd d Zdd dZdd ZdddZ dddZ fddZ ZS )QueryzoBase class for getting verified answer from a user. For this base class, accept any non-blank string. Ftext0 used_names_htest_utestc C s. || _ || _|| _|| _t| | | | | | | |sL| t | | jdkrl| d| j | d| j | d| j | d| j | d| j | | | d| | d | d | |s| d | d nd f | jd d d |s*| | dS ) a Create modal popup, return when destroyed. Additional subclass init must be done before this unless _utest=True is passed to suppress wait_window(). title - string, title of popup dialog message - string, informational message to display text0 - initial value for entry used_names - names already in use _htest - bool, change box location when running htest _utest - bool, leave window hidden and not modal Zaquaz<Command-.>z<Key-Escape>ZWM_DELETE_WINDOWz<Key-Return>z <KP_Enter>z+%d+%d F)ZheightwidthN)parentmessager r r __init__ZwithdrawtitleZ transientZgrab_setr Z_windowingsystembindcancelprotocolokcreate_widgetsZupdate_idletasksZgeometryZwinfo_rootxZwinfo_widthZwinfo_reqwidthZwinfo_rootyZwinfo_heightZwinfo_reqheightZ resizableZ deiconifyZwait_window)selfr r r r r r r r&