f Qc@s'dZddlTdddYZdS(sTypeinViewer class. The TypeinViewer is what you see at the lower right of the main Pynche widget. It contains three text entry fields, one each for red, green, blue. Input into these windows is highly constrained; it only allows you to enter values that are legal for a color axis. This usually means 0-255 for decimal input and 0x0 - 0xff for hex input. You can toggle whether you want to view and input the values in either decimal or hex by clicking on Hexadecimal. By clicking on Update while typing, the color selection will be made on every change to the text field. Otherwise, you must hit Return or Tab to select the color. i(t*t TypeinViewercBs_eZddZddZddZddZddZdZdZ dZ RS( c Cs"||_|j}t|_|jj|jddt|_|jj|jddt|dtdd|_ |j j ddd dd d t |j d d |_ |j j ddd dd t t|j }|j ddd dt |d d|_|jj ddd dd t d|jdsGreen:sBlue:isUpdate while typingtvariablet columnspant Hexadecimaltcommandi(RR(RR(RR( t_TypeinViewer__sbtoptiondbt BooleanVart_TypeinViewer__hexptsettgett_TypeinViewer__uwtypingtFrametRAISEDt_TypeinViewer__frametgridtLabelt_TypeinViewer__xltEt_TypeinViewer__xoxtEntryt_TypeinViewer__xtbindtagst bind_classt_TypeinViewer__normalizet_TypeinViewer__maybeupdatet_TypeinViewer__ylt_TypeinViewer__yoxt_TypeinViewer__yt_TypeinViewer__zlt_TypeinViewer__zoxt_TypeinViewer__zt Checkbuttont_TypeinViewer__uwttWt_TypeinViewer__togglehext_TypeinViewer__hex(tselft switchboardtmasterRtsubframe((s9/usr/lib64/python2.7/site-packages/pynche/TypeinViewer.pyt__init__sb        %  cCst|jj\}}}|jjr0d}nd}||jd<||jd<||jd<|j|||dS(NR s R (Rt current_rgbRRR#R+R.tupdate_yourself(R5teventtredtgreentbluetlabel((s9/usr/lib64/python2.7/site-packages/pynche/TypeinViewer.pyt __togglehexNs    cCso|j}|j}|jt}|rV|ddkrV|jjrVd|}ny1|jjrzt|d}n t|}Wntk rd}nX|dkrn|dks|dkr|jt}|jr||d ||}|d8}n|j n.|jjr2t |d}n t|}|j dt |j d||j|dS(NitxXt0iiii(twidgetRtindextINSERTRtintt ValueErrortNonetchartbellthextdeletetENDtinsertticursor(R5R<tewtcontentsRPtvti((s9/usr/lib64/python2.7/site-packages/pynche/TypeinViewer.pyt __normalizeYs2  %        cCs2|jjs|jdkr.|j|ndS(NtReturntTab(RVRW(RRtkeysymt_TypeinViewer__update(R5R<((s9/usr/lib64/python2.7/site-packages/pynche/TypeinViewer.pyt __maybeupdatezsc Cs|jjpd}|jjp'd}|jjp<d}|jjrWd}nd}g|||fD]}t||^qm\}}} |jj||| dS(NRCii (R%RR,R/RRGRt update_views( R5R<tredstrtgreenstrtbluestrtbasetxR=R>R?((s9/usr/lib64/python2.7/site-packages/pynche/TypeinViewer.pyt__update~s 4c Cs0|jjrGg|||fD]}t|d^q\}}}n|||}}}|j|j|j}}} |jt} |jt} | jt} |jdt |jdt | jdt |j d||j d|| j d||j | |j | | j | dS(Nii( RRRLR%R,R/RERFRMRNRORP( R5R=R>R?R`tsredtsgreentsbluetytztxicursortyicursortzicursor((s9/usr/lib64/python2.7/site-packages/pynche/TypeinViewer.pyR;s 8  cCs|jS(N(R(R5((s9/usr/lib64/python2.7/site-packages/pynche/TypeinViewer.pythexp_varscCs*|jj|d<|jj|d s