
[[\u                 @   s  d  d l  m 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 Gd d   d e  Z d d d d d d  Z d d d d  Z d d d d  Z d d d d  Z d d d d  Z d d d d   Z d d d! d"  Z d d d# d$  Z d d d% d&  Z e d' k re 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 d/ e d( d0   e d1 e d( d2   e d3 e d( d4   n  d S)5    )Dialog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   (/usr/lib/python3.4/tkinter/messagebox.pyr   9   s   r   Nc             K   s   | r d | k r | | d <n  | r> d | k r> | | d <n  |  rQ |  | d <n  | rd | | d <n  t  |   j   } t | t  r | r t St St |  S)NZicontypetitlemessage)r   Zshow
isinstanceboolYESNOstr)r   r   Z_iconZ_typeoptionsZresr   r   r   _showC   s        r   c             K   s   t  |  | t t |  S)zShow an info message)r   INFOOK)r   r   r   r   r   r   showinfoQ   s    r   c             K   s   t  |  | t t |  S)zShow a warning message)r   WARNINGr   )r   r   r   r   r   r   showwarningU   s    r   c             K   s   t  |  | t t |  S)zShow an error message)r   ERRORr   )r   r   r   r   r   r   	showerrorY   s    r   c             K   s   t  |  | t t |  S)zAsk a question)r   QUESTIONYESNO)r   r   r   r   r   r   askquestion]   s    r"   c             K   s"   t  |  | t t |  } | 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   askokcancela   s    r%   c             K   s"   t  |  | t t |  } | t k S)z0Ask a question; return true if the answer is yes)r   r    r!   r   )r   r   r   r$   r   r   r   askyesnof   s    r&   c             K   s>   t  |  | t t |  } t |  } | t k r4 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   r   r   askyesnocancelk   s
    r)   c             K   s"   t  |  | t t |  } | t k S)zDAsk if operation should be retried; return true if the answer is yes)r   r   RETRYCANCELRETRY)r   r   r   r$   r   r   r   askretrycancelt   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?)Ztkinter.commondialogr   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>   sH   
		