Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/root/sys/lib/python2.7/lib-tk/SimpleDialog.pyo

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


�`^c@sFdZddlTddd��YZedkrBd�Ze�ndS(	s'A simple but flexible modal dialog box.i�(t*tSimpleDialogcBsVeZdgd	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|
jdtdd
�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(tTopleveltrootttitleticonnametMessagetmessagetpacktBOTHtFrametframeRtcanceltdefaulttbindtreturn_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_widthtwinfo_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(NcSsBt|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	

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].