mς %U²Ic@sEdZdkTdfd„ƒYZedjod„ZeƒndS(s'A simple but flexible modal dialog box.(t*t SimpleDialogcBsVtZdgddddd„Zddd„Zd„Zd„Zd„Zd „ZRS( Ntc Cs–|ot|d|ƒ|_nt|ƒ|_|o$|ii|ƒ|ii|ƒnt|id|ddƒ|_ |i i dddt ƒt |iƒ|_ |i i ƒ||_||_||_|iid|iƒx‹tt|ƒƒD]w} || } t|i d| d || d „ƒ}| |jo|id td d ƒn|i dtdt ddƒqτW|iid|iƒ|i|ƒdS(Ntclass_ttexttaspectitexpanditfillstcommandcCs |i|ƒS(N(tselftdonetnum(R R ((t0/data/zmath/lib/python2.4/lib-tk/SimpleDialog.pytstrelieft borderwidthitsidetWM_DELETE_WINDOW(RtTopleveltmasterR trootttitleticonnametMessageRtmessagetpacktBOTHtFrametframetdefaultR tcanceltbindt return_eventtrangetlentbuttonststButtontbtconfigtRIDGEtLEFTtprotocoltwm_delete_windowt_set_transient( R RRR#RRRRR&R$R ((R t__init__ s0       f0.5f0.29999999999999999c Csr|i}|iƒ|i|ƒ|iƒ|iƒo4|iƒ} |i ƒ} |i ƒ}|iƒ}n#|iƒ} |iƒ} d}}|iƒ}|iƒ} || ||}|| | |} |||iƒjo|iƒ|}n|djo d}n| | |iƒjo|iƒ| } n| djo d} n|id|| fƒ|iƒdS(Nis+%d+%d(R Rtwidgettwithdrawt transientRtupdate_idletaskstwinfo_ismappedt winfo_widthtm_widtht winfo_heighttm_heightt winfo_rootxtm_xt winfo_rootytm_ytwinfo_screenwidthtwinfo_screenheighttwinfo_reqwidthtw_widthtwinfo_reqheighttw_heighttrelxtxtrelytytgeometryt deiconify( R RRARCRBR.R:R8R>RDR6R4R@((R R,%s4                 cCs;|iiƒ|iiƒ|iiƒ|iiƒ|iS(N(R Rtwait_visibilitytgrab_settmainlooptdestroyR (R ((R tgoBs     cCs5|idjo|iiƒn|i|iƒdS(N(R RtNoneRtbellR (R tevent((R R IscCs5|idjo|iiƒn|i|iƒdS(N(R RRLRRMR (R ((R R+OscCs||_|iiƒdS(N(R R Rtquit(R R ((R R Us ( t__name__t __module__RLR-R,RKR R+R (((R Rs    t__main__cCsjtƒ}|d„}t|ddd|ƒ}|iƒt|ddd|iƒ}|iƒ|iƒdS(Nc CsBt|ddddddgddd d d d ƒ}|iƒGHdS( NRs‘This is a test dialog. Would this have been an actual dialog, the buttons below would have been glowing in soft pink light. Do you believe this?R#tYestNotCancelRiRiRs Test Dialog(RRtdRK(RRV((R tdoit^s RtTestRtQuit( tTkRRWR%ttRROtqRI(R\RWRR[((R ttest\s    N(t__doc__tTkinterRRPR](R]R((R t?s S