MOON
Server: Apache/2.2.34 (Unix) mod_ssl/2.2.34 OpenSSL/0.9.8e-fips-rhel5 mod_bwlimited/1.4 FrontPage/5.0.2.2635
System: Linux server.asjudinet.com 2.6.32-042stab141.3 #1 SMP Fri Nov 15 22:45:34 MSK 2019 i686
User: asjudine (504)
PHP: 5.2.17
Disabled: NONE
Upload Files
File: //proc/2/cwd/usr/lib/python2.4/site-packages/pynche/TextViewer.pyo
mς
‚=5Dc@s3dZdkTdkZdZdfd„ƒ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).
(t*NsText Window...t
TextViewercBsntZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Z	d„Z
d	„ZRS(
NcCsO||_|iƒ}
t|ddƒ}|_|id|i	ƒ|i
dƒ|idƒ|id|i
ƒ|id|i
ƒ|id|i	ƒ|id|i	ƒt|d	td
|
iddƒd
|
iddƒddddƒ|_|
idƒ}|o|iid|ƒn|
idƒ}
|
o|iid|
ƒn|
idƒ}|o|iid|ƒn|iiƒ|iid|
iddƒƒ|
idƒ}|o|iit|ƒny8|
iddtfƒ\}	}|iit|	|ƒWntj
onX|ii ƒt!ƒ|_"|i"i#|
id d!ƒƒt$ƒ|_%|i%i#|
id"d!ƒƒt&|d#d$d%|i"d	t'd&|i(ƒ|_)|i)id't*d(t+ƒt,|ƒ}|_.|iƒg|_/d)}xVd6D]N}t2|d#|ƒ}|i4d-|d.d!d/t5ƒ|i/i6|ƒ|d07}qπWd0}xPd7D]H}t2|d#|ƒ}|i4d-d0d.|ƒ|i/i6|ƒ|d07}qOWg|_8xšd8D]’}x‰d9D]}|d4jo|d0joqΈnt9|d%|i%d5|d)d)|d0d&|i:ƒ}|i4d-|d.|ƒ|i8i6|ƒqΈWq«W|i(ƒdS(:Ntclass_tPynchetWM_DELETE_WINDOWsPynche Text Windows<Alt-q>s<Alt-Q>s<Alt-w>s<Alt-W>trelieft
backgroundtTEXTBGtblackt
foregroundtTEXTFGtwhitetwidthi#theightitTEXT_SFGtselectforegroundtTEXT_SBGtselectbackgroundtTEXT_IBGtinsertbackgroundf0.0tTEXTsΔ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.tTEXTINStTEXTSELf6.0tTRACKPitWHICHttextsTrack color changestvariabletcommandtfilltexpandisText:s
Selection:s
Insertion:trowtcolumntstickyit
Foregroundt
Backgroundiitvalue(sText:s
Selection:s
Insertion:(R!R"(ii(iii(<tswitchboardtselft_TextViewer__sbtoptiondbtTopleveltmastertroott_TextViewer__roottprotocoltwithdrawttitleticonnametbindt_TextViewer__quittTexttSUNKENtgett_TextViewer__texttsfgt	configuretsbgtibgtpacktinserttmark_settINSERTtENDtstarttendttag_addtSELt
ValueErrort	focus_sett
BooleanVart_TextViewer__trackptsettIntVart_TextViewer__whichtCheckbuttontGROOVEt_TextViewer__toggletrackt_TextViewer__ttXtYEStFrametframet_TextViewer__framet_TextViewer__labelsRRtLabeltltgridtEtappendtcolt_TextViewer__radiostRadiobuttont_TextViewer__set_colortr(R%R$R)RRQRUR*RR@R?R8R6R;R'R9R]RY((t5/usr/lib/python2.4/site-packages/pynche/TextViewer.pyt__init__s”	




	
		cCs|iiƒdS(N(R%R+tquit(R%tevent((R^t__quitvscCs|iiƒdS(N(R%R+R-(R%Ra((R^R-yscCs|iiƒdS(N(R%R+t	deiconify(R%Ra((R^Rc|scCs|iiƒdS(N(R%R&tupdate_views_current(R%Ra((R^t
__forceupdatescCsŽ|iiƒot}|idd}nt}|idd}x!|iD]}|i	d|ƒqLWx!|i
D]}|i	d|ƒqpWdS(NiR	tdisabledforegroundtstate(R%RFR4tNORMALRgRZtfgtDISABLEDR]R7RSRU(R%RaRURgR]Ri((R^t
__toggletrack‚s

cCs|iiƒ}|i}|djo|d}nm|djo|d}nR|djo|d}n7|djo|d}n|d	jo|d
}nyti|ƒ\}}}Wn7tij
o(|i
iƒi|ƒ\}}}nX|i
i|||ƒdS(NiR	iRiRiRiR(R%RIR4twhichR5RtcolortColorDBtrrggbb_to_triplettredtgreentbluetBadColorR&tcolordbtfind_bynametupdate_views(R%RaRrRmRRqRlRp((R^t__set_colorŽs"	




&cCsν|iiƒoΩti|||fƒ}|i	iƒ}|i}|djo|i
d|ƒqι|djo|i
d|ƒqι|djo|i
d|ƒqι|djo|i
d|ƒqι|d	jo|i
d
|ƒqιndS(NiR	iRiRiRiR(R%RFR4Rnttriplet_to_rrggbbRpRqRrt	colornameRIRlR5RR7(R%RpRqRrRyRRl((R^tupdate_yourself’s	




cCsΛ|iiƒ|d<|iiƒ|d<|iiddƒ|d<|iitƒdd!|d<|iit	ƒ|d	<|id
|d<|id|d
<|id|d<|id|d<|id|d<dS(NRRf0.0send - 1cRiiRRR	R
RRRRRRRR(
R%RFR4R'RIR5t
tag_rangesRBtindexR=(R%R'((R^tsave_options²s(t__name__t
__module__tNoneR_R1R-Rct_TextViewer__forceupdateRLR\RzR}(((R^Rs\	(t__doc__tTkinterRnt	ADDTOVIEWR(R„RnR((R^t?s