a
    If                     @   sP  d dl mZ g dZdZdZdZdZdZdZd	Z	d
Z
dZdZdZdZdZdZdZdZdZG dd deZd6ddZd7ddZd8ddZd9ddZd:ddZd;d d!Zd<d"d#Zd=d$d%Zd>d&d'Zed(krLeded)d* eded)d+ eded)d, eded)d- ed.ed)d/ ed0ed)d1 ed2ed)d3 ed4ed)d5 dS )?    )Dialog)showinfoshowwarning	showerroraskquestionaskokcancelaskyesnoaskyesnocancelaskretrycancelerrorinfoZquestionZwarningZabortretryignoreokZokcancelZretrycancelZyesnoZyesnocancelabortZretryignoreZcancelZyesZnoc                   @   s   e Zd ZdZdZdS )MessagezA message boxZtk_messageBoxN)__name__
__module____qualname____doc__Zcommand r   r   #lib/python3.9/tkinter/messagebox.pyr   =   s   r   Nc                 K   sp   |rd|vr||d< |r(d|vr(||d< | r4| |d< |r@||d< t f i | }t|trh|rdtS tS t|S )NZicontypetitlemessage)r   Zshow
isinstanceboolYESNOstr)r   r   Z_iconZ_typeoptionsresr   r   r   _showG   s    
r!   c                 K   s   t | |ttfi |S )zShow an info message)r!   INFOOKr   r   r   r   r   r   r   V   s    r   c                 K   s   t | |ttfi |S )zShow a warning message)r!   WARNINGr#   r$   r   r   r   r   [   s    r   c                 K   s   t | |ttfi |S )zShow an error message)r!   ERRORr#   r$   r   r   r   r   `   s    r   c                 K   s   t | |ttfi |S )zAsk a question)r!   QUESTIONYESNOr$   r   r   r   r   e   s    r   c                 K   s   t | |ttfi |}|tkS )z@Ask if operation should proceed; return true if the answer is ok)r!   r'   OKCANCELr#   r   r   r   sr   r   r   r   j   s    r   c                 K   s   t | |ttfi |}|tkS )z0Ask a question; return true if the answer is yes)r!   r'   r(   r   r*   r   r   r   r   p   s    r   c                 K   s2   t | |ttfi |}t|}|tkr*dS |tkS )zDAsk a question; return true if the answer is yes, None if cancelled.N)r!   r'   YESNOCANCELr   CANCELr   r*   r   r   r   r	   v   s
    r	   c                 K   s   t | |ttfi |}|tkS )zDAsk if operation should be retried; return true if the answer is yes)r!   r%   RETRYCANCELRETRYr*   r   r   r   r
      s    r
   __main__ZSpamzEgg InformationzEgg Warningz	Egg Alertz	Question?ZproceedzProceed?zyes/nozGot it?zyes/no/cancelzWant it?z	try againz
Try again?)NNNN)NN)NN)NN)NN)NN)NN)NN)NN)Ztkinter.commondialogr   __all__r&   r"   r'   r%   ZABORTRETRYIGNOREr#   r)   r.   r(   r,   ZABORTr/   ZIGNOREr-   r   r   r   r!   r   r   r   r   r   r   r	   r
   r   printr   r   r   r   <module>   sJ   










	
