Dc@sdZdZddkZeidjoddkZnddkZeZeiZddkTddk Tyddk Z e Z [ Wne j o e Z nXdZeeiZeeiZeiZeiZeiZy eiWnej oe e_nXy eiWnej oe e_nXdZy eiZWnej onXdZy eiZWnej onXd fd YZdae ad Zd Z d dZ!da"dfdYZ#de#fdYZ$de#fdYZ%de#fdYZ&de#fdYZ'ddZ(e)Z*eZ+dZ,dfdYZ-dfdYZ.d fd!YZ/d"e-e/fd#YZ0e e d"dd$Z1d%fd&YZ2d'fd(YZ3d)fd*YZ4d+e-fd,YZ5d-e5e2e3e4fd.YZ6d/e5e/fd0YZ7d1e6fd2YZ8d3Z9d4Z:d5Z;d6Z<e d7Z=d8e6fd9YZ>d:e6fd;YZ?d<e6fd=YZ@d>e6fd?YZAd@e6fdAYZBdBe6fdCYZCdDe6fdEYZDdFe6fdGYZEdHe6fdIYZFdJe6fdKYZGdLe6fdMYZHdNe6fdOYZIdPe6fdQYZJdRfdSYZKdTeEfdUYZLdVfdWYZMdXeMfdYYZNdZeMfd[YZOd\ZPd]ZQd^e6fd_YZRd`e6fdaYZSdbe6fdcYZTdde8fdeYZUdfe8fdgYZVdhZWeXdijo eWndS(js2Wrapper 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: 50704 $iNtwin32(t*icCsfd}xY|D]Q}t|ttfjo|t|}q |dj o||f}q q W|S(sInternal function.(N(ttypet TupleTypetListTypet_flattentNone(ttupletrestitem((s Tkinter.pycR@s cCst|tjo|Snt|ttfjo|Snh}xst|D]e}y|i|WqOttfj o9}dG|GHx)|iD]\}}|||tvdeleteN(R,R1R-R*t deletecommand(R3RARC((s Tkinter.pyct trace_vdeletescCs4t|ii|ii|iidd|iS(s&Return all trace callback information.R>tvinfo(tmapR,tsplitt splitlistR1R-(R3((s Tkinter.pyct trace_vinfoscCs)|ii|iijo|i|ijS(sComparison for equality (==). Note: if the Variable's master matters to behavior also compare self._master == other._master (t __class__RR-(R3tother((s Tkinter.pyct__eq__sN(RRRR2RR7R9R:R0R=RDR>RGRLRO(((s Tkinter.pycR%s       t StringVarcBs/eZdZdZddddZdZRS(s#Value holder for strings variables.R&cCsti||||dS(s6Construct a string variable. MASTER can be given as master widget. VALUE is an optional value (defaults to "") NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. N(R%R7(R3R4R5R6((s Tkinter.pycR7s cCs7|ii|i}t|to|Snt|S(s#Return value of variable as string.(R,R<R-t isinstancet basestringtstr(R3R5((s Tkinter.pycR=sN(RRRR2RR7R=(((s Tkinter.pycRPs tIntVarcBs8eZdZdZddddZdZdZRS(s#Value holder for integer variables.icCsti||||dS(s7Construct an integer variable. MASTER can be given as master widget. VALUE is an optional value (defaults to 0) NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. N(R%R7(R3R4R5R6((s Tkinter.pycR7 s cCs0t|tot|}nti||S(s;Set the variable to value, converting booleans to integers.(RQtbooltintR%R0(R3R5((s Tkinter.pycR0scCst|ii|iS(s/Return the value of the variable as an integer.(tgetintR,R<R-(R3((s Tkinter.pycR=sN(RRRR2RR7R0R=(((s Tkinter.pycRTs  t DoubleVarcBs/eZdZdZddddZdZRS(s!Value holder for float variables.gcCsti||||dS(s6Construct a float variable. MASTER can be given as master widget. VALUE is an optional value (defaults to 0.0) NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. N(R%R7(R3R4R5R6((s Tkinter.pycR7#s cCst|ii|iS(s,Return the value of the variable as a float.(t getdoubleR,R<R-(R3((s Tkinter.pycR=/sN(RRRR2RR7R=(((s Tkinter.pycRX s t BooleanVarcBs/eZdZeZddddZdZRS(s#Value holder for boolean variables.cCsti||||dS(s:Construct a boolean variable. MASTER can be given as master widget. VALUE is an optional value (defaults to False) NAME is an optional Tcl name (defaults to PY_VARnum). If NAME matches an existing variable and VALUE is omitted then the existing value is retained. N(R%R7(R3R4R5R6((s Tkinter.pycR76s cCs|ii|ii|iS(s+Return the value of the variable as a bool.(R,t getbooleanR<R-(R3((s Tkinter.pycR=BsN(RRRtFalseR2RR7R=(((s Tkinter.pycRZ3s cCstii|dS(sRun the main loop of Tcl.N(RR+tmainloop(tn((s Tkinter.pycR]FscCstii|S(s1Convert true and false to integer values 1 and 0.(RR+R[(ts((s Tkinter.pycR[NstMisccBseZdZdZdZdZddZdZdZ dZ ddZ e Z dd Z dd Zdd d Zdd ZeZeZdZdZeZdZdZdZdZdZdZdZddZdZ dZ!ddZ"dZ#dZ$dZ%dZ&d Z'd!Z(d"Z)d#Z*dd$Z+dd%Z,d&Z-d'Z.dd(Z/d)Z0d*Z1d+Z2d,Z3d-Z4d.Z5dd/Z+dd0Z6e6Z7dd1Z8dd2Z9dd3Z:d4Z;d5Z<d6Z=d7Z>dd8Z?d9Z@d:ZAd;ZBd<ZCd=ZDd>ZEdd?ZFd@ZGdAZHdBZIdCZJddDZKdEZLdFZMdGZNdHZOdIZPdJZQdKZRdLZSdMZTdNZUdOZVdPZWdQZXdRZYdSZZdTZ[dUZ\dVZ]dWZ^dXZ_dYZ`dZZadd[Zbd\Zcd]Zdd^Zed_Zfd`ZgdaZhdbZidcZjddZkdeZldfZmddgZndhdiZoddddjZpddkZqddddlZrdmZsddddnZtdoZuddpZvdqZwdrZxdsZydtZzduZ{ddvZ|dwZ}e}Z~ddhdxZeZdyZdZdieZdZdZdZddZeZdZeZdZdZdZdgZedZeZdZeZdZdddddZeZdZhdZeZdZedZhdZeZdZeZdddZdZdZdZddZdZdZRS(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(t _tclCommandsRR+RF(R3R6((s Tkinter.pyctdestroyZs  cCs>|ii|y|ii|Wntj onXdS(sDInternal function. Delete the Tcl command provided in NAME.N(R+RFRatremovet ValueError(R3R6((s Tkinter.pycRFds cCs"|ii|iidd|S(sSet 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.R0ttk_strictMotif(R+R[R1(R3tboolean((s Tkinter.pycRenscCs|iiddS(sDChange the color scheme to light brown as used in Tk 3.6 and before.t tk_bisqueN(R+R1(R3((s Tkinter.pycRgwscOs.|iidt|t|idS(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+R1RR(R3targstkw((s Tkinter.pycRhzs cGsdS(s)Do not use. Needed in Tk 3.6 and earlier.N((R3Ri((s Tkinter.pyct tk_menuBarsR'cCs|iidd|dS(sWait until the variable is modified. A parameter of type IntVar, StringVar, DoubleVar or BooleanVar must be given.ttkwaitR?N(R+R1(R3R6((s Tkinter.pyct wait_variablescCs4|djo |}n|iidd|idS(sQWait until a WIDGET is destroyed. If no parameter is given self is used.RltwindowN(RR+R1t_w(R3Rn((s Tkinter.pyct wait_windows  cCs4|djo |}n|iidd|idS(sxWait until the visibility of a WIDGET changes (e.g. it appears). If no parameter is given self is used.Rlt visibilityN(RR+R1Ro(R3Rn((s Tkinter.pyctwait_visibilitys  t1cCs|ii||dS(sSet Tcl variable NAME to VALUE.N(R+tsetvar(R3R6R5((s Tkinter.pycRtscCs|ii|S(s"Return value of Tcl variable NAME.(R+tgetvar(R3R6((s Tkinter.pycRuscCs|ii|S(sPReturn a boolean value for Tcl boolean values true and false given as parameter.(R+R[(R3R_((s Tkinter.pycR[scCs|iid|idS(sDirect 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+R1Ro(R3((s Tkinter.pyct focus_setscCs|iidd|idS(stDirect input focus to this widget even if the application does not have the focus. Use with caution!Rvs-forceN(R+R1Ro(R3((s Tkinter.pyct focus_forcescCs<|iid}|djp| odSn|i|S(sReturn 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.RvtnoneN(R+R1Rt _nametowidget(R3R6((s Tkinter.pyct focus_getscCsE|iidd|i}|djp| odSn|i|S(sReturn 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.Rvs -displayofRyN(R+R1RoRRz(R3R6((s Tkinter.pyctfocus_displayofscCsE|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.Rvs-lastforRyN(R+R1RoRRz(R3R6((s Tkinter.pyct focus_lastforscCs|iiddS(sXThe widget under mouse will get automatically focus. Can not be disabled easily.ttk_focusFollowsMouseN(R+R1(R3((s Tkinter.pycR~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+R1RoRRz(R3R6((s Tkinter.pycRs cCs4|iid|i}|pdSn|i|S(sHReturn previous widget in the focus order. See tk_focusNext for details.t tk_focusPrevN(R+R1RoRRz(R3R6((s Tkinter.pycRscs_piid|n>fd}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.tafterc s=zWdyiWntj onXXdS(N(RFtTclError((R3RiR6tfunc(s Tkinter.pyctcallits N(R+R1R@(R3tmsRRiR((R3RiRR6s Tkinter.pycRs cGs|id||S(sCall FUNC once if the Tcl main loop has no event to process. Return an identifier to cancel the scheduling with after_cancel.tidle(R(R3RRi((s Tkinter.pyct after_idlescCsoy?|iidd|}|ii|d}|i|Wntj onX|iidd|dS(sCancel scheduling of function identified with ID. Identifier returned by after or after_idle must be given as first parameter.RR(itcancelN(R+R1RKRFR(R3tidtdatatscript((s Tkinter.pyct after_cancelsicCs!|iid|i|dS(sRing a display's bell.tbellN(sbell(R+R1t _displayof(R3t displayof((s Tkinter.pycRscKs|iid|i|S(sRetrieve data from the clipboard on window's display. The window keyword defaults to the root window of the Tkinter application. The type keyword specifies the form in which the data is to be returned and should be an atom name such as STRING or FILE_NAME. Type defaults to STRING. This command is equivalent to: selection_get(CLIPBOARD) t clipboardR=(s clipboardsget(R+R1t_options(R3Rj((s Tkinter.pyct clipboard_getscKsB|idp|i|dscCs |iiddd|idS(sSet global grab for this widget. A global grab directs all events to this and descendant widgets on the display. Use with caution - other applications do not get events anymore.RR0s-globalN(R+R1Ro(R3((s Tkinter.pyctgrab_set_globalDscCs6|iidd|i}|djo d}n|S(sYReturn None, "local" or "global" if this widget has no, a local or a global grab.RtstatusRyN(R+R1RoR(R3R((s Tkinter.pyct grab_statusKs cCs|iid|i|dS(s(Lower this widget in the stacking order.tlowerN(R+R1Ro(R3t belowThis((s Tkinter.pycRQscCs |iidd|||dS(sSet a VALUE (second parameter) for an option PATTERN (first parameter). An optional third parameter gives the numeric priority (defaults to 80).toptiontaddN(R+R1(R3tpatternR5tpriority((s Tkinter.pyct option_addTscCs|iidddS(sPClear the option database. It will be reloaded if option_add is called.RRN(R+R1(R3((s Tkinter.pyct option_clear[scCs|iidd|i||S(sReturn the value for an option NAME for this widget with CLASSNAME. Values with higher priority override lower values.RR=(R+R1Ro(R3R6t className((s Tkinter.pyct option_get`scCs|iidd||dS(svRead file FILENAME into the option database. An optional second parameter gives the numeric priority.RtreadfileN(R+R1(R3tfileNameR((s Tkinter.pyctoption_readfilefscKsB|idp|i|d|idp|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.tbind(R8Ro(R3R5RR((s Tkinter.pycR9s'cCs8|iid|i|d|o|i|ndS(sWUnbind for this widget for event SEQUENCE the function identified with FUNCID.R9R&N(R+R1RoRF(R3R5R7((s Tkinter.pyctunbindscCs|id|||dS(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.R9talli(sbindsall(R8(R3R5RR((s Tkinter.pyctbind_allscCs|iidd|ddS(s8Unbind for all widgets for event SEQUENCE all functions.R9R;R&N(R+R1(R3R5((s Tkinter.pyct unbind_allscCs|id|f|||dS(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.R9i(R8(R3RR5RR((s Tkinter.pyct bind_classs cCs|iid||ddS(sYUnbind for a all widgets with bindtag CLASSNAME for event SEQUENCE all functions.R9R&N(R+R1(R3RR5((s Tkinter.pyct unbind_classscCs|ii|dS(sCall the mainloop of Tk.N(R+R](R3R^((s Tkinter.pycR]scCs|iidS(s8Quit the Tcl interpreter. All widgets will be destroyed.N(R+tquit(R3((s Tkinter.pycR@scCs.|o#ttt|ii|SndS(sInternal function.N(RRIRWR+RK(R3R((s Tkinter.pycRscCs.|o#ttt|ii|SndS(sInternal function.N(RRIRYR+RK(R3R((s Tkinter.pyct _getdoublesscCs|o|ii|SndS(sInternal function.N(R+R[(R3R((s Tkinter.pyct _getboolean scCs7|od|fSn|djod|ifSndS(sInternal function.s -displayofN((RRo(R3R((s Tkinter.pycRs  cCs|ot||f}n t|}d}x~|iD]p\}}|dj oW|ddjo|d }nt|o|i|}n|d||f}q<q<W|S(sInternal function.it_t-(N(RRRtcallableR@(R3RRjRRR((s Tkinter.pycRs    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&(t_roottfindR(R3R6twtittail((s Tkinter.pyct nametowidget$s    c Cst|||i}tt|}y |i}Wntj onXy||i}Wntj onX|ii|||o1|i djo g|_ n|i i |n|S(sReturn 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 CallWrappert__call__R.Rtim_funcRRR+t createcommandRaRR(R3RtsubstR6tfR6((s Tkinter.pycR@5s   cCs%|}x|io |i}q W|S(sInternal function.(R4(R3RI((s Tkinter.pycRGLs  s%#s%bs%fs%hs%ks%ss%ts%ws%xs%ys%As%Es%Ks%Ns%Ws%Ts%Xs%Ys%Dt cGst|t|ijo|Sn|ii}t}d}|\}}}}} } } } } }}}}}}}}}}t}|||_|||_y|||_Wnt j onX|||_ || |_ || |_ || |_ || |_|| |_|||_||_y|||_Wnt j onX||_|||_||_y|i||_Wntj o||_nX|||_|||_y|||_Wntj od|_nX|fS(sInternal function.cSs,yt|SWntj o |SnXdS(s?Tk changed behavior in 8.4.2, returning "??" rather more often.N(RVRd(R_((s Tkinter.pyct getint_event[si(tlent _subst_formatR+R[RVRtserialtnumRvRRtkeycodetstatettimeR(RR+tchart send_eventtkeysymt keysym_numRRztwidgetRtx_rootty_roottdeltaRd(R3RiR[RWRTtnsigntbRRthRR_RRIRR+tAtEtKtNtWtTtXtYtDte((s Tkinter.pycR2UsN  ?    cCsLddk}|i|i|i}}}|i}|i|||dS(sInternal function.iN(tsystexc_typet exc_valuet exc_tracebackRGtreport_callback_exception(R3Rqtexctvalttbtroot((s Tkinter.pyct_report_exceptions  c Cs>|ot||f}n|ot|}n|djokh}xZ|ii|iit|i|fD]+}|ddf|d||ddsR|(RIR+RJR1Ro(R3((s Tkinter.pyctkeyss cCs|iS(s+Return the window path name of this widget.(Ro(R3((s Tkinter.pycR:st_noarg_cCsV|tijo&|i|iidd|iSn|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(R`RRBR+R1Ro(R3tflag((s Tkinter.pyctpack_propagatescCs1t|i|ii|iidd|iS(sHReturn a list of all slaves of this widget in its packing order.Rtslaves(RIRzR+RKR1Ro(R3((s Tkinter.pyct pack_slavess  cCs1t|i|ii|iidd|iS(sHReturn a list of all slaves of this widget in its packing order.tplaceR(RIRzR+RKR1Ro(R3((s Tkinter.pyct place_slavess   cCsdd|if}|dj o!|dj o|||f}n|dj o!|dj o|||f}n|i|ii|pdS(sReturn 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(RoRRR+R1(R3tcolumntrowtcol2trow2Ri((s Tkinter.pyct grid_bboxs c Cst|tjoS| oK|ddjo|d }n|d djod|}n|f}n|i||}|p|iid||i|}|ii|}h}xtdt|dD]f} || d} || d} | p d } n*d| jot | } n t | } | || >) to an event SEQUENCE such that the virtual event is triggered whenever SEQUENCE occurs.teventRN(R+R1(R3tvirtualt sequencesRi((s Tkinter.pyct event_addHscGs'dd|f|}|ii|dS(s-Unbind a virtual event VIRTUAL from SEQUENCE.RtdeleteN(R+R1(R3RRRi((s Tkinter.pyct event_deleteOscKs`dd|i|f}x4|iD]&\}}|d|t|f}q"W|ii|dS(sGenerate an event SEQUENCE. Additional keyword arguments specify parameter of the event (e.g. x, y, rootx, rooty).Rtgenerates-%sN(RoRRSR+R1(R3R5RjRiRR((s Tkinter.pyctevent_generateTs  cCs"|ii|iidd|S(suReturn a list of all virtual events or the information about the SEQUENCE bound to the virtual event VIRTUAL.RR((R+RKR1(R3R((s Tkinter.pyct event_info]s cCs|iiddS(s*Return a list of all existing image names.timagetnames(R+R1(R3((s Tkinter.pyct image_namesescCs|iiddS(s?Return a list of all available image types (e.g. phote bitmap).Rttypes(R+R1(R3((s Tkinter.pyct image_typesisN(s%#s%bs%fs%hs%ks%ss%ts%ws%xs%ys%As%Es%Ks%Ns%Ws%Ts%Xs%Ys%D(RRRRRaRbRFReRgRhRkRmtwaitvarRpRrRtRuRVRWtfloatRYR[RwRvRxR{R|R}R~RRRRRRRRRRRRRRRRRRRRRRRRRRtliftRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRR R RRRRRRRRR!R#R%R'R)R*R,R R.R/R8R9R:R<R=R>R?R]R@RRARBRRRLRzR@tregisterRGRVtjoinR3R2RzR{R|tconfigR}t __getitem__RRR:RRRRRRRRRRRRRRRRRRRRRRRR(((s Tkinter.pycR`SsH                                                                                        (             9            "        RMcBs eZdZdZdZRS(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(RRQR`(R3RRQR`((s Tkinter.pycR7qs  cGsfy.|io|i|}n|i|SWn1tj o}t|n|iinXdS(s3Apply first function SUBST to arguments, than FUNC.N(RQRR"R`Rz(R3RiR((s Tkinter.pycRNvs  (RRRR7RN(((s Tkinter.pycRMns tWmcBseZdZdddddZeZdZeZddZeZ dZ e Z ddZ e Z dZeZddZeZdZeZdd ZeZddddd ZeZdd ZeZddd ZeZd ZeZddZeZddZ e Z!dddZ"e"Z#ddZ$e$Z%dddZ&e&Z'dddZ(e(Z)ddZ*e*Z+ddZ,e,Z-dddZ.e.Z/dddZ0e0Z1ddZ2e2Z3ddZ4e4Z5ddZ6e6Z7ddZ8e8Z9dZ:e:Z;RS(sAProvides functions for the communication with the window manager.c Cs.|i|iidd|i||||S(sInstruct 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.twmtaspect(RR+R1Ro(R3tminNumertminDenomtmaxNumertmaxDenom((s Tkinter.pyct wm_aspectscGs&dd|if|}|ii|S(sThis 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. Rt attributes(RoR+R1(R3Ri((s Tkinter.pyct wm_attributesscCs|iidd|i|S(sVStore NAME in WM_CLIENT_MACHINE property of this widget. Return current value.Rtclient(R+R1Ro(R3R6((s Tkinter.pyct wm_clientscGsRt|djo |f}ndd|if|}t|i|ii|S(sStore 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.iRtcolormapwindows(RURoRIRzR+R1(R3twlistRi((s Tkinter.pyctwm_colormapwindowss cCs|iidd|i|S(sStore VALUE in WM_COMMAND property. It is the command which shall be used to invoke the application. Return current command if VALUE is None.RR(R+R1Ro(R3R5((s Tkinter.pyct wm_commandscCs|iidd|iS(sDeiconify this widget. If it was never mapped it will not be mapped. On Windows it will raise this widget and give it the focus.Rt deiconify(R+R1Ro(R3((s Tkinter.pyct wm_deiconifyscCs|iidd|i|S(sSet 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.Rt focusmodel(R+R1Ro(R3tmodel((s Tkinter.pyct wm_focusmodelscCs|iidd|iS(sAReturn identifier for decorative frame of this widget if present.Rtframe(R+R1Ro(R3((s Tkinter.pyctwm_framescCs|iidd|i|S(siSet geometry to NEWGEOMETRY of the form =widthxheight+x+y. Return current value if None is given.RR(R+R1Ro(R3t newGeometry((s Tkinter.pyct wm_geometrysc 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.RR(RR+R1Ro(R3t baseWidtht baseHeighttwidthInct heightInc((s Tkinter.pyctwm_grids cCs|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.Rtgroup(R+R1Ro(R3tpathName((s Tkinter.pyctwm_groupscCsJ|o#|iidd|id|Sn|iidd|i|SdS(sSet bitmap for the iconified widget to BITMAP. Return the bitmap if None is given. Under Windows, the DEFAULT parameter can be used to set the icon for the widget and any descendents that don't have an icon set explicitly. DEFAULT can be the relative path to a .ico file (example: root.iconbitmap(default='myicon.ico') ). See Tk documentation for more information.Rt iconbitmaps-defaultN(R+R1Ro(R3tbitmaptdefault((s Tkinter.pyct wm_iconbitmaps #cCs|iidd|iS(sDisplay widget as icon.Rticonify(R+R1Ro(R3((s Tkinter.pyct wm_iconifyscCs|iidd|i|S(sVSet mask for the icon bitmap of this widget. Return the mask if None is given.Rticonmask(R+R1Ro(R3R((s Tkinter.pyct wm_iconmaskscCs|iidd|i|S(sSSet the name of the icon for this widget. Return the name if None is given.Rticonname(R+R1Ro(R3tnewName((s Tkinter.pyct wm_iconnamescCs(|i|iidd|i||S(sSet 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.Rt iconposition(RR+R1Ro(R3RR+((s Tkinter.pyctwm_iconpositionscCs|iidd|i|S(sgSet widget PATHNAME to be displayed instead of icon. Return the current value if None is given.Rt iconwindow(R+R1Ro(R3R((s Tkinter.pyct wm_iconwindowscCs(|i|iidd|i||S(sSet 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.Rtmaxsize(RR+R1Ro(R3R(R((s Tkinter.pyct wm_maxsizescCs(|i|iidd|i||S(sSet 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.Rtminsize(RR+R1Ro(R3R(R((s Tkinter.pyct wm_minsize scCs%|i|iidd|i|S(sInstruct the window manager to ignore this widget if BOOLEAN is given with 1. Return the current value if None is given.Rtoverrideredirect(RBR+R1Ro(R3Rf((s Tkinter.pyctwm_overrideredirectscCs|iidd|i|S(sInstruct 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".Rt positionfrom(R+R1Ro(R3twho((s Tkinter.pyctwm_positionfromscCsEt|o|i|}n|}|iidd|i||S(sBind 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".Rtprotocol(RER@R+R1Ro(R3R6RR((s Tkinter.pyct 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.Rt resizable(R+R1Ro(R3R(R((s Tkinter.pyct wm_resizable,scCs|iidd|i|S(sInstruct 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".Rtsizefrom(R+R1Ro(R3R((s Tkinter.pyct wm_sizefrom1scCs|iidd|i|S(sQuery or set the state of this widget as one of normal, icon, iconic (see wm_iconwindow), withdrawn, or zoomed (Windows only).RRZ(R+R1Ro(R3tnewstate((s Tkinter.pyctwm_state7scCs|iidd|i|S(sSet the title of this widget.Rttitle(R+R1Ro(R3R((s Tkinter.pyctwm_title<scCs|iidd|i|S(s_Instruct the window manager that this widget is transient with regard to widget MASTER.Rt transient(R+R1Ro(R3R4((s Tkinter.pyct wm_transient@scCs|iidd|iS(sWithdraw this widget from the screen such that it is unmapped and forgotten by the window manager. Re-draw it with wm_deiconify.Rtwithdraw(R+R1Ro(R3((s Tkinter.pyct wm_withdrawEsN(<RRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRRZRRRRRR(((s Tkinter.pycRsv                      tTkcBseeZdZdZd d dddd dZdZdZdZd 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.RFRiic Csd|_h|_d|_d|_|djohddk}ddk}|ii|i d}|ii |\}} | djo|| }qnd} t i |||| t ||||_|o|in|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.iiNs.pys.pycs.pyo(s.pys.pycs.pyo(RR4Rt _tkloadedR+Rqtostpathtbasenametargvtsplitextt_tkintertcreatet wantobjectst_loadtkt readprofile( R3t screenNametbaseNameRtuseTktsynctuseRqRtextt interactive((s Tkinter.pycR7Ps      'cCs)|ip|ii|indS(N(RR+tloadtkR(R3((s Tkinter.pycRhs  cCssd|_to.ttdotidd|in|iid}|tijot dti|fnt |iid}|ti jot dti |fnt djot d t t n|i djo g|_ n|iid t|iid t|i id |i id tot o |an|id |idS( 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)g@s)Tk 4.0 or higher is required; found Tk %sttkerrortexittWM_DELETE_WINDOW(Rt_MacOSthasattrRR R+RuRt TK_VERSIONt RuntimeErrorRSt TCL_VERSIONt TkVersionRaRRPR R$RRRRRb(R3RR((s Tkinter.pycRls6    cCsix!|iiD]}|iqW|iid|iti|tot|jo dandS(shDestroy this and all descendants widgets. This will end the application of this Tcl interpreter.RbN( RtvaluesRbR+R1RoR`RRR(R3R((s Tkinter.pycRbs c BsTddk}|iido|id}n |i}|ii|d|}|ii|d|}|ii|d|}|ii|d|}h|d<} d| U|ii|o|iid|n|ii|oe || n|ii|o|iid|n|ii|oe || ndS( sInternal 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.iNtHOMEs.%s.tcls.%s.pyR3sfrom Tkinter import *tsource( RtenvironRtcurdirRRtisfileR+R1texecfile( R3R RRthomet class_tcltclass_pytbase_tcltbase_pytdir((s Tkinter.pycR s$  cCsZddk}ddk}|iid||_||_||_|i|||dS(s6Internal function. It reports exception on sys.stderr.iNsException in Tkinter callback (t tracebackRqtstderrtwritet last_typet last_valuetlast_tracebacktprint_exception(R3RvRwRxR+Rq((s Tkinter.pycRus    cCst|i|S(s3Delegate attribute access to the interpreter object(tgetattrR+(R3tattr((s Tkinter.pyct __getattr__sN( RRRRoRR7RRRbR RuR4(((s Tkinter.pycRLs   %  cCst||||S(N(R(R R RR ((s Tkinter.pyctTclstPackcBs`eZdZhdZeZZZdZeZdZ 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(sPack 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. RR|N(R+R1RoR(R3RRj((s Tkinter.pyctpack_configures cCs|iidd|idS(s:Unmap this widget and do not use it for the packing order.RtforgetN(R+R1Ro(R3((s Tkinter.pyct pack_forgetscCs|ii|iidd|i}h}xjtdt|dD]P}||d}||d}|d djo|i|}n|||dgD]3}|i|o||||d <||=q q W|iidd|if|i||dS(sPlace 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_iRR|N(RR+R1RoR(R3RRjR((s Tkinter.pyctplace_configures  cCs|iidd|idS(sUnmap this widget.RR8N(R+R1Ro(R3((s Tkinter.pyct place_forgetscCs|ii|iidd|i}h}xjtdt|dD]P}||d}||d}|d djo|i|}n|||R8R?R(R`RR(((s Tkinter.pycR;s   tGridcBseZdZhdZeZZZeiZ Zei Z Z dZ e Z dZdZeZeiZZeiZZeiZZeiZZeiZZRS(sQGeometry manager Grid. Base class to use the methods grid_* in every widget.cKs0|iidd|if|i||dS(sPosition a widget in the parent widget in a grid. Use as options: column=number - use cell identified with given column (starting with 0) columnspan=number - this widget will span several columns 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 row=number - use cell identified with given row (starting with 0) rowspan=number - this widget will span several rows sticky=NSEW - if cell is larger on which sides will this widget stick to the cell boundary RR|N(R+R1RoR(R3RRj((s Tkinter.pyctgrid_configure3s cCs|iidd|idS(sUnmap this widget.RR8N(R+R1Ro(R3((s Tkinter.pyct grid_forgetGscCs|iidd|idS(s0Unmap this widget but remember the grid options.RRcN(R+R1Ro(R3((s Tkinter.pyct grid_removeKscCs|ii|iidd|i}h}xjtdt|dD]P}||d}||d}|d djo|i|}n|||eZdZdZhhddZdZddZRS(sInternal class.cCsto)|ptp tant}q0n||_|i|_d}|ido|d}|d=n|ptt|}n||_ |i djod||_ n|i d||_ h|_ |ii i|i o|ii |i i n||ii |i d9Z?d:Z@d;ZAd<ZBd=ZCd>ZDd?ZERS(As?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(RLR7(R3R4RRj((s Tkinter.pycR7 s cGs!|ii|idf|dS(sInternal function.taddtagN(R+R1Ro(R3Ri((s Tkinter.pycRfscCs|i|d|dS(s*Add tag NEWTAG to all items above TAGORID.taboveN(Rf(R3tnewtagttagOrId((s Tkinter.pyct addtag_abovescCs|i|ddS(sAdd tag NEWTAG to all items.R;N(Rf(R3Rh((s Tkinter.pyct addtag_allscCs|i|d|dS(s*Add tag NEWTAG to all items below TAGORID.tbelowN(Rf(R3RhRi((s Tkinter.pyct addtag_below scCs |i|d||||dS(sAdd 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(Rf(R3RhRR+thalotstart((s Tkinter.pyctaddtag_closest#scCs |i|d||||dS(sLAdd tag NEWTAG to all items in the rectangle defined by X1,Y1,X2,Y2.tenclosedN(Rf(R3Rhtx1ty1tx2ty2((s Tkinter.pyctaddtag_enclosed)scCs |i|d||||dS(sWAdd tag NEWTAG to all items which overlap the rectangle defined by X1,Y1,X2,Y2.t overlappingN(Rf(R3RhRsRtRuRv((s Tkinter.pyctaddtag_overlapping-scCs|i|d|dS(s)Add tag NEWTAG to all items with TAGORID.twithtagN(Rf(R3RhRi((s Tkinter.pyctaddtag_withtag1scGs-|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.RN(RR+R1RoR(R3Ri((s Tkinter.pycR4scCs;|ii|id||d|o|i|ndS(sbUnbind for all items with TAGORID for event SEQUENCE the function identified with FUNCID.R9R&N(R+R1RoRF(R3RiR5R7((s Tkinter.pyct tag_unbind9scCs"|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.R9(R8Ro(R3RiR5RR((s Tkinter.pycttag_bind?scCs"t|ii|id||S(srReturn the canvas x coordinate of pixel position SCREENX rounded to nearest multiple of GRIDSPACING units.tcanvasx(RYR+R1Ro(R3tscreenxt gridspacing((s Tkinter.pycR~Gs cCs"t|ii|id||S(srReturn the canvas y coordinate of pixel position SCREENY rounded to nearest multiple of GRIDSPACING units.tcanvasy(RYR+R1Ro(R3tscreenyR((s Tkinter.pycRLs cGs2tt|ii|ii|idf|S(s8Return a list of coordinates for the item given in ARGS.tcoords(RIRYR+RKR1Ro(R3Ri((s Tkinter.pycRQs c Csut|}|d}t|ttfjo|d }nh}t|ii|id|||i||S(sInternal function.iR( RRR RRWR+R1RoR(R3titemTypeRiRjR((s Tkinter.pyct_createWs    cOs|id||S(s6Create arc shaped region with coordinates x1,y1,x2,y2.tarc(R(R3RiRj((s Tkinter.pyct create_arcbscOs|id||S(s%Create bitmap with coordinates x1,y1.R(R(R3RiRj((s Tkinter.pyct create_bitmapescOs|id||S(s)Create image item with coordinates x1,y1.R(R(R3RiRj((s Tkinter.pyct create_imagehscOs|id||S(s-Create line with coordinates x1,y1,...,xn,yn.tline(R(R3RiRj((s Tkinter.pyct create_linekscOs|id||S(s)Create oval with coordinates x1,y1,x2,y2.toval(R(R3RiRj((s Tkinter.pyct create_ovalnscOs|id||S(s0Create polygon with coordinates x1,y1,...,xn,yn.tpolygon(R(R3RiRj((s Tkinter.pyctcreate_polygonqscOs|id||S(s.Create rectangle with coordinates x1,y1,x2,y2.t rectangle(R(R3RiRj((s Tkinter.pyctcreate_rectangletscOs|id||S(s#Create text with coordinates x1,y1.ttext(R(R3RiRj((s Tkinter.pyct create_textwscOs|id||S(s+Create window with coordinates x1,y1,x2,y2.Rn(R(R3RiRj((s Tkinter.pyct create_windowzscGs!|ii|idf|dS(sDelete characters of text items identified by tag or id in ARGS (possibly several times) from FIRST to LAST character (including).tdcharsN(R+R1Ro(R3Ri((s Tkinter.pycR}scGs!|ii|idf|dS(s<Delete items identified by all tag or ids contained in ARGS.RN(R+R1Ro(R3Ri((s Tkinter.pycRscGs!|ii|idf|dS(siDelete tag or id given as last arguments in ARGS from items identified by first argument in ARGS.tdtagN(R+R1Ro(R3Ri((s Tkinter.pycRscGs-|i|ii|idf|pdS(sInternal function.RH((RR+R1Ro(R3Ri((s Tkinter.pycRHscCs|id|S(sReturn items above TAGORID.Rg(RH(R3Ri((s Tkinter.pyct find_abovescCs |idS(sReturn all items.R;(RH(R3((s Tkinter.pyctfind_allscCs|id|S(sReturn all items below TAGORID.Rl(RH(R3Ri((s Tkinter.pyct find_belowscCs|id||||S(sReturn 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.Rn(RH(R3RR+RoRp((s Tkinter.pyct find_closestscCs|id||||S(s=Return all items in rectangle defined by X1,Y1,X2,Y2.Rr(RH(R3RsRtRuRv((s Tkinter.pyct find_enclosedscCs|id||||S(sLReturn all items which overlap the rectangle defined by X1,Y1,X2,Y2.Rx(RH(R3RsRtRuRv((s Tkinter.pyctfind_overlappingscCs|id|S(sReturn all items with TAGORID.Rz(RH(R3Ri((s Tkinter.pyct find_withtagscGs|ii|idf|S(s.Set focus to the first item specified in ARGS.Rv(R+R1Ro(R3Ri((s Tkinter.pycRvscGs)|ii|ii|idf|S(s=Return tags associated with the first item specified in ARGS.tgettags(R+RKR1Ro(R3Ri((s Tkinter.pycRs cGs!|ii|idf|dS(sdSet cursor at position POS in the item identified by TAGORID. In ARGS TAGORID must be first.ticursorN(R+R1Ro(R3Ri((s Tkinter.pycRscGs#t|ii|idf|S(s?Return position of cursor as integer in item specified in ARGS.R(RWR+R1Ro(R3Ri((s Tkinter.pycRscGs!|ii|idf|dS(sSInsert TEXT in item TAGORID at position POS. ARGS must be TAGORID POS TEXT.R^N(R+R1Ro(R3Ri((s Tkinter.pycR^scCs'|ii|idf|d|fS(s9Return the resource value for an OPTION for item TAGORID.titemcgetRD(R+R1Ro(R3RiR((s Tkinter.pycRs cKs|id|f||S(sConfigure 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 itemconfigure(R{(R3RiRRj((s Tkinter.pycRscGs!|ii|idf|dS(sJLower an item TAGORID given in ARGS (optional below another item).RN(R+R1Ro(R3Ri((s Tkinter.pyct tag_lowerscGs!|ii|idf|dS(s#Move an item TAGORID given in ARGS.tmoveN(R+R1Ro(R3Ri((s Tkinter.pycRscKs)|ii|idf|i||S(sPrint 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 postscript(R+R1RoR(R3RRj((s Tkinter.pycRscGs!|ii|idf|dS(sJRaise an item TAGORID given in ARGS (optional above another item).RN(R+R1Ro(R3Ri((s Tkinter.pyct tag_raisescGs!|ii|idf|dS(s9Scale item TAGORID with XORIGIN, YORIGIN, XSCALE, YSCALE.tscaleN(R+R1Ro(R3Ri((s Tkinter.pycRscCs#|ii|idd||dS(s&Remember the current X, Y coordinates.tscantmarkN(R+R1Ro(R3RR+((s Tkinter.pyct scan_marksi cCs&|ii|idd|||dS(sAdjust the view of the canvas to GAIN times the difference between X and Y and the coordinates given in scan_mark.RtdragtoN(R+R1Ro(R3RR+tgain((s Tkinter.pyct scan_dragtoscCs#|ii|idd||dS(sLAdjust the end of the selection near the cursor of an item TAGORID to index.tselecttadjustN(R+R1Ro(R3RiR((s Tkinter.pyct select_adjustscCs|ii|idddS(s,Clear the selection if it is in this widget.RRN(R+R1Ro(R3((s Tkinter.pyct select_clearscCs#|ii|idd||dS(s:Set the fixed end of a selection in item TAGORID to INDEX.RtfromN(R+R1Ro(R3RiR((s Tkinter.pyct select_fromscCs |ii|iddpdS(s(Return the item which has the selection.RR N(R+R1RoR(R3((s Tkinter.pyct select_itemscCs#|ii|idd||dS(s=Set the variable end of a selection in item TAGORID to INDEX.RttoN(R+R1Ro(R3RiR((s Tkinter.pyct select_toscCs |ii|id|pdS(s$Return the type of the item TAGORID.RN(R+R1RoR(R3Ri((s Tkinter.pycRscGsK|p#|i|ii|idSn|ii|idf|dS(s1Query and change horizontal position of the view.txviewN(RAR+R1Ro(R3Ri((s Tkinter.pycRs#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.RtmovetoN(R+R1Ro(R3tfraction((s Tkinter.pyct xview_movetoscCs#|ii|idd||dS(sTShift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).RtscrollN(R+R1Ro(R3RR4((s Tkinter.pyct xview_scroll scGsK|p#|i|ii|idSn|ii|idf|dS(s/Query and change vertical position of the view.tyviewN(RAR+R1Ro(R3Ri((s Tkinter.pycR 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.RRN(R+R1Ro(R3R((s Tkinter.pyct yview_moveto scCs#|ii|idd||dS(sTShift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).RRN(R+R1Ro(R3RR4((s Tkinter.pyct yview_scroll sN(FRRRRR7RfRjRkRmRqRwRyR{RR|R}R~RRRRRRRRRRRRRRRRHRRRRRRRRvRRRR^RRt itemconfigRRRRRRRRRRRRRRRRRRRRRR(((s Tkinter.pycRd s                                                         t CheckbuttoncBsJeZdZdhdZdZdZdZdZdZ 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(RLR7(R3R4RRj((s Tkinter.pycR7 s cCs|ii|iddS(sPut the button in off-state.tdeselectN(R+R1Ro(R3((s Tkinter.pycR scCs|ii|iddS(sFlash the button.RZN(R+R1Ro(R3((s Tkinter.pycRZ# scCs|ii|idS(s<Toggle the button and invoke a command if given as resource.R[(R+R1Ro(R3((s Tkinter.pycR[& scCs|ii|iddS(sPut the button in on-state.RN(R+R1Ro(R3((s Tkinter.pycR) scCs|ii|iddS(sToggle the button.ttoggleN(R+R1Ro(R3((s Tkinter.pycR, sN( RRRRR7RRZR[RR(((s Tkinter.pycR s    tEntrycBseZdZdhdZddZdZdZdZdZ dZ dZ d Z e Z d ZeZd ZeZd ZeZd ZeZdZeZdZdZdZRS(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(RLR7(R3R4RRj((s Tkinter.pycR72 s cCs |ii|id||dS(s.Delete text from FIRST to LAST (not included).RN(R+R1Ro(R3tfirsttlast((s Tkinter.pycR> scCs|ii|idS(sReturn the text.R=(R+R1Ro(R3((s Tkinter.pycR=A scCs|ii|id|dS(sInsert cursor at INDEX.RN(R+R1Ro(R3R((s Tkinter.pycRD scCst|ii|id|S(sReturn position of cursor.R(RWR+R1Ro(R3R((s Tkinter.pycRG s cCs |ii|id||dS(sInsert STRING at INDEX.R^N(R+R1Ro(R3RR((s Tkinter.pycR^K scCs |ii|idd|dS(s&Remember the current X, Y coordinates.RRN(R+R1Ro(R3R((s Tkinter.pycRN scCs |ii|idd|dS(sAdjust the view of the canvas to 10 times the difference between X and Y and the coordinates given in scan_mark.RRN(R+R1Ro(R3R((s Tkinter.pycRQ scCs |ii|idd|dS(s9Adjust the end of the selection near the cursor to INDEX.RRN(R+R1Ro(R3R((s Tkinter.pyctselection_adjustV scCs|ii|idddS(s,Clear the selection if it is in this widget.RRN(R+R1Ro(R3((s Tkinter.pycRZ scCs |ii|idd|dS(s*Set the fixed end of a selection to INDEX.RRN(R+R1Ro(R3R((s Tkinter.pyctselection_from^ scCs%|ii|ii|iddS(s,Return whether the widget has the selection.Rtpresent(R+R[R1Ro(R3((s Tkinter.pyctselection_presentb s cCs#|ii|idd||dS(s3Set the selection from START to END (not included).RRN(R+R1Ro(R3RpR\((s Tkinter.pyctselection_rangeg scCs |ii|idd|dS(s-Set the variable end of a selection to INDEX.RRN(R+R1Ro(R3R((s Tkinter.pyct selection_tok scCs|ii|id|dS(s1Query and change horizontal position of the view.RN(R+R1Ro(R3R((s Tkinter.pycRo 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.RRN(R+R1Ro(R3R((s Tkinter.pycRr scCs#|ii|idd||dS(sTShift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).RRN(R+R1Ro(R3RR4((s Tkinter.pycRv sN(RRRRR7RR=RRR^RRRRRRRRRtselect_presentRt select_rangeRRRRR(((s Tkinter.pycR0 s0               tFramecBseZdZdhdZRS(sFFrame widget which may contain other widgets and can have a 3D border.cKst||f}d}|idod|df}|d=n,|idod|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.RNs-classRRN((RRRLR7(R3R4RRjRI((s Tkinter.pycR7| s  N(RRRRR7(((s Tkinter.pycRz stLabelcBseZdZdhdZRS(s0Label widget which can display text and bitmaps.cKsti||d||dS(sConstruct 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(RLR7(R3R4RRj((s Tkinter.pycR7 sN(RRRRR7(((s Tkinter.pycR stListboxcBs"eZdZdhdZdZdZdZddZddZ dZ dZ d Z d Z d Zd Zd ZeZddZeZdZeZddZeZdZdZdZdZdZdZdZdZddZ e Z!RS(s3Listbox widget which can display a list of strings.cKsti||d||dS(sConstruct 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(RLR7(R3R4RRj((s Tkinter.pycR7 scCs|ii|id|dS(s"Activate item identified by INDEX.tactivateN(R+R1Ro(R3R((s Tkinter.pycR 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.RN(RR+R1RoR(R3Ri((s Tkinter.pycR scCs"|ii|ii|idS(s2Return list of indices of currently selected item.t curselection(R+RKR1Ro(R3((s Tkinter.pycR scCs |ii|id||dS(s/Delete items from FIRST to LAST (not included).RN(R+R1Ro(R3RR((s Tkinter.pycR scCsP|o,|ii|ii|id||Sn|ii|id|SdS(s4Get list of items from FIRST to LAST (not included).R=N(R+RKR1Ro(R3RR((s Tkinter.pycR= scCs:|ii|id|}|djodSnt|S(s+Return index of item identified with INDEX.RRyN(R+R1RoRRW(R3RRJ((s Tkinter.pycR s cGs$|ii|id|f|dS(sInsert ELEMENTS at INDEX.R^N(R+R1Ro(R3Rtelements((s Tkinter.pycR^ scCst|ii|id|S(s5Get index of item which is nearest to y coordinate Y.tnearest(RWR+R1Ro(R3R+((s Tkinter.pycR s cCs#|ii|idd||dS(s&Remember the current X, Y coordinates.RRN(R+R1Ro(R3RR+((s Tkinter.pycR scCs#|ii|idd||dS(sAdjust the view of the listbox to 10 times the difference between X and Y and the coordinates given in scan_mark.RRN(R+R1Ro(R3RR+((s Tkinter.pycR scCs|ii|id|dS(s"Scroll such that INDEX is visible.tseeN(R+R1Ro(R3R((s Tkinter.pycR scCs |ii|idd|dS(s-Set the fixed end oft the selection to INDEX.RtanchorN(R+R1Ro(R3R((s Tkinter.pyctselection_anchor scCs#|ii|idd||dS(s6Clear the selection from FIRST to LAST (not included).RRN(R+R1Ro(R3RR((s Tkinter.pycR scCs(|ii|ii|idd|S(s+Return 1 if INDEX is part of the selection.Rtincludes(R+R[R1Ro(R3R((s Tkinter.pyctselection_includes scCs#|ii|idd||dS(smSet the selection from FIRST to LAST (not included) without changing the currently selected elements.RR0N(R+R1Ro(R3RR((s Tkinter.pyct selection_set scCst|ii|idS(s-Return the number of elements in the listbox.R(RWR+R1Ro(R3((s Tkinter.pycR scGsK|p#|i|ii|idSn|ii|idf|dS(s1Query and change horizontal position of the view.RN(RAR+R1Ro(R3R4((s Tkinter.pycR 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.RRN(R+R1Ro(R3R((s Tkinter.pycR scCs#|ii|idd||dS(sTShift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).RRN(R+R1Ro(R3RR4((s Tkinter.pycR scGsK|p#|i|ii|idSn|ii|idf|dS(s/Query and change vertical position of the view.RN(RAR+R1Ro(R3R4((s Tkinter.pycR 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.RRN(R+R1Ro(R3R((s Tkinter.pycR scCs#|ii|idd||dS(sTShift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).RRN(R+R1Ro(R3RR4((s Tkinter.pycR scCs'|ii|idf|d|fS(s4Return the resource value for an ITEM and an OPTION.RRD(R+R1Ro(R3RR((s Tkinter.pycR s cKs|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(R{(R3RRRj((s Tkinter.pycR sN("RRRRR7RRRRR=RR^RRRRRt select_anchorRRRtselect_includesRt select_setRRRRRRRRRR(((s Tkinter.pycR s>                        tMenucBseZdZd%hdZdZdZdZdZdZ dZ dZ d Z d Z d Zd Zd dZdZhdZhdZhdZhdZhdZhdZhdZhdZhdZhdZhdZhdZd%dZdZd%dZ e Z!dZ"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(RLR7(R3R4RRj((s Tkinter.pycR7 scCsdS(N((R3((s Tkinter.pycttk_bindForTraversal" scCs|iid|idS(Nt tk_mbPost(R+R1Ro(R3((s Tkinter.pycR$ scCs|iiddS(Nt tk_mbUnpost(R+R1(R3((s Tkinter.pycR& scCs|iid|i|dS(Nttk_traverseToMenu(R+R1Ro(R3R\((s Tkinter.pycR( scCs|iid|i|dS(Nttk_traverseWithinMenu(R+R1Ro(R3R\((s Tkinter.pycR* scCs|iid|iS(Nttk_getMenuButtons(R+R1Ro(R3((s Tkinter.pycR, scCs|iid|dS(Nt tk_nextMenu(R+R1(R3tcount((s Tkinter.pycR. scCs|iid|dS(Nttk_nextMenuEntry(R+R1(R3R((s Tkinter.pycR0 scCs|iid|idS(Nt tk_invokeMenu(R+R1Ro(R3((s Tkinter.pycR2 scCs|iid|idS(Nt tk_firstMenu(R+R1Ro(R3((s Tkinter.pycR4 scCs|iid|idS(Nttk_mbButtonDown(R+R1Ro(R3((s Tkinter.pycR6 sR&cCs#|iid|i|||dS(s/Post the menu at position X,Y with entry ENTRY.ttk_popupN(R+R1Ro(R3RR+R((s Tkinter.pycR8 scCs|ii|id|dS(sActivate entry at INDEX.RN(R+R1Ro(R3R((s Tkinter.pycR; scKs0|ii|id|f|i||dS(sInternal function.RN(R+R1RoR(R3RRRj((s Tkinter.pycR> scKs|id|p|dS(sAdd hierarchical menu item.tcascadeN(R(R3RRj((s Tkinter.pyct add_cascadeB scKs|id|p|dS(sAdd checkbutton menu item.RN(R(R3RRj((s Tkinter.pyctadd_checkbuttonE scKs|id|p|dS(sAdd command menu item.RN(R(R3RRj((s Tkinter.pyct add_commandH scKs|id|p|dS(sAddd radio menu item.t radiobuttonN(R(R3RRj((s Tkinter.pyctadd_radiobuttonK scKs|id|p|dS(sAdd separator.t separatorN(R(R3RRj((s Tkinter.pyct add_separatorN scKs3|ii|id||f|i||dS(sInternal function.R^N(R+R1RoR(R3RRRRj((s Tkinter.pycR^Q scKs|i|d|p|dS(s$Add hierarchical menu item at INDEX.RN(R^(R3RRRj((s Tkinter.pyctinsert_cascadeU scKs|i|d|p|dS(s#Add checkbutton menu item at INDEX.RN(R^(R3RRRj((s Tkinter.pyctinsert_checkbuttonX scKs|i|d|p|dS(sAdd command menu item at INDEX.RN(R^(R3RRRj((s Tkinter.pyctinsert_command[ scKs|i|d|p|dS(sAddd radio menu item at INDEX.RN(R^(R3RRRj((s Tkinter.pyctinsert_radiobutton^ scKs|i|d|p|dS(sAdd separator at INDEX.RN(R^(R3RRRj((s Tkinter.pyctinsert_separatora scCs |ii|id||dS(s;Delete menu items between INDEX1 and INDEX2 (not included).RN(R+R1Ro(R3tindex1tindex2((s Tkinter.pycRd scCs |ii|id|d|S(s>Return the resource value of an menu item for OPTION at INDEX.t entrycgetRD(R+R1Ro(R3RR((s Tkinter.pycRg scKs|id|f||S(sConfigure a menu item at INDEX.tentryconfigure(R{(R3RRRj((s Tkinter.pycRj scCs:|ii|id|}|djodSnt|S(s4Return the index of a menu item identified by INDEX.RRyN(R+R1RoRRW(R3RRJ((s Tkinter.pycRn s cCs|ii|id|S(sRInvoke a menu item identified by INDEX and execute the associated command.R[(R+R1Ro(R3R((s Tkinter.pycR[s scCs |ii|id||dS(sDisplay a menu at position X,Y.tpostN(R+R1Ro(R3RR+((s Tkinter.pycRw scCs|ii|id|S(s*Return the type of the menu item at INDEX.R(R+R1Ro(R3R((s Tkinter.pycRz scCs|ii|iddS(s Unmap a menu.tunpostN(R+R1Ro(R3((s Tkinter.pycR} scCst|ii|id|S(sEReturn the y-position of the topmost pixel of the menu item at INDEX.t yposition(RWR+R1Ro(R3R((s Tkinter.pycR s N((RRRRR7RRRRRRRRRRRRRRRRRRRR^RRRRRRRRt entryconfigRR[RRRR(((s Tkinter.pycR sJ                                 t MenubuttoncBseZdZdhdZRS(s(Menubutton widget, obsolete since Tk8.0.cKsti||d||dS(Nt menubutton(RLR7(R3R4RRj((s Tkinter.pycR7 sN(RRRRR7(((s Tkinter.pycR stMessagecBseZdZdhdZRS(sKMessage widget to display multiline text. Obsolete since Label does it too.cKsti||d||dS(Ntmessage(RLR7(R3R4RRj((s Tkinter.pycR7 sN(RRRRR7(((s Tkinter.pycR st RadiobuttoncBsAeZdZdhdZdZdZdZdZRS(sGRadiobutton widget which shows only one of several buttons in on-state.cKsti||d||dS(sConstruct 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.RN(RLR7(R3R4RRj((s Tkinter.pycR7 s cCs|ii|iddS(sPut the button in off-state.RN(R+R1Ro(R3((s Tkinter.pycR scCs|ii|iddS(sFlash the button.RZN(R+R1Ro(R3((s Tkinter.pycRZ scCs|ii|idS(s<Toggle the button and invoke a command if given as resource.R[(R+R1Ro(R3((s Tkinter.pycR[ scCs|ii|iddS(sPut the button in on-state.RN(R+R1Ro(R3((s Tkinter.pycR sN( RRRRR7RRZR[R(((s Tkinter.pycR  s    tScalecBsDeZdZdhdZdZdZddZdZRS(s1Scale widget which can display a numerical scale.cKsti||d||dS(sConstruct 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.RN(RLR7(R3R4RRj((s Tkinter.pycR7 s cCsJ|ii|id}yt|SWntj ot|SnXdS(s*Get the current value as integer or float.R=N(R+R1RoRWRdRY(R3R5((s Tkinter.pycR= s cCs|ii|id|dS(sSet the value to VALUE.R0N(R+R1Ro(R3R5((s Tkinter.pycR0 scCs"|i|ii|id|S(sReturn 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(RR+R1Ro(R3R5((s Tkinter.pycR scCs|ii|id||S(scReturn where the point X,Y lies. Valid return values are "slider", "though1" and "though2".tidentify(R+R1Ro(R3RR+((s Tkinter.pycR  sN( RRRRR7R=R0RR (((s Tkinter.pycR  s    t ScrollbarcBsSeZdZdhdZdZdZdZdZdZ dZ 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(RLR7(R3R4RRj((s Tkinter.pycR7 s cCs|ii|id|dS(sxDisplay the element at INDEX with activebackground and activerelief. INDEX can be "arrow1","slider" or "arrow2".RN(R+R1Ro(R3R((s Tkinter.pycR scCs"t|ii|id||S(snReturn the fractional change of the scrollbar setting if it would be moved by DELTAX or DELTAY pixels.Rc(RYR+R1Ro(R3tdeltaxtdeltay((s Tkinter.pycRc scCs"t|ii|id||S(sRReturn the fractional value which corresponds to a slider position of X,Y.R(RYR+R1Ro(R3RR+((s Tkinter.pycR scCs|ii|id||S(sYReturn the element under position X,Y as one of "arrow1","slider","arrow2" or "".R (R+R1Ro(R3RR+((s Tkinter.pycR  scCs|i|ii|idS(sZReturn the current fractional values (upper and lower end) of the slider position.R=(RAR+R1Ro(R3((s Tkinter.pycR= scGs!|ii|idf|dS(siSet the fractional values of the slider position (upper and lower ends as value between 0 and 1).R0N(R+R1Ro(R3Ri((s Tkinter.pycR0 sN( RRRRR7RRcRR R=R0(((s Tkinter.pycR  s     tTextcBs{eZdZd;hdZdZdZdZdZdZ dZ d;dZ d;d Z d Z d;d;d Zd Zd;d ZdZdZdZdZd;dZdZd;dZhdZdZdZdZd;dZdZdZdZdZ dZ!dZ"d Z#d;d;d;d;d;d;d;d!Z$d"Z%d#Z&d;d$Z'd;d%Z(d&Z)d;d'Z*e*Z+d(Z,d;d)Z-d;d*Z.d;d+Z/d;d,Z0d;d-Z1d.Z2d;d/Z3d0Z4d;d1Z5e5Z6hd2Z7d3Z8d4Z9d5Z:d6Z;d7Z<d8Z=d9Z>d:Z?RS(<s4Text widget which can display text in various forms.cKsti||d||dS(sConstruct 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, RN(RLR7(R3R4RRj((s Tkinter.pycR7 scGs-|i|ii|idf|pdS(sReturn a tuple of (x,y,width,height) which gives the bounding box of the visible part of the character at the index in ARGS.RN(RR+R1RoR(R3Ri((s Tkinter.pycR scCs|iid|i|dS(Nttk_textSelectTo(R+R1Ro(R3R((s Tkinter.pycR scCs|iid|idS(Nttk_textBackspace(R+R1Ro(R3((s Tkinter.pycR scCs#|iid|i|||dS(Nttk_textIndexCloser(R+R1Ro(R3R_ReR((s Tkinter.pycR scCs|iid|i|dS(Nttk_textResetAnchor(R+R1Ro(R3R((s Tkinter.pycR scCs+|ii|ii|id|||S(sReturn whether between index INDEX1 and index INDEX2 the relation OP is satisfied. OP is one of <, <=, ==, >=, >, or !=.tcompare(R+R[R1Ro(R3RtopR((s Tkinter.pycR scCs%|ii|ii|id|S(sjTurn on the internal consistency checks of the B-Tree inside the text widget according to BOOLEAN.tdebug(R+R[R1Ro(R3Rf((s Tkinter.pycR scCs |ii|id||dS(s?Delete the characters between INDEX1 and INDEX2 (not included).RN(R+R1Ro(R3RR((s Tkinter.pycR$ scCs"|i|ii|id|S(sReturn 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 dlineinfo(RR+R1Ro(R3R((s Tkinter.pycR' sc Ksg}d}d}|pg}|d}|}nzt|tp|i|}}n|d|g7}x.|D]&} || o|id| qvqvW|i||o|i|n|ii|id||SWd|o|i|nXdS(sReturn 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.cSs|i|||fdS(N(R(R~R5RR((s Tkinter.pyct append_tripleA ss-commandRDtdumpN( RRQRSR@RR+R1RoRF( R3RRRRjRit func_nameRRR~((s Tkinter.pycR, s,     cGs-|i|ii|idf|pdS(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 tedit((RR+R1Ro(R3Ri((s Tkinter.pycRT 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. tmodified(R(R3targ((s Tkinter.pyct edit_modifiedd s cCs |idS(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. tredo(R(R3((s Tkinter.pyct edit_redoo scCs |idS(s(Clears the undo and redo stacks treset(R(R3((s Tkinter.pyct edit_resety scCs |idS(snInserts a separator (boundary) on the undo stack. Does nothing when the undo option is false R(R(R3((s Tkinter.pyctedit_separator~ scCs |idS(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 tundo(R(R3((s Tkinter.pyct edit_undo s cCs|ii|id||S(s5Return the text from INDEX1 to INDEX2 (not included).R=(R+R1Ro(R3RR((s Tkinter.pycR= sc Cs]|d djod|}n|ddjo|d }n|ii|idd||S(s9Return the value of OPTION of an embedded image at INDEX.iRDiRCRR}(R+R1Ro(R3RR((s Tkinter.pyct image_cget s cKs|idd|f||S(s%Configure an embedded image at INDEX.RR|(R{(R3RRRj((s Tkinter.pyctimage_configure scKs+|ii|idd||i||S(s"Create an embedded image at INDEX.RR(R+R1RoR(R3RRRj((s Tkinter.pyct image_create s cCs|ii|iddS(s3Return all names of embedded images in this widget.RR(R+R1Ro(R3((s Tkinter.pycR scCs|ii|id|S(s1Return the index in the form line.char for INDEX.R(R+R1Ro(R3R((s Tkinter.pycR scGs'|ii|id||f|dS(sInsert 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+R1Ro(R3RtcharsRi((s Tkinter.pycR^ scCs"|ii|idd||fS(sChange the gravity of a mark MARKNAME to DIRECTION (LEFT or RIGHT). Return the current value if None is given for DIRECTION.Rtgravity(R+R1Ro(R3tmarkNamet direction((s Tkinter.pyct mark_gravity s cCs%|ii|ii|iddS(sReturn all mark names.RR(R+RKR1Ro(R3((s Tkinter.pyct mark_names scCs#|ii|idd||dS(s0Set mark MARKNAME before the character at INDEX.RR0N(R+R1Ro(R3R-R((s Tkinter.pyctmark_set scGs$|ii|iddf|dS(sDelete all marks in MARKNAMES.RtunsetN(R+R1Ro(R3t markNames((s Tkinter.pyct mark_unset scCs#|ii|idd|pdS(s-Return the name of the next mark after INDEX.RtnextN(R+R1RoR(R3R((s Tkinter.pyct mark_next scCs#|ii|idd|pdS(s2Return the name of the previous mark before INDEX.RtpreviousN(R+R1RoR(R3R((s Tkinter.pyct mark_previous scCs#|ii|idd||dS(s&Remember the current X, Y coordinates.RRN(R+R1Ro(R3RR+((s Tkinter.pycR 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.RRN(R+R1Ro(R3RR+((s Tkinter.pycR sc Cs|idg} |o| idn|o| idn|o| idn|o| idn|o| idn| o| id| i| n|dd jo| id n| i|| i||o| i|n|iit| S( sSearch 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-countiRDs--(RoRR+R1R( R3RRt stopindextforwardst backwardstexacttregexptnocaseRRi((s Tkinter.pycR9 s*   cCs|ii|id|dS(s3Scroll such that the character at INDEX is visible.RN(R+R1Ro(R3R((s Tkinter.pycR 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.ttagRN(R+R1Ro(R3ttagNameRRi((s Tkinter.pycttag_add s cCs>|ii|idd||d|o|i|ndS(sgUnbind for all characters with TAGNAME for event SEQUENCE the function identified with FUNCID.R@R9R&N(R+R1RoRF(R3RAR5R7((s Tkinter.pycR| 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@R9(R8Ro(R3RAR5RR((s Tkinter.pycR} sc Cs]|d djod|}n|ddjo|d }n|ii|idd||S(s+Return the value of OPTION for tag TAGNAME.iRDiRCR@R}(R+R1Ro(R3RAR((s Tkinter.pycttag_cget s cKs|idd|f||S(sConfigure a tag TAGNAME.R@R|(R{(R3RARRj((s Tkinter.pyct tag_configure scGs$|ii|iddf|dS(sDelete all tags in TAGNAMES.R@RN(R+R1Ro(R3ttagNames((s Tkinter.pyct tag_delete scCs#|ii|idd||dS(s`Change the priority of tag TAGNAME such that it is lower than the priority of BELOWTHIS.R@RN(R+R1Ro(R3RAR((s Tkinter.pycR scCs(|ii|ii|idd|S(sReturn a list of all tag names.R@R(R+RKR1Ro(R3R((s Tkinter.pyct tag_names s cCs.|ii|ii|idd|||S(sReturn 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 nextrange(R+RKR1Ro(R3RARR((s Tkinter.pyct tag_nextrange scCs.|ii|ii|idd|||S(sReturn 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 prevrange(R+RKR1Ro(R3RARR((s Tkinter.pyct tag_prevrange scCs#|ii|idd||dS(saChange the priority of tag TAGNAME such that it is higher than the priority of ABOVETHIS.R@RN(R+R1Ro(R3RAR((s Tkinter.pycR s cCs(|ii|ii|idd|S(s7Return a list of ranges of text which have tag TAGNAME.R@tranges(R+RKR1Ro(R3RA((s Tkinter.pyct tag_ranges scCs&|ii|idd|||dS(sARemove tag TAGNAME from all characters between INDEX1 and INDEX2.R@RcN(R+R1Ro(R3RARR((s Tkinter.pyct tag_remove s c Cs]|d djod|}n|ddjo|d }n|ii|idd||S(s:Return the value of OPTION of an embedded window at INDEX.iRDiRCRnR}(R+R1Ro(R3RR((s Tkinter.pyct window_cget s cKs|idd|f||S(s&Configure an embedded window at INDEX.RnR|(R{(R3RRRj((s Tkinter.pyctwindow_configure' scKs3|ii|idd|f|i||dS(sCreate a window at INDEX.RnRN(R+R1RoR(R3RRRj((s Tkinter.pyct window_create+ s cCs%|ii|ii|iddS(s4Return all names of embedded windows in this widget.RnR(R+RKR1Ro(R3((s Tkinter.pyct window_names0 s cGsK|p#|i|ii|idSn|ii|idf|dS(s1Query and change horizontal position of the view.RN(RAR+R1Ro(R3R4((s Tkinter.pycR4 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.RRN(R+R1Ro(R3R((s Tkinter.pycR9 scCs#|ii|idd||dS(s\Shift the x-view according to NUMBER which is measured in "units" or "pages" (WHAT).RRN(R+R1Ro(R3RR4((s Tkinter.pycR= scGsK|p#|i|ii|idSn|ii|idf|dS(s/Query and change vertical position of the view.RN(RAR+R1Ro(R3R4((s Tkinter.pycRA 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.RRN(R+R1Ro(R3R((s Tkinter.pycRF scCs#|ii|idd||dS(s\Shift the y-view according to NUMBER which is measured in "units" or "pages" (WHAT).RRN(R+R1Ro(R3RR4((s Tkinter.pycRJ scGs$|ii|iddf|dS(sObsolete function, use see.Rs -pickplaceN(R+R1Ro(R3R4((s Tkinter.pyctyview_pickplaceN sN(@RRRRR7RRRRRRRRRRRR R"R$R%R'R=R(R)R*RRR^R/R0R1R4R6R8RRR9RRBR|R}RCRDt tag_configRFRRGRIRKRRMRNRORPt window_configRQRRRRRRRRRS(((s Tkinter.pycR s~         (                                           t_setitcBs#eZdZddZdZRS(s>Internal class. It wraps the command in the widget OptionMenu.cCs||_||_||_dS(N(t _setit__valuet _setit__vart_setit__callback(R3tvarR5RB((s Tkinter.pycR7U s  cGs8|ii|i|io|i|i|ndS(N(RXR0RWRY(R3Ri((s Tkinter.pycRNY s N(RRRRR7RN(((s Tkinter.pycRVS s t OptionMenucBs)eZdZdZdZdZRS(s?OptionMenu which allows the user to select a value from a menu.c Os5hdd<|d<dd<td<dd<dd <}ti||d |d |_t|d d dd}|_|i|_|id}|i do |d=n|ot d|i dn|i d|dt |||x0|D](} |i d| dt || |qW||d s s<1>s(RLR7R9RTRVRWRX(R3R4RRj((s Tkinter.pycR7s N(RRRR7(((s Tkinter.pycRst TributtoncBseZdhdZRS(cKsti||d|||id|i|id|i|id|i|id|i|d|d<|d|ds s<1>stbgtfgtactivebackground(RLR7R9RTRVRWRX(R3R4RRj((s Tkinter.pycR7sN(RRRR7(((s Tkinter.pycRsc Cst}dt}tdjo1y|tdd}WqQtj oqQXnt|d|}|it|ddd|d}|i||_t|dd d|i}|i|i |i |i |i dS( NsThis is Tcl/Tk version %sg333333 @s This should be a cedilla: s iso-8859-1Rs Click me!RcSs|iidd|idS(Rs[%s](ttestR|(Ry((s Tkinter.pycRs tQUIT( Rt TclVersiontunicodet NameErrorRRRRRRbRR RR](RyRRRR@((s Tkinter.pyct_tests(            t__main__(YRt __version__RqtplatformtFixTkRttkinterRRt TkconstantstMacOSRt ImportErrorRRRRRRRtREADABLEtWRITABLEt EXCEPTIONtcreatefilehandlerRtdeletefilehandlerRRRRRRR R$R/R%RPRTRXRZR]RVRWRYR[R`RMRRR5R6R;R@RERLRMRRR]R`RaRbRcRdRRRRRRRRR R R RRVR[RgRjRuRRRvRzR|RRRR(((s Tkinter.pycss                ,  L  ~,546>      Jvm!(a %<<