�`^c@sFdZddlTddd��YZedkrBd�Ze�ndS( s'A simple but flexible modal dialog box.i�(t*tSimpleDialogcBsVeZdgd d d d d�Zddd�Zd�Zd�Zd�Zd�ZRS(
tc Cs�|rt|d|�|_nt|�|_|rV|jj|�|jj|�nt|jd|dd�|_|jjdddt�t|j�|_ |j j�||_
||_||_|jj
d|j�x�tt|��D]u}||} t|j d| d ||d
��}
||krI|
jdtdd
�n|
jdtdtdd�q�jjd|j�|j|�dS(Ntclass_ttexttaspecti�texpanditfills<Return>tcommandcSs
|j|�S(N(tdone(tselftnum((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyt<lambda>strelieftborderwidthitsidetWM_DELETE_WINDOW(tTopleveltrootttitleticonnametMessagetmessagetpacktBOTHtFrametframeRtcanceltdefaulttbindtreturn_eventtrangetlentButtontconfigtRIDGEtLEFTtprotocoltwm_delete_windowt_set_transient(R
tmasterRtbuttonsRRRRRtstb((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyt__init__ s.
g�333333�c
Csh|j}|j�|j|�|j�|j�ri|j�}|j�}|j�}|j�}n"|j �}|j
�}d}}|j�} |j�}
||| |}|||
|}|| |j �kr�j �| }n|dkrd}n||
|j
�kr.|j
�|
}n|dkrCd}n|j
d||f�|j�dS(Nis+%d+%d(Rtwithdrawt transienttupdate_idletaskstwinfo_ismappedtwinfo_widthtwinfo_heighttwinfo_rootxtwinfo_rootytwinfo_screenwidthtwinfo_screenheighttwinfo_reqwidthtwinfo_reqheighttgeometryt deiconify(
R
R(trelxtrelytwidgettm_widthtm_heighttm_xtm_ytw_widthtw_heighttxty((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyR'%s4
cCs;|jj�|jj�|jj�|jj�|jS(N(Rtwait_visibilitytgrab_settmainlooptdestroyR(R
((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pytgoBs
cCs3|jdkr|jj�n|j|j�dS(N(RtNoneRtbellR (R
tevent((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyRIscCs3|jdkr|jj�n|j|j�dS(N(RRKRRLR (R
((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyR&OscCs||_|jj�dS(N(RRtquit(R
R((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyR Us N( t__name__t
__module__RKR,R'RJRR&R (((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyRs t__main__cCsjt�}|d�}t|ddd|�}|j�t|ddd|j�}|j�|j�dS(NcSsBt|ddddddgddd d
dd�}|j�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)tYestNotCancelRiRiRsTest Dialog(RRJ(Rtd((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pytdoit^s RtTestRtQuit(tTkR!RRNRH(RRVtttq((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyttest\s
N((t__doc__tTkinterRROR\(((s)/sys/lib/python2.7/lib-tk/SimpleDialog.pyt<module>s
S
|