mò %U²Ic@s£dZdZdkZeidjo dkZndkZeZeiZdkTdk Tydk Z e Z [ Wne j o e Z nXdZeeiƒZeeiƒZeiZeiZeiZy eiWnej oe e_nXy eiWnej oe e_nXd„Zy eiZWnej onXd„Zy eiZWnej onXdfd „ƒYZdae ad „Zd „Z d d „Z!da"dfd„ƒYZ#de#fd„ƒYZ$de#fd„ƒYZ%de#fd„ƒYZ&de#fd„ƒYZ'dd„Z(e)Z*eZ+d„Z,dfd„ƒYZ-dfd„ƒYZ.dfd „ƒYZ/d!e-e/fd"„ƒYZ0e e d!dd#„Z1d$fd%„ƒYZ2d&fd'„ƒYZ3d(fd)„ƒYZ4d*e-fd+„ƒYZ5d,e5e2e3e4fd-„ƒYZ6d.e5e/fd/„ƒYZ7d0e6fd1„ƒYZ8d2„Z9d3„Z:d4„Z;d5„Z<e d6„Z=d7e6fd8„ƒYZ>d9e6fd:„ƒYZ?d;e6fd<„ƒYZ@d=e6fd>„ƒYZAd?e6fd@„ƒYZBdAe6fdB„ƒYZCdCe6fdD„ƒYZDdEe6fdF„ƒYZEdGe6fdH„ƒYZFdIe6fdJ„ƒYZGdKe6fdL„ƒYZHdMe6fdN„ƒYZIdOe6fdP„ƒYZJdQfdR„ƒYZKdSeEfdT„ƒYZLdUfdV„ƒYZMdWeMfdX„ƒYZNdYeMfdZ„ƒYZOd[„ZPd\„ZQd]e6fd^„ƒYZRd_e6fd`„ƒYZSdae6fdb„ƒYZTdce8fdd„ƒYZUdee8fdf„ƒYZVdg„ZWeXdhjo eWƒndS(is2Wrapper functions for Tcl/Tk. Tkinter provides classes which allow the display, positioning and control of widgets. Toplevel widgets are Tk and Toplevel. Other widgets are Frame, Label, Entry, Text, Canvas, Button, Radiobutton, Checkbutton, Scale, Listbox, Scrollbar, OptionMenu, Spinbox LabelFrame and PanedWindow. Properties of the widgets are specified with keyword arguments. Keyword arguments have the same name as the corresponding resource under Tk. Widgets are positioned with one of the geometry managers Place, Pack or Grid. These managers can be called with methods place, pack, grid available in every Widget. Actions are bound to events by resources (e.g. keyword argument command) or with the method bind. Example (Hello, World): import Tkinter from Tkconstants import * tk = Tkinter.Tk() frame = Tkinter.Frame(tk, relief=RIDGE, borderwidth=2) frame.pack(fill=BOTH,expand=1) label = Tkinter.Label(frame, text="Hello, World") label.pack(fill=X, expand=1) button = Tkinter.Button(frame,text="Exit",command=tk.destroy) button.pack(side=BOTTOM) tk.mainloop() s$Revision: 39220 $Ntwin32(t*icCsff}xY|D]Q}t|ƒttfjo|t|ƒ}q |dj o||f}q q W|S(sInternal function.N(tresttupletitemttypet TupleTypetListTypet_flattentNone(RRR((t+/data/zmath/lib/python2.4/lib-tk/Tkinter.pyR@s cCsÀt|ƒtjo|Sn¢t|ƒttfjo|Sn�h}xst|ƒD]e}y|i|ƒWqOt t fj o9}dG|GHx)|i ƒD]\}}|||R?((R ttrace_variableÃscCs3|iidd|i||ƒ|ii|ƒdS(sÅDelete the trace callback for a variable. MODE is one of "r", "w", "u" for read, write, undefine. CBNAME is the name of the callback returned from trace_variable or trace. R;tvdeleteN(R*R-R@R0RAR?R+t deletecommand(R*RAR?((R t trace_vdeleteÐscCs4t|ii|ii|iidd|iƒƒƒS(s&Return all trace callback information.R;tvinfoN(tmapR*R-tsplitt splitlistR@R0(R*((R t trace_vinfoØs(RRRR2R R3R5R6R1R:RBR;RERJ(((R R&¥s       t StringVarcBs)tZdZdZed„Zd„ZRS(s#Value holder for strings variables.R'cCsti||ƒdS(sKConstruct a string variable. MASTER can be given as master widget.N(R&R3R*R)(R*R)((R R3àscCs7|ii|iƒ}t|tƒo|Snt|ƒS(s#Return value of variable as string.N(R*R-R9R0R8t isinstancet basestringtstr(R*R8((R R:æs (RRRR2R R3R:(((R RKÝs  tIntVarcBs2tZdZdZed„Zd„Zd„ZRS(s#Value holder for integer variables.icCsti||ƒdS(sMConstruct an integer variable. MASTER can be given as master widget.N(R&R3R*R)(R*R)((R R3ðscCs0t|tƒot|ƒ}nti||ƒS(s;Set the variable to value, converting booleans to integers.N(RLR8tbooltintR&R1R*(R*R8((R R1öscCst|ii|iƒƒS(s/Return the value of the variable as an integer.N(tgetintR*R-R9R0(R*((R R:üs(RRRR2R R3R1R:(((R ROís   t DoubleVarcBs)tZdZdZed„Zd„ZRS(s!Value holder for float variables.f0.0cCsti||ƒdS(sLConstruct a float variable. MASTER can be given as a master widget.N(R&R3R*R)(R*R)((R R3scCst|ii|iƒƒS(s,Return the value of the variable as a float.N(t getdoubleR*R-R9R0(R*((R R: s(RRRR2R R3R:(((R RSs  t BooleanVarcBs)tZdZdZed„Zd„ZRS(s#Value holder for boolean variables.tfalsecCsti||ƒdS(sNConstruct a boolean variable. MASTER can be given as a master widget.N(R&R3R*R)(R*R)((R R3scCs|ii|ii|iƒƒS(s+Return the value of the variable as a bool.N(R*R-t getbooleanR9R0(R*((R R:s(RRRR2R R3R:(((R RU s  cCstii|ƒdS(sRun the main loop of Tcl.N(RR,tmainlooptn(RY((R RXscCstii|ƒS(s1Convert true and false to integer values 1 and 0.N(RR,RWts(RZ((R RW"stMisccBstZdZeZd„Zd„Zed„Zd„Zd„Z d„Z dd„Z e Z ed „Z ed „Zdd d „Zdd „ZeZeZd„Zd„ZeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zed„Zd„Z d„Z!dd„Z"d„Z#d„Z$d„Z%d„Z&d „Z'd!„Z(d"„Z)ed#„Z*ed$„Z+d%„Z,d&„Z-ed'„Z.d(„Z/d)„Z0d*„Z1d+„Z2d,„Z3d-„Z4ed.„Z*ed/„Z5e5Z6ed0„Z7dd1„Z8dd2„Z9d3„Z:d4„Z;d5„Z<d6„Z=dd7„Z>d8„Z?d9„Z@d:„ZAd;„ZBd<„ZCd=„ZDdd>„ZEd?„ZFd@„ZGdA„ZHdB„ZIddC„ZJdD„ZKdE„ZLdF„ZMdG„ZNdH„ZOdI„ZPdJ„ZQdK„ZRdL„ZSdM„ZTdN„ZUdO„ZVdP„ZWdQ„ZXdR„ZYdS„ZZdT„Z[dU„Z\dV„Z]dW„Z^dX„Z_dY„Z`ddZ„Zad[„Zbd\„Zcd]„Zdd^„Zed_„Zfd`„Zgda„Zhdb„Zidc„Zjdd„Zkde„Zledf„Zmdgdh„Zneeedi„Zoedj„Zpeeedk„Zqdl„Zreeedm„Zsdn„Ztddo„Zudp„Zvdq„Zwdr„Zxds„Zydt„Zzedu„Z{dv„Z|e|Z}edgdw„Z~e~Zdx„Z€d§Z�dŒi‚e�ƒZƒd�„Z„dŽ„Z…d�„Z†ed�„Z‡e‡Zˆd‘„Z‰e‰ZŠd’„Z‹d“„ZŒd”„Z�d•gZŽeŽd–„Z�e�Z�d—„Z‘e‘Z’d˜„Z“eeeed™„Z”e”Z•dš„Z–hd›„Z—e—Z˜dœ„Z™eŽd�„Zšhdž„Z›e›ZœdŸ„Z�e�Zžeed „ZŸd¡„Z d¢„Z¡d£„Z¢ed¤„Z£d¥„Z¤d¦„Z¥RS(¨sRInternal class. Base class which defines methods common for interior widgets.cCsE|idj o1x!|iD]}|ii|ƒqWd|_ndS(skInternal function. Delete all Tcl commands created for this widget in the Tcl interpreter.N(R*t _tclCommandsR tnameR,RD(R*R]((R tdestroy.s  cCs>|ii|ƒy|ii|ƒWntj onXdS(sDInternal function. Delete the Tcl command provided in NAME.N(R*R,RDR]R\tremovet ValueError(R*R]((R RD8s cCs"|ii|iidd|ƒƒS(sßSet Tcl internal variable, whether the look and feel should adhere to Motif. A parameter of 1 means adhere to Motif (e.g. no color change if mouse passes over slider). Returns the set value.R1ttk_strictMotifN(R*R,RWR@tboolean(R*Rb((R RaBscCs|iidƒdS(sDChange the color scheme to light brown as used in Tk 3.6 and before.t tk_bisqueN(R*R,R@(R*((R RcKscOs.|iidt|ƒt|iƒƒƒdS(s Set a new color scheme for all widget elements. A single color as argument will cause that all colors of Tk widget elements are derived from this. Alternatively several keyword parameters and its associated colors can be given. The following keywords are valid: activeBackground, foreground, selectColor, activeForeground, highlightBackground, selectBackground, background, highlightColor, selectForeground, disabledForeground, insertBackground, troughColor.t tk_setPaletteN(s tk_setPalette(R*R,R@RtargstkwR(R*ReRf((R RdNs cGsdS(s)Do not use. Needed in Tk 3.6 and earlier.N((R*Re((R t tk_menuBar[sR(cCs|iidd|ƒdS(sƒWait until the variable is modified. A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.ttkwaitR<N(R*R,R@R](R*R]((R t wait_variable^scCs4|djo |}n|iidd|iƒdS(sQWait until a WIDGET is destroyed. If no parameter is given self is used.RhtwindowN(RjR R*R,R@t_w(R*Rj((R t wait_windowes  cCs4|djo |}n|iidd|iƒdS(sxWait until the visibility of a WIDGET changes (e.g. it appears). If no parameter is given self is used.Rht visibilityN(RjR R*R,R@Rk(R*Rj((R twait_visibilityls  t1cCs|ii||ƒdS(sSet Tcl variable NAME to VALUE.N(R*R,tsetvarR]R8(R*R]R8((R RptscCs|ii|ƒS(s"Return value of Tcl variable NAME.N(R*R,tgetvarR](R*R]((R RqwscCs|ii|ƒS(sPReturn a boolean value for Tcl boolean values true and false given as parameter.N(R*R,RWRZ(R*RZ((R RW|scCs|iid|iƒdS(sÍDirect input focus to this widget. If the application currently does not have the focus this widget will get the focus if the application gets the focus through the window manager.tfocusN(R*R,R@Rk(R*((R t focus_setscCs|iidd|iƒdS(stDirect input focus to this widget even if the application does not have the focus. Use with caution!Rrs-forceN(R*R,R@Rk(R*((R t focus_force‡scCs<|iidƒ}|djp| odSn|i|ƒS(sÔReturn the widget which has currently the focus in the application. Use focus_displayof to allow working with several displays. Return None if application does not have the focus.RrtnoneN(R*R,R@R]R t _nametowidget(R*R]((R t focus_getŒs cCsE|iidd|iƒ}|djp| odSn|i|ƒS(s¥Return the widget which has currently the focus on the display where this widget is located. Return None if the application does not have the focus.Rrs -displayofRuN(R*R,R@RkR]R Rv(R*R]((R tfocus_displayof–s cCsE|iidd|iƒ}|djp| odSn|i|ƒS(syReturn the widget which would have the focus if top level for this widget gets the focus from the window manager.Rrs-lastforRuN(R*R,R@RkR]R Rv(R*R]((R t focus_lastforžs cCs|iidƒdS(sXThe widget under mouse will get automatically focus. Can not be disabled easily.ttk_focusFollowsMouseN(R*R,R@(R*((R Rz¤scCs4|iid|iƒ}|pdSn|i|ƒS(snReturn the next widget in the focus order which follows widget which has currently the focus. The focus order first goes to the next child, then to the children of the child recursively and then to the next sibling which is higher in the stacking order. A widget is omitted if it has the takefocus resource set to 0.t tk_focusNextN(R*R,R@RkR]R Rv(R*R]((R R{¨s cCs4|iid|iƒ}|pdSn|i|ƒS(sHReturn previous widget in the focus order. See tk_focusNext for details.t tk_focusPrevN(R*R,R@RkR]R Rv(R*R]((R R|´s cGso|p|iid|ƒnNg}||||d„}|i|ƒ}|i |ƒ|iid||ƒSdS(sCall function once after given time. MS specifies the time in milliseconds. FUNC gives the function which shall be called. Additional parameters are given as parameters to the function call. Return identifier to cancel scheduling with after_cancel.taftercCsAz||ŒWdy|i|dƒWntj onXXdS(Ni(tfuncReR*RDttmptTclError(R~ReR*R((R tcallitÆsN( R~R*R,R@tmsRReR�R=R]tappend(R*R‚R~ReRR�R]((R R}¹s cGs|id||ŒS(s–Call FUNC once if the Tcl main loop has no event to process. Return an identifier to cancel the scheduling with after_cancel.tidleN(R*R}R~Re(R*R~Re((R t after_idleÑscCsoy?|iidd|ƒ}|ii|ƒd}|i|ƒWntj onX|iidd|ƒdS(s�Cancel scheduling of function identified with ID. Identifier returned by after or after_idle must be given as first parameter.R}tinfoitcancelN( R*R,R@tidtdataRItscriptRDR€(R*RˆR‰RŠ((R t after_cancelØsicCs!|iid|i|ƒƒdS(sRing a display's bell.tbellN(sbell(R*R,R@t _displayoft displayof(R*RŽ((R RŒæscKsB|idƒp|i|d|idƒp|i|d where MODIFIER is one of Control, Mod2, M2, Shift, Mod3, M3, Lock, Mod4, M4, Button1, B1, Mod5, M5 Button2, B2, Meta, M, Button3, B3, Alt, Button4, B4, Double, Button5, B5 Triple, Mod1, M1. TYPE is one of Activate, Enter, Map, ButtonPress, Button, Expose, Motion, ButtonRelease FocusIn, MouseWheel, Circulate, FocusOut, Property, Colormap, Gravity Reparent, Configure, KeyPress, Key, Unmap, Deactivate, KeyRelease Visibility, Destroy, Leave and DETAIL is the button number for ButtonPress, ButtonRelease and DETAIL is the Keysym for KeyPress and KeyRelease. Examples are for pressing Control and mouse button 1 or for pressing A and the Alt key (KeyPress can be omitted). An event pattern can also be a virtual event of the form <> where AString can be arbitrary. This event can be generated by event_generate. If events are concatenated they must appear shortly after each other. FUNC will be called if the event sequence occurs with an instance of Event as argument. If the return value of FUNC is "break" no further bound function is invoked. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. Bind will return an identifier to allow deletion of the bound function with unbind without memory leak. If FUNC or SEQUENCE is omitted the bound function or list of bound events are returned.tbindN(R*R6RkR1R~R¢(R*R1R~R¢((R R7~s%cCs8|iid|i|dƒ|o|i|ƒndS(sWUnbind for this widget for event SEQUENCE the function identified with FUNCID.R7R'N(R*R,R@RkR1R4RD(R*R1R4((R tunbind¦scCs|id|||dƒS(sBind to all widgets at an event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.R7talliN(sbindsall(R*R6R1R~R¢(R*R1R~R¢((R tbind_all¬scCs|iidd|dƒdS(s8Unbind for all widgets for event SEQUENCE all functions.R7R9R'N(R*R,R@R1(R*R1((R t unbind_all²scCs|id|f|||dƒS(s=Bind to widgets with bindtag CLASSNAME at event SEQUENCE a call of function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.R7iN(R*R6R§R1R~R¢(R*R§R1R~R¢((R t bind_classµscCs|iid||dƒdS(sYUnbind for a all widgets with bindtag CLASSNAME for event SEQUENCE all functions.R7R'N(R*R,R@R§R1(R*R§R1((R t unbind_class¿scCs|ii|ƒdS(sCall the mainloop of Tk.N(R*R,RXRY(R*RY((R RXÃscCs|iiƒdS(s8Quit the Tcl interpreter. All widgets will be destroyed.N(R*R,tquit(R*((R R>ÆscCs.|o#ttt|ii|ƒƒƒSndS(sInternal function.N(R”RRGRRR*R,RI(R*R”((R RìÉscCs.|o#ttt|ii|ƒƒƒSndS(sInternal function.N(R”RRGRTR*R,RI(R*R”((R t _getdoublesÍscCs|o|ii|ƒSndS(sInternal function.N(R”R*R,RW(R*R”((R t _getbooleanÑscCs7|od|fSn|djod|ifSnfS(sInternal function.s -displayofN(RŽR R*Rk(R*RŽ((R R�Õs  cCs´|ot||fƒ}n t|ƒ}f}x~|iƒD]p\}}|dj oW|ddjo|d }nt|ƒo|i |ƒ}n|d||f}q<q<W|S(sInternal function.iÿÿÿÿt_t-N( RfRRRRRRR tcallableR*R=(R*RRfRRR((R R’Üs    cCs–|}|ddjo|iƒ}|d}nx^|oV|idƒ}|djo|| ||d}}nd}|i|}|}q4W|S(sPReturn the Tkinter instance of a widget identified by its Tcl name NAME.it.iR'N(R*twR]t_roottfindtittailRÃ(R*R]RHRIRE((R t nametowidgetês    cCsÀt|||ƒi}tt|ƒƒ}y |i }Wnt j onXy||i }Wnt j onX|i i ||ƒ|o1|idjo g|_n|ii|ƒn|S(sÏReturn a newly created Tcl function. If this function is called, the Python function FUNC will be executed. An optional function SUBST can be given which will be executed before FUNC.N(t CallWrapperR~tsubstR*t__call__tfR.RˆR]tim_funcRRR,t createcommandR3R\R Rƒ(R*R~RLR3R]RN((R R=ûs"  cCs%|}x|io |i}q W|S(sInternal function.N(R*RER)(R*RE((R RFs  s%#s%bs%fs%hs%ks%ss%ts%ws%xs%ys%As%Es%Ks%Ns%Ws%Ts%Xs%Ys%Dt cGst|ƒt|iƒjo|Sn|ii}t}d„}|\}}}}}}}}}}}}}} } } } } }tƒ}||ƒ|_||ƒ|_y||ƒ|_ Wnt!j onX||ƒ|_"||ƒ|_#||ƒ|_$||ƒ|_%||ƒ|_&||ƒ|_||ƒ|_||_'y||ƒ|_(Wnt!j onX||_)|| ƒ|_*| |_+y|i,| ƒ|_-Wnt.j o| |_-nX|| ƒ|_/|| ƒ|_0y||ƒ|_1Wnt2j od|_1nX|fS(sInternal function.cCs,yt|ƒSWntj o |SnXdS(s?Tk changed behavior in 8.4.2, returning "??" rather more often.N(RQRZR`(RZ((R t getint_event!s iN(3tlenReR*t _subst_formatR,RWRQRRRRtnsigntbRNthRRZRRERR)tAtEtKtNtWtTtXtYtDRtetserialtnumRrR€RÙtkeycodetstatettimeR&tchart send_eventtkeysymt keysym_numRRvtwidgetRÆtx_rootty_roottdeltaR`(R*ReRRRWRURXRYR`RZR[R]R\R_R^RVRaRNRWRRRRZRRER)R((R R2sP  ?    cCsIdk}|i|i|i}}}|iƒ}|i |||ƒdS(sInternal function.N( tsystexc_typet exc_valuet exc_tracebacktexctvalttbR*RFtroottreport_callback_exception(R*RsRtRuRoRv((R t_report_exceptionTs   cCs>|ot||fƒ}n|ot|ƒ}n|djokh}xZ|ii|iit|i |fƒƒƒD]+}|ddf|d||dd}sRzN(RGR*R,RHR@Rk(R*((R tkeys{s cCs|iS(s+Return the window path name of this widget.N(R*Rk(R*((R R6st_noarg_cCsV|tijo&|i|iidd|iƒƒSn|iidd|i|ƒdS(sSet or get the status for propagation of geometry information. A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given the current setting will be returned. tpackt propagateN(tflagR[R€R*R@R,R@Rk(R*Rƒ((R tpack_propagate„s&cCs1t|i|ii|iidd|iƒƒƒS(sHReturn a list of all slaves of this widget in its packing order.R�tslavesN(RGR*RvR,RIR@Rk(R*((R t pack_slaves‘s cCs1t|i|ii|iidd|iƒƒƒS(sHReturn a list of all slaves of this widget in its packing order.tplaceR…N(RGR*RvR,RIR@Rk(R*((R t place_slaves™s cCsŽdd|if}|dj o!|dj o|||f}n|dj o!|dj o|||f}n|i|i i |ŒƒpdS(sÓReturn a tuple of integer coordinates for the bounding box of this widget controlled by the geometry manager grid. If COLUMN, ROW is given the bounding box applies from the cell with row and column 0 to the specified cell. If COL2 and ROW2 are given the bounding box starts at that cell. The returned integers specify the offset of the upper left corner in the master widget and the width and height. tgridtbboxN( R*RkRetcolumnR trowtcol2trow2RìR,R@(R*R‹RŒR�RŽRe((R t grid_bbox¡s c Cs´t|ƒtjoS| oK|ddjo|d }n|d djod|}n|f} n|i||ƒ} | pÁ|iid||i |ƒ}|ii |ƒ} h} x€tdt| ƒdƒD]f}| |d}| |d}|p d }n*d|jot|ƒ}n t|ƒ}|| |     % cKs|id|||ƒS(sãConfigure column INDEX of a grid. Valid resources are minsize (minimum size of the column), weight (how much does additional space propagate to this column) and pad (how much space to let additionally).tcolumnconfigureN(R*R•R‘RRf(R*R‘RRf((R tgrid_columnconfigure×scCs/|i|iidd|i||ƒƒpdS(s”Return a tuple of column and row which identify the cell at which the pixel at position X and Y inside the master widget is located.R‰tlocationN(R*RìR,R@RkRR)R (R*RR)((R t grid_locationßscCsV|tijo&|i|iidd|iƒƒSn|iidd|i|ƒdS(sSet or get the status for propagation of geometry information. A boolean argument specifies whether the geometry information of the slaves will determine the size of this widget. If no argument is given, the current setting will be returned. R‰R‚N(RƒR[R€R*R@R,R@Rk(R*Rƒ((R tgrid_propagateæs&cKs|id|||ƒS(sÚConfigure row INDEX of a grid. Valid resources are minsize (minimum size of the row), weight (how much does additional space propagate to this row) and pad (how much space to let additionally).t rowconfigureN(R*R•R‘RRf(R*R‘RRf((R tgrid_rowconfigureòscCs)|i|iidd|iƒƒpdS(s<Return a tuple of the number of column and rows in the grid.R‰tsizeN(R*RìR,R@RkR (R*((R t grid_sizeúscCs€f}|dj o|d|f}n|dj o|d|f}nt|i|ii|ii dd|i f|ƒƒƒS(sHReturn a list of all slaves of this widget in its packing order.s-rows-columnR‰R…N( ReRŒR R‹RGR*RvR,RIR@Rk(R*RŒR‹Re((R t grid_slavesÿs   cGs'dd|f|}|ii|ƒdS(s›Bind a virtual event VIRTUAL (of the form <>) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.teventR¢N(tvirtualt sequencesReR*R,R@(R*R¡R¢Re((R t event_addscGs'dd|f|}|ii|ƒdS(s-Unbind a virtual event VIRTUAL from SEQUENCE.R tdeleteN(R¡R¢ReR*R,R@(R*R¡R¢Re((R t event_deletescKs`dd|i|f}x4|iƒD]&\}}|d|t|ƒf}q"W|i i |ƒdS(s‚Generate an event SEQUENCE. Additional keyword arguments specify parameter of the event (e.g. x, y, rootx, rooty).R tgenerates-%sN( R*RkR1ReRfRRRRNR,R@(R*R1RfReRR((R tevent_generates  cCs"|ii|iidd|ƒƒS(suReturn a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.R R†N(R*R,RIR@R¡(R*R¡((R t event_info#scCs|iiddƒS(s*Return a list of all existing image names.timagetnamesN(R*R,R@(R*((R t image_names+scCs|iiddƒS(s?Return a list of all available image types (e.g. phote bitmap).R©ttypesN(R*R,R@(R*((R t image_types/s(s%#s%bs%fs%hs%ks%ss%ts%ws%xs%ys%As%Es%Ks%Ns%Ws%Ts%Xs%Ys%D(¦RRRR R\R^RDRaRcRdRgRitwaitvarRlRnRpRqRQRRtfloatRTRWRsRrRtRwRxRyRzR{R|R}R…R‹RŒR“R•R˜RšR›RœRžRŸR¥R¦R¨R«R­R®R±R³R´RµRºtliftR»R¾RÀRÂRÇRÉRËRÏRÑRÓRÖRØRÚRÛRÝRßRáRâRäRæRèRêRíRïRñRóRöRøRúRüRþRRRRRR R RRRRRRRRR!R#R%R'R(R*RR,R-R6R7R8R:R;R<R=RXR>RìR?R@R�R’RJRvR=tregisterRFRTtjoinR5R2RxRyRztconfigR{t __getitem__R}RR6R€R„R‚R†R…RˆR�RŠR•R—R–R™RšRœR›RžR�RŸR£R¥R§R¨R«R­(((R R['sB                                                                                        (             9            "        RKcBs tZdZd„Zd„ZRS(swInternal class. Stores function to call when some user defined Tcl function is called e.g. after an event occurred.cCs||_||_||_dS(s(Store FUNC, SUBST and WIDGET as members.N(R~R*RLRk(R*R~RLRk((R R37s  cGsfy.|io|i|Œ}n|i|ŒSWn1tj o}t|‚n|iiƒnXdS(s3Apply first function SUBST to arguments, than FUNC.N(R*RLReR~R#RRkRx(R*ReR((R RM<s  (RRRR3RM(((R RK4s  tWmcBstZdZeeeed„ZeZd„ZeZed„ZeZ d„Z e Z ed„Z e Z d„ZeZed„ZeZd„ZeZed „ZeZeeeed „ZeZed „ZeZed „ZeZd „ZeZed„ZeZed„Z e Z!eed„Z"e"Z#ed„Z$e$Z%eed„Z&e&Z'eed„Z(e(Z)ed„Z*e*Z+ed„Z,e,Z-eed„Z.e.Z/eed„Z0e0Z1ed„Z2e2Z3ed„Z4e4Z5ed„Z6e6Z7ed„Z8e8Z9d„Z:e:Z;RS(sAProvides functions for the communication with the window manager.c Cs.|i|iidd|i||||ƒƒS(sÕInstruct the window manager to set the aspect ratio (width/height) of this widget to be between MINNUMER/MINDENOM and MAXNUMER/MAXDENOM. Return a tuple of the actual values if no argument is given.twmtaspectN( R*RìR,R@RktminNumertminDenomtmaxNumertmaxDenom(R*R¸R¹RºR»((R t wm_aspectKscGs&dd|if|}|ii|ƒS(sÅThis subcommand returns or sets platform specific attributes The first form returns a list of the platform specific flags and their values. The second form returns the value for the specific option. The third form sets one or more of the values. The values are as follows: On Windows, -disabled gets or sets whether the window is in a disabled state. -toolwindow gets or sets the style of the window to toolwindow (as defined in the MSDN). -topmost gets or sets whether this is a topmost window (displays above all other windows). On Macintosh, XXXXX On Unix, there are currently no special attribute values. R¶t attributesN(R*RkReR,R@(R*Re((R t wm_attributesWscCs|iidd|i|ƒS(sVStore NAME in WM_CLIENT_MACHINE property of this widget. Return current value.R¶tclientN(R*R,R@RkR](R*R]((R t wm_clientmscGsRt|ƒdjo |f}ndd|if|}t|i|ii|ƒƒS(sÛStore list of window names (WLIST) into WM_COLORMAPWINDOWS property of this widget. This list contains windows whose colormaps differ from their parents. Return current list of widgets if WLIST is empty.iR¶tcolormapwindowsN( RStwlistR*RkReRGRvR,R@(R*RÂRe((R twm_colormapwindowsrs  cCs|iidd|i|ƒS(s�Store VALUE in WM_COMMAND property. It is the command which shall be used to invoke the application. Return current command if VALUE is None.R¶R°N(R*R,R@RkR8(R*R8((R t wm_command{scCs|iidd|iƒS(sˆDeiconify this widget. If it was never mapped it will not be mapped. On Windows it will raise this widget and give it the focus.R¶t deiconifyN(R*R,R@Rk(R*((R t wm_deiconify�scCs|iidd|i|ƒS(sÑSet focus model to MODEL. "active" means that this widget will claim the focus itself, "passive" means that the window manager shall give the focus. Return current focus model if MODEL is None.R¶t focusmodelN(R*R,R@Rktmodel(R*RÈ((R t wm_focusmodel†scCs|iidd|iƒS(sAReturn identifier for decorative frame of this widget if present.R¶tframeN(R*R,R@Rk(R*((R twm_frameŒscCs|iidd|i|ƒS(siSet geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return current value if None is given.R¶R×N(R*R,R@Rkt newGeometry(R*RÌ((R t wm_geometry�sc Cs.|i|iidd|i||||ƒƒS(sInstruct the window manager that this widget shall only be resized on grid boundaries. WIDTHINC and HEIGHTINC are the width and height of a grid unit in pixels. BASEWIDTH and BASEHEIGHT are the number of grid units requested in Tk_GeometryRequest.R¶R‰N( R*RìR,R@Rkt baseWidtht baseHeighttwidthInct heightInc(R*RÎRÏRÐRÑ((R twm_grid•scCs|iidd|i|ƒS(s~Set the group leader widgets for related widgets to PATHNAME. Return the group leader of this widget if None is given.R¶tgroupN(R*R,R@RktpathName(R*RÔ((R twm_group scCs|iidd|i|ƒS(sZSet bitmap for the iconified widget to BITMAP. Return the bitmap if None is given.R¶t iconbitmapN(R*R,R@Rktbitmap(R*R×((R t wm_iconbitmap¥scCs|iidd|iƒS(sDisplay widget as icon.R¶ticonifyN(R*R,R@Rk(R*((R t wm_iconifyªscCs|iidd|i|ƒS(sVSet mask for the icon bitmap of this widget. Return the mask if None is given.R¶ticonmaskN(R*R,R@RkR×(R*R×((R t wm_iconmask®scCs|iidd|i|ƒS(sSSet the name of the icon for this widget. Return the name if None is given.R¶ticonnameN(R*R,R@RktnewName(R*RÞ((R t wm_iconname³scCs(|i|iidd|i||ƒƒS(s�Set the position of the icon of this widget to X and Y. Return a tuple of the current values of X and X if None is given.R¶t iconpositionN(R*RìR,R@RkRR)(R*RR)((R twm_iconposition¸scCs|iidd|i|ƒS(sgSet widget PATHNAME to be displayed instead of icon. Return the current value if None is given.R¶t iconwindowN(R*R,R@RkRÔ(R*RÔ((R t wm_iconwindow¾scCs(|i|iidd|i||ƒƒS(s¢Set max WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.R¶tmaxsizeN(R*RìR,R@RkR&RÙ(R*R&RÙ((R t wm_maxsizeÃscCs(|i|iidd|i||ƒƒS(s¢Set min WIDTH and HEIGHT for this widget. If the window is gridded the values are given in grid units. Return the current values if None is given.R¶tminsizeN(R*RìR,R@RkR&RÙ(R*R&RÙ((R t wm_minsizeÊscCs%|i|iidd|i|ƒƒS(sˆInstruct the window manager to ignore this widget if BOOLEAN is given with 1. Return the current value if None is given.R¶toverrideredirectN(R*R@R,R@RkRb(R*Rb((R twm_overrideredirectÑscCs|iidd|i|ƒS(s¦Instruct the window manager that the position of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".R¶t positionfromN(R*R,R@Rktwho(R*Rë((R twm_positionfromØscCsEt|ƒo|i|ƒ}n|}|iidd|i||ƒS(s´Bind function FUNC to command NAME for this widget. Return the function bound to NAME if None is given. NAME could be e.g. "WM_SAVE_YOURSELF" or "WM_DELETE_WINDOW".R¶tprotocolN( RCR~R*R=R°R,R@RkR](R*R]R~R°((R t wm_protocolÞs  cCs|iidd|i||ƒS(syInstruct the window manager whether this width can be resized in WIDTH or HEIGHT. Both values are boolean values.R¶t resizableN(R*R,R@RkR&RÙ(R*R&RÙ((R t wm_resizableéscCs|iidd|i|ƒS(s¢Instruct the window manager that the size of this widget shall be defined by the user if WHO is "user", and by its own policy if WHO is "program".R¶tsizefromN(R*R,R@RkRë(R*Rë((R t wm_sizefromîscCs|iidd|i|ƒS(s†Query or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).R¶ReN(R*R,R@Rktnewstate(R*Ró((R twm_stateôscCs|iidd|i|ƒS(sSet the title of this widget.R¶ttitleN(R*R,R@RkR”(R*R”((R twm_titleùscCs|iidd|i|ƒS(s_Instruct the window manager that this widget is transient with regard to widget MASTER.R¶t transientN(R*R,R@RkR)(R*R)((R t wm_transientýscCs|iidd|iƒS(sˆWithdraw this widget from the screen such that it is unmapped and forgotten by the window manager. Re-draw it with wm_deiconify.R¶twithdrawN(R*R,R@Rk(R*((R t wm_withdraws(<RRRR R¼R·R¾R½RÀR¿RÃRÁRÄR°RÆRÅRÉRÇRËRÊRÍR×RÒR‰RÕRÓRØRÖRÚRÙRÜRÛRßRÝRáRàRãRâRåRäRçRæRéRèRìRêRîRíRðRïRòRñRôReRöRõRøR÷RúRù(((R RµHsr                         tTkcBsetZdZdZeeddded„Zd„Zd„Zd„Zd „Z d „Z d „Z RS( syToplevel widget of Tk which represents mostly the main window of an appliation. It has an associated Tcl interpreter.RDRûiic Cséd|_h|_d|_d|_|djobdk}dk} | i i |i dƒ}| i i |ƒ\}}|djo||}q“nd} ti|||| t|||ƒ|_|o|iƒn|i||ƒdS(s@Return a new Toplevel widget on screen SCREENNAME. A new Tcl interpreter will be created. BASENAME will be used for the identification of the profile file (see readprofile). It is constructed from sys.argv[0] without extensions if None is given. CLASSNAME is the name of the widget class.iNs.pys.pycs.pyo(s.pys.pycs.pyo(R R*R)RÃt _tkloadedR,tbaseNameRotostpathtbasenametargvtsplitexttextt interactivet_tkintertcreatet screenNameR§t wantobjectstuseTktsynctuset_loadtkt readprofile( R*RRýR§R R R RoRRRþ((R R3 s       'cCs)|ip|iiƒ|iƒndS(N(R*RüR,tloadtkR (R*((R R%s  cCssd|_to.ttdƒotiddƒ|iƒn|iidƒ}|t i jot dt i |f‚nt |iidƒƒ}|t ijot dt i|f‚ntdjot d t tƒ‚n|idjo g|_n|iid tƒ|iid tƒ|iid ƒ|iid ƒtot o |an|id |iƒdS( Nit SchedParamsit tk_versions4tk.h version (%s) doesn't match libtk.a version (%s)t tcl_versions6tcl.h version (%s) doesn't match libtcl.a version (%s)f4.0s)Tk 4.0 or higher is required; found Tk %sttkerrortexittWM_DELETE_WINDOW(R*Rüt_MacOSthasattrRRR,RqRRt TK_VERSIONt RuntimeErrorRNRt TCL_VERSIONt TkVersionR\R RPR!R%RƒRRRíR^(R*RR((R R )s,    cCsix!|iiƒD]}|iƒqW|iid|iƒti|ƒt ot |jo da ndS(shDestroy this and all descendants widgets. This will end the application of this Tcl interpreter.R^N( R*RÃtvaluesRR^R,R@RkR[RRR (R*R((R R^Ns c BsQdk}|iidƒo|id}n |i}|ii|d|ƒ}|ii|d|ƒ}|ii|d|ƒ}|ii|d|ƒ}hd|<} d| U|ii|ƒo|iid|ƒn|ii|ƒoe|| ƒn|ii|ƒo|iid|ƒn|ii|ƒoe|| ƒndS(sÃInternal function. It reads BASENAME.tcl and CLASSNAME.tcl into the Tcl Interpreter and calls execfile on BASENAME.py and CLASSNAME.py if such a file exists in the home directory.NtHOMEs.%s.tcls.%s.pyR*sfrom Tkinter import *tsource(RþtenvironR‘thometcurdirRÿR²R§t class_tcltclass_pyRýtbase_tcltbase_pyR*tdirtisfileR,R@texecfile( R*RýR§R#R$R"R!RRþR%((R R Ws&  cCsTdk}dk}|iidƒ||_||_||_ |i |||ƒdS(s6Internal function. It reports exception on sys.stderr.NsException in Tkinter callback ( t tracebackRotstderrtwriteRst last_typeRtt last_valueRutlast_tracebacktprint_exception(R*RsRtRuR(Ro((R Rwls   cCst|i|ƒS(s3Delegate attribute access to the interpreter objectN(tgetattrR*R,tattr(R*R0((R t __getattr__ts( RRRRkR R3RR R^R RwR1(((R Rû s   %  cCst||||ƒS(N(RûRRýR§R (RRýR§R ((R tTcl‡stPackcBs`tZdZhd„ZeZZZd„ZeZd„Z e Z e i Z Z e iZZRS(sQGeometry manager Pack. Base class to use the methods pack_* in every widget.cKs0|iidd|if|i||ƒƒdS(sÿPack a widget in the parent widget. Use as options: after=widget - pack it after you have packed widget anchor=NSEW (or subset) - position widget according to given direction before=widget - pack it before you will pack widget expand=bool - expand widget if parent size grows fill=NONE or X or Y or BOTH - fill widget if widget grows in=master - use master to contain this widget ipadx=amount - add internal padding in x direction ipady=amount - add internal padding in y direction padx=amount - add padding in x direction pady=amount - add padding in y direction side=TOP or BOTTOM or LEFT or RIGHT - where to add this widget. R�RzN(R*R,R@RkR’RRf(R*RRf((R tpack_configureŽscCs|iidd|iƒdS(s:Unmap this widget and do not use it for the packing order.R�tforgetN(R*R,R@Rk(R*((R t pack_forget¡scCsž|ii|iidd|iƒƒ}h}xjtdt|ƒdƒD]P}||d}||d}|d djo|i |ƒ}n|||dgD]3}|i|ƒo||||d <||=q q W|iidd|if|i||ƒƒdS(søPlace a widget in the parent widget. Use as options: in=master - master relative to which the widget is placed. x=amount - locate anchor of this widget at position x of master y=amount - locate anchor of this widget at position y of master relx=amount - locate anchor of this widget between 0.0 and 1.0 relative to width of master (1.0 is right edge) rely=amount - locate anchor of this widget between 0.0 and 1.0 relative to height of master (1.0 is bottom edge) anchor=NSEW (or subset) - position anchor according to given direction width=amount - width of this widget in pixel height=amount - height of this widget in pixel relwidth=amount - width of this widget between 0.0 and 1.0 relative to width of master (1.0 is the same width as the master) relheight=amount - height of this widget between 0.0 and 1.0 relative to height of master (1.0 is the same height as the master) bordermode="inside" or "outside" - whether to take border width of master widget into account tin_iÿÿÿÿR‡RzN( RRfR‘R*R,R@RkR’R(R*RRfR((R tplace_configureºs cCs|iidd|iƒdS(sUnmap this widget.R‡R5N(R*R,R@Rk(R*((R t place_forget×scCsž|ii|iidd|iƒƒ}h}xjtdt|ƒdƒD]P}||d}||d}|d djo|i |ƒ}n|||R‰RzR³R[R�RŠR—R–R?R5R@RAR†R™R˜RšR‚RœR›RžR�RŸR…(((R R=ës           t BaseWidgetcBs>tZdZd„Zhhfd„Zd„Zfd„ZRS(sInternal class.cCsto)|ptp tƒant}q0n||_|i|_d}|i dƒo|d}|d=n|pt t |ƒƒ}n||_ |i djod||_ n|i d||_ h|_|iii |i ƒo|ii|i iƒn||ii|i d9„Z?d:„Z@d;„ZAd<„ZBd=„ZCd>„ZDd?„ZERS(@s?Canvas widget to display graphical elements like lines or text.cKsti||d||ƒdS(sConstruct a canvas widget with the parent MASTER. Valid resource names: background, bd, bg, borderwidth, closeenough, confine, cursor, height, highlightbackground, highlightcolor, highlightthickness, insertbackground, insertborderwidth, insertofftime, insertontime, insertwidth, offset, relief, scrollregion, selectbackground, selectborderwidth, selectforeground, state, takefocus, width, xscrollcommand, xscrollincrement, yscrollcommand, yscrollincrement.tcanvasN(RIR3R*R)RRf(R*R)RRf((R R3És cGs!|ii|idf|ƒdS(sInternal function.taddtagN(R*R,R@RkRe(R*Re((R RcÔscCs|i|d|ƒdS(s*Add tag NEWTAG to all items above TAGORID.taboveN(R*RctnewtagttagOrId(R*ReRf((R t addtag_above×scCs|i|dƒdS(sAdd tag NEWTAG to all items.R9N(R*RcRe(R*Re((R t addtag_allÚscCs|i|d|ƒdS(s*Add tag NEWTAG to all items below TAGORID.tbelowN(R*RcReRf(R*ReRf((R t addtag_belowÝscCs |i|d||||ƒdS(s÷Add tag NEWTAG to item which is closest to pixel at X, Y. If several match take the top-most. All items closer than HALO are considered overlapping (all are closests). If START is specified the next below this tag is taken.tclosestN(R*RcReRR)thalotstart(R*ReRR)RlRm((R taddtag_closestàscCs |i|d||||ƒdS(sLAdd tag NEWTAG to all items in the rectangle defined by X1,Y1,X2,Y2.tenclosedN(R*RcRetx1ty1tx2ty2(R*ReRpRqRrRs((R taddtag_enclosedæscCs |i|d||||ƒdS(sWAdd tag NEWTAG to all items which overlap the rectangle defined by X1,Y1,X2,Y2.t overlappingN(R*RcReRpRqRrRs(R*ReRpRqRrRs((R taddtag_overlappingêscCs|i|d|ƒdS(s)Add tag NEWTAG to all items with TAGORID.twithtagN(R*RcReRf(R*ReRf((R taddtag_withtagîscGs-|i|ii|idf|ƒƒpdS(s|Return a tuple of X1,Y1,X2,Y2 coordinates for a rectangle which encloses all items with tags specified as arguments.RŠN(R*RìR,R@RkReR (R*Re((R RŠñscCs;|ii|id||dƒ|o|i|ƒndS(sbUnbind for all items with TAGORID for event SEQUENCE the function identified with FUNCID.R7R'N(R*R,R@RkRfR1R4RD(R*RfR1R4((R t tag_unbindöscCs"|i|id|f|||ƒS(s&Bind to all items with TAGORID at event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.R7N(R*R6RkRfR1R~R¢(R*RfR1R~R¢((R ttag_bindüscCs"t|ii|id||ƒƒS(srReturn the canvas x coordinate of pixel position SCREENX rounded to nearest multiple of GRIDSPACING units.tcanvasxN(RTR*R,R@Rktscreenxt gridspacing(R*R|R}((R R{scCs"t|ii|id||ƒƒS(srReturn the canvas y coordinate of pixel position SCREENY rounded to nearest multiple of GRIDSPACING units.tcanvasyN(RTR*R,R@RktscreenyR}(R*RR}((R R~ scGs2tt|ii|ii|idf|ƒƒƒS(s8Return a list of coordinates for the item given in ARGS.tcoordsN(RGRTR*R,RIR@RkRe(R*Re((R R€sc Csut|ƒ}|d}t|ƒttfjo|d }nh}t|ii |i d|||i ||ƒŒƒS(sInternal function.iÿÿÿÿRN(RReRRR RRRR*R,R@RktitemTypeR’Rf(R*R�ReRfR((R t_creates  cOs|id||ƒS(s6Create arc shaped region with coordinates x1,y1,x2,y2.tarcN(R*R‚ReRf(R*ReRf((R t create_arcscOs|id||ƒS(s%Create bitmap with coordinates x1,y1.R×N(R*R‚ReRf(R*ReRf((R t create_bitmap"scOs|id||ƒS(s)Create image item with coordinates x1,y1.R©N(R*R‚ReRf(R*ReRf((R t create_image%scOs|id||ƒS(s-Create line with coordinates x1,y1,...,xn,yn.tlineN(R*R‚ReRf(R*ReRf((R t create_line(scOs|id||ƒS(s)Create oval with coordinates x1,y1,x2,y2.tovalN(R*R‚ReRf(R*ReRf((R t create_oval+scOs|id||ƒS(s0Create polygon with coordinates x1,y1,...,xn,yn.tpolygonN(R*R‚ReRf(R*ReRf((R tcreate_polygon.scOs|id||ƒS(s.Create rectangle with coordinates x1,y1,x2,y2.t rectangleN(R*R‚ReRf(R*ReRf((R tcreate_rectangle1scOs|id||ƒS(s#Create text with coordinates x1,y1.ttextN(R*R‚ReRf(R*ReRf((R t create_text4scOs|id||ƒS(s+Create window with coordinates x1,y1,x2,y2.RjN(R*R‚ReRf(R*ReRf((R t create_window7scGs!|ii|idf|ƒdS(sŠDelete characters of text items identified by tag or id in ARGS (possibly several times) from FIRST to LAST character (including).tdcharsN(R*R,R@RkRe(R*Re((R R’:scGs!|ii|idf|ƒdS(s<Delete items identified by all tag or ids contained in ARGS.R¤N(R*R,R@RkRe(R*Re((R R¤>scGs!|ii|idf|ƒdS(siDelete tag or id given as last arguments in ARGS from items identified by first argument in ARGS.tdtagN(R*R,R@RkRe(R*Re((R R“AscGs-|i|ii|idf|ƒƒpfS(sInternal function.RGN(R*RìR,R@RkRe(R*Re((R RGEscCs|id|ƒS(sReturn items above TAGORID.RdN(R*RGRf(R*Rf((R t find_aboveIscCs |idƒS(sReturn all items.R9N(R*RG(R*((R tfind_allLscCs|id|ƒS(sReturn all items below TAGORID.RiN(R*RGRf(R*Rf((R t find_belowOscCs|id||||ƒS(sìReturn item which is closest to pixel at X, Y. If several match take the top-most. All items closer than HALO are considered overlapping (all are closests). If START is specified the next below this tag is taken.RkN(R*RGRR)RlRm(R*RR)RlRm((R t find_closestRscCs|id||||ƒS(s=Return all items in rectangle defined by X1,Y1,X2,Y2.RoN(R*RGRpRqRrRs(R*RpRqRrRs((R t find_enclosedXscCs|id||||ƒS(sLReturn all items which overlap the rectangle defined by X1,Y1,X2,Y2.RuN(R*RGRpRqRrRs(R*RpRqRrRs((R tfind_overlapping\scCs|id|ƒS(sReturn all items with TAGORID.RwN(R*RGRf(R*Rf((R t find_withtag`scGs|ii|idf|ƒS(s.Set focus to the first item specified in ARGS.RrN(R*R,R@RkRe(R*Re((R RrcscGs)|ii|ii|idf|ƒƒS(s=Return tags associated with the first item specified in ARGS.tgettagsN(R*R,RIR@RkRe(R*Re((R R›fscGs!|ii|idf|ƒdS(sdSet cursor at position POS in the item identified by TAGORID. In ARGS TAGORID must be first.ticursorN(R*R,R@RkRe(R*Re((R RœjscGs#t|ii|idf|ƒƒS(s?Return position of cursor as integer in item specified in ARGS.R‘N(RRR*R,R@RkRe(R*Re((R R‘nscGs!|ii|idf|ƒdS(sSInsert TEXT in item TAGORID at position POS. ARGS must be TAGORID POS TEXT.R[N(R*R,R@RkRe(R*Re((R R[qscCs'|ii|idf|d|fƒS(s9Return the resource value for an OPTION for item TAGORID.titemcgetRBN(R*R,R@RkRfR¡(R*RfR¡((R R�uscKs|id|f||ƒS(sàConfigure resources of an item TAGORID. The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method without arguments. t itemconfigureN(R*RyRfRRf(R*RfRRf((R RžyscGs!|ii|idf|ƒdS(sJLower an item TAGORID given in ARGS (optional below another item).RŸN(R*R,R@RkRe(R*Re((R t tag_lower†scGs!|ii|idf|ƒdS(s#Move an item TAGORID given in ARGS.tmoveN(R*R,R@RkRe(R*Re((R R ‹scKs)|ii|idf|i||ƒƒS(sÏPrint the contents of the canvas to a postscript file. Valid options: colormap, colormode, file, fontmap, height, pageanchor, pageheight, pagewidth, pagex, pagey, rotate, witdh, x, y.t postscriptN(R*R,R@RkR’RRf(R*RRf((R R¡ŽscGs!|ii|idf|ƒdS(sJRaise an item TAGORID given in ARGS (optional above another item).R¸N(R*R,R@RkRe(R*Re((R t tag_raise•scGs!|ii|idf|ƒdS(s9Scale item TAGORID with XORIGIN, YORIGIN, XSCALE, YSCALE.tscaleN(R*R,R@RkRe(R*Re((R R£šscCs#|ii|idd||ƒdS(s&Remember the current X, Y coordinates.tscantmarkN(R*R,R@RkRR)(R*RR)((R t scan_mark�si cCs&|ii|idd|||ƒdS(s‚Adjust the view of the canvas to GAIN times the difference between X and Y and the coordinates given in scan_mark.R¤tdragtoN(R*R,R@RkRR)tgain(R*RR)R¨((R t scan_dragto scCs#|ii|idd||ƒdS(sLAdjust the end of the selection near the cursor of an item TAGORID to index.tselecttadjustN(R*R,R@RkRfR‘(R*RfR‘((R t select_adjust¥scCs|ii|iddƒdS(s,Clear the selection if it is in this widget.RªR�N(R*R,R@Rk(R*((R t select_clear¨scCs#|ii|idd||ƒdS(s:Set the fixed end of a selection in item TAGORID to INDEX.RªtfromN(R*R,R@RkRfR‘(R*RfR‘((R t select_from«scCs |ii|iddƒpdS(s(Return the item which has the selection.RªRN(R*R,R@RkR (R*((R t select_item®scCs#|ii|idd||ƒdS(s=Set the variable end of a selection in item TAGORID to INDEX.RªttoN(R*R,R@RkRfR‘(R*RfR‘((R t select_to±scCs |ii|id|ƒpdS(s$Return the type of the item TAGORID.RN(R*R,R@RkRfR (R*Rf((R R´scGsK|p#|i|ii|idƒƒSn|ii|idf|ƒdS(s1Query and change horizontal position of the view.txviewN(ReR*R?R,R@Rk(R*Re((R R³·s#cCs |ii|idd|ƒdS(ssAdjusts the view in the window so that FRACTION of the total width of the canvas is off-screen to the left.R³tmovetoN(R*R,R@Rktfraction(R*Rµ((R t xview_moveto¼scCs#|ii|idd||ƒdS(sTShift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).R³tscrollN(R*R,R@RkRÕR0(R*RÕR0((R t xview_scrollÀscGsK|p#|i|ii|idƒƒSn|ii|idf|ƒdS(s/Query and change vertical position of the view.tyviewN(ReR*R?R,R@Rk(R*Re((R R¹Ãs#cCs |ii|idd|ƒdS(ssAdjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top.R¹R´N(R*R,R@RkRµ(R*Rµ((R t yview_movetoÈscCs#|ii|idd||ƒdS(sTShift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).R¹R·N(R*R,R@RkRÕR0(R*RÕR0((R t yview_scrollÌs(FRRRR R3RcRgRhRjRnRtRvRxRŠRyRzR{R~R€R‚R„R…R†RˆRŠRŒRŽR�R‘R’R¤R“RGR”R•R–R—R˜R™RšRrR›RœR‘R[R�Ržt itemconfigRŸRŸR R¡R¢R°RºR£R¦R©R¬R­R¯R°R²RR³R¶R¸R¹RºR»(((R RaÇs„                                                          t CheckbuttoncBsJtZdZehd„Zd„Zd„Zd„Zd„Zd„Z RS(s7Checkbutton widget which is either in on- or off-state.cKsti||d||ƒdS(sConstruct a checkbutton widget with the parent MASTER. Valid resource names: activebackground, activeforeground, anchor, background, bd, bg, bitmap, borderwidth, command, cursor, disabledforeground, fg, font, foreground, height, highlightbackground, highlightcolor, highlightthickness, image, indicatoron, justify, offvalue, onvalue, padx, pady, relief, selectcolor, selectimage, state, takefocus, text, textvariable, underline, variable, width, wraplength.t checkbuttonN(RIR3R*R)RRf(R*R)RRf((R R3Òs cCs|ii|idƒdS(sPut the button in off-state.tdeselectN(R*R,R@Rk(R*((R R¿ÝscCs|ii|idƒdS(sFlash the button.RWN(R*R,R@Rk(R*((R RWàscCs|ii|idƒS(s<Toggle the button and invoke a command if given as resource.RXN(R*R,R@Rk(R*((R RXãscCs|ii|idƒdS(sPut the button in on-state.RªN(R*R,R@Rk(R*((R RªæscCs|ii|idƒdS(sToggle the button.ttoggleN(R*R,R@Rk(R*((R RÀés( RRRR R3R¿RWRXRªRÀ(((R R½Ðs     tEntrycBsÔtZdZehd„Zed„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z e Z d „ZeZd „ZeZd „ZeZd „ZeZd„ZeZd„Zd„Zd„ZRS(s1Entry widget which allows to display simple text.cKsti||d||ƒdS(sConstruct an entry widget with the parent MASTER. Valid resource names: background, bd, bg, borderwidth, cursor, exportselection, fg, font, foreground, highlightbackground, highlightcolor, highlightthickness, insertbackground, insertborderwidth, insertofftime, insertontime, insertwidth, invalidcommand, invcmd, justify, relief, selectbackground, selectborderwidth, selectforeground, show, state, takefocus, textvariable, validate, validatecommand, vcmd, width, xscrollcommand.tentryN(RIR3R*R)RRf(R*R)RRf((R R3ïs cCs |ii|id||ƒdS(s.Delete text from FIRST to LAST (not included).R¤N(R*R,R@Rktfirsttlast(R*RÃRÄ((R R¤ûscCs|ii|idƒS(sReturn the text.R:N(R*R,R@Rk(R*((R R:þscCs|ii|id|ƒdS(sInsert cursor at INDEX.RœN(R*R,R@RkR‘(R*R‘((R Rœ scCst|ii|id|ƒƒS(sReturn position of cursor.R‘N(RRR*R,R@RkR‘(R*R‘((R R‘ scCs |ii|id||ƒdS(sInsert STRING at INDEX.R[N(R*R,R@RkR‘R”(R*R‘R”((R R[ scCs |ii|idd|ƒdS(s&Remember the current X, Y coordinates.R¤R¥N(R*R,R@RkR(R*R((R R¦ scCs |ii|idd|ƒdS(s€Adjust the view of the canvas to 10 times the difference between X and Y and the coordinates given in scan_mark.R¤R§N(R*R,R@RkR(R*R((R R© scCs |ii|idd|ƒdS(s9Adjust the end of the selection near the cursor to INDEX.R¬R«N(R*R,R@RkR‘(R*R‘((R tselection_adjust scCs|ii|iddƒdS(s,Clear the selection if it is in this widget.R¬R�N(R*R,R@Rk(R*((R R­ scCs |ii|idd|ƒdS(s*Set the fixed end of a selection to INDEX.R¬R®N(R*R,R@RkR‘(R*R‘((R tselection_from scCs%|ii|ii|iddƒƒS(s,Return whether the widget has the selection.R¬tpresentN(R*R,RWR@Rk(R*((R tselection_present scCs#|ii|idd||ƒdS(s3Set the selection from START to END (not included).R¬R”N(R*R,R@RkRmRY(R*RmRY((R tselection_range$ scCs |ii|idd|ƒdS(s-Set the variable end of a selection to INDEX.R¬R±N(R*R,R@RkR‘(R*R‘((R t selection_to( scCs|ii|id|ƒdS(s1Query and change horizontal position of the view.R³N(R*R,R@RkR‘(R*R‘((R R³, scCs |ii|idd|ƒdS(sqAdjust the view in the window so that FRACTION of the total width of the entry is off-screen to the left.R³R´N(R*R,R@RkRµ(R*Rµ((R R¶/ scCs#|ii|idd||ƒdS(sTShift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).R³R·N(R*R,R@RkRÕR0(R*RÕR0((R R¸3 s(RRRR R3R¤R:RœR‘R[R¦R©RÅR¬R­R­RÆR¯RÈtselect_presentRÉt select_rangeRÊR²R³R¶R¸(((R RÁís0                tFramecBstZdZehd„ZRS(sFFrame widget which may contain other widgets and can have a 3D border.cKsŽt||fƒ}f}|idƒod|df}|d=n,|idƒod|df}|d=nti||d|h|ƒdS(sConstruct a frame widget with the parent MASTER. Valid resource names: background, bd, bg, borderwidth, class, colormap, container, cursor, height, highlightbackground, highlightcolor, highlightthickness, relief, takefocus, visual, width.RKs-classRÈRÊN( RRRfRGR‘RIR3R*R)(R*R)RRfRG((R R39 s  (RRRR R3(((R RÍ7 s tLabelcBstZdZehd„ZRS(s0Label widget which can display text and bitmaps.cKsti||d||ƒdS(sùConstruct a label widget with the parent MASTER. STANDARD OPTIONS activebackground, activeforeground, anchor, background, bitmap, borderwidth, cursor, disabledforeground, font, foreground, highlightbackground, highlightcolor, highlightthickness, image, justify, padx, pady, relief, takefocus, text, textvariable, underline, wraplength WIDGET-SPECIFIC OPTIONS height, state, width tlabelN(RIR3R*R)RRf(R*R)RRf((R R3K s(RRRR R3(((R RÎI s tListboxcBs"tZdZehd„Zd„Zd„Zd„Zed„Zed„Z d„Z d„Z d „Z d „Z d „Zd „Zd „ZeZed„ZeZd„ZeZed„ZeZd„Zd„Zd„Zd„Zd„Zd„Zd„Zd„Zed„Z e Z!RS(s3Listbox widget which can display a list of strings.cKsti||d||ƒdS(s–Construct a listbox widget with the parent MASTER. Valid resource names: background, bd, bg, borderwidth, cursor, exportselection, fg, font, foreground, height, highlightbackground, highlightcolor, highlightthickness, relief, selectbackground, selectborderwidth, selectforeground, selectmode, setgrid, takefocus, width, xscrollcommand, yscrollcommand, listvariable.tlistboxN(RIR3R*R)RRf(R*R)RRf((R R3a scCs|ii|id|ƒdS(s"Activate item identified by INDEX.tactivateN(R*R,R@RkR‘(R*R‘((R RÒj scGs-|i|ii|idf|ƒƒpdS(svReturn a tuple of X1,Y1,X2,Y2 coordinates for a rectangle which encloses the item identified by index in ARGS.RŠN(R*RìR,R@RkReR (R*Re((R RŠm scCs"|ii|ii|idƒƒS(s2Return list of indices of currently selected item.t curselectionN(R*R,RIR@Rk(R*((R RÓr scCs |ii|id||ƒdS(s/Delete items from FIRST to LAST (not included).R¤N(R*R,R@RkRÃRÄ(R*RÃRÄ((R R¤w scCsP|o,|ii|ii|id||ƒƒSn|ii|id|ƒSdS(s4Get list of items from FIRST to LAST (not included).R:N(RÄR*R,RIR@RkRÃ(R*RÃRÄ((R R:z s,cCs:|ii|id|ƒ}|djodSnt|ƒS(s+Return index of item identified with INDEX.R‘RuN(R*R,R@RkR‘RHR RR(R*R‘RH((R R‘� s  cGs$|ii|id|f|ƒdS(sInsert ELEMENTS at INDEX.R[N(R*R,R@RkR‘telements(R*R‘RÔ((R R[† scCst|ii|id|ƒƒS(s5Get index of item which is nearest to y coordinate Y.tnearestN(RRR*R,R@RkR)(R*R)((R RÕ‰ scCs#|ii|idd||ƒdS(s&Remember the current X, Y coordinates.R¤R¥N(R*R,R@RkRR)(R*RR)((R R¦� scCs#|ii|idd||ƒdS(s�Adjust the view of the listbox to 10 times the difference between X and Y and the coordinates given in scan_mark.R¤R§N(R*R,R@RkRR)(R*RR)((R R©� scCs|ii|id|ƒdS(s"Scroll such that INDEX is visible.tseeN(R*R,R@RkR‘(R*R‘((R RÖ• scCs |ii|idd|ƒdS(s-Set the fixed end oft the selection to INDEX.R¬tanchorN(R*R,R@RkR‘(R*R‘((R tselection_anchor˜ scCs#|ii|idd||ƒdS(s6Clear the selection from FIRST to LAST (not included).R¬R�N(R*R,R@RkRÃRÄ(R*RÃRÄ((R R­œ scCs(|ii|ii|idd|ƒƒS(s+Return 1 if INDEX is part of the selection.R¬tincludesN(R*R,RWR@RkR‘(R*R‘((R tselection_includes¡ scCs#|ii|idd||ƒdS(smSet the selection from FIRST to LAST (not included) without changing the currently selected elements.R¬R1N(R*R,R@RkRÃRÄ(R*RÃRÄ((R t selection_set¦ scCst|ii|idƒƒS(s-Return the number of elements in the listbox.R�N(RRR*R,R@Rk(R*((R R�« scGsK|p#|i|ii|idƒƒSn|ii|idf|ƒdS(s1Query and change horizontal position of the view.R³N(R0R*R?R,R@Rk(R*R0((R R³® s#cCs |ii|idd|ƒdS(sqAdjust the view in the window so that FRACTION of the total width of the entry is off-screen to the left.R³R´N(R*R,R@RkRµ(R*Rµ((R R¶³ scCs#|ii|idd||ƒdS(sTShift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).R³R·N(R*R,R@RkRÕR0(R*RÕR0((R R¸· scGsK|p#|i|ii|idƒƒSn|ii|idf|ƒdS(s/Query and change vertical position of the view.R¹N(R0R*R?R,R@Rk(R*R0((R R¹º s#cCs |ii|idd|ƒdS(spAdjust the view in the window so that FRACTION of the total width of the entry is off-screen to the top.R¹R´N(R*R,R@RkRµ(R*Rµ((R Rº¿ scCs#|ii|idd||ƒdS(sTShift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).R¹R·N(R*R,R@RkRÕR0(R*RÕR0((R R»à scCs'|ii|idf|d|fƒS(s4Return the resource value for an ITEM and an OPTION.R�RBN(R*R,R@RkR‘R¡(R*R‘R¡((R R�Æ scKs|id|f||ƒS(s9Configure resources of an ITEM. The values for resources are specified as keyword arguments. To get an overview about the allowed keyword arguments call the method without arguments. Valid resource names: background, bg, foreground, fg, selectbackground, selectforeground.RžN(R*RyR‘RRf(R*R‘RRf((R RžÊ s("RRRR R3RÒRŠRÓR¤R:R‘R[RÕR¦R©RÖRØt select_anchorR­R­RÚtselect_includesRÛt select_setR�R³R¶R¸R¹RºR»R�RžR¼(((R RÐ_ s>                         tMenucBs‚tZdZehd„Zd„Zd„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd d„Zd„Zhd„Zhd„Zhd„Zhd„Zhd„Zhd„Zhd„Zhd„Zhd„Zhd„Zhd„Zhd„Zed„Zd„Zed„Z e Z!d„Z"d „Z#d!„Z$d"„Z%d#„Z&d$„Z'RS(%sPMenu widget which allows to display menu bars, pull-down menus and pop-up menus.cKsti||d||ƒdS(sAConstruct menu widget with the parent MASTER. Valid resource names: activebackground, activeborderwidth, activeforeground, background, bd, bg, borderwidth, cursor, disabledforeground, fg, font, foreground, postcommand, relief, selectcolor, takefocus, tearoff, tearoffcommand, title, type.tmenuN(RIR3R*R)RRf(R*R)RRf((R R3× scCsdS(N((R*((R ttk_bindForTraversalß scCs|iid|iƒdS(Nt tk_mbPost(R*R,R@Rk(R*((R Râá scCs|iidƒdS(Nt tk_mbUnpost(R*R,R@(R*((R Rãã scCs|iid|i|ƒdS(Nttk_traverseToMenu(R*R,R@RkRg(R*Rg((R Räå scCs|iid|i|ƒdS(Nttk_traverseWithinMenu(R*R,R@RkRg(R*Rg((R Råç scCs|iid|iƒS(Nttk_getMenuButtons(R*R,R@Rk(R*((R Ræé scCs|iid|ƒdS(Nt tk_nextMenu(R*R,R@tcount(R*Rè((R Rçë scCs|iid|ƒdS(Nttk_nextMenuEntry(R*R,R@Rè(R*Rè((R Réí scCs|iid|iƒdS(Nt tk_invokeMenu(R*R,R@Rk(R*((R Rêï scCs|iid|iƒdS(Nt tk_firstMenu(R*R,R@Rk(R*((R Rëñ scCs|iid|iƒdS(Nttk_mbButtonDown(R*R,R@Rk(R*((R Rìó sR'cCs#|iid|i|||ƒdS(s/Post the menu at position X,Y with entry ENTRY.ttk_popupN(R*R,R@RkRR)RÂ(R*RR)RÂ((R Ríõ scCs|ii|id|ƒdS(sActivate entry at INDEX.RÒN(R*R,R@RkR‘(R*R‘((R RÒø scKs0|ii|id|f|i||ƒƒdS(sInternal function.R¢N(R*R,R@RkR�R’RRf(R*R�RRf((R R¢û scKs|id|p|ƒdS(sAdd hierarchical menu item.tcascadeN(R*R¢RRf(R*RRf((R t add_cascadeÿ scKs|id|p|ƒdS(sAdd checkbutton menu item.R¾N(R*R¢RRf(R*RRf((R tadd_checkbutton scKs|id|p|ƒdS(sAdd command menu item.R°N(R*R¢RRf(R*RRf((R t add_command scKs|id|p|ƒdS(sAddd radio menu item.t radiobuttonN(R*R¢RRf(R*RRf((R tadd_radiobutton scKs|id|p|ƒdS(sAdd separator.t separatorN(R*R¢RRf(R*RRf((R t add_separator scKs3|ii|id||f|i||ƒƒdS(sInternal function.R[N( R*R,R@RkR‘R�R’RRf(R*R‘R�RRf((R R[ scKs|i|d|p|ƒdS(s$Add hierarchical menu item at INDEX.RîN(R*R[R‘RRf(R*R‘RRf((R tinsert_cascade scKs|i|d|p|ƒdS(s#Add checkbutton menu item at INDEX.R¾N(R*R[R‘RRf(R*R‘RRf((R tinsert_checkbutton scKs|i|d|p|ƒdS(sAdd command menu item at INDEX.R°N(R*R[R‘RRf(R*R‘RRf((R tinsert_command scKs|i|d|p|ƒdS(sAddd radio menu item at INDEX.RòN(R*R[R‘RRf(R*R‘RRf((R tinsert_radiobutton scKs|i|d|p|ƒdS(sAdd separator at INDEX.RôN(R*R[R‘RRf(R*R‘RRf((R tinsert_separator scCs |ii|id||ƒdS(s;Delete menu items between INDEX1 and INDEX2 (not included).R¤N(R*R,R@Rktindex1tindex2(R*RûRü((R R¤! scCs |ii|id|d|ƒS(s>Return the resource value of an menu item for OPTION at INDEX.t entrycgetRBN(R*R,R@RkR‘R¡(R*R‘R¡((R Rý$ scKs|id|f||ƒS(sConfigure a menu item at INDEX.tentryconfigureN(R*RyR‘RRf(R*R‘RRf((R Rþ' scCs:|ii|id|ƒ}|djodSnt|ƒS(s4Return the index of a menu item identified by INDEX.R‘RuN(R*R,R@RkR‘RHR RR(R*R‘RH((R R‘+ s  cCs|ii|id|ƒS(sRInvoke a menu item identified by INDEX and execute the associated command.RXN(R*R,R@RkR‘(R*R‘((R RX0 scCs |ii|id||ƒdS(sDisplay a menu at position X,Y.tpostN(R*R,R@RkRR)(R*RR)((R Rÿ4 scCs|ii|id|ƒS(s*Return the type of the menu item at INDEX.RN(R*R,R@RkR‘(R*R‘((R R7 scCs|ii|idƒdS(s Unmap a menu.tunpostN(R*R,R@Rk(R*((R R: scCst|ii|id|ƒƒS(sEReturn the y-position of the topmost pixel of the menu item at INDEX.t ypositionN(RRR*R,R@RkR‘(R*R‘((R R= s((RRRR R3RáRâRãRäRåRæRçRéRêRëRìRíRÒR¢RïRðRñRóRõR[RöR÷RøRùRúR¤RýRþt entryconfigR‘RXRÿRRR(((R RßÕ sJ                                  t MenubuttoncBstZdZehd„ZRS(s(Menubutton widget, obsolete since Tk8.0.cKsti||d||ƒdS(Nt menubutton(RIR3R*R)RRf(R*R)RRf((R R3D s(RRRR R3(((R RB s tMessagecBstZdZehd„ZRS(sKMessage widget to display multiline text. Obsolete since Label does it too.cKsti||d||ƒdS(Ntmessage(RIR3R*R)RRf(R*R)RRf((R R3I s(RRRR R3(((R RG s t RadiobuttoncBsAtZdZehd„Zd„Zd„Zd„Zd„ZRS(sGRadiobutton widget which shows only one of several buttons in on-state.cKsti||d||ƒdS(söConstruct a radiobutton widget with the parent MASTER. Valid resource names: activebackground, activeforeground, anchor, background, bd, bg, bitmap, borderwidth, command, cursor, disabledforeground, fg, font, foreground, height, highlightbackground, highlightcolor, highlightthickness, image, indicatoron, justify, padx, pady, relief, selectcolor, selectimage, state, takefocus, text, textvariable, underline, value, variable, width, wraplength.RòN(RIR3R*R)RRf(R*R)RRf((R R3N s cCs|ii|idƒdS(sPut the button in off-state.R¿N(R*R,R@Rk(R*((R R¿Y scCs|ii|idƒdS(sFlash the button.RWN(R*R,R@Rk(R*((R RW] scCs|ii|idƒS(s<Toggle the button and invoke a command if given as resource.RXN(R*R,R@Rk(R*((R RX` scCs|ii|idƒdS(sPut the button in on-state.RªN(R*R,R@Rk(R*((R Rªc s( RRRR R3R¿RWRXRª(((R RL s    tScalecBsDtZdZehd„Zd„Zd„Zed„Zd„ZRS(s1Scale widget which can display a numerical scale.cKsti||d||ƒdS(s×Construct a scale widget with the parent MASTER. Valid resource names: activebackground, background, bigincrement, bd, bg, borderwidth, command, cursor, digits, fg, font, foreground, from, highlightbackground, highlightcolor, highlightthickness, label, length, orient, relief, repeatdelay, repeatinterval, resolution, showvalue, sliderlength, sliderrelief, state, takefocus, tickinterval, to, troughcolor, variable, width.R£N(RIR3R*R)RRf(R*R)RRf((R R3i scCsJ|ii|idƒ}yt|ƒSWntj ot|ƒSnXdS(s*Get the current value as integer or float.R:N(R*R,R@RkR8RRR`RT(R*R8((R R:s s cCs|ii|id|ƒdS(sSet the value to VALUE.R1N(R*R,R@RkR8(R*R8((R R1z scCs"|i|ii|id|ƒƒS(s•Return a tuple (X,Y) of the point along the centerline of the trough that corresponds to VALUE or the current value if None is given.R€N(R*RìR,R@RkR8(R*R8((R R€} scCs|ii|id||ƒS(scReturn where the point X,Y lies. Valid return values are "slider", "though1" and "though2".tidentifyN(R*R,R@RkRR)(R*RR)((R R ƒ s( RRRR R3R:R1R€R (((R Rg s    t ScrollbarcBsStZdZehd„Zd„Zd„Zd„Zd„Zd„Z d„Z RS(s?Scrollbar widget which displays a slider at a certain position.cKsti||d||ƒdS(slConstruct a scrollbar widget with the parent MASTER. Valid resource names: activebackground, activerelief, background, bd, bg, borderwidth, command, cursor, elementborderwidth, highlightbackground, highlightcolor, highlightthickness, jump, orient, relief, repeatdelay, repeatinterval, takefocus, troughcolor, width.t scrollbarN(RIR3R*R)RRf(R*R)RRf((R R3Š scCs|ii|id|ƒdS(sxDisplay the element at INDEX with activebackground and activerelief. INDEX can be "arrow1","slider" or "arrow2".RÒN(R*R,R@RkR‘(R*R‘((R RÒ” scCs"t|ii|id||ƒƒS(snReturn the fractional change of the scrollbar setting if it would be moved by DELTAX or DELTAY pixels.RnN(RTR*R,R@Rktdeltaxtdeltay(R*R R ((R Rn˜ scCs"t|ii|id||ƒƒS(sRReturn the fractional value which corresponds to a slider position of X,Y.RµN(RTR*R,R@RkRR)(R*RR)((R Rµ� scCs|ii|id||ƒS(sYReturn the element under position X,Y as one of "arrow1","slider","arrow2" or "".R N(R*R,R@RkRR)(R*RR)((R R ¡ scCs|i|ii|idƒƒS(sZReturn the current fractional values (upper and lower end) of the slider position.R:N(R*R?R,R@Rk(R*((R R:¥ scGs!|ii|idf|ƒdS(siSet the fractional values of the slider position (upper and lower ends as value between 0 and 1).R1N(R*R,R@RkRe(R*Re((R R1© s( RRRR R3RÒRnRµR R:R1(((R R ˆ s      tTextcBs{tZdZehd„Zd„Zd„Zd„Zd„Zd„Z d„Z ed„Z ed „Z d „Z eed „Zd „Zed „Zd„Zd„Zd„Zd„Zed„Zd„Zed„Zhd„Zd„Zd„Zd„Zed„Zd„Zd„Zd„Zd„Z d„Z!d„Z"d „Z#eeeeeeed!„Z$d"„Z%d#„Z&ed$„Z'ed%„Z(d&„Z)ed'„Z*e*Z+d(„Z,ed)„Z-ed*„Z.ed+„Z/ed,„Z0ed-„Z1d.„Z2ed/„Z3d0„Z4ed1„Z5e5Z6hd2„Z7d3„Z8d4„Z9d5„Z:d6„Z;d7„Z<d8„Z=d9„Z>d:„Z?RS(;s4Text widget which can display text in various forms.cKsti||d||ƒdS(s¼Construct a text widget with the parent MASTER. STANDARD OPTIONS background, borderwidth, cursor, exportselection, font, foreground, highlightbackground, highlightcolor, highlightthickness, insertbackground, insertborderwidth, insertofftime, insertontime, insertwidth, padx, pady, relief, selectbackground, selectborderwidth, selectforeground, setgrid, takefocus, xscrollcommand, yscrollcommand, WIDGET-SPECIFIC OPTIONS autoseparators, height, maxundo, spacing1, spacing2, spacing3, state, tabs, undo, width, wrap, R�N(RIR3R*R)RRf(R*R)RRf((R R3² scGs-|i|ii|idf|ƒƒpdS(s„Return a tuple of (x,y,width,height) which gives the bounding box of the visible part of the character at the index in ARGS.RŠN(R*RìR,R@RkReR (R*Re((R RŠÊ scCs|iid|i|ƒdS(Nttk_textSelectTo(R*R,R@RkR‘(R*R‘((R RÏ scCs|iid|iƒdS(Nttk_textBackspace(R*R,R@Rk(R*((R RÑ scCs#|iid|i|||ƒdS(Nttk_textIndexCloser(R*R,R@RkR\RVR(R*R\RVR((R RÓ scCs|iid|i|ƒdS(Nttk_textResetAnchor(R*R,R@RkR‘(R*R‘((R RÕ scCs+|ii|ii|id|||ƒƒS(s€Return whether between index INDEX1 and index INDEX2 the relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=.tcompareN(R*R,RWR@RkRûtopRü(R*RûRRü((R R× scCs%|ii|ii|id|ƒƒS(sjTurn on the internal consistency checks of the B-Tree inside the text widget according to BOOLEAN.tdebugN(R*R,RWR@RkRb(R*Rb((R RÜ scCs |ii|id||ƒdS(s?Delete the characters between INDEX1 and INDEX2 (not included).R¤N(R*R,R@RkRûRü(R*RûRü((R R¤á scCs"|i|ii|id|ƒƒS(s©Return tuple (x,y,width,height,baseline) giving the bounding box and baseline position of the visible part of the line containing the character at INDEX.t dlineinfoN(R*RìR,R@RkR‘(R*R‘((R Rä sc Ksg}d}d}|pg}|d„} | }nz®t|tƒp|i |ƒ}}n|d|g7}x.|D]&}||o|i d|ƒqvqvW|i |ƒ|o|i |ƒn|ii|id|Œ|SWd|o|i|ƒnXdS(sŽReturn the contents of the widget between index1 and index2. The type of contents returned in filtered based on the keyword parameters; if 'all', 'image', 'mark', 'tag', 'text', or 'window' are given and true, then the corresponding items are returned. The result is a list of triples of the form (key, value, index). If none of the keywords are true then 'all' is used by default. If the 'command' argument is given, it is called once for each element of the list of triples, with the values of each triple serving as the arguments to the function. In this case the list is not returned.cCs|i|||fƒdS(N(RÄRƒR|R8R‘(R|R8R‘RÄ((R t append_tripleþ ss-commandRBtdumpN(ReR t func_nameRÄR°RRLRNR*R=RfR|RƒRûRüR,R@RkRD( R*RûRüR°RfR|RReRÄR((R Ré s0     cGs-|i|ii|idf|ƒƒpfS(srInternal method This method controls the undo mechanism and the modified flag. The exact behavior of the command depends on the option argument that follows the edit argument. The following forms of the command are currently supported: edit_modified, edit_redo, edit_reset, edit_separator and edit_undo teditN(R*RìR,R@RkRe(R*Re((R R s cCs|id|ƒS(s;Get or Set the modified flag If arg is not specified, returns the modified flag of the widget. The insert, delete, edit undo and edit redo commands or the user can set or clear the modified flag. If boolean is specified, sets the modified flag of the widget to arg. tmodifiedN(R*Rtarg(R*R((R t edit_modified! scCs |idƒS(s Redo the last undone edit When the undo option is true, reapplies the last undone edits provided no other edits were done since then. Generates an error when the redo stack is empty. Does nothing when the undo option is false. tredoN(R*R(R*((R t edit_redo, scCs |idƒS(s(Clears the undo and redo stacks tresetN(R*R(R*((R t edit_reset6 scCs |idƒS(snInserts a separator (boundary) on the undo stack. Does nothing when the undo option is false RôN(R*R(R*((R tedit_separator; scCs |idƒS(sDUndoes the last edit action If the undo option is true. An edit action is defined as all the insert and delete commands that are recorded on the undo stack in between two separators. Generates an error when the undo stack is empty. Does nothing when the undo option is false tundoN(R*R(R*((R t edit_undoB scCs|ii|id||ƒS(s5Return the text from INDEX1 to INDEX2 (not included).R:N(R*R,R@RkRûRü(R*RûRü((R R:M scCs]|d djod|}n|ddjo|d }n|ii|idd||ƒS(s9Return the value of OPTION of an embedded image at INDEX.iRBiÿÿÿÿRAR©R{N(R¡R*R,R@RkR‘(R*R‘R¡((R t image_cgetQ s cKs|idd|f||ƒS(s%Configure an embedded image at INDEX.R©RzN(R*RyR‘RRf(R*R‘RRf((R timage_configureX scKs+|ii|idd||i||ƒŒS(s"Create an embedded image at INDEX.R©RN(R*R,R@RkR‘R’RRf(R*R‘RRf((R t image_create[ scCs|ii|iddƒS(s3Return all names of embedded images in this widget.R©RªN(R*R,R@Rk(R*((R R«` scCs|ii|id|ƒS(s1Return the index in the form line.char for INDEX.R‘N(R*R,R@RkR‘(R*R‘((R R‘c scGs'|ii|id||f|ƒdS(sŠInsert CHARS before the characters at INDEX. An additional tag can be given in ARGS. Additional CHARS and tags can follow in ARGS.R[N(R*R,R@RkR‘tcharsRe(R*R‘R(Re((R R[f scCs"|ii|idd||fƒS(s„Change the gravity of a mark MARKNAME to DIRECTION (LEFT or RIGHT). Return the current value if None is given for DIRECTION.R¥tgravityN(R*R,R@RktmarkNamet direction(R*R*R+((R t mark_gravityj scCs%|ii|ii|iddƒƒS(sReturn all mark names.R¥RªN(R*R,RIR@Rk(R*((R t mark_nameso scCs#|ii|idd||ƒdS(s0Set mark MARKNAME before the character at INDEX.R¥R1N(R*R,R@RkR*R‘(R*R*R‘((R tmark_sets scGs$|ii|iddf|ƒdS(sDelete all marks in MARKNAMES.R¥tunsetN(R*R,R@Rkt markNames(R*R0((R t mark_unsetv scCs#|ii|idd|ƒpdS(s-Return the name of the next mark after INDEX.R¥tnextN(R*R,R@RkR‘R (R*R‘((R t mark_nexty scCs#|ii|idd|ƒpdS(s2Return the name of the previous mark before INDEX.R¥tpreviousN(R*R,R@RkR‘R (R*R‘((R t mark_previous| scCs#|ii|idd||ƒdS(s&Remember the current X, Y coordinates.R¤R¥N(R*R,R@RkRR)(R*RR)((R R¦ scCs#|ii|idd||ƒdS(s~Adjust the view of the text to 10 times the difference between X and Y and the coordinates given in scan_mark.R¤R§N(R*R,R@RkRR)(R*RR)((R R©‚ sc Cs|idg} |o| idƒn|o| idƒn|o| idƒn|o| idƒn|o| idƒn| o| idƒ| i| ƒn|dd jo| id ƒn| i|ƒ| i|ƒ|o| i|ƒn|i it| ƒƒS( sƒSearch PATTERN beginning from INDEX until STOPINDEX. Return the index of the first character of a match or an empty string.tsearchs -forwardss -backwardss-exacts-regexps-nocases-countiRBs--N(R*RkRetforwardsRƒt backwardstexacttregexptnocaseRèR£R‘t stopindexR,R@R( R*R£R‘R<R7R8R9R:R;RèRe((R R6‡ s*  cCs|ii|id|ƒdS(s3Scroll such that the character at INDEX is visible.RÖN(R*R,R@RkR‘(R*R‘((R RÖ˜ scGs*|ii|idd||f|ƒdS(s|Add tag TAGNAME to all characters between INDEX1 and index2 in ARGS. Additional pairs of indices may follow in ARGS.ttagR¢N(R*R,R@RkttagNameRûRe(R*R>RûRe((R ttag_add› scCs>|ii|idd||dƒ|o|i|ƒndS(sgUnbind for all characters with TAGNAME for event SEQUENCE the function identified with FUNCID.R=R7R'N(R*R,R@RkR>R1R4RD(R*R>R1R4((R Ry  s"cCs%|i|idd|f|||ƒS(s+Bind to all characters with TAGNAME at event SEQUENCE a call to function FUNC. An additional boolean parameter ADD specifies whether FUNC will be called additionally to the other bound function or whether it will replace the previous function. See bind for the return value.R=R7N(R*R6RkR>R1R~R¢(R*R>R1R~R¢((R Rz¦ scCs]|d djod|}n|ddjo|d }n|ii|idd||ƒS(s+Return the value of OPTION for tag TAGNAME.iRBiÿÿÿÿRAR=R{N(R¡R*R,R@RkR>(R*R>R¡((R ttag_cget® s cKs|idd|f||ƒS(sConfigure a tag TAGNAME.R=RzN(R*RyR>RRf(R*R>RRf((R t tag_configureµ scGs$|ii|iddf|ƒdS(sDelete all tags in TAGNAMES.R=R¤N(R*R,R@RkttagNames(R*RB((R t tag_delete¹ scCs#|ii|idd||ƒdS(s`Change the priority of tag TAGNAME such that it is lower than the priority of BELOWTHIS.R=RŸN(R*R,R@RkR>R (R*R>R ((R RŸ¼ scCs(|ii|ii|idd|ƒƒS(sReturn a list of all tag names.R=RªN(R*R,RIR@RkR‘(R*R‘((R t tag_namesÀ scCs.|ii|ii|idd|||ƒƒS(s¹Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME. The text is searched forward from INDEX1.R=t nextrangeN(R*R,RIR@RkR>RûRü(R*R>RûRü((R t tag_nextrangeÄ scCs.|ii|ii|idd|||ƒƒS(s»Return a list of start and end index for the first sequence of characters between INDEX1 and INDEX2 which all have tag TAGNAME. The text is searched backwards from INDEX1.R=t prevrangeN(R*R,RIR@RkR>RûRü(R*R>RûRü((R t tag_prevrangeÊ scCs#|ii|idd||ƒdS(saChange the priority of tag TAGNAME such that it is higher than the priority of ABOVETHIS.R=R¸N(R*R,R@RkR>R¹(R*R>R¹((R R¢Ð scCs(|ii|ii|idd|ƒƒS(s7Return a list of ranges of text which have tag TAGNAME.R=trangesN(R*R,RIR@RkR>(R*R>((R t tag_rangesÕ scCs&|ii|idd|||ƒdS(sARemove tag TAGNAME from all characters between INDEX1 and INDEX2.R=R_N(R*R,R@RkR>RûRü(R*R>RûRü((R t tag_removeÙ scCs]|d djod|}n|ddjo|d }n|ii|idd||ƒS(s:Return the value of OPTION of an embedded window at INDEX.iRBiÿÿÿÿRARjR{N(R¡R*R,R@RkR‘(R*R‘R¡((R t window_cgetÝ s cKs|idd|f||ƒS(s&Configure an embedded window at INDEX.RjRzN(R*RyR‘RRf(R*R‘RRf((R twindow_configureä scKs3|ii|idd|f|i||ƒƒdS(sCreate a window at INDEX.RjRN(R*R,R@RkR‘R’RRf(R*R‘RRf((R t window_createè scCs%|ii|ii|iddƒƒS(s4Return all names of embedded windows in this widget.RjRªN(R*R,RIR@Rk(R*((R t window_namesí scGsK|p#|i|ii|idƒƒSn|ii|idf|ƒdS(s1Query and change horizontal position of the view.R³N(R0R*R?R,R@Rk(R*R0((R R³ñ s#cCs |ii|idd|ƒdS(ssAdjusts the view in the window so that FRACTION of the total width of the canvas is off-screen to the left.R³R´N(R*R,R@RkRµ(R*Rµ((R R¶ö scCs#|ii|idd||ƒdS(s\Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).R³R·N(R*R,R@RkRÕR0(R*RÕR0((R R¸ú scGsK|p#|i|ii|idƒƒSn|ii|idf|ƒdS(s/Query and change vertical position of the view.R¹N(R0R*R?R,R@Rk(R*R0((R R¹þ s#cCs |ii|idd|ƒdS(ssAdjusts the view in the window so that FRACTION of the total height of the canvas is off-screen to the top.R¹R´N(R*R,R@RkRµ(R*Rµ((R Rº scCs#|ii|idd||ƒdS(s\Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).R¹R·N(R*R,R@RkRÕR0(R*RÕR0((R R» scGs$|ii|iddf|ƒdS(sObsolete function, use see.R¹s -pickplaceN(R*R,R@RkR0(R*R0((R tyview_pickplace s(@RRRR R3RŠRRRRRRR¤RRRRRR!R"R$R:R%R&R'R«R‘R[R,R-R.R1R3R5R¦R©R6RÖR?RyRzR@RAt tag_configRCRŸRDRFRHR¢RJRKRLRMt window_configRNROR³R¶R¸R¹RºR»RP(((R R° sz          (                                          t_setitcBs#tZdZed„Zd„ZRS(s>Internal class. It wraps the command in the widget OptionMenu.cCs||_||_||_dS(N(R8R*t _setit__valuetvart _setit__varR>t_setit__callback(R*RUR8R>((R R3 s  cGs8|ii|iƒ|io|i|i|ŒndS(N(R*RVR1RTRWRe(R*Re((R RM s (RRRR R3RM(((R RS s  t OptionMenucBs)tZdZd„Zd„Zd„ZRS(s?OptionMenu which allows the user to select a value from a menu.c Os5hdd<d|<dd<dt<dd<d d<} ti||d | ƒd |_t|d d ddƒ}|_ |i |_ |idƒ}|idƒo |d=n|otd|iƒd‚n|id|dt|||ƒƒx0|D](}|id|dt|||ƒƒqûW||d R‘R€RRñR8RSRR( R*R)R<R8RRcRàRR>Rf((R R3 s$<     cCs(|djo |iSnti||ƒS(NRà(R]R*RaRIR´(R*R]((R R´6 s  cCsti|ƒd|_dS(s,Destroy this widget and the associated menu.N(RR^R*R Ra(R*((R R^; s (RRRR3R´R^(((R RX s   tImagecBsttZdZdZehed„Zd„Zd„Zd„Zd„Z d„Z e Z d„Z d „Z d „ZRS( sBase class for images.ic Ks@d|_|pt}|p td‚q.n|i|_|pFtid7_dtif}|ddjod|d}q‡n|o|ot ||fƒ}n|o |}nf}xN|i ƒD]@\}}t|ƒo|i|ƒ}n|d||f}qÏW|iidd||f|ƒ||_dS( NsToo early to create imageis pyimage%riRBRAR©R(R R*R]R)RRR,Rdt_last_idRfRRR�RRRRCR=R@timgtype( R*RfR]RR)RfR�RR((R R3C s.      cCs|iS(N(R*R](R*((R R6Y scCsE|io7y|iidd|iƒWqAtj oqAXndS(NR©R¤(R*R]R,R@R€(R*((R R5Z s  cCs$|ii|idd||ƒdS(NRzRB(R*R,R@R]R|R8(R*R|R8((R R}a scCs|ii|idd|ƒS(NRzRB(R*R,R@R]R|(R*R|((R R´c scKs®f}x„t|ƒiƒD]p\}}|dj oW|ddjo|d }nt|ƒo|i |ƒ}n|d||f}qqW|i i |i df|ƒdS(sConfigure the image.iÿÿÿÿRARBR³N( RRRfRRRR RCR*R=R,R@R](R*RfRRR((R Rze s   cCst|iidd|iƒƒS(sReturn the height of the image.R©RÙN(RRR*R,R@R](R*((R RÙp scCs|iidd|iƒS(s8Return the type of the imgage, e.g. "photo" or "bitmap".R©RN(R*R,R@R](R*((R Rt scCst|iidd|iƒƒS(sReturn the width of the image.R©R&N(RRR*R,R@R](R*((R R&w s(RRRReR R3R6R5R}R´RzR³RÙRR&(((R Rd@ s        t PhotoImagecBs€tZdZehed„Zd„Zd„Zd„Zd„Zdd„Z dd„Z d „Z ed „Z eed „Z RS( s?Widget which can display colored images in GIF, PPM/PGM format.cKs ti|d||||�dS(stCreate an image with NAME. Valid resource names: data, format, file, gamma, height, palette, width.tphotoN(RdR3R*R]RR)Rf(R*R]RR)Rf((R R3~ scCs|ii|idƒdS(sDisplay a transparent image.tblankN(R*R,R@R](R*((R Ri„ scCs|ii|idd|ƒS(sReturn the value of OPTION.R{RBN(R*R,R@R]R¡(R*R¡((R R{‡ scCs|ii|idd|ƒS(NR{RB(R*R,R@R]R|(R*R|((R R´‹ scCs&tƒ}|ii|d|iƒ|S(s;Return a new PhotoImage with the same image as this widget.tcopyN(Rgt destImageR*R,R@R](R*Rk((R RjŽ s R'cCsFtƒ}|djo |}n|ii|d|id||ƒ|S(s\Return a new PhotoImage with the same image as this widget but zoom it with X and Y.R'Rjs-zoomN(RgRkR)RR*R,R@R](R*RR)Rk((R tzoom“ s   "cCsFtƒ}|djo |}n|ii|d|id||ƒ|S(skReturn a new PhotoImage based on the same image as this widget but use only every Xth or Yth pixel.R'Rjs -subsampleN(RgRkR)RR*R,R@R](R*RR)Rk((R t subsampleš s   "cCs|ii|id||ƒS(s8Return the color (red, green, blue) of the pixel at X,Y.R:N(R*R,R@R]RR)(R*RR)((R R:¡ scCsd|id|f}|o7|ddjo|d}n|dt|ƒ}n|ii|ƒdS(syPut row formated colors to image starting from position TO, e.g. image.put("{red green} {blue yellow}", to=(4,6))tputis-toiN(s-to(R*R]R‰ReR±RR,R@(R*R‰R±Re((R Rn¤ scCs`|id|f}|o|d|f}n|o|dt|ƒ}n|ii|ƒdS(sRWrite image to file FILENAME in FORMAT starting from position FROM_COORDS.R*s-formats-fromN(s-from( R*R]tfilenameRetformatt from_coordsRR,R@(R*RoRpRqRe((R R*® s(RRRR R3RiR{R´RjRlRmR:RnR*(((R Rg| s         t BitmapImagecBs tZdZehed„ZRS(s"Widget which can display a bitmap.cKs ti|d||||�dS(sqCreate a bitmap with NAME. Valid resource names: background, data, file, foreground, maskdata, maskfile.R×N(RdR3R*R]RR)Rf(R*R]RR)Rf((R R3º s(RRRR R3(((R Rr¸ s cCstiiddƒS(NR©Rª(RR,R@(((R R«À scCstiiddƒS(NR©R¬(RR,R@(((R R­Á stSpinboxcBsªtZdZehd„Zd„Zed„Zd„Zd„Zd„Z d„Z d„Z d „Z d „Z d „Zd „Zd „Zd„Zd„Zed„ZRS(sspinbox widget.cKsti||d||ƒdS(s¤Construct a spinbox widget with the parent MASTER. STANDARD OPTIONS activebackground, background, borderwidth, cursor, exportselection, font, foreground, highlightbackground, highlightcolor, highlightthickness, insertbackground, insertborderwidth, insertofftime, insertontime, insertwidth, justify, relief, repeatdelay, repeatinterval, selectbackground, selectborderwidth selectforeground, takefocus, textvariable xscrollcommand. WIDGET-SPECIFIC OPTIONS buttonbackground, buttoncursor, buttondownrelief, buttonuprelief, command, disabledbackground, disabledforeground, format, from, invalidcommand, increment, readonlybackground, state, to, validate, validatecommand values, width, wrap, tspinboxN(RIR3R*R)RRf(R*R)RRf((R R3Æ scCs|ii|id|ƒS(søReturn a tuple of X1,Y1,X2,Y2 coordinates for a rectangle which encloses the character given by index. The first two elements of the list give the x and y coordinates of the upper-left corner of the screen area covered by the character (in pixels relative to the widget) and the last two elements give the width and height of the character, in pixels. The bounding box may refer to a region outside the visible area of the window. RŠN(R*R,R@RkR‘(R*R‘((R RŠã s cCs|ii|id||ƒS(sWDelete one or more elements of the spinbox. First is the index of the first character to delete, and last is the index of the character just after the last one to delete. If last isn't specified it defaults to first+1, i.e. a single character is deleted. This command returns an empty string. R¤N(R*R,R@RkRÃRÄ(R*RÃRÄ((R R¤ñ scCs|ii|idƒS(sReturns the spinbox's stringR:N(R*R,R@Rk(R*((R R:ü scCs|ii|id|ƒS(s®Alter the position of the insertion cursor. The insertion cursor will be displayed just before the character given by index. Returns an empty string RœN(R*R,R@RkR‘(R*R‘((R Rœ scCs|ii|id||ƒS(s{Returns the name of the widget at position x, y Return value is one of: none, buttondown, buttonup, entry R N(R*R,R@RkRR)(R*RR)((R R  scCs|ii|id|ƒS(s;Returns the numerical index corresponding to index R‘N(R*R,R@RkR‘(R*R‘((R R‘ scCs|ii|id||ƒS(sDInsert string s at index Returns an empty string. R[N(R*R,R@RkR‘RZ(R*R‘RZ((R R[ scCs|ii|id|ƒS(sšCauses the specified element to be invoked The element could be buttondown or buttonup triggering the action associated with it. RXN(R*R,R@Rktelement(R*Ru((R RX scGs-|i|ii|idf|ƒƒpfS(sInternal function.R¤N(R*RìR,R@RkRe(R*Re((R R¤# scCs|id|ƒS(söRecords x and the current view in the spinbox window; used in conjunction with later scan dragto commands. Typically this command is associated with a mouse button press in the widget. It returns an empty string. R¥N(R*R¤R(R*R((R R¦( scCs|id|ƒS(s´Compute the difference between the given x argument and the x argument to the last scan mark command It then adjusts the view left or right by 10 times the difference in x-coordinates. This command is typically associated with mouse motion events in the widget, to produce the effect of dragging the spinbox at high speed through the window. The return value is an empty string. R§N(R*R¤R(R*R((R R©1 s cGs-|i|ii|idf|ƒƒpfS(sInternal function.R¬N(R*RìR,R@RkRe(R*Re((R R¬= scCs|id|ƒS(sLocate the end of the selection nearest to the character given by index, Then adjust that end of the selection to be at index (i.e including but not going beyond index). The other end of the selection is made the anchor point for future select to commands. If the selection isn't currently in the spinbox, then a new selection is created to include the characters between index and the most recent selection anchor point, inclusive. Returns an empty string. R«N(R*R¬R‘(R*R‘((R RÅB s cCs |idƒS(sŒClear the selection If the selection isn't in this widget then the command has no effect. Returns an empty string. R�N(R*R¬(R*((R R­P scCs|id|ƒS(s‹Sets or gets the currently selected element. If a spinbutton element is specified, it will be displayed depressed RuN(R*R¬Ru(R*Ru((R tselection_elementX s(RRRR R3RŠR¤R:RœR R‘R[RXR¤R¦R©R¬RÅR­Rv(((R RsÄ s"            t LabelFramecBstZdZehd„ZRS(slabelframe widget.cKsti||d||ƒdS(s«Construct a labelframe widget with the parent MASTER. STANDARD OPTIONS borderwidth, cursor, font, foreground, highlightbackground, highlightcolor, highlightthickness, padx, pady, relief, takefocus, text WIDGET-SPECIFIC OPTIONS background, class, colormap, container, height, labelanchor, labelwidget, visual, width t labelframeN(RIR3R*R)RRf(R*R)RRf((R R3d s(RRRR R3(((R Rwb s t PanedWindowcBsªtZdZehd„Zd„Zd„ZeZd„Zd„Z d„Z d„Z d„Z d „Z d „Zd „Zd „Zd „Zed„ZeZd„ZRS(spanedwindow widget.cKsti||d||ƒdS(sTConstruct a panedwindow widget with the parent MASTER. STANDARD OPTIONS background, borderwidth, cursor, height, orient, relief, width WIDGET-SPECIFIC OPTIONS handlepad, handlesize, opaqueresize, sashcursor, sashpad, sashrelief, sashwidth, showhandle, t panedwindowN(RIR3R*R)RRf(R*R)RRf((R R3z s cKs-|ii|id|f|i|ƒƒdS(s!Add a child widget to the panedwindow in a new pane. The child argument is the name of the child widget followed by pairs of arguments that specify how to manage the windows. Options may have any of the values accepted by the configure subcommand. R¢N(R*R,R@RkRÅR’Rf(R*RÅRf((R R¢Š scCs|ii|id|ƒdS(s„Remove the pane containing child from the panedwindow All geometry management options for child will be forgotten. R5N(R*R,R@RkRÅ(R*RÅ((R R_” scCs|ii|id||ƒS(s—Identify the panedwindow component at point x, y If the point is over a sash or a sash handle, the result is a two element list containing the index of the sash or handle, and a word indicating whether it is over a sash or a handle, such as {0 sash} or {2 handle}. If the point is over any other part of the panedwindow, the result is an empty list. R N(R*R,R@RkRR)(R*RR)((R R œ s cGs-|i|ii|idf|ƒƒpfS(sInternal function.tproxyN(R*RìR,R@RkRe(R*Re((R R{¨ scCs |idƒS(sBReturn the x and y pair of the most recent proxy location tcoordN(R*R{(R*((R t proxy_coord­ scCs |idƒS(s+Remove the proxy from the display. R5N(R*R{(R*((R t proxy_forget² scCs|id||ƒS(s:Place the proxy at the given x and y coordinates. R‡N(R*R{RR)(R*RR)((R t proxy_place· scGs-|i|ii|idf|ƒƒpfS(sInternal function.tsashN(R*RìR,R@RkRe(R*Re((R R€¼ scCs|id|ƒS(sAReturn the current x and y pair for the sash given by index. Index must be an integer between 0 and 1 less than the number of panes in the panedwindow. The coordinates given are those of the top left corner of the region containing the sash. pathName sash dragto index x y This command computes the difference between the given coordinates and the coordinates given to the last sash coord command for the given sash. It then moves that sash the computed difference. The return value is the empty string. R|N(R*R€R‘(R*R‘((R t sash_coordÁ s cCs|id|ƒS(sRecords x and y for the sash given by index; Used in conjunction with later dragto commands to move the sash. R¥N(R*R€R‘(R*R‘((R t sash_markÏ scCs|id|||ƒS(s?Place the sash given by index at the given coordinates R‡N(R*R€R‘RR)(R*R‘RR)((R t sash_placeÖ scCs'|ii|idf|d|fƒS(swQuery a management option for window. Option may be any value allowed by the paneconfigure subcommand tpanecgetRBN(R*R,R@RkRÅR¡(R*RÅR¡((R R„Û scKs|djom| oeh}xT|ii|ii|id|ƒƒD]+}|ddf|d||dds s<1>s( RIR3R*R)RRfR7RQRSRTRU(R*R)RRf((R R3>s (RRR R3(((R Rˆ=st TributtoncBstZdhd„ZRS(NcKs…ti||d||ƒ|id|iƒ|id|iƒ|id|i ƒ|id|i ƒ|d|d<|d|ds s<1>stbgtfgtactivebackground( RIR3R*R)RRfR7RQRSRTRU(R*R)RRf((R R3Fs(RRR R3(((R RŠEscCsïtƒ}dt}tdjo1y|tddƒ}WqQtj oqQXnt|d|ƒ}|iƒt |ddd|d„ƒ}|iƒ||_ t |dd d|i ƒ}|iƒ|i ƒ|iƒ|iƒ|iƒdS( NsThis is Tcl/Tk version %sf8.0999999999999996s This should be a cedilla: çs iso-8859-1R�s Click me!R°cCs|iidd|idƒS(NR�s[%s](RvttestRz(Rv((R R~^stQUIT(RûRvt TclVersionR�tunicodet NameErrorRÎRÏR�ROR�R^R>RÙRRÅRX(R>R�RÏR�Rv((R t_testRs(             t__main__(YRt __version__RotplatformtFixTkRttkinterR€R¬t TkconstantstMacOSRt ImportErrorR RR¯RRRR‘tREADABLEtWRITABLEt EXCEPTIONtcreatefilehandlerRtdeletefilehandlerRRRRRRR!R%R/R&RKRORSRURXRQRRRTRWR[RKRµRûR2R3R8R=RBRIRJRORZR]R^R_R`RaR½RÁRÍRÎRÐRßRRRRR RRSRXRdRgRrR«R­RsRwRyRˆRŠR”R(HR›R˜RŠRXR”RSRŸRÎRžRRwRûRORKRBR­R^R]R€RWRZR‘RRJRRdRµR�RR½R=RßR&RSR–R«RORaRRURyRgRR!RIRRoRTR RRˆRÁR3RXR_RsR™RrRÐRÍRR[RKRRRR2RR`RR8R%R((R t?sÐ              ,  8   ÿÿÿÿÁ~,546>     ÿ Jvm!(ÿa %<<  žÅ