.
52c      s{     d  Z  
 d   k l l l l  d   Z $ d d  Z C d d  Z e d   Z	 m e
 d j o n e	   n d S(	   s  Easy to use dialogs.

Message(msg) -- display a message and an OK button.
AskString(prompt, default) -- ask for a string, display OK and Cancel buttons.
AskYesNoCancel(question, default) -- display a question and Yes, No and Cancel buttons.

More documentation in each function.
This module uses DLOG resources 256, 257 and 258.
Based upon STDWIN dialogs with the same names and functions.
c   s     d   d }  t | d  }  | o  d G| GH d Sn  | i d  \ } } }  t | |    x9  d o.  t	 t
  }   | d j o ! d Sn qy Wd S(   s   Display a MESSAGE string.
	
	Return when the user clicks the OK button or presses Return.
	
	The MESSAGE string can be at most 255 characters long.
	i   i   s!   Can't get DLOG resource with id =Ni   (   s   ids   GetNewDialogs   ds   GetDialogItems   tps   hs   rects   SetDialogItemTexts   msgs   ModalDialogs   Nones   n(   s   msgs   ids   ds   tps   hs   rects   ns"   /usr/lib/python/mac/EasyDialogs.pys   Messagec   s  $ / d  1 d } 2 t | d  } 3 | o 4 d G| GH5 d Sn 6 | i d  \ } } } 7 t | |   8 | i d  \ } } } 9 t | |  ; xu ; d oj < t
 t  } = | d j o, > | i d  \ } } } ? t |  Sn @ | d j o @ t Sn q Wd S(   sh  Display a PROMPT string and a text entry field with a DEFAULT string.
	
	Return the contents of the text entry field when the user clicks the
	OK button or presses Return.
	Return None when the user clicks the Cancel button.
	
	If omitted, DEFAULT is empty.
	
	The PROMPT and DEFAULT strings, as well as the return value,
	can be at most 255 characters long.
	i  i   s!   Can't get DLOG resource with id =Ni   i   i   (   s   ids   GetNewDialogs   ds   GetDialogItems   tps   hs   rects   SetDialogItemTexts   prompts   defaults   ModalDialogs   Nones   ns   GetDialogItemText(   s   prompts   defaults   ids   ds   tps   hs   rects   ns"   /usr/lib/python/mac/EasyDialogs.pys	   AskStrings    c   s  C P d } Q t | d  } R | o S d G| GHT d  Sn [ | i d  \ } } } \ t | |   ] x ] d o ^ t	 t
  } _ | d j o _ | Sn ` | d j o ` d Sn a | d j o a d Sn b | d j o b d Sn qr Wd  S(	   Ni  i   s!   Can't get DLOG resource with id =i   i   i   i    i   (   s   ids   GetNewDialogs   ds   GetDialogItems   tps   hs   rects   SetDialogItemTexts   questions   ModalDialogs   Nones   ns   default(   s   questions   defaults   ids   ds   tps   hs   rects   ns"   /usr/lib/python/mac/EasyDialogs.pys   AskYesNoCanceli    c    sX   e f t  d  g t d  }  h |  d j o% i t d  } j t  d |  n d  S(   Ns   Testing EasyDialogs.s   Do you want to proceed?i    s   Enter your first names   Thank you,%s(   s   Messages   AskYesNoCancels   oks	   AskStrings   s(   s   oks   ss"   /usr/lib/python/mac/EasyDialogs.pys   tests   __main__N(   s   __doc__s   Dlgs   GetNewDialogs   SetDialogItemTexts   GetDialogItemTexts   ModalDialogs   Messages	   AskStrings   AskYesNoCancels   tests   __name__(    s"   /usr/lib/python/mac/EasyDialogs.pys   ?