V Qc @sddlZddlZddlZddlZddlTddlZddlZdQZdRZdSZ dTZ dUZ dZ d dVd YZ d Zd Zd ZdZdZdZdZdZddddgadZdZdZdZdZdZdZdZdZd Z d!Z!d"Z"d#Z#d$Z$d%Z%d&Z&d'Z'd(Z(d)Z)d*Z*d+Z+d,Z,d-Z-id.d/6d0d16Z.id2d26d3d46d5d66d7d86d9d:6d;d<6d=d=6d>d?6d@dA6dBdC6dDdE6dFdG6dHdI6dJdK6Z/iZ0d2d4d6d=d:d<d?dAdEdCdGdIdKg e0d/Fst BalloonHelptvariable( RR tFrametRAISEDt MenubuttontpacktLEFTtRIGHTtMenut add_commandtadd_checkbuttont ToggleHelpR (RRtwtfilethelptfmthm((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyt MkMainMenu9s !!    c Cs,|j}tj|dddddd}|d|d<|jddd d d d |dd |jdddd d d |dd|jdddd d d |dd|jdddd d d |dd|jdddd d d |dd|jdddd d d |dd|S(NtipadxitipadytoptionssC tagPadX 6 tagPadY 4 borderWidth 2 tbgtwelR,tWelcomeR&it createcmdcSs t||S(N(t MkWelcome(R=tname((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0ZstchotChooserscSs t||S(N(t MkChoosers(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0\stscrsScrolled WidgetscSs t||S(N(tMkScroll(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0^stmgrsManager WidgetscSs t||S(N(t MkManager(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0`sRsDirectory ListcSs t||S(N(t MkDirList(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0bstexpsRun Sample ProgramscSs t||S(N(tMkSample(R=RK((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0ds(RR tNoteBooktadd(RRR=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytMkMainNotebookOs"  c Csq|j}tj|dtjdd}tj|dtjddt_tjjddddddd d |S( NR#R"itpadxitpadytleftitrights%70( RR R3R4tLabeltSUNKENtdemoR tform(RRR=((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyt MkMainStatusgs  !%c Cs|j}|j}|jd|jdkrD|jdn |jdtj|t_|j }|j }|j }|j dt dt|j dtdt|j dt dddtd d d d tjtjd <|jd |ddS(NsTix Widget Demonstrationi s 790x590+10+10s 890x640+10+10R)tfilltexpandiRYiRZR tWM_DELETE_WINDOWcSs |jS(N(R/(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0s(Rtwinfo_topleveltwm_titletwinfo_screenwidthtgeometryR tBalloonR_RRBRXRaR6tTOPtXtBOTTOMtBOTHR t wm_protocol(RRtztframe1tframe2tframe3((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytbuildps       (cCs d|_dS(s@Quit our mainloop. It is up to you to call root.destroy() after.iN(R(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR/scCsx|jdkry-x&|jdkr=|jjjtqWWqtk r\d|_dStk rtjdddkrd|_dSqqt j \}}}d}x+t j |||D]}||d7}qWytj d |WnnXd|_tdqXqWdS( sThis is an explict replacement for _tkinter mainloop() It lets you catch keyboard interrupts easier, and avoids the 20 msec. dead sleep() which burns a constant CPU.iiNt Interrupts Really Quit?tyesRs tError(RRttkt dooneeventtTCL_ALL_EVENTSt SystemExittKeyboardInterruptt tkMessageBoxt askquestionRtexc_infot tracebacktformat_exceptiont showerror(RtttvttbR$tline((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytloops.     cCs|jjdS(N(Rtdestroy(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRs( t__name__t __module__R!RBRXRaRsR/RR(((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRs      "cCs.t|atjtjtjdS(N(RR_RsRR(R((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pytRunMains   c Csi|j|}t|}t|}|jdtdtdddd|jdtdtdddS(NR)RbRYiRZRci(tpaget MkWelcomeBart MkWelcomeTextR6RjRkRm(tnbRKR=tbarR$((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRJs   "cCstj|dddtj}tj|d|d}tj|d|d}d|jdtfunccSs%|jjdt|dt|S(Nt tixDoWhenIdlet attachwidget(RwtcallR(targtrhtlist((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0sN(R R3RR"RtScrolledListBoxtplaceRRRt ResizeHandleR4tButtont propagateR6RkRRmtbind(R=RtbotRRJRItbtn((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0s0  " $ c Cs=|jdddddddd|j|j|dS( NR6i2R7iRixRiP(RLtupdatet attach_widget(RIRJ((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRC s" c Csd}tjjtjdd}tjj|s@|d7}ntj|dddd}tj|}tj|dtj dd d tj d |}tj |d d }|j j dd|}tj|j d|}|jdddtj|jddddddddtj|dddtjdddddd d!d} tj|d d"d#| |d$} |jd%|jdtj| jd tj|jdddtj|jdtj|jd&d'd%| |d(d)S(*sThe ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget. s}The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.tbitmapsstix.gifs (Image missing)RiJRR#iRR$RRtphotoR>timageRciRbR6iR7iiixRFR=R>iR?R@i2RARBR.cSs t||S(N(t SWindow_reset(R=R6((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0,sisRDcSs%|jjdt|dt|S(NRERF(RwRGR(RHRIR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR03sN(RRtjoinR_RtisfileR R3RR"RRRt image_createR]R6RmRLRMR4RNRORkRRP( R=R$R>RRQRRtimage1tlblRIRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR1s0   " $ c Cs=|jdddddddd|j|j|dS( NR6iR7iRiRix(RLRSRT(RIR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRX6s" cCstj|dddd}tj|}tj|dtjdddtjdd}tj|d d }d |jd <|jjtjd |j ddddddddtj |dddtj dddddddd}tj |ddd||d}|j d |jd!tj|jdtj|jd"dd!tj|jd!tj|jd#d$d ||d%d&S('sThe TixScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.RiJRR#iRR$s}The Tix ScrolledWindow widget allows you to scroll any kind of Tk widget. It is more versatile than a scrolled canvas widget.RRRtwrapsWhen -scrollbar is set to "auto", the scrollbars are shown only when needed. Additional modifiers can be used to force a scrollbar to be shown or hidden. For example, "auto -y" means the horizontal scrollbar should be shown when needed but the vertical scrollbar should always be hidden; "auto +x" means the vertical scrollbar should be shown when needed but the horizontal scrollbar should always be shown, and so on.R6iR7iiidRFR=R>iR?iR@i2RARBR.cSs t||S(N(t SText_reset(R=R6((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0VsiRbRcsRDcSs%|jjdt|dt|S(NRERF(RwRGR(RHRIR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0\sN(R R3RR"Rt ScrolledTextR$RRRLRMR4RNROR6RkRRmRP(R=RRQRRRIRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR2;s(    " $ c Cs=|jdddddddd|j|j|dS( NR6iR7iRiRix(RLRSRT(RIR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR__s" c Cs|j|}d}tj|ddd|}tj|ddd|}t|jt|j|jddddd |d d |jddd d d d dS( Ns label.padX 4R,sTix.PanedWindowREs Tix.NoteBookRiR[R\Ri(RR Rt MkPanedWindowRt MkNoteBookR`(RRKR=REtpanetnote((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRRds  "c Cs[tj|dtjdddtjdd}tj|ddd d }|jjd d tj|d d}|jddddd}|jddd}tj |}tj |}|j jtj d|j jtj d|j jtj d|j jtj d|j jtj d|j jtj d|j jtj d|j d|j dNs label.padX 4Rt horizontalR)RciRbRJRR$t5tflatR#R,sSelect a sample program:RYiRZsSource:REshlist.width 20RKtstextstix option get fixed_fontRRsRun ...trunsView Source ...tviewiRFtdisabledRRR^iPRit.t separatorit drawbranchi tindentt wideselectcSst|||||dS(NR(t Sample_Action(targsR=tslbRRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0sR.cSst|||||dS(Ntbrowse(R(RR=RRRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0st browsecmdcSst|||||dS(NR(R(RR=RRRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0scSst|||||dS(NR(R(RR=RRRR((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyR0sRRWR"iRititemtypeRtdata(RR RiR6RjRmRWRRRR`RRwtevalR$tconfigR3RNR7tNONEthlistRlRkR^t add_childtWINDOWtTEXTtcommentststypestselection_clear(RRKR=RERctf1tf2tlabtlab1RRRRRRttypeR6tkey((s+/usr/lib64/python2.7/Demo/tix/tixwidgets.pyRUksd"  ..(""   ((     "" !%   c Bs@|j}|j}|s2d|ds0   %   % "         '  $  / .    ^    @