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/ChipViewer.pyc
mò
‚=5Dc@sMdZdklZdkTdkZdfd„ƒYZdfd„ƒYZdS(sdChip viewer and widget.

In the lower left corner of the main Pynche window, you will see two
ChipWidgets, one for the selected color and one for the nearest color.  The
selected color is the actual RGB value expressed as an X11 #COLOR name. The
nearest color is the named color from the X11 database that is closest to the
selected color in 3D space.  There may be other colors equally close, but the
nearest one is the first one found.

Clicking on the nearest color chip selects that named color.

The ChipViewer class includes the entire lower left quandrant; i.e. both the
selected and nearest ChipWidgets.
(s
StringType(t*Nt
ChipWidgetcBshtZdZdZdeeddddd„Zd„Zd„Zd„Zd	„Z	d
„Z
d„ZRS(Ni–iPtColortbluec
Cs|t|d|ƒ|_|iiddddƒt|dtddd|d	|d
|ƒ|_|iiddddƒtƒ|_
|i
i|ƒt|d|i
dtd
tdtd|idƒ|_|iiddddƒtƒ|_t|d|idtd
tdtd|idƒ|_|iiddddƒ|o|iid|ƒn|o|iid|ƒndS(Nttexttrowitcolumntrelieftborderwidthitwidththeightt
backgroundittextvariabletjustifytstatetfontis<ButtonPress-1>s<ButtonRelease-1>(tLabeltmasterRtselft_ChipWidget__labeltgridtFrametRAISEDR	R
tinitialcolort_ChipWidget__chipt	StringVart_ChipWidget__namevartsettEntrytFLATtCENTERtDISABLEDt_ChipWidget__namet_ChipWidget__msgvartpresscmdtbindt
releasecmd(RRR	R
RRR"R$((t5/usr/lib/python2.4/site-packages/pynche/ChipViewer.pyt__init__s,	cCs|iid|ƒdS(NR(RRtconfigtcolor(RR(((R%t	set_color=scCs|idS(NR(RR(R((R%t	get_color@scCs|ii|ƒdS(N(RRRt	colorname(RR+((R%tset_nameCscCs|ii|ƒdS(N(RR!Rtmessage(RR-((R%tset_messageFscCs|iidtƒdS(NR(RRt	configuretSUNKEN(R((R%tpressIscCs|iidtƒdS(NR(RRR/R(R((R%treleaseLs(t__name__t
__module__t_WIDTHt_HEIGHTtNoneR&R)R*R,R.R1R2(((R%Rs$					t
ChipViewercBs5tZdd„Zd„Zdd„Zdd„ZRS(Nc	Cså||_t|dtddƒ|_|iidddddd	d
dƒt|iƒ|_|iiddddƒt	|idd
ƒ|_
t|iƒ|_|iiddddƒt	|iddd|id|i
ƒ|_dS(NRRiRiRitipadxitstickytNSEWRtSelectedtNearestR"R$(tswitchboardRt_ChipViewer__sbRRRt_ChipViewer__frameRt_ChipViewer__sframeRt_ChipViewer__selectedt_ChipViewer__nframet_ChipViewer__buttonpresst_ChipViewer__buttonreleaset_ChipViewer__nearest(RR>R((R%R&Rs	%	c
Cså|iiƒ}|||f}ti|ƒ}	|i
|||ƒ}|i|ƒ}ti|ƒ}|ii|	ƒ|ii|ƒ|ii|	ƒ|	|jo|ii|ƒn|iidƒ|ii|ƒ|ii|ƒdS(Nt(RR?tcolordbtredtgreenRtrgbtupletColorDBttriplet_to_rrggbbtrrggbbtnearesttfind_bynamet
nearest_tupletnearest_rrggbbRBR)RFR,R.(
RRIRJRRORHRRRQRKRN((R%tupdate_yourselfcs
cCs|iiƒdS(N(RRFR1(Rtevent((R%t
__buttonpress|scCsN|iiƒ|iiƒ}ti|ƒ\}}}|i
i|||ƒdS(N(RRFR2R*RNRLtrrggbb_to_tripletRIRJRR?tupdate_views(RRTRRJRNRI((R%t__buttonreleases
(R3R4R7R&RSRDRE(((R%R8Qs	(t__doc__ttypest
StringTypetTkinterRLRR8(RR[R8RL((R%t?s

	<