B }Ž†Ô‡aò´ã@sLddlZddlZddlTddlmZddlZdZdZdZdZdZd Z d Z d Z d Z d Z dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZGdd „d ƒZ Gd!d"„d"ej!e ƒZ!Gd#d$„d$ƒZ"ej#j$e"fej#_$Gd%d&„d&ej#ƒZ%Gd'd(„d(e%ƒZ&Gd)d*„d*ƒZ'Gd+d,„d,e%ƒZ(Gd-d.„d.e%ƒZ)Gd/d0„d0e%ƒZ*Gd1d2„d2e%ƒZ+Gd3d4„d4e%ƒZ,Gd5d6„d6e%ƒZ-Gd7d8„d8e%ƒZ.Gd9d:„d:e%ƒZ/Gd;d<„d„d>e%ƒZ1Gd?d@„d@e%ƒZ2GdAdB„dBe%ƒZ3GdCdD„dDe%ƒZ4GdEdF„dFe%e5e6ƒZ7GdGdH„dHe%ƒZ8GdIdJ„dJe%ƒZ9GdKdL„dLe%ƒZ:GdMdN„dNe%ƒZ;GdOdP„dPe%ƒZGdUdV„dVe%ƒZ?GdWdX„dXe%ƒZ@GdYdZ„dZe%ƒZAGd[d\„d\e%ƒZBGd]d^„d^e%ƒZCGd_d`„d`e%ƒZDGdadb„dbe%ƒZEGdcdd„dde%ƒZFGdedf„dfe%ƒZGGdgdh„dhe%ƒZHGdidj„dje%ƒZIGdkdl„dle%ƒZJGdmdn„dne%ƒZKGdodp„dpe%e5e6ƒZLGdqdr„dre%ƒZMGdsdt„dte%ƒZNGdudv„dveOe&ƒZPGdwdx„dxeQe&ƒZRGdydz„dzeSe&ƒZTGd{d|„d|eUe&ƒZVGd}d~„d~eWe&ƒZXGdd€„d€eYe&ƒZZGdd‚„d‚e[e&ƒZ\Gdƒd„„d„e]e&ƒZ^Gd…d†„d†e_e&ƒZ`Gd‡dˆ„dˆeae&ƒZbGd‰dŠ„dŠeDe&ƒZcGd‹dŒ„dŒe7e&ƒZdGddŽ„dŽeCe&ƒZeGdd„deLe&ƒZfGd‘d’„d’e*e&ƒZgGd“d”„d”e,e&ƒZhGd•d–„d–e.e&ƒZiGd—d˜„d˜e/e&ƒZjGd™dš„dše2e&ƒZkGd›dœ„dœe*e&ƒZlGddž„džeKe&ƒZmGdŸd „d e>e&ƒZnGd¡d¢„d¢e@e&ƒZod£d¤„Zpd¥d¦„ZqGd§d¨„d¨e%ƒZrGd©dª„dªe%e5e6ƒZsGd«d¬„d¬esƒZtdS)­éN)Ú*)Ú _cnfmergeÚwindowÚtextZstatusZ immediateÚimageZ imagetextZballoonÚautoZ acrosstopÚasciiZcellÚcolumnZ decreasingZ increasingZintegerÚmainÚmaxÚrealÚrowzs-regionzx-regionzy-regionééééé c@sVeZdZdZdd„Zdd„Zddd„Zdd d „Zd d „Zd d„Z dd„Z ddd„Z dS)Ú tixCommanda”The tix commands provide access to miscellaneous elements of Tix's internal state and the Tix application context. Most of the information manipulated by these commands pertains to the application as a whole, or to a screen or display, rather than to a particular window. This is a mixin class, assumed to be mixed to Tkinter.Tk that supports the self.tk.call method. cCs|j dd|¡S)a¯Tix maintains a list of directories under which the tix_getimage and tix_getbitmap commands will search for image files. The standard bitmap directory is $TIX_LIBRARY/bitmaps. The addbitmapdir command adds directory into this list. By using this command, the image files of an applications can also be located using the tix_getimage or tix_getbitmap command. ÚtixZ addbitmapdir)ÚtkÚcall)ÚselfZ directory©rú0/opt/alt/python37/lib64/python3.7/tkinter/tix.pyÚtix_addbitmapdirRs ztixCommand.tix_addbitmapdircCs|j dd|¡S)z·Returns the current value of the configuration option given by option. Option may be any of the options described in the CONFIGURATION OPTIONS section. rÚcget)rr)rÚoptionrrrÚtix_cget^sztixCommand.tix_cgetNcKsd|rt||fƒ}n |rt|ƒ}|dkr2| dd¡St|tƒrN| ddd|¡S|j d| |¡¡S)a‘Query or modify the configuration options of the Tix application context. If no option is specified, returns a dictionary all of the available options. If option is specified with no value, then the command returns a list describing the one named option (this list will be identical to the corresponding sublist of the value returned if no option is specified). If one or more option-value pairs are specified, then the command modifies the given option(s) to have the given value(s); in this case the command returns an empty string. Option may be any of the configuration options. NrÚ configureú-)rr)rÚ _getconfigureÚ isinstanceÚstrZ_getconfigure1rrÚ_options)rÚcnfÚkwrrrÚ tix_configurees   ztixCommand.tix_configurecCs*|dk r|j dd|¡S|j dd¡SdS)añReturns the file selection dialog that may be shared among different calls from this application. This command will create a file selection dialog widget when it is called the first time. This dialog will be returned by all subsequent calls to tix_filedialog. An optional dlgclass parameter can be passed to specified what type of file selection dialog widget is desired. Possible options are tix FileSelectDialog or tixExFileSelectDialog. NrZ filedialog)rr)rZdlgclassrrrÚtix_filedialog{s ztixCommand.tix_filedialogcCs|j dd|¡S)aâLocates a bitmap file of the name name.xpm or name in one of the bitmap directories (see the tix_addbitmapdir command above). By using tix_getbitmap, you can avoid hard coding the pathnames of the bitmap files in your application. When successful, it returns the complete pathname of the bitmap file, prefixed with the character '@'. The returned value can be used to configure the -bitmap option of the TK and Tix widgets. rZ getbitmap)rr)rÚnamerrrÚ tix_getbitmap‰s ztixCommand.tix_getbitmapcCs|j dd|¡S)aÅLocates an image file of the name name.xpm, name.xbm or name.ppm in one of the bitmap directories (see the addbitmapdir command above). If more than one file with the same name (but different extensions) exist, then the image type is chosen according to the depth of the X display: xbm images are chosen on monochrome displays and color images are chosen on color displays. By using tix_ getimage, you can avoid hard coding the pathnames of the image files in your application. When successful, this command returns the name of the newly created image, which can be used to configure the -image option of the Tk and Tix widgets. rZgetimage)rr)rr(rrrÚ tix_getimage”s ztixCommand.tix_getimagecCs|j ddd|¡S)a@Gets the options maintained by the Tix scheme mechanism. Available options include: active_bg active_fg bg bold_font dark1_bg dark1_fg dark2_bg dark2_fg disabled_fg fg fixed_font font inactive_bg inactive_fg input1_bg input2_bg italic_font light1_bg light1_fg light2_bg light2_fg menu_font output1_bg output2_bg select_bg select_fg selector rrÚget)rr)rr(rrrÚtix_option_get¢sztixCommand.tix_option_getcCs2|dk r|j dd|||¡S|j dd||¡SdS)aÉResets the scheme and fontset of the Tix application to newScheme and newFontSet, respectively. This affects only those widgets created after this call. Therefore, it is best to call the resetoptions command before the creation of any widgets in a Tix application. The optional parameter newScmPrio can be given to reset the priority level of the Tk options set by the Tix schemes. Because of the way Tk handles the X option database, after Tix has been has imported and inited, it is not possible to reset the color schemes and font sets using the tix config command. Instead, the tix_resetoptions command must be used. NrZ resetoptions)rr)rZ newSchemeZ newFontSetZ newScmPriorrrÚtix_resetoptions³sztixCommand.tix_resetoptions)N)N)N) Ú__name__Ú __module__Ú __qualname__Ú__doc__rrr&r'r)r*r,r-rrrrrGs     rc@s"eZdZdZddd„Zdd„ZdS) ÚTkz{Toplevel widget of Tix which represents mostly the main window of an application. It has an associated Tcl interpreter.NÚTixcCsbtj ||||¡tj d¡}|j d¡|dk rR|j d|¡|j d|¡|j d¡dS)NZ TIX_LIBRARYz|s|j dd|j¡S|ddkr*d|}|j dd|j|¡S)Nr<Úinforr)rrr=)rrrrrrJüs  z Form.infocs(‡fdd„ˆj ˆj ddˆj¡¡DƒS)Ncsg|]}ˆ |¡‘qSr)Ú _nametowidget)Ú.0rG)rrrú szForm.slaves..r<Úslaves)rrFrr=)rr)rrrNs z Form.slaves)rr)N) r.r/r0r1r>r?rBrCrDrErJrNrrrrr;Þs  r;c@sreZdZdZdddiifdd„Zdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dd„Z idfdd„Z dd„Z dS)Ú TixWidgetaQA TixWidget class is used to package all (or most) Tix widgets. Widget initialization is extended in two ways: 1) It is possible to give a list of options which must be part of the creation command (so called Tix 'static' options). These cannot be given as a 'config' command later. 2) It is possible to give the name of an existing TK widget. These are child widgets created automatically by a Tix mega-widget. The Tk call to create these widgets is therefore bypassed in TixWidget.__init__ Both options are for use by subclasses only. Nc Cs´|rt||fƒ}nt|ƒ}d}|r.| d¡ndg}x6t| ¡ƒD]&\}}||krB|d||f}||=qBW||_t |||¡|rš|jj||j f|žŽ|rªt  ||¡i|_ dS)NrÚoptionsr) rÚappendÚlistÚitemsÚ widgetNameÚWidgetÚ_setuprrr=r>Úsubwidget_list) rÚmasterrTZstatic_optionsr$r%ZextraÚkÚvrrrr5s$   zTixWidget.__init__cCs ||jkr|j|St|ƒ‚dS)N)rWÚAttributeError)rr(rrrÚ __getattr__Gs  zTixWidget.__getattr__cCs|j d|j|¡dS)z1Set a variable without calling its action routineZ tixSetSilentN)rrr=)rrArrrÚ set_silentLszTixWidget.set_silentcCsD| |¡}|s$td|d|jƒ‚|t|jƒdd…}| |¡S)zSReturn the named subwidget (which must have been created by the sub-class).z Subwidget z not child of éN)Ú_subwidget_nameÚTclErrorÚ_nameÚlenr=rK)rr(ÚnrrrÚ subwidgetPs  zTixWidget.subwidgetcCs^| ¡}|sgSg}xD|D]<}|t|jƒdd…}y| | |¡¡WqYqXqW|S)zReturn all subwidgets.r^N)Ú_subwidget_namesrbr=rQrK)rÚnamesZretlistr(rrrÚsubwidgets_allZs  zTixWidget.subwidgets_allcCs,y|j |jd|¡Stk r&dSXdS)z7Get a subwidget name (returns a String, not a Widget !)rdN)rrr=r`)rr(rrrr_iszTixWidget._subwidget_namecCs8y|j |jdd¡}|j |¡Stk r2dSXdS)z"Return the name of all subwidgets.Z subwidgetsz-allN)rrr=rFr`)rrGrrrreps  zTixWidget._subwidget_namescCs`|dkr dSt|tƒst|ƒ}t|tƒs0t|ƒ}| ¡}x"|D]}|j |dd||¡q>WdS)z8Set configuration options for all subwidgets (and self).r9Nrr)r!r"Úreprrerr)rrrArfr(rrrÚ config_allxs   zTixWidget.config_allcKs†|stj}|stdƒ‚|r,|r,t||fƒ}n|r4|}d}x6| ¡D]*\}}t|ƒr\| |¡}|d||f}qBW|j dd|f|¡S)NzToo early to create imagerrrÚcreate) r4Ú _default_rootÚ RuntimeErrorrrSÚcallableÚ _registerrr)rZimgtyper$rXr%rPrYrZrrrÚ image_create„s zTixWidget.image_createcCs.y|j dd|¡Wntk r(YnXdS)NrÚdelete)rrr`)rZimgnamerrrÚ image_delete‘szTixWidget.image_delete)r.r/r0r1r5r\r]rdrgr_rerirorqrrrrrO s ,   rOc@s"eZdZdZddd„Zdd„ZdS) Ú TixSubWidgetz¥Subwidget class. This is used to mirror child widgets automatically created by Tix/Tk as part of a mega-widget in Python (which is not informed of this)r^c Csü|rD| |¡}y$|t|jƒdd…}| d¡}Wng}YnX|s`t ||ddd|i¡n’|}xjtt|ƒdƒD]V}d |d|d…¡} y| | ¡} | }Wqvt k rÊt |||ddd}YqvXqvW|rÜ|d}t ||ddd|i¡||_ dS)Nr^Ú.r(r)Údestroy_physicallyÚcheck_intermediateéÿÿÿÿ) r_rbr=ÚsplitrOr5ÚrangeÚjoinrKÚKeyErrorrrrt) rrXr(rtruÚpathZplistÚparentÚircÚwrrrr5¢s.    zTixSubWidget.__init__cCsnxt|j ¡ƒD] }| ¡qW|j|jjkr:|jj|j=|j|jjkrT|jj|j=|jrj|j  d|j ¡dS)Nr:) rRÚchildrenÚvaluesr:rarXrWrtrrr=)rÚcrrrr:Âs   zTixSubWidget.destroyN)r^r^)r.r/r0r1r5r:rrrrrr›s rrc@sVeZdZdZifddœdd„Zdd„Zdd „Zd d „Zd d „Zifdd„Z dd„Z dS)Ú DisplayStylezRDisplayStyle - handle configuration options shared by (multiple) Display ItemsN)rXcKsd|s:d|kr|d}n$d|kr(|d}ntj}|s:tdƒ‚|j|_|jjd|f| ||¡žŽ|_dS)NZ refwindowz1Too early to create display style: no root windowZtixDisplayStyle)r4rkrlrrr#Ú stylename)rÚitemtyper$rXr%rrrr5×s   zDisplayStyle.__init__cCs|jS)N)rƒ)rrrrÚ__str__æszDisplayStyle.__str__cCsL|r|rt||fƒ}n|r|}d}x$| ¡D]\}}|d||f}q,W|S)Nrr)rrS)rr$r%ZoptsrYrZrrrr#észDisplayStyle._optionscCs|j |jd¡dS)Nrp)rrrƒ)rrrrrpószDisplayStyle.deletecCs|j |jdd||¡dS)Nrz-%s)rrrƒ)rr@rArrrrBöszDisplayStyle.__setitem__cKs|j|jdf| ||¡žŽS)Nr)r rƒr#)rr$r%rrrr>ùszDisplayStyle.configcCs|j |jdd|¡S)Nrz-%s)rrrƒ)rr@rrrÚ __getitem__ýszDisplayStyle.__getitem__) r.r/r0r1r5r…r#rprBr>r†rrrrr‚Ós  r‚c@s2eZdZdZdifdd„Zifdd„Zdd„ZdS) ÚBalloonzBalloon help widget. Subwidget Class --------- ----- label Label message MessageNcKsNdddddg}t ||d|||¡t|ddd |jd<t|d dd |jd <dS) NrPZinstallcolormapZinitwaitZ statusbarZcursorZ tixBalloonÚlabelr)rtÚmessage)rOr5Ú _dummyLabelrW)rrXr$r%Ústaticrrrr5szBalloon.__init__cKs&|jj|jd|jf| ||¡žŽdS)zkBind balloon widget to another. One balloon widget may be bound to several widgets at the same timeÚbindN)rrr=r#)rÚwidgetr$r%rrrÚ bind_widgetszBalloon.bind_widgetcCs|j |jd|j¡dS)NÚunbind)rrr=)rrrrrÚ unbind_widgetszBalloon.unbind_widget)r.r/r0r1r5rŽrrrrrr‡s r‡c@s2eZdZdZdifdd„Zifdd„Zdd„ZdS) Ú ButtonBoxzgButtonBox - A container for pushbuttons. Subwidgets are the buttons added with the add method. NcKst ||dddg||¡dS)NZ tixButtonBoxÚ orientationrP)rOr5)rrXr$r%rrrr5$s zButtonBox.__init__cKs4|jj|jd|f| ||¡žŽ}t||ƒ|j|<|S)z$Add a button with given name to box.Úadd)rrr=r#Ú _dummyButtonrW)rr(r$r%Zbtnrrrr“(s z ButtonBox.addcCs ||jkr|j |jd|¡dS)NÚinvoke)rWrrr=)rr(rrrr•/s zButtonBox.invoke)r.r/r0r1r5r“r•rrrrr‘ s r‘c@s>eZdZdZdifdd„Zdd„Zdd„Zd d „Zd d „ZdS) ÚComboBoxa€ComboBox - an Entry field with a dropdown menu. The user can select a choice by either typing in the entry subwidget or selecting from the listbox subwidget. Subwidget Class --------- ----- entry Entry arrow Button slistbox ScrolledListBox tick Button cross Button : present if created with the fancy optionNc Ksšt ||dddddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|d ƒ|jd <y$t|d ƒ|jd <t|d ƒ|jd <Wntk r”YnXdS) NZ tixComboBoxZeditableZdropdownÚfancyrPrˆÚentryÚarrowÚslistboxÚtickÚcross)rOr5rŠrWÚ _dummyEntryr”Ú_dummyScrolledListBoxÚ TypeError)rrXr$r%rrrr5As   zComboBox.__init__cCs|j |jd|¡dS)NZ addhistory)rrr=)rr"rrrÚ add_historySszComboBox.add_historycCs|j |jd|¡dS)NZ appendhistory)rrr=)rr"rrrÚappend_historyVszComboBox.append_historycCs|j |jd||¡dS)NÚinsert)rrr=)rÚindexr"rrrr¢YszComboBox.insertcCs|j |jd|¡dS)NÚpick)rrr=)rr£rrrr¤\sz ComboBox.pick) r.r/r0r1r5r r¡r¢r¤rrrrr–3s  r–c@s>eZdZdZdifdd„Zdd„Zdd„Zd d „Zd d „ZdS) ÚControlaControl - An entry field with value change arrows. The user can adjust the value by pressing the two arrow buttons or by entering the value directly into the entry. The new value will be checked against the user-defined upper and lower limits. Subwidget Class --------- ----- incr Button decr Button entry Entry label LabelNcKsZt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZ tixControlrPÚincrÚdecrrˆr˜)rOr5r”rWrŠr)rrXr$r%rrrr5ms zControl.__init__cCs|j |jd¡dS)Nr§)rrr=)rrrrÚ decrementtszControl.decrementcCs|j |jd¡dS)Nr¦)rrr=)rrrrÚ incrementwszControl.incrementcCs|j |jd¡dS)Nr•)rrr=)rrrrr•zszControl.invokecCs|j |jd¡dS)NÚupdate)rrr=)rrrrrª}szControl.update) r.r/r0r1r5r¨r©r•rªrrrrr¥_s  r¥c@s$eZdZdZifdd„Zdd„ZdS)ÚDirListaRDirList - displays a list view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory. Subwidget Class --------- ----- hlist HList hsb Scrollbar vsb ScrollbarcKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZ tixDirListrPÚhlistÚvsbÚhsb)rOr5Ú _dummyHListrWÚ_dummyScrollbar)rrXr$r%rrrr5ŒszDirList.__init__cCs|j |jd|¡dS)NÚchdir)rrr=)rÚdirrrrr±’sz DirList.chdirN)r.r/r0r1r5r±rrrrr«€s  r«c@s$eZdZdZifdd„Zdd„ZdS)ÚDirTreea‚DirTree - Directory Listing in a hierarchical view. Displays a tree view of a directory, its previous directories and its sub-directories. The user can choose one of the directories displayed in the list or change to another directory. Subwidget Class --------- ----- hlist HList hsb Scrollbar vsb ScrollbarcKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZ tixDirTreerPr¬r­r®)rOr5r¯rWr°)rrXr$r%rrrr5¢szDirTree.__init__cCs|j |jd|¡dS)Nr±)rrr=)rr²rrrr±¨sz DirTree.chdirN)r.r/r0r1r5r±rrrrr³•s  r³c@seZdZdZifdd„ZdS)Ú DirSelectBoxa¡DirSelectBox - Motif style file select box. It is generally used for the user to choose a file. FileSelectBox stores the files mostly recently selected into a ComboBox widget so that they can be quickly selected again. Subwidget Class --------- ----- selection ComboBox filter ComboBox dirlist ScrolledListBox filelist ScrolledListBoxcKs:t ||ddg||¡t|dƒ|jd<t|dƒ|jd<dS)NZtixDirSelectBoxrPÚdirlistÚdircbx)rOr5Ú _dummyDirListrWÚ_dummyFileComboBox)rrXr$r%rrrr5¹szDirSelectBox.__init__N)r.r/r0r1r5rrrrr´«s r´c@s,eZdZdZifdd„Zdd„Zdd„ZdS) ÚExFileSelectBoxaŽExFileSelectBox - MS Windows style file select box. It provides a convenient method for the user to select files. Subwidget Class --------- ----- cancel Button ok Button hidden Checkbutton types ComboBox dir ComboBox file ComboBox dirlist ScrolledListBox filelist ScrolledListBoxcKsšt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|d ƒ|jd <t|d ƒ|jd <dS) NZtixExFileSelectBoxrPÚcancelÚokÚhiddenÚtypesr²rµÚfileÚfilelist)rOr5r”rWÚ_dummyCheckbuttonÚ_dummyComboBoxr·rž)rrXr$r%rrrr5ÍszExFileSelectBox.__init__cCs|j |jd¡dS)NÚfilter)rrr=)rrrrrÂØszExFileSelectBox.filtercCs|j |jd¡dS)Nr•)rrr=)rrrrr•ÛszExFileSelectBox.invokeN)r.r/r0r1r5rÂr•rrrrr¹¾s  r¹c@s,eZdZdZifdd„Zdd„Zdd„ZdS) ÚDirSelectDialoga#The DirSelectDialog widget presents the directories in the file system in a dialog window. The user can use this dialog window to navigate through the file system to select the desired directory. Subwidgets Class ---------- ----- dirbox DirSelectDialogcKs*t ||ddg||¡t|dƒ|jd<dS)NZtixDirSelectDialogrPZdirbox)rOr5Ú_dummyDirSelectBoxrW)rrXr$r%rrrr5ês  zDirSelectDialog.__init__cCs|j |jd¡dS)NÚpopup)rrr=)rrrrrÅðszDirSelectDialog.popupcCs|j |jd¡dS)NÚpopdown)rrr=)rrrrrÆószDirSelectDialog.popdownN)r.r/r0r1r5rÅrÆrrrrrÃàs rÃc@s,eZdZdZifdd„Zdd„Zdd„ZdS) ÚExFileSelectDialogzÒExFileSelectDialog - MS Windows style file select dialog. It provides a convenient method for the user to select files. Subwidgets Class ---------- ----- fsbox ExFileSelectBoxcKs*t ||ddg||¡t|dƒ|jd<dS)NZtixExFileSelectDialogrPÚfsbox)rOr5Ú_dummyExFileSelectBoxrW)rrXr$r%rrrr5s  zExFileSelectDialog.__init__cCs|j |jd¡dS)NrÅ)rrr=)rrrrrÅszExFileSelectDialog.popupcCs|j |jd¡dS)NrÆ)rrr=)rrrrrÆ szExFileSelectDialog.popdownN)r.r/r0r1r5rÅrÆrrrrrÇøs rÇc@s,eZdZdZifdd„Zdd„Zdd„ZdS) Ú FileSelectBoxa¤ExFileSelectBox - Motif style file select box. It is generally used for the user to choose a file. FileSelectBox stores the files mostly recently selected into a ComboBox widget so that they can be quickly selected again. Subwidget Class --------- ----- selection ComboBox filter ComboBox dirlist ScrolledListBox filelist ScrolledListBoxcKsZt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixFileSelectBoxrPrµr¿rÂÚ selection)rOr5ržrWrÁ)rrXr$r%rrrr5s zFileSelectBox.__init__cCs|j |jd¡dS)NrÂ)rrr=)rrrrÚ apply_filter!szFileSelectBox.apply_filtercCs|j |jd¡dS)Nr•)rrr=)rrrrr•$szFileSelectBox.invokeN)r.r/r0r1r5rÌr•rrrrrÊ s  rÊc@s,eZdZdZifdd„Zdd„Zdd„ZdS) ÚFileSelectDialogz£FileSelectDialog - Motif style file select dialog. Subwidgets Class ---------- ----- btns StdButtonBox fsbox FileSelectBoxcKs:t ||ddg||¡t|dƒ|jd<t|dƒ|jd<dS)NZtixFileSelectDialogrPZbtnsrÈ)rOr5Ú_dummyStdButtonBoxrWÚ_dummyFileSelectBox)rrXr$r%rrrr51s  zFileSelectDialog.__init__cCs|j |jd¡dS)NrÅ)rrr=)rrrrrÅ7szFileSelectDialog.popupcCs|j |jd¡dS)NrÆ)rrr=)rrrrrÆ:szFileSelectDialog.popdownN)r.r/r0r1r5rÅrÆrrrrrÍ(s rÍc@s,eZdZdZifdd„Zdd„Zdd„ZdS) Ú FileEntrya_FileEntry - Entry field with button that invokes a FileSelectDialog. The user can type in the filename manually. Alternatively, the user can press the button widget that sits next to the entry, which will bring up a file selection dialog. Subwidgets Class ---------- ----- button Button entry EntrycKs<t ||dddg||¡t|dƒ|jd<t|dƒ|jd<dS)NZ tixFileEntryZ dialogtyperPZbuttonr˜)rOr5r”rWr)rrXr$r%rrrr5Is zFileEntry.__init__cCs|j |jd¡dS)Nr•)rrr=)rrrrr•OszFileEntry.invokecCsdS)Nr)rrrrÚ file_dialogRszFileEntry.file_dialogN)r.r/r0r1r5r•rÑrrrrrÐ=s  rÐc@sêeZdZdZdifdd„Zifdd„Zdifdd„Zd d „Zd d „Zdldd„Z dd„Z dd„Z dd„Z dd„Z dd„Zdd„Zdd„Zdd„Zifd d!„Zifd"d#„Zd$d%„Zd&d'„ZeZd(d)„Zd*d+„Zd,d-„Zifd.d/„Zifd0d1„Zd2d3„Zd4d5„Zd6d7„Zd8d9„Zd:d;„Z dd?„Z"d@dA„Z#dBdC„Z$dDdE„Z%dFdG„Z&dHdI„Z'dJdK„Z(dLdM„Z)dNdO„Z*dPdQ„Z+dRdS„Z,ifdTdU„Z-ifdVdW„Z.dXdY„Z/dZd[„Z0d\d]„Z1ifd^d_„Z2d`da„Z3dbdc„Z4ifddde„Z5dfdg„Z6dndhdi„Z7djdk„Z8dS)oÚHListaHList - Hierarchy display widget can be used to display any data that have a hierarchical structure, for example, file system directory trees. The list entries are indented and connected by branch lines according to their places in the hierarchy. Subwidgets - NoneNcKst ||dddg||¡dS)NZtixHListÚcolumnsrP)rOr5)rrXr$r%rrrr5^s zHList.__init__cKs |jj|jd|f| ||¡žŽS)Nr“)rrr=r#)rr˜r$r%rrrr“bsz HList.addcKs(|sd}|jj|jd|f| ||¡žŽS)Nr9Zaddchild)rrr=r#)rr|r$r%rrrÚ add_childeszHList.add_childcCs|j |jdd|¡dS)NÚanchorÚset)rrr=)rr˜rrrÚ anchor_setkszHList.anchor_setcCs|j |jdd¡dS)NrÕÚclear)rrr=)rrrrÚ anchor_clearnszHList.anchor_clearrcCs6|s|j |jdd||¡S|j |jdd|d|¡SdS)Nr Úwidthz-char)rrr=)rÚcolrÚÚcharsrrrÚ column_widthqszHList.column_widthcCs|j |jdd¡dS)NrpÚall)rrr=)rrrrÚ delete_allxszHList.delete_allcCs|j |jdd|¡dS)Nrpr˜)rrr=)rr˜rrrÚ delete_entry{szHList.delete_entrycCs|j |jdd|¡dS)NrpZ offsprings)rrr=)rr˜rrrÚdelete_offsprings~szHList.delete_offspringscCs|j |jdd|¡dS)NrpZsiblings)rrr=)rr˜rrrÚdelete_siblingsszHList.delete_siblingscCs|j |jdd|¡dS)NÚdragsiterÖ)rrr=)rr£rrrÚ dragsite_set„szHList.dragsite_setcCs|j |jdd¡dS)NrãrØ)rrr=)rrrrÚdragsite_clear‡szHList.dragsite_clearcCs|j |jdd|¡dS)NÚdropsiterÖ)rrr=)rr£rrrÚ dropsite_setŠszHList.dropsite_setcCs|j |jdd¡dS)NrærØ)rrr=)rrrrÚdropsite_clearszHList.dropsite_clearcKs&|jj|jdd|f| ||¡žŽdS)NÚheaderrj)rrr=r#)rrÛr$r%rrrÚ header_createszHList.header_createcKs@|dkr| |jdd|¡S|jj|jdd|f| ||¡žŽdS)Nrér)r r=rrr#)rrÛr$r%rrrÚheader_configure“szHList.header_configurecCs|j |jdd||¡S)Nrér)rrr=)rrÛÚoptrrrÚ header_cget™szHList.header_cgetcCs|j |j |jdd|¡¡S)NréZexist)rZ getbooleanrr=)rrÛrrrÚ header_existsœszHList.header_existscCs|j |jdd|¡dS)Nrérp)rrr=)rrÛrrrÚ header_delete£szHList.header_deletecCs|j |jdd|¡S)NréÚsize)rrr=)rrÛrrrÚ header_size¦szHList.header_sizecCs|j |jdd|¡dS)NÚhider˜)rrr=)rr˜rrrÚ hide_entry©szHList.hide_entrycKs&|jj|jdd|f| ||¡žŽdS)NÚ indicatorrj)rrr=r#)rr˜r$r%rrrÚindicator_create¬szHList.indicator_createcKs@|dkr| |jdd|¡S|jj|jdd|f| ||¡žŽdS)Nrôr)r r=rrr#)rr˜r$r%rrrÚindicator_configure°s zHList.indicator_configurecCs|j |jdd||¡S)Nrôr)rrr=)rr˜rìrrrÚindicator_cget·szHList.indicator_cgetcCs|j |jdd|¡S)NrôÚexists)rrr=)rr˜rrrÚindicator_existsºszHList.indicator_existscCs|j |jdd|¡dS)Nrôrp)rrr=)rr˜rrrÚindicator_delete½szHList.indicator_deletecCs|j |jdd|¡S)Nrôrð)rrr=)rr˜rrrÚindicator_sizeÀszHList.indicator_sizecCs|j |jdd¡S)NrJrÕ)rrr=)rrrrÚ info_anchorÃszHList.info_anchorcCs| |j |jdd|¡¡pdS)NrJÚbbox)Ú_getintsrrr=)rr˜rrrÚ info_bboxÆszHList.info_bboxcCs |j |jdd|¡}|j |¡S)NrJr)rrr=rF)rr˜rrrrÚ info_childrenÊszHList.info_childrencCs|j |jdd|¡S)NrJÚdata)rrr=)rr˜rrrÚ info_dataÎszHList.info_datacCs|j |jdd¡S)NrJrã)rrr=)rrrrÚ info_dragsiteÑszHList.info_dragsitecCs|j |jdd¡S)NrJræ)rrr=)rrrrÚ info_dropsiteÔszHList.info_dropsitecCs|j |jdd|¡S)NrJrø)rrr=)rr˜rrrÚ info_exists×szHList.info_existscCs|j |jdd|¡S)NrJr¼)rrr=)rr˜rrrÚ info_hiddenÚszHList.info_hiddencCs|j |jdd|¡S)NrJÚnext)rrr=)rr˜rrrÚ info_nextÝszHList.info_nextcCs|j |jdd|¡S)NrJr|)rrr=)rr˜rrrÚ info_parentàszHList.info_parentcCs|j |jdd|¡S)NrJÚprev)rrr=)rr˜rrrÚ info_prevãszHList.info_prevcCs|j |jdd¡}|j |¡S)NrJrË)rrr=rF)rrrrrÚinfo_selectionæszHList.info_selectioncCs|j |jdd|||¡S)NÚitemr)rrr=)rr˜rÛrìrrrÚ item_cgetêszHList.item_cgetcKsD|dkr| |jdd||¡S|jj|jdd||f| ||¡žŽdS)Nr r)r r=rrr#)rr˜rÛr$r%rrrÚitem_configureíszHList.item_configurecKs(|jj|jdd||f| ||¡žŽdS)Nr rj)rrr=r#)rr˜rÛr$r%rrrÚ item_createószHList.item_createcCs|j |jdd||¡S)Nr rø)rrr=)rr˜rÛrrrÚ item_exists÷szHList.item_existscCs|j |jdd||¡dS)Nr rp)rrr=)rr˜rÛrrrÚ item_deleteúszHList.item_deletecCs|j |jd||¡S)NÚ entrycget)rrr=)rr˜rìrrrrýszHList.entrycgetcKs<|dkr| |jd|¡S|jj|jd|f| ||¡žŽdS)NÚentryconfigure)r r=rrr#)rr˜r$r%rrrrszHList.entryconfigurecCs|j |jd|¡S)NÚnearest)rrr=)rrHrrrrsz HList.nearestcCs|j |jd|¡dS)NÚsee)rrr=)rr˜rrrr sz HList.seecKs$|jj|jddf| ||¡žŽdS)NrËrØ)rrr=r#)rr$r%rrrÚselection_clear szHList.selection_clearcCs|j |jdd|¡S)NrËÚincludes)rrr=)rr˜rrrÚselection_includesszHList.selection_includescCs|j |jdd||¡dS)NrËrÖ)rrr=)rÚfirstÚlastrrrÚ selection_setszHList.selection_setcCs|j |jdd|¡S)NÚshowr˜)rrr=)rr˜rrrÚ show_entryszHList.show_entry)rNN)N)N)9r.r/r0r1r5r“rÔr×rÙrÝrßràrárârärårçrèrêrërírîZ header_existrïrñrórõrör÷rùrúrûrürÿrrrrrrrr r r rrrrrrrrrrrrrrrrrrÒVsl            rÒc@seZdZdZdifdd„ZdS)Ú InputOnlyz?InputOnly - Invisible widget. Unix only. Subwidgets - NoneNcKst ||dd||¡dS)NZ tixInputOnly)rOr5)rrXr$r%rrrr5szInputOnly.__init__)r.r/r0r1r5rrrrrsrc@seZdZdZdifdd„ZdS)Ú LabelEntryaLabelEntry - Entry field with label. Packages an entry widget and a label into one mega widget. It can be used to simplify the creation of ``entry-form'' type of interface. Subwidgets Class ---------- ----- label Label entry EntryNcKs<t ||dddg||¡t|dƒ|jd<t|dƒ|jd<dS)NZ tixLabelEntryÚ labelsiderPrˆr˜)rOr5rŠrWr)rrXr$r%rrrr5*s zLabelEntry.__init__)r.r/r0r1r5rrrrr  sr c@seZdZdZdifdd„ZdS)Ú LabelFrameaeLabelFrame - Labelled Frame container. Packages a frame widget and a label into one mega widget. To create widgets inside a LabelFrame widget, one creates the new widgets relative to the frame subwidget and manage them inside the frame subwidget. Subwidgets Class ---------- ----- label Label frame FrameNcKs<t ||dddg||¡t|dƒ|jd<t|dƒ|jd<dS)NZ tixLabelFramer!rPrˆÚframe)rOr5rŠrWÚ _dummyFrame)rrXr$r%rrrr5;s zLabelFrame.__init__)r.r/r0r1r5rrrrr"0s r"c@s@eZdZdZifdd„Zifdd„Zdd„Zdd „Zd d „Zd S) Ú ListNoteBookaA ListNoteBook widget is very similar to the TixNoteBook widget: it can be used to display many windows in a limited space using a notebook metaphor. The notebook is divided into a stack of pages (windows). At one time only one of these pages can be shown. The user can navigate through these pages by choosing the name of the desired page in the hlist subwidget.cKsNt ||ddg||¡t|ddd|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixListNoteBookrPZpaner)rtr¬Zshlist)rOr5Ú_dummyPanedWindowrWr¯Ú_dummyScrolledHList)rrXr$r%rrrr5Js zListNoteBook.__init__cKs:|jj|jd|f| ||¡žŽt||ƒ|j|<|j|S)Nr“)rrr=r#rrrW)rr(r$r%rrrr“Rs zListNoteBook.addcCs | |¡S)N)rd)rr(rrrÚpageWszListNoteBook.pagecCs>|j |j |jd¡¡}g}x|D]}| | |¡¡q"W|S)NÚpages)rrFrr=rQrd)rrfÚretrGrrrr)Zs  zListNoteBook.pagescCs|j |jd|¡dS)NÚraise)rrr=)rr(rrrÚ raise_pagebszListNoteBook.raise_pageN) r.r/r0r1r5r“r(r)r,rrrrr%Bs   r%c@seZdZdZdifdd„ZdS)ÚMeterzuThe Meter widget can be used to show the progress of a background job which may take a long time to execute. NcKst ||ddg||¡dS)NZtixMeterrP)rOr5)rrXr$r%rrrr5js zMeter.__init__)r.r/r0r1r5rrrrr-esr-c@sReZdZdZdifdd„Zifdd„Zdd„Zd d „Zd d „Zd d„Z dd„Z dS)ÚNoteBookzÞNoteBook - Multi-page container widget (tabbed notebook metaphor). Subwidgets Class ---------- ----- nbframe NoteBookFrame page widgets added dynamically with the add methodNcKs.t ||ddg||¡t|ddd|jd<dS)NZ tixNoteBookrPZnbframer)rt)rOr5rrrW)rrXr$r%rrrr5vszNoteBook.__init__cKs:|jj|jd|f| ||¡žŽt||ƒ|j|<|j|S)Nr“)rrr=r#rrrW)rr(r$r%rrrr“{s z NoteBook.addcCs,|j |jd|¡|j| ¡|j|=dS)Nrp)rrr=rWr:)rr(rrrrp€szNoteBook.deletecCs | |¡S)N)rd)rr(rrrr(…sz NoteBook.pagecCs>|j |j |jd¡¡}g}x|D]}| | |¡¡q"W|S)Nr))rrFrr=rQrd)rrfr*rGrrrr)ˆs  zNoteBook.pagescCs|j |jd|¡dS)Nr+)rrr=)rr(rrrr,szNoteBook.raise_pagecCs|j |jd¡S)NÚraised)rrr=)rrrrr/“szNoteBook.raised) r.r/r0r1r5r“rpr(r)r,r/rrrrr.ns r.c@s eZdZdS)Ú NoteBookFrameN)r.r/r0rrrrr0–sr0c@sLeZdZdZifdd„Zifdd„Zifdd„Zdd „Zd d „Zd d „Z dS)Ú OptionMenuz›OptionMenu - creates a menu button of options. Subwidget Class --------- ----- menubutton Menubutton menu MenucKs:t ||ddg||¡t|dƒ|jd<t|dƒ|jd<dS)NZ tixOptionMenurPÚ menubuttonÚmenu)rOr5Ú_dummyMenubuttonrWÚ _dummyMenu)rrXr$r%rrrr5¢szOptionMenu.__init__cKs&|jj|jdd|f| ||¡žŽdS)Nr“Úcommand)rrr=r#)rr(r$r%rrrÚ add_command§szOptionMenu.add_commandcKs&|jj|jdd|f| ||¡žŽdS)Nr“Z separator)rrr=r#)rr(r$r%rrrÚ add_separatorªszOptionMenu.add_separatorcCs|j |jd|¡dS)Nrp)rrr=)rr(rrrrp­szOptionMenu.deletecCs|j |jd|¡dS)NÚdisable)rrr=)rr(rrrr9°szOptionMenu.disablecCs|j |jd|¡dS)NÚenable)rrr=)rr(rrrr:³szOptionMenu.enableN) r.r/r0r1r5r7r8rpr9r:rrrrr1šs   r1c@sTeZdZdZifdd„Zifdd„Zdd„Zdd „Zd d „Zifd d „Z dd„Z dS)Ú PanedWindowa’PanedWindow - Multi-pane container widget allows the user to interactively manipulate the sizes of several panes. The panes can be arranged either vertically or horizontally.The user changes the sizes of the panes by dragging the resize handle between two panes. Subwidgets Class ---------- ----- g/p widgets added dynamically with the add method.cKst ||dddg||¡dS)NZtixPanedWindowr’rP)rOr5)rrXr$r%rrrr5ÁszPanedWindow.__init__cKs>|jj|jd|f| ||¡žŽt||dd|j|<|j|S)Nr“r)ru)rrr=r#rrrW)rr(r$r%rrrr“Ås zPanedWindow.addcCs,|j |jd|¡|j| ¡|j|=dS)Nrp)rrr=rWr:)rr(rrrrpËszPanedWindow.deletecCs|j |jd|¡dS)NrD)rrr=)rr(rrrrDÐszPanedWindow.forgetcCs|j |jd||¡S)NÚpanecget)rrr=)rr˜rìrrrr<ÓszPanedWindow.panecgetcKs<|dkr| |jd|¡S|jj|jd|f| ||¡žŽdS)NÚ paneconfigure)r r=rrr#)rr˜r$r%rrrr=ÖszPanedWindow.paneconfigurecs*ˆj ˆj ˆjd¡¡}‡fdd„|DƒS)NÚpanescsg|]}ˆ |¡‘qSr)rd)rLrG)rrrrMÝsz%PanedWindow.panes..)rrFrr=)rrfr)rrr>ÛszPanedWindow.panesN) r.r/r0r1r5r“rprDr<r=r>rrrrr;¶s    r;c@s4eZdZdZifdd„Zdd„Zdd„Zdd „Zd S) Ú PopupMenuaPopupMenu widget can be used as a replacement of the tk_popup command. The advantage of the Tix PopupMenu widget is it requires less application code to manipulate. Subwidgets Class ---------- ----- menubutton Menubutton menu MenucKs:t ||ddg||¡t|dƒ|jd<t|dƒ|jd<dS)NZ tixPopupMenurPr2r3)rOr5r4rWr5)rrXr$r%rrrr5ëszPopupMenu.__init__cCs|j |jd|j¡dS)NrŒ)rrr=)rrrrrrŽðszPopupMenu.bind_widgetcCs|j |jd|j¡dS)Nr)rrr=)rrrrrrószPopupMenu.unbind_widgetcCs|j |jd|j||¡dS)NZpost)rrr=)rrrGrHrrrÚ post_widgetöszPopupMenu.post_widgetN)r.r/r0r1r5rŽrr@rrrrr?ßs   r?c@s<eZdZdZifdd„Zdd„Zdd„Zdd „Zd d „Zd S) Ú ResizeHandlez;Internal widget to draw resize handles on Scrolled widgets.c Ks.ddddddddd g }t ||d |||¡dS) NrPr6ZcursorfgZcursorbgZ handlesizeZ hintcolorZ hintwidthrGrHZtixResizeHandle)rOr5)rrXr$r%Úflagsrrrr5ûs  zResizeHandle.__init__cCs|j |jd|j¡dS)NZ attachwidget)rrr=)rrrrrÚ attach_widgetszResizeHandle.attach_widgetcCs|j |jd|j¡dS)NZ detachwidget)rrr=)rrrrrÚ detach_widgetszResizeHandle.detach_widgetcCs|j |jd|j¡dS)Nrò)rrr=)rrrrrrò szResizeHandle.hidecCs|j |jd|j¡dS)Nr)rrr=)rrrrrrszResizeHandle.showN) r.r/r0r1r5rCrDròrrrrrrAùs  rAc@seZdZdZifdd„ZdS)Ú ScrolledHListz0ScrolledHList - HList with automatic scrollbars.cKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixScrolledHListrPr¬r­r®)rOr5r¯rWr°)rrXr$r%rrrr5s zScrolledHList.__init__N)r.r/r0r1r5rrrrrEsrEc@seZdZdZifdd„ZdS)ÚScrolledListBoxz4ScrolledListBox - Listbox with automatic scrollbars.cKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixScrolledListBoxrPÚlistboxr­r®)rOr5Ú _dummyListboxrWr°)rrXr$r%rrrr5 szScrolledListBox.__init__N)r.r/r0r1r5rrrrrFsrFc@seZdZdZifdd„ZdS)Ú ScrolledTextz.ScrolledText - Text with automatic scrollbars.cKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixScrolledTextrPrr­r®)rOr5Ú _dummyTextrWr°)rrXr$r%rrrr5*szScrolledText.__init__N)r.r/r0r1r5rrrrrI&srIc@seZdZdZifdd„ZdS)Ú ScrolledTListz0ScrolledTList - TList with automatic scrollbars.cKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixScrolledTListrPZtlistr­r®)rOr5Ú _dummyTListrWr°)rrXr$r%rrrr54s zScrolledTList.__init__N)r.r/r0r1r5rrrrrK0srKc@seZdZdZifdd„ZdS)ÚScrolledWindowz2ScrolledWindow - Window with automatic scrollbars.cKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixScrolledWindowrPrr­r®)rOr5r$rWr°)rrXr$r%rrrr5?szScrolledWindow.__init__N)r.r/r0r1r5rrrrrM;srMc@s0eZdZdZifdd„Zifdd„Zdd„ZdS) ÚSelectzÊSelect - Container of button subwidgets. It can be used to provide radio-box or check-box style of selection options for the user. Subwidgets are buttons added dynamically using the add method.c Ks2t ||ddddddg||¡t|dƒ|jd<dS)NZ tixSelectZ allowzeroÚradior’r!rPrˆ)rOr5rŠrW)rrXr$r%rrrr5Ls  zSelect.__init__cKs:|jj|jd|f| ||¡žŽt||ƒ|j|<|j|S)Nr“)rrr=r#r”rW)rr(r$r%rrrr“Ss z Select.addcCs|j |jd|¡dS)Nr•)rrr=)rr(rrrr•Xsz Select.invokeN)r.r/r0r1r5r“r•rrrrrNEs  rNc@seZdZdZdifdd„ZdS)ÚShellz'Toplevel window. Subwidgets - NoneNcKst ||dddg||¡dS)NZtixShellrPÚtitle)rOr5)rrXr$r%rrrr5`szShell.__init__)r.r/r0r1r5rrrrrP[srPc@s6eZdZdZdifdd„Zdd„Zdd„Zd d „ZdS) Ú DialogShellzöToplevel window, with popup popdown and center methods. It tells the window manager that it is a dialog window and should be treated specially. The exact treatment depends on the treatment of the window manager. Subwidgets - NoneNc Ks&t ||ddddddddg||¡dS) NZtixDialogShellrPrQZmappedZ minheightZminwidthr|Z transient)rOr5)rrXr$r%rrrr5ls zDialogShell.__init__cCs|j |jd¡dS)NrÆ)rrr=)rrrrrÆsszDialogShell.popdowncCs|j |jd¡dS)NrÅ)rrr=)rrrrrÅvszDialogShell.popupcCs|j |jd¡dS)NÚcenter)rrr=)rrrrrSyszDialogShell.center)r.r/r0r1r5rÆrÅrSrrrrrRcs rRc@s&eZdZdZdifdd„Zdd„ZdS)Ú StdButtonBoxz@StdButtonBox - Standard Button Box (OK, Apply, Cancel and Help) NcKs\t ||dddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixStdButtonBoxr’rPr»ÚapplyrºÚhelp)rOr5r”rW)rrXr$r%rrrr5s  zStdButtonBox.__init__cCs ||jkr|j |jd|¡dS)Nr•)rWrrr=)rr(rrrr•‡s zStdButtonBox.invoke)r.r/r0r1r5r•rrrrrT|srTc@sâeZdZdZdifdd„Zdd„Zdd„Zd d „Zd d „Zd3d d„Z dd„Z dd„Z dd„Z dd„Z ifdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zifd-d.„Zd/d0„Zd4d1d2„ZdS)5ÚTLista¡TList - Hierarchy display widget which can be used to display data in a tabular format. The list entries of a TList widget are similar to the entries in the Tk listbox widget. The main differences are (1) the TList widget can display the list entries in a two dimensional format and (2) you can use graphical images as well as multiple colors and fonts for the list entries. Subwidgets - NoneNcKst ||ddg||¡dS)NZtixTListrP)rOr5)rrXr$r%rrrr5•szTList.__init__cCs|j |jdd|¡dS)NÚactiverÖ)rrr=)rr£rrrÚ active_set˜szTList.active_setcCs|j |jdd¡dS)NrXrØ)rrr=)rrrrÚ active_clear›szTList.active_clearcCs|j |jdd|¡dS)NrÕrÖ)rrr=)rr£rrrrמszTList.anchor_setcCs|j |jdd¡dS)NrÕrØ)rrr=)rrrrrÙ¡szTList.anchor_clearcCs|j |jd||¡dS)Nrp)rrr=)rÚfrom_Útorrrrp¤sz TList.deletecCs|j |jdd|¡dS)NrãrÖ)rrr=)rr£rrrrä§szTList.dragsite_setcCs|j |jdd¡dS)NrãrØ)rrr=)rrrrråªszTList.dragsite_clearcCs|j |jdd|¡dS)NrærÖ)rrr=)rr£rrrrç­szTList.dropsite_setcCs|j |jdd¡dS)NrærØ)rrr=)rrrrrè°szTList.dropsite_clearcKs$|jj|jd|f| ||¡žŽdS)Nr¢)rrr=r#)rr£r$r%rrrr¢³sz TList.insertcCs|j |jdd¡S)NrJrX)rrr=)rrrrÚ info_active¶szTList.info_activecCs|j |jdd¡S)NrJrÕ)rrr=)rrrrrü¹szTList.info_anchorcCs|j |jdd|¡S)NrJZdown)rrr=)rr£rrrÚ info_down¼szTList.info_downcCs|j |jdd|¡S)NrJÚleft)rrr=)rr£rrrÚ info_left¿szTList.info_leftcCs|j |jdd|¡S)NrJÚright)rrr=)rr£rrrÚ info_rightÂszTList.info_rightcCs|j |jdd¡}|j |¡S)NrJrË)rrr=rF)rrrrrr ÅszTList.info_selectioncCs|j |jdd¡S)NrJrð)rrr=)rrrrÚ info_sizeÉszTList.info_sizecCs|j |jdd|¡S)NrJZup)rrr=)rr£rrrÚinfo_upÌsz TList.info_upcCs|j |jd||¡S)Nr)rrr=)rrGrHrrrrÏsz TList.nearestcCs|j |jd|¡dS)Nr)rrr=)rr£rrrrÒsz TList.seecKs$|jj|jddf| ||¡žŽdS)NrËrØ)rrr=r#)rr$r%rrrrÕszTList.selection_clearcCs|j |jdd|¡S)NrËr)rrr=)rr£rrrrØszTList.selection_includescCs|j |jdd||¡dS)NrËrÖ)rrr=)rrrrrrrÛszTList.selection_set)N)N)r.r/r0r1r5rYrZr×rÙrprärårçrèr¢r]rür^r`rbr rcrdrrrrrrrrrrW‹s2   rWc@sHeZdZdZdifdd„Zdd„Zdd„Zd d „Zd d „Zddd„Z dS)ÚTreez¬Tree - The tixTree widget can be used to display hierarchical data in a tree form. The user can adjust the view of the tree by opening or closing parts of the tree.NcKsJt ||ddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZtixTreerPr¬r­r®)rOr5r¯rWr°)rrXr$r%rrrr5äs   z Tree.__init__cCs|j |jd¡dS)a This command calls the setmode method for all the entries in this Tree widget: if an entry has no child entries, its mode is set to none. Otherwise, if the entry has any hidden child entries, its mode is set to open; otherwise its mode is set to close.Ú autosetmodeN)rrr=)rrrrrfëszTree.autosetmodecCs|j |jd|¡dS)z8Close the entry given by entryPath if its mode is close.ÚcloseN)rrr=)rÚ entrypathrrrrgòsz Tree.closecCs|j |jd|¡S)z9Returns the current mode of the entry given by entryPath.Úgetmode)rrr=)rrhrrrriösz Tree.getmodecCs|j |jd|¡dS)z6Open the entry given by entryPath if its mode is open.ÚopenN)rrr=)rrhrrrrjúsz Tree.openÚnonecCs|j |jd||¡dS)a‡This command is used to indicate whether the entry given by entryPath has children entries and whether the children are visible. mode must be one of open, close or none. If mode is set to open, a (+) indicator is drawn next the entry. If mode is set to close, a (-) indicator is drawn next the entry. If mode is set to none, no indicators will be drawn for this entry. The default mode is none. The open mode indicates the entry has hidden children and this entry can be opened by the user. The close mode indicates that all the children of the entry are now visible and the entry can be closed by the user.ÚsetmodeN)rrr=)rrhÚmoderrrrlþs z Tree.setmode)rk) r.r/r0r1r5rfrgrirjrlrrrrreÞsrec@sZeZdZdZdifdd„Zdd„Zdd„Zd d „Zd d „Zddd„Z dd„Z ddd„Z dS)Ú CheckListzõThe CheckList widget displays a list of items to be selected by the user. CheckList acts similarly to the Tk checkbutton or radiobutton widgets, except it is capable of handling many more items than checkbuttons or radiobuttons. NcKsLt ||dddg||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NZ tixCheckListrPrOr¬r­r®)rOr5r¯rWr°)rrXr$r%rrrr5s  zCheckList.__init__cCs|j |jd¡dS)a This command calls the setmode method for all the entries in this Tree widget: if an entry has no child entries, its mode is set to none. Otherwise, if the entry has any hidden child entries, its mode is set to open; otherwise its mode is set to close.rfN)rrr=)rrrrrfszCheckList.autosetmodecCs|j |jd|¡dS)z8Close the entry given by entryPath if its mode is close.rgN)rrr=)rrhrrrrg!szCheckList.closecCs|j |jd|¡S)z9Returns the current mode of the entry given by entryPath.ri)rrr=)rrhrrrri%szCheckList.getmodecCs|j |jd|¡dS)z6Open the entry given by entryPath if its mode is open.rjN)rrr=)rrhrrrrj)szCheckList.openÚoncCs|j |j |jd|¡¡S)z®Returns a list of items whose status matches status. If status is not specified, the list of items in the "on" status will be returned. Mode can be on, off, defaultÚ getselection)rrFrr=)rrmrrrrp-szCheckList.getselectioncCs|j |jd|¡S)z(Returns the current status of entryPath.Ú getstatus)rrr=)rrhrrrrq3szCheckList.getstatuscCs|j |jd||¡dS)z~Sets the status of entryPath to be status. A bitmap will be displayed next to the entry its status is on, off or default.Ú setstatusN)rrr=)rrhrmrrrrr7szCheckList.setstatus)ro)ro) r.r/r0r1r5rfrgrirjrprqrrrrrrrn s rnc@seZdZddd„ZdS)r”r^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Csz_dummyButton.__init__N)r^)r.r/r0r5rrrrr”Bsr”c@seZdZddd„ZdS)rÀr^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Gsz_dummyCheckbutton.__init__N)r^)r.r/r0r5rrrrrÀFsrÀc@seZdZddd„ZdS)rr^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Ksz_dummyEntry.__init__N)r^)r.r/r0r5rrrrrJsrc@seZdZddd„ZdS)r$r^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Osz_dummyFrame.__init__N)r^)r.r/r0r5rrrrr$Nsr$c@seZdZddd„ZdS)rŠr^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Ssz_dummyLabel.__init__N)r^)r.r/r0r5rrrrrŠRsrŠc@seZdZddd„ZdS)rHr^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Wsz_dummyListbox.__init__N)r^)r.r/r0r5rrrrrHVsrHc@seZdZddd„ZdS)r5r^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5[sz_dummyMenu.__init__N)r^)r.r/r0r5rrrrr5Zsr5c@seZdZddd„ZdS)r4r^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5_sz_dummyMenubutton.__init__N)r^)r.r/r0r5rrrrr4^sr4c@seZdZddd„ZdS)r°r^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5csz_dummyScrollbar.__init__N)r^)r.r/r0r5rrrrr°bsr°c@seZdZddd„ZdS)rJr^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5gsz_dummyText.__init__N)r^)r.r/r0r5rrrrrJfsrJc@seZdZddd„ZdS)ržr^cCsDt ||||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)NrGr­r®)rrr5rHrWr°)rrXr(rtrrrr5ksz_dummyScrolledListBox.__init__N)r^)r.r/r0r5rrrrržjsržc@seZdZddd„ZdS)r¯r^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5rsz_dummyHList.__init__N)r^)r.r/r0r5rrrrr¯qsr¯c@seZdZddd„ZdS)r'r^cCsDt ||||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)Nr¬r­r®)rrr5r¯rWr°)rrXr(rtrrrr5vsz_dummyScrolledHList.__init__N)r^)r.r/r0r5rrrrr'usr'c@seZdZddd„ZdS)rLr^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5}sz_dummyTList.__init__N)r^)r.r/r0r5rrrrrL|srLc@seZdZddd„ZdS)rÁr^cCs’t |||d|g¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<y$t|dƒ|jd<t|dƒ|jd<Wntk rŒYnXdS)Nr—rˆr˜r™ršr›rœ)rrr5rŠrWrr”ržrŸ)rrXr(rtrrrr5s z_dummyComboBox.__init__N)r^)r.r/r0r5rrrrrÁ€srÁc@seZdZddd„ZdS)r·r^cCsDt ||||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)Nr¬r­r®)rrr5r¯rWr°)rrXr(rtrrrr5’sz_dummyDirList.__init__N)r^)r.r/r0r5rrrrr·‘sr·c@seZdZddd„ZdS)rÄr^cCs4t ||||¡t|dƒ|jd<t|dƒ|jd<dS)Nrµr¶)rrr5r·rWr¸)rrXr(rtrrrr5™sz_dummyDirSelectBox.__init__N)r^)r.r/r0r5rrrrrĘsrÄc@seZdZddd„ZdS)rÉr^cCs”t ||||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS) Nrºr»r¼r½r²rµr¾r¿)rrr5r”rWrÀrÁrž)rrXr(rtrrrr5Ÿsz_dummyExFileSelectBox.__init__N)r^)r.r/r0r5rrrrrÉžsrÉc@seZdZddd„ZdS)rÏr^cCsTt ||||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)Nrµr¿rÂrË)rrr5ržrWrÁ)rrXr(rtrrrr5«s z_dummyFileSelectBox.__init__N)r^)r.r/r0r5rrrrrϪsrÏc@seZdZddd„ZdS)r¸r^cCs$t ||||¡t|dƒ|jd<dS)Nr¶)rrr5rÁrW)rrXr(rtrrrr5³sz_dummyFileComboBox.__init__N)r^)r.r/r0r5rrrrr¸²sr¸c@seZdZddd„ZdS)rÎr^cCsTt ||||¡t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<t|dƒ|jd<dS)Nr»rUrºrV)rrr5r”rW)rrXr(rtrrrr5¸s z_dummyStdButtonBox.__init__N)r^)r.r/r0r5rrrrrηsrÎc@seZdZddd„ZdS)Ú_dummyNoteBookFramercCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Àsz_dummyNoteBookFrame.__init__N)r)r.r/r0r5rrrrrs¿srsc@seZdZddd„ZdS)r&r^cCst ||||¡dS)N)rrr5)rrXr(rtrrrr5Äsz_dummyPanedWindow.__init__N)r^)r.r/r0r5rrrrr&Ãsr&cCs|j d|j¡S)zzReturns the qualified path name for the widget. Normally used to set default options for subwidgets. See tixwidgets.pyZ tixOptionName)rrr=)rrrrÚ OptionNameÍsrtcCs>d}x4| ¡D](}|d|d|d||d}qW|S)Nr9z{{z} {z - z}} )Úkeys)ÚdictÚsÚtyperrrÚ FileTypeList×s(ryc@seZdZdZdS)ÚCObjViewaBThis file implements the Canvas Object View widget. This is a base class of IconView. It implements automatic placement/adjustment of the scrollbars according to the canvas objects inside the canvas subwidget. The scrollbars are adjusted so that the canvas is just large enough to see all the objects. N)r.r/r0r1rrrrrzßsrzc@s¶eZdZdZdifdd„Zdd„Zdd„Zd d „Zd)d d „Zd*d d„Z dd„Z dd„Z dd„Z d+dd„Z dd„Zdd„Zdd„Zdd„Zdd „Zd,d!d"„Zd#d$„Zd%d&„Zd'd(„ZdS)-ÚGrida}The Tix Grid command creates a new window and makes it into a tixGrid widget. Additional options, may be specified on the command line or in the option database to configure aspects such as its cursor and relief. A Grid widget displays its contents in a two dimensional grid of cells. Each cell may contain one Tix display item, which may be in text, graphics or other formats. See the DisplayStyle class for more information about Tix display items. Individual cells, or groups of cells, can be formatted with a wide range of attributes, such as its color, relief and border. Subwidgets - NoneNcKs"g}||_t ||d|||¡dS)NZtixGrid)r$rOr5)rrXr$r%r‹rrrr5üsz Grid.__init__cCs|j |dd¡dS)zRemoves the selection anchor.rÕrØN)rr)rrrrrÙszGrid.anchor_clearcCs| |j |dd¡¡S)z3Get the (x,y) coordinate of the current anchor cellrÕr+)rþrr)rrrrÚ anchor_get szGrid.anchor_getcCs|j |dd||¡dS)z/Set the selection anchor to the cell at (x, y).rÕrÖN)rr)rrGrHrrrr× szGrid.anchor_setcCs4|dkr|j |dd|¡n|j |dd||¡dS)zdDelete rows between from_ and to inclusive. If to is not provided, delete only row at from_Nrpr )rr)rr[r\rrrÚ delete_rowszGrid.delete_rowcCs4|dkr|j |dd|¡n|j |dd||¡dS)zjDelete columns between from_ and to inclusive. If to is not provided, delete only column at from_Nrpr )rr)rr[r\rrrÚ delete_columnszGrid.delete_columncCs|j |dd¡dS)zUIf any cell is being edited, de-highlight the cell and applies the changes.ÚeditrUN)rr)rrrrÚ edit_apply!szGrid.edit_applycCs|j |dd||¡dS)zmHighlights the cell at (x, y) for editing, if the -editnotify command returns True for this cell.rrÖN)rr)rrGrHrrrÚedit_set&sz Grid.edit_setcCs,|r|ddkrd|}|j |d|||¡S)z&Get the option value for cell at (x,y)rrr)rr)rrGrHrrrrr+szGrid.entrycgetcKs| d||f||¡S)Nr)Z _configure)rrGrHr$r%rrrr1szGrid.entryconfigurec Cs| |j |dd||¡¡S)z+Return True if display item exists at (x,y)rJrø)Z _getbooleanrr)rrGrHrrrr7szGrid.info_existscCs|j |dd||¡S)NrJrý)rr)rrGrHrrrrÿ;szGrid.info_bboxcCs|j |dd|||¡dS)z¹Moves the range of columns from position FROM through TO by the distance indicated by OFFSET. For example, move_column(2, 4, 1) moves the columns 2,3,4 to columns 3,4,5.Úmover N)rr)rr[r\ÚoffsetrrrÚ move_column?szGrid.move_columncCs|j |dd|||¡dS)z­Moves the range of rows from position FROM through TO by the distance indicated by OFFSET. For example, move_row(2, 4, 1) moves the rows 2,3,4 to rows 3,4,5.r‚r N)rr)rr[r\rƒrrrÚmove_rowEsz Grid.move_rowcCs| |j |d||¡¡S)z8Return coordinate of cell nearest pixel coordinate (x,y)r)rþrr)rrGrHrrrrKsz Grid.nearestcKs>| |j|¡}|dk r"d|f|}|jj|d||f|žŽdS)Nz -itemtyperÖ)r#r$rr)rrGrHr„r%ÚargsrrrrÖUs zGrid.setcKs*|j |jj|jdd|f| i|¡žŽ¡S)aèQueries or sets the size of the column given by INDEX. INDEX may be any non-negative integer that gives the position of a given column. INDEX can also be the string "default"; in this case, this command queries or sets the default size of all columns. When no option-value pair is given, this command returns a tuple containing the current size setting of the given column. When option-value pairs are given, the corresponding options of the size setting of the given column are changed. Options may be one of the following: pad0 pixels Specifies the paddings to the left of a column. pad1 pixels Specifies the paddings to the right of a column. size val Specifies the width of a column. Val may be: "auto" -- the width of the column is set to the width of the widest cell in the column; a valid Tk screen distance unit; or a real number following by the word chars (e.g. 3.4chars) that sets the width of the column to the given number of characters.rðr )rrFrr=r#)rr£r%rrrÚ size_column[szGrid.size_columncKs(|j |jj|dd|f| i|¡žŽ¡S)aÅQueries or sets the size of the row given by INDEX. INDEX may be any non-negative integer that gives the position of a given row . INDEX can also be the string "default"; in this case, this command queries or sets the default size of all rows. When no option-value pair is given, this command returns a list con- taining the current size setting of the given row . When option-value pairs are given, the corresponding options of the size setting of the given row are changed. Options may be one of the following: pad0 pixels Specifies the paddings to the top of a row. pad1 pixels Specifies the paddings to the bottom of a row. size val Specifies the height of a row. Val may be: "auto" -- the height of the row is set to the height of the highest cell in the row; a valid Tk screen distance unit; or a real number following by the word chars (e.g. 3.4chars) that sets the height of the row to the given number of characters.rðr )rrFrr#)rr£r%rrrÚsize_rowus z Grid.size_rowcCs|j |jd||¡dS)z7Clears the cell at (x, y) by removing its display item.ÚunsetN)rrr=)rrGrHrrrr‰Žsz Grid.unset)N)N)N)N)r.r/r0r1r5rÙr|r×r}r~r€rrrrrÿr„r…rrÖr‡rˆr‰rrrrr{ês(      r{c@seZdZdZdifdd„ZdS)Ú ScrolledGridzScrolled Grid widgetsNcKs"g}||_t ||d|||¡dS)NZtixScrolledGrid)r$rOr5)rrXr$r%r‹rrrr5—szScrolledGrid.__init__)r.r/r0r1r5rrrrrŠ“srŠ)ur6r4rZ_tkinterZWINDOWZTEXTZSTATUSZ IMMEDIATEZIMAGEZ IMAGETEXTZBALLOONZAUTOZ ACROSSTOPÚASCIIZCELLZCOLUMNZ DECREASINGZ INCREASINGZINTEGERZMAINÚMAXZREALZROWZS_REGIONZX_REGIONZY_REGIONZ TCL_DONT_WAITZTCL_WINDOW_EVENTSZTCL_FILE_EVENTSZTCL_TIMER_EVENTSZTCL_IDLE_EVENTSZTCL_ALL_EVENTSrr2r;rUÚ __bases__rOrrr‚r‡r‘r–r¥r«r³r´r¹rÃrÇrÊrÍrÐZXViewZYViewrÒrr r"r%r-r.r0r1r;r?rArErFrIrKrMrNrPrRrTrWrernZButtonr”Z CheckbuttonrÀZEntryrZFramer$ZLabelrŠZListboxrHZMenur5Z Menubuttonr4Z Scrollbarr°ZTextrJržr¯r'rLrÁr·rÄrÉrÏr¸rÎrsr&rtryrzr{rŠrrrrÚsØ -82,!"C# ()     S.6    *