Your IP : 216.73.216.213


Current Path : /opt/alt/python33/lib64/python3.3/Tools/pynche/__pycache__/
Upload File :
Current File : //opt/alt/python33/lib64/python3.3/Tools/pynche/__pycache__/DetailsViewer.cpython-33.pyc

�
��f�'c@sEdZddlTdZdZdZdZdZGdd	�d	�Zd
S(u�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(u*uStopuWrap ArounduPreserve DistanceuSquashuDetails Window...cBs�|EeZdZddd�Zddd�Zddd�Zddd�Zdd	d
�Zddd�Z	dd
d�Z
ddd�Zddd�Zddd�Z
ddd�Zdd�Zdd�Zdd�ZdS(u
DetailsViewercCs�||_|j�}|j�\|_|_|_t|dd�}|_|jd|j	�|j
d�|jd�|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(3Nuclass_uPyncheuWM_DELETE_WINDOWuPynche Details Windowu<Alt-q>u<Alt-Q>u<Alt-w>u<Alt-W>u<KeyPress-Left>u<KeyPress-Right>u<Control-KeyPress-Left>u<Control-KeyPress-Right>u<Shift-KeyPress-Left>u<Shift-KeyPress-Right>uexpandufillutextu
Move Sliders:urowiucolumniustickyuRSLIDERiuReduvariableucommanduonvalueuoffvalueuGSLIDERiuGreenuBSLIDERuBlueiuAt boundary:iuATBOUNDuwidthiu
columnspanuEWu-25u-10u-1u+1u+10u+25uside(=u_DetailsViewer__sbuoptiondbucurrent_rgbu_DetailsViewer__redu_DetailsViewer__greenu_DetailsViewer__blueuToplevelu_DetailsViewer__rootuprotocoluwithdrawutitleuiconnameubindu_DetailsViewer__quitu_DetailsViewer__minus1u_DetailsViewer__plus1u_DetailsViewer__minus10u_DetailsViewer__plus10u_DetailsViewer__minus25u_DetailsViewer__plus25uFrameu_DetailsViewer__frameupackuYESuXuLabelu_DetailsViewer__l1ugriduEuIntVaru_DetailsViewer__rvarusetugetuCheckbuttonu_DetailsViewer__effectu_DetailsViewer__radio1uWu_DetailsViewer__gvaru_DetailsViewer__radio2u_DetailsViewer__bvaru_DetailsViewer__radio3u_DetailsViewer__l2u_DetailsViewer__l3u	StringVaru_DetailsViewer__boundvaruSTOPu
OptionMenuuWRAPuRATIOuGRAVu_DetailsViewer__omenuu	configureu_DetailsViewer__btnframeuButtonu_DetailsViewer__down25u_DetailsViewer__down10u_DetailsViewer__down1u_DetailsViewer__up1u_DetailsViewer__up10u_DetailsViewer__up25uLEFT(uselfuswitchboardumasteruoptiondburootuframe((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__init__Bs�	

						
"uDetailsViewer.__init__cCs|jj�|jj�|jj�}|dkr>d}n*didd6d	d
6dd6d
d6|}|jjd|�dS(Niiiiuu(= %s Level)uCyaniuMagentaiuYellowiuGreyiutext(iiii(u_DetailsViewer__rvarugetu_DetailsViewer__gvaru_DetailsViewer__bvaru_DetailsViewer__l2u	configure(uselfueventutieutext((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__effect�s)	
uDetailsViewer.__effectcCs|jj�dS(N(u_DetailsViewer__rootuquit(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__quit�suDetailsViewer.__quitcCs|jj�dS(N(u_DetailsViewer__rootuwithdraw(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyuwithdraw�suDetailsViewer.withdrawcCs|jj�dS(N(u_DetailsViewer__rootu	deiconify(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu	deiconify�suDetailsViewer.deiconifycCs|jd�dS(Nii��(u_DetailsViewer__delta(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu	__minus25�suDetailsViewer.__minus25cCs|jd�dS(Ni
i����(u_DetailsViewer__delta(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu	__minus10�suDetailsViewer.__minus10cCs|jd�dS(Nii����(u_DetailsViewer__delta(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__minus1�suDetailsViewer.__minus1cCs|jd�dS(Ni(u_DetailsViewer__delta(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__plus1�suDetailsViewer.__plus1cCs|jd�dS(Ni
(u_DetailsViewer__delta(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__plus10�suDetailsViewer.__plus10cCs|jd�dS(Ni(u_DetailsViewer__delta(uselfuevent((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__plus25�suDetailsViewer.__plus25c		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|tkr�t|�dkr�|dkrn|d7}n|dkr�|d7}n|dkr�|d7}n|dkr�|d8}n|dkr�|d8}n|dkr�|d8}q�n�|tkr(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|dkr�d}n|dkr�d}q�n|jj|||�|jj�dS(Nii�iiii����i����(u_DetailsViewer__rvarugetu_DetailsViewer__reduappendu_DetailsViewer__gvaru_DetailsViewer__greenu_DetailsViewer__bvaru_DetailsViewer__blueu_DetailsViewer__boundvaruSTOPuWRAPuRATIOulenumaxuminuGRAVu_DetailsViewer__sbuupdate_viewsu_DetailsViewer__rootuupdate_idletasks(	uselfudeltautieuredugreenublueuatboundudiruc((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu__delta�s�
	
	
	$$#*





	


					uDetailsViewer.__deltacCs||_||_||_dS(N(u_DetailsViewer__redu_DetailsViewer__greenu_DetailsViewer__blue(uselfuredugreenublue((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyuupdate_yourselfs		uDetailsViewer.update_yourselfcCsP|jj�|d<|jj�|d<|jj�|d<|jj�|d<dS(NuRSLIDERuGSLIDERuBSLIDERuATBOUND(u_DetailsViewer__rvarugetu_DetailsViewer__gvaru_DetailsViewer__bvaru_DetailsViewer__boundvar(uselfuoptiondb((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyusave_options
suDetailsViewer.save_optionsN(u__name__u
__module__u__qualname__uNoneu__init__u_DetailsViewer__effectu_DetailsViewer__quituwithdrawu	deiconifyu_DetailsViewer__minus25u_DetailsViewer__minus10u_DetailsViewer__minus1u_DetailsViewer__plus1u_DetailsViewer__plus10u_DetailsViewer__plus25u_DetailsViewer__deltauupdate_yourselfusave_options(u
__locals__((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu
DetailsViewerAsSMu
DetailsViewerN(u__doc__utkinteruSTOPuWRAPuRATIOuGRAVu	ADDTOVIEWu
DetailsViewer(((u?/opt/alt/python33/lib64/python3.3/Tools/pynche/DetailsViewer.pyu<module>5s