
    3f                        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e      Zd-dZd.dZd.dZd.dZd.dZd.dZd.dZd.dZ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 d(              ed) ed d*              ed+ ed d,             yy)/    )Dialog)showinfoshowwarning	showerroraskquestionaskokcancelaskyesnoaskyesnocancelaskretrycancelerrorinfoquestionwarningabortretryignoreokokcancelretrycancelyesnoyesnocancelabortretryignorecancelyesnoc                       e Zd ZdZdZy)MessagezA message boxtk_messageBoxN)__name__
__module____qualname____doc__command     )/usr/lib/python3.12/tkinter/messagebox.pyr   r   =   s
    Gr%   r   Nc                     |r	d|vr||d<   |r	d|vr||d<   | r| |d<   |r||d<   t        di |j                         }t        |t              r|rt        S t
        S t        |      S )Nicontypetitlemessager$   )r   show
isinstanceboolYESNOstr)r*   r+   _icon_typeoptionsress         r&   _showr6   G   st    w&U76?w&U76?5 W	"

G

!
!
#C#tJ	s8Or%   c                 0    t        | |t        t        fi |S )zShow an info message)r6   INFOOKr*   r+   r4   s      r&   r   r   V   s    r5W55r%   c                 0    t        | |t        t        fi |S )zShow a warning message)r6   WARNINGr9   r:   s      r&   r   r   [   s    "888r%   c                 0    t        | |t        t        fi |S )zShow an error message)r6   ERRORr9   r:   s      r&   r   r   `   s    6g66r%   c                 0    t        | |t        t        fi |S )zAsk a question)r6   QUESTIONYESNOr:   s      r&   r   r   e   s    5<G<<r%   c                 B    t        | |t        t        fi |}|t        k(  S )z@Ask if operation should proceed; return true if the answer is ok)r6   r@   OKCANCELr9   r*   r+   r4   ss       r&   r   r   j   s     eWh<G<A7Nr%   c                 B    t        | |t        t        fi |}|t        k(  S )z0Ask a question; return true if the answer is yes)r6   r@   rA   r/   rD   s       r&   r	   r	   p   s     eWh99A8Or%   c                 l    t        | |t        t        fi |}t        |      }|t        k(  ry|t
        k(  S )zDAsk a question; return true if the answer is yes, None if cancelled.N)r6   r@   YESNOCANCELr1   CANCELr/   rD   s       r&   r
   r
   v   s3    eWh?w?AAAF{8Or%   c                 B    t        | |t        t        fi |}|t        k(  S )zDAsk if operation should be retried; return true if the answer is yes)r6   r<   RETRYCANCELRETRYrD   s       r&   r   r      s!    eWg{>g>A:r%   __main__SpamzEgg InformationzEgg Warningz	Egg Alertz	Question?proceedzProceed?zyes/nozGot it?zyes/no/cancelzWant it?z	try againz
Try again?)NNNN)NN)tkinter.commondialogr   __all__r>   r8   r@   r<   ABORTRETRYIGNOREr9   rC   rK   rA   rH   ABORTrL   IGNORErI   r/   r0   r   r6   r   r   r   r   r   r	   r
   r   r   printr$   r%   r&   <module>rV      s>  2 (/ 	
 & 	 					f 6
9
7
=
 z	&(6#456	)[78	'9V[12	*k&+67	)[45	(HVY/0	/>&*=>	+~fl;< r%   