ó ¿œ^c@sEdZddlTdZdZdZdZdZdd d „ƒYZd S( s—DetailsViewer class. This class implements a pure input window which allows you to meticulously edit the current color. You have both mouse control of the color (via the buttons along the bottom row), and there are keyboard bindings for each of the increment/decrement buttons. The top three check buttons allow you to specify which of the three color variations are tied together when incrementing and decrementing. Red, green, and blue are self evident. By tying together red and green, you can modify the yellow level of the color. By tying together red and blue, you can modify the magenta level of the color. By tying together green and blue, you can modify the cyan level, and by tying all three together, you can modify the grey level. The behavior at the boundaries (0 and 255) are defined by the `At boundary' option menu: Stop When the increment or decrement would send any of the tied variations out of bounds, the entire delta is discarded. Wrap Around When the increment or decrement would send any of the tied variations out of bounds, the out of bounds variation is wrapped around to the other side. Thus if red were at 238 and 25 were added to it, red would have the value 7. Preserve Distance When the increment or decrement would send any of the tied variations out of bounds, all tied variations are wrapped as one, so as to preserve the distance between them. Thus if green and blue were tied, and green was at 238 while blue was at 223, and an increment of 25 were applied, green would be at 15 and blue would be at 0. Squash When the increment or decrement would send any of the tied variations out of bounds, the out of bounds variation is set to the ceiling of 255 or floor of 0, as appropriate. In this way, all tied variations are squashed to one edge or the other. The following key bindings can be used as accelerators. Note that Pynche can fall behind if you hold the key down as a key repeat: Left arrow == -1 Right arrow == +1 Control + Left == -10 Control + Right == 10 Shift + Left == -25 Shift + Right == +25 iÿÿÿÿ(t*tStops Wrap AroundsPreserve DistancetSquashsDetails Window...t DetailsViewercBs§eZdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd„Z dd„Z dd„Z dd „Z dd „Z d „Zd „Zd „ZRS(c Cs||_|jƒ}|jƒ\|_|_|_t|ddƒ}|_|jd|j ƒ|j dƒ|j dƒ|j d|j ƒ|j d|j ƒ|j d|j ƒ|j d|j ƒ|j d |jƒ|j d |jƒ|j d |jƒ|j d |jƒ|j d |jƒ|j d|jƒt|ƒ}|_|jdtdtƒt|ddƒ|_|jjdddddtƒtƒ|_|jj|j ddƒƒt!|ddd|jd|j"ddddƒ|_#|j#jdddddt$ƒtƒ|_%|j%j|j dd ƒƒt!|dd!d|j%d|j"dd ddƒ|_&|j&jdd dddt$ƒtƒ|_'|j'j|j d"dƒƒt!|dd#d|j'd|j"ddddƒ|_(|j(jdd$dddt$ƒt|ƒ|_)|j)jdddddt$ƒ|j"ƒt|dd%ƒ|_*|j*jdd&dddtƒt+ƒ|_,|j,j|j d't-ƒƒt.||j,t-t/t0t1ƒ|_2|j2jdd&dddt$ƒ|j2j3d(d)ƒt|ƒ}|_4|jddddd*d dd+ƒt5|dd,d|jƒ|_6t5|dd-d|jƒ|_7t5|dd.d|jƒ|_8t5|dd/d|jƒ|_9t5|dd0d|jƒ|_:t5|dd1d|jƒ|_;|j6jdtdtd2t<ƒ|j7jdtdtd2t<ƒ|j8jdtdtd2t<ƒ|j9jdtdtd2t<ƒ|j:jdtdtd2t<ƒ|j;jdtdtd2t<ƒdS(3Ntclass_tPynchetWM_DELETE_WINDOWsPynche Details Windowsssssssssstexpandtfillttexts Move Sliders:trowitcolumnitstickytRSLIDERitRedtvariabletcommandtonvaluetoffvaluetGSLIDERitGreentBSLIDERtBlueis At boundary:itATBOUNDtwidthit columnspantEWs-25s-10s-1s+1s+10s+25tside(=t_DetailsViewer__sbtoptiondbt current_rgbt_DetailsViewer__redt_DetailsViewer__greent_DetailsViewer__bluetToplevelt_DetailsViewer__roottprotocoltwithdrawttitleticonnametbindt_DetailsViewer__quitt_DetailsViewer__minus1t_DetailsViewer__plus1t_DetailsViewer__minus10t_DetailsViewer__plus10t_DetailsViewer__minus25t_DetailsViewer__plus25tFramet_DetailsViewer__frametpacktYEStXtLabelt_DetailsViewer__l1tgridtEtIntVart_DetailsViewer__rvartsettgett Checkbuttont_DetailsViewer__effectt_DetailsViewer__radio1tWt_DetailsViewer__gvart_DetailsViewer__radio2t_DetailsViewer__bvart_DetailsViewer__radio3t_DetailsViewer__l2t_DetailsViewer__l3t StringVart_DetailsViewer__boundvartSTOPt OptionMenutWRAPtRATIOtGRAVt_DetailsViewer__omenut configuret_DetailsViewer__btnframetButtont_DetailsViewer__down25t_DetailsViewer__down10t_DetailsViewer__down1t_DetailsViewer__up1t_DetailsViewer__up10t_DetailsViewer__up25tLEFT(tselft switchboardtmasterRtroottframe((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__init__Bs’                "cCs|jjƒ|jjƒ|jjƒ}|dkr>d}n*didd6d d 6d d 6d d6|}|jjd|ƒdS(Niiiits (= %s Level)tCyanitMagentaitYellowitGreyiR (iiii(R:R<RARCRERO(RYteventttieR ((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__effect•s)   cCs|jjƒdS(N(R#tquit(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__quit scCs|jjƒdS(N(R#R%(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyR%£scCs|jjƒdS(N(R#t deiconify(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyRi¦scCs|jdƒdS(Niçÿÿÿ(t_DetailsViewer__delta(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt __minus25©scCs|jdƒdS(Niöÿÿÿ(Rj(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt __minus10¬scCs|jdƒdS(Niÿÿÿÿ(Rj(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__minus1¯scCs|jdƒdS(Ni(Rj(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__plus1²scCs|jdƒdS(Ni (Rj(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__plus10µscCs|jdƒdS(Ni(Rj(RYRd((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__plus25¸sc CsÜg}|jjƒr2|j|}|j|ƒn |j}|jjƒrg|j|}|j|ƒn |j}|jjƒrœ|j|}|j|ƒn |j}|jjƒ}|t kr+|dks|dks|dks|dks|dks|dkrµ|j|j|j}}}qµnŠ|t ksU|t krît |ƒdkrî|dkrn|d7}n|dkr‡|d7}n|dkr |d7}n|dkr¹|d8}n|dkrÒ|d8}n|dkrµ|d8}qµnÇ|t kr(d}x8|D]0}|dkr"d}q|dkrd}qqW|dkr¶t |ƒ}|jjƒrs|d|}n|jjƒr“|d|}n|jjƒr%|d|}q%qµ|dkrµt|ƒ}|jjƒrê||}n|jjƒr||}n|jjƒr%||}q%qµn|tkrµ|dkrId}n|dkr^d}n|dkrsd}n|dkrˆd}n|dkrd}n|dkrµd}qµn|jj|||ƒ|jjƒdS(Niiÿiiiÿÿÿÿi(R:R<RtappendRAR RCR!RHRIRKRLtlentmaxtminRMRt update_viewsR#tupdate_idletasks( RYtdeltaRetredtgreentbluetatboundtdirtc((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt__delta»sŠ       $$#*                                    cCs||_||_||_dS(N(RR R!(RYRxRyRz((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pytupdate_yourselfs  cCsP|jjƒ|d<|jjƒ|d<|jjƒ|d<|jjƒ|dR)R%RiR.R,R*R+R-R/RjRR€(((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyRAs S          M N((t__doc__tTkinterRIRKRLRMt ADDTOVIEWR(((s:/usr/lib64/python2.7/site-packages/pynche/DetailsViewer.pyt5s