%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /proc/self/root/proc/thread-self/root/lib64/python2.7/site-packages/pynche/
Upload File :
Create Path :
Current File : //proc/self/root/proc/thread-self/root/lib64/python2.7/site-packages/pynche/TextViewer.pyo

�
��^c@s9dZddlTddlZdZddd��YZdS(s(TextViewer class.

The TextViewer allows you to see how the selected color would affect various
characteristics of a Tk text widget.  This is an output viewer only.

In the top part of the window is a standard text widget with some sample text
in it.  You are free to edit this text in any way you want (BAW: allow you to
change font characteristics).  If you want changes in other viewers to update
text characteristics, turn on Track color changes.

To select which characteristic tracks the change, select one of the radio
buttons in the window below.  Text foreground and background affect the text
in the window above.  The Selection is what you see when you click the middle
button and drag it through some text.  The Insertion is the insertion cursor
in the text window (which only has a background).
i����(t*NsText Window...t
TextViewercBsneZd	d�Zd	d�Zd	d�Zd	d�Zd	d�Zd	d�Zd	d�Z	d�Z
d�ZRS(
cCsB||_|j�}t|dd�}|_|jd|j�|jd�|jd�|jd|j	�|jd|j	�|jd|j�|jd|j�t
|d	td
|jdd�d
|jdd�dddd�|_
|jd�}|r|j
jd|�n|jd�}|rB|j
jd|�n|jd�}|rm|j
jd|�n|j
j�|j
jd|jdd��|jd�}|r�|j
jt|�ny8|jddtf�\}	}
|j
jt|	|
�Wntk
rnX|j
j�t�|_|jj|jd d!��t�|_|jj|jd"d!��t|d#d$d%|jd	td&|j�|_ |j jd't!d(t"�t#|�}|_$|j�g|_%d)}xVd6D]N}
t&|d#|
�}|j'd-|d.d!d/t(�|j%j)|�|d07}q�Wd0}xPd7D]H}
t&|d#|
�}|j'd-d0d.|�|j%j)|�|d07}qEWg|_*x�d8D]�}x�d9D]~}|d4kr�|d0kr�q�nt+|d%|jd5|d)d)|d0d&|j,�}|j'd-|d.|�|j*j)|�q�Wq�W|j�dS(:Ntclass_tPynchetWM_DELETE_WINDOWsPynche Text Windows<Alt-q>s<Alt-Q>s<Alt-w>s<Alt-W>trelieft
backgroundtTEXTBGtblackt
foregroundtTEXTFGtwhitetwidthi#theightitTEXT_SFGtselectforegroundtTEXT_SBGtselectbackgroundtTEXT_IBGtinsertbackgroundgtTEXTs�Insert some stuff here and play
with the buttons below to see
how the colors interact in
textual displays.

See how the selection can also
be affected by tickling the buttons
and choosing a color.tTEXTINStTEXTSELg@tTRACKPitWHICHttextsTrack color changestvariabletcommandtfilltexpandisText:s
Selection:s
Insertion:trowtcolumntstickyit
Foregroundt
Backgroundiitvalue(sText:s
Selection:s
Insertion:(R!R"(ii(iii(-t_TextViewer__sbtoptiondbtToplevelt_TextViewer__roottprotocoltwithdrawttitleticonnametbindt_TextViewer__quittTexttSUNKENtgett_TextViewer__textt	configuretpacktinserttmark_settINSERTtENDttag_addtSELt
ValueErrort	focus_sett
BooleanVart_TextViewer__trackptsettIntVart_TextViewer__whichtCheckbuttontGROOVEt_TextViewer__toggletrackt_TextViewer__ttXtYEStFramet_TextViewer__framet_TextViewer__labelstLabeltgridtEtappendt_TextViewer__radiostRadiobuttont_TextViewer__set_color(tselftswitchboardtmasterR%troottsfgtsbgtibgR4tstarttendtframeRRtltcoltr((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyt__init__s�	





	
	

	

cCs|jj�dS(N(R'tquit(RQtevent((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyt__quitvscCs|jj�dS(N(R'R)(RQR`((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyR)yscCs|jj�dS(N(R't	deiconify(RQR`((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyRb|scCs|jj�dS(N(R$tupdate_views_current(RQR`((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyt
__forceupdatescCs�|jj�r)t}|jdd}nt}|jdd}x!|jD]}|jd|�qJWx!|jD]}|jd|�qnWdS(NiR	tdisabledforegroundtstate(R=R0tNORMALRNtDISABLEDR2RI(RQR`RftfgR]R[((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyt
__toggletrack�scCs|jj�}|j}|dkr1|d}nd|dkrJ|d}nK|dkrc|d}n2|dkr||d}n|d	kr�|d
}nytj|�\}}}Wn5tjk
r�|jj�j|�\}}}nX|jj	|||�dS(NiR	iRiRiRiR(
R@R0R1tColorDBtrrggbb_to_triplettBadColorR$tcolordbtfind_bynametupdate_views(RQR`twhichRtcolortredtgreentblue((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyt__set_color�s"	




%cCs�|jj�r�tj|||f�}|jj�}|j}|dkr^|jd|�q�|dkr}|jd|�q�|dkr�|jd|�q�|dkr�|jd|�q�|d	kr�|jd
|�q�ndS(NiR	iRiRiRiR(R=R0Rkttriplet_to_rrggbbR@R1R2(RQRsRtRut	colornameRqR((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pytupdate_yourself�s	cCs�|jj�|d<|jj�|d<|jjdd�|d<|jjt�dd!|d<|jjt�|d	<|jd
|d<|jd|d
<|jd|d<|jd|d<|jd|d<dS(NRRgsend - 1cRiiRRR	R
RRRRRRRR(R=R0R@R1t
tag_rangesR9tindexR6(RQR%((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pytsave_options�sN(t__name__t
__module__tNoneR^R-R)Rbt_TextViewer__forceupdateRCRPRyR|(((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyRs\	((t__doc__tTkinterRkt	ADDTOVIEWR(((s7/usr/lib64/python2.7/site-packages/pynche/TextViewer.pyt<module>s


Zerion Mini Shell 1.0