HEX

Warning: set_time_limit() [function.set-time-limit]: Cannot set time limit - prohibited by configuration in /home/u547966/brikov.ru/www/wp-content/plugins/admin-menu-editor/menu-editor.php on line 745
Server: Apache
System: Linux 4.19.0-0.bpo.9-amd64 x86_64 at red40
User: u547966 (5490)
PHP: 5.3.29-mh2
Disabled: syslog, dl, popen, proc_open, proc_nice, proc_get_status, proc_close, proc_terminate, posix_mkfifo, chown, chgrp, accelerator_reset, opcache_reset, accelerator_get_status, opcache_get_status, pcntl_alarm, pcntl_fork, pcntl_waitpid, pcntl_wait, pcntl_wifexited, pcntl_wifstopped, pcntl_wifsignaled, pcntl_wifcontinued, pcntl_wexitstatus, pcntl_wtermsig, pcntl_wstopsig, pcntl_signal, pcntl_signal_dispatch, pcntl_get_last_error, pcntl_strerror, pcntl_sigprocmask, pcntl_sigwaitinfo, pcntl_sigtimedwait, pcntl_exec, pcntl_getpriority, pcntl_setpriority
Upload Files
File: //usr/lib/python3.5/tkinter/__pycache__/tix.cpython-35.pyc


Fa-@sxddlZddlZddlTddlmZedkrJedddlZdZdZdZd	Z	d
Z
dZdZd
Z
dZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZdZ dZ!Gd!d"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/d0d0e'Z+Gd1d2d2e'Z,Gd3d4d4e'Z-Gd5d6d6e'Z.Gd7d8d8e'Z/Gd9d:d:e'Z0Gd;d<d<e'Z1Gd=d>d>e'Z2Gd?d@d@e'Z3GdAdBdBe'Z4GdCdDdDe'Z5GdEdFdFe'Z6GdGdHdHe'e7e8Z9GdIdJdJe'Z:GdKdLdLe'Z;GdMdNdNe'Z<GdOdPdPe'Z=GdQdRdRe'Z>GdSdTdTe'Z?GdUdVdVe'Z@GdWdXdXe'ZAGdYdZdZe'ZBGd[d\d\e'ZCGd]d^d^e'ZDGd_d`d`e'ZEGdadbdbe'ZFGdcdddde'ZGGdedfdfe'ZHGdgdhdhe'ZIGdidjdje'ZJGdkdldle'ZKGdmdndne'ZLGdodpdpe'ZMGdqdrdre'e7e8ZNGdsdtdte'ZOGdudvdve'ZPGdwdxdxeQe(ZRGdydzdzeSe(ZTGd{d|d|eUe(ZVGd}d~d~eWe(ZXGdddeYe(ZZGddde[e(Z\Gddde]e(Z^Gddde_e(Z`Gdddeae(ZbGdddece(ZdGdddeFe(ZeGddde9e(ZfGdddeEe(ZgGdddeNe(ZhGddde,e(ZiGddde.e(ZjGddde0e(ZkGddde1e(ZlGddde4e(ZmGddde,e(ZnGdddeMe(ZoGddde@e(ZpGdddeBe(ZqddZrddZsGddde'ZtGddde'e7e8ZuGdddeuZvdS)N)*)	_cnfmergegˡE@z0This version of Tix.py requires Tk 4.0 or higherwindowtextZstatusZ	immediateimageZ	imagetextZballoonZautoZ	acrosstopasciiZcellcolumnZ
decreasingZ
increasingZintegermainmaxrealrowzs-regionzx-regionzy-regionc@seZdZdZddZddZdddZdd	d
ZddZd
dZ	ddZ
dddZdS)
tixCommandaThe 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|jjdd|S)aTix 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)tkcall)selfZ	directoryr!/usr/lib/python3.5/tkinter/tix.pytix_addbitmapdirVs
ztixCommand.tix_addbitmapdircCs|jjdd|S)zReturns  the  current  value  of the configuration
        option given by option. Option may be  any  of  the
        options described in the CONFIGURATION OPTIONS section.
        rcget)rr)roptionrrrtix_cgetbsztixCommand.tix_cgetNcKs|rt||f}n|r-t|}|dkrI|jddSt|tro|jddd|S|jjd|j|S)aQuery 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
isinstancestrZ_getconfigure1rr_options)rcnfkwrrr
tix_configureisztixCommand.tix_configurecCs9|dk	r"|jjdd|S|jjddSdS)aReturns 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)rZdlgclassrrrtix_filedialogs	ztixCommand.tix_filedialogcCs|jjdd|S)aLocates 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)rnamerrr
tix_getbitmaps	ztixCommand.tix_getbitmapcCs|jjdd|S)aLocates 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_getimagesztixCommand.tix_getimagecCs|jjddd|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
            rrget)rr)rr'rrrtix_option_getsztixCommand.tix_option_getcCsE|dk	r(|jjdd|||S|jjdd||SdS)aResets 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
newScmPriorrrtix_resetoptionssztixCommand.tix_resetoptions)__name__
__module____qualname____doc__rrr%r&r(r)r+r,rrrrrKs	rc@s7eZdZdZdddddZddZdS)Tkz{Toplevel widget of Tix which represents mostly the main window
    of an application. It has an associated Tcl interpreter.NZTixcCstjj||||tjjd}|jjd|dk	ro|jjd||jjd||jjddS)NZTIX_LIBRARYz<global auto_path; lappend auto_path [file dir [info nameof]]z(global auto_path; lappend auto_path {%s}z,global tcl_pkgPath; lappend tcl_pkgPath {%s}zpackage require Tix)tkinterr1__init__osenvironr*reval)rZ
screenNameZbaseNameZ	classNameZtixlibrrrr3szTk.__init__cCs$|jddtjj|dS)NZWM_DELETE_WINDOW)Zprotocolr2r1destroy)rrrrr8sz
Tk.destroy)r-r.r/r0r3r8rrrrr1sr1c@s|eZdZdZiddZeZddZddZdd	Zd
d
ddZ	d
ddZ
ddZd
S)FormzThe Tix Form geometry manager

    Widgets can be arranged by specifying attachments to other widgets.
    See Tix documentation for complete detailscKs)|jjd|j|j||dS)NtixForm)rr_wr")rr#r$rrrconfigszForm.configcCstj|||idS)N)r9form)rkeyvaluerrr__setitem__szForm.__setitem__cCs|jjdd|jS)Nr:check)rrr;)rrrrrAsz
Form.checkcCs|jjdd|jdS)Nr:forget)rrr;)rrrrrBszForm.forgetrcCs|ro|ro|jjdd|j}|jj|}f}x'|D]}||jj|f}qHW|S|jjdd|j||S)Nr:grid)rrr;	splitlistZgetint)rZxsizeZysizexyzrrrrCs
z	Form.gridNcCsU|s|jjdd|jS|ddkr9d|}|jjdd|j|S)Nr:inforr)rrr;)rrrrrrHs

z	Form.infocs8fddjjjjddjDS)Ncsg|]}j|qSr)
_nametowidget).0rE)rrr
<listcomp>s	zForm.slaves.<locals>.<listcomp>r:slaves)rrDrr;)rr)rrrLs		zForm.slaves)r-r.r/r0r<r=r@rArBrCrHrLrrrrr9s
r9c@seZdZdZdddiiddZddZddZd	d
ZddZd
dZ	ddZ
ddZidddZddZ
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}nt|}f}|rC|jdn	dg}xGt|jD]3\}}||kr_|d||f}||=q_W||_tj||||r|jj||j	||rtj
||i|_dS)Noptionsr)rappendlistitems
widgetNameWidget_setuprrr;r<subwidget_list)	rmasterrRZstatic_optionsr#r$Zextrakvrrrr3s$		zTixWidget.__init__cCs*||jkr|j|St|dS)N)rUAttributeError)rr'rrr__getattr__KszTixWidget.__getattr__cCs|jjd|j|dS)z1Set a variable without calling its action routineZtixSetSilentN)rrr;)rr?rrr
set_silentPszTixWidget.set_silentcCsZ|j|}|s0td|d|j|t|jdd}|j|S)zSReturn the named subwidget (which must have been created by
        the sub-class).z
Subwidget z not child of r
N)_subwidget_nameTclError_namelenr;rI)rr'nrrr	subwidgetTs
zTixWidget.subwidgetc
Css|j}|sgSg}xP|D]H}|t|jdd}y|j|j|Wq#Yq#Xq#W|S)zReturn all subwidgets.r
N)_subwidget_namesr_r;rOrI)rnamesZretlistr'rrrsubwidgets_all^s
	zTixWidget.subwidgets_allcCs:y|jj|jd|SWntk
r5dSYnXdS)z7Get a subwidget name (returns a String, not a Widget !)raN)rrr;r])rr'rrrr\ms
zTixWidget._subwidget_namecCsLy/|jj|jdd}|jj|SWntk
rGdSYnXdS)z"Return the name of all subwidgets.Z
subwidgetsz-allN)rrr;rDr])rrErrrrbts

zTixWidget._subwidget_namescCs|dkrdSt|ts+t|}t|tsFt|}|j}x+|D]#}|jj|dd||qYWdS)z8Set configuration options for all subwidgets (and self).r7Nrr)r r!reprrbrr)rrr?rcr'rrr
config_all|s
zTixWidget.config_allcKs|s!tj}|s!td|rB|rBt||f}n|rN|}f}xI|jD];\}}t|r|j|}|d||f}qaW|jjdd|f|S)NzToo early to create imagerrcreate)	r2
_default_rootRuntimeErrorrrQcallable	_registerrr)rZimgtyper#rVr$rNrWrXrrrimage_creates	zTixWidget.image_createcCs3y|jjdd|Wntk
r.YnXdS)Nrdelete)rrr])rZimgnamerrrimage_deletes
zTixWidget.image_delete)r-r.r/r0r3rZr[rardr\rbrfrlrnrrrrrMs,

rMc@s4eZdZdZddddZddZdS)TixSubWidgetzSubwidget 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
cCsK|rV|j|}y0|t|jdd}|jd}Wng}YnX|s~tj||ddd|in|}xtt|dD]p}dj|d|d}	y|j|	}
|
}Wqt	k
r
t
|||dddd}YqXqW|r|d}tj||ddd|i||_dS)Nr
.r'destroy_physicallyrcheck_intermediate)r\r_r;splitrMr3rangejoinrIKeyErrorrorq)rrVr'rqrrpathZplistparentir`wrrrr3s."


zTixSubWidget.__init__cCsx't|jjD]}|jqW|j|jjkrO|jj|j=|j|jjkrt|jj|j=|jr|jj	d|j
dS)Nr8)rPchildrenvaluesr8r^rVrUrqrrr;)rcrrrr8s	zTixSubWidget.destroyN)r-r.r/r0r3r8rrrrrosroc@speZdZdZiddZddZddZdd	Zd
dZidd
Z	ddZ
dS)DisplayStylezRDisplayStyle - handle configuration options shared by
    (multiple) Display ItemscKsd|kr|d}n4d|kr2|d}ntj}|sMtd|j|_|jjd||j|||_dS)NZ	refwindowz1Too early to create display style: no root windowZtixDisplayStyle)r2rhrirrr"	stylename)ritemtyper#r$rVrrrr3s

	zDisplayStyle.__init__cCs|jS)N)r)rrrr__str__szDisplayStyle.__str__cCsh|r!|r!t||f}n|r-|}f}x.|jD] \}}|d||f}q@W|S)Nr)rrQ)rr#r$ZoptsrWrXrrrr"szDisplayStyle._optionscCs|jj|jddS)Nrm)rrr)rrrrrmszDisplayStyle.deletecCs$|jj|jdd||dS)Nrz-%s)rrr)rr>r?rrrr@szDisplayStyle.__setitem__cKs"|j|jd|j||S)Nr)rrr")rr#r$rrrr<szDisplayStyle.configcCs|jj|jdd|S)Nrz-%s)rrr)rr>rrr__getitem__szDisplayStyle.__getitem__N)r-r.r/r0r3rr"rmr@r<rrrrrrs
rc@sCeZdZdZdiddZiddZddZdS)	BalloonzBalloon help widget.

    Subwidget       Class
    ---------       -----
    label           Label
    message         MessageNcKsmdddddg}tj||d|||t|ddd	|jd<t|d
dd	|jd
<dS)NrNZinstallcolormapZinitwaitZ	statusbarZcursorZ
tixBalloonlabelrqrmessage)rMr3_dummyLabelrU)rrVr#r$staticrrrr3s	zBalloon.__init__cKs/|jj|jd|j|j||dS)zkBind balloon widget to another.
        One balloon widget may be bound to several widgets at the same timebindN)rrr;r")rwidgetr#r$rrrbind_widgetszBalloon.bind_widgetcCs |jj|jd|jdS)Nunbind)rrr;)rrrrr
unbind_widget szBalloon.unbind_widget)r-r.r/r0r3rrrrrrrs
rc@sCeZdZdZdiddZiddZddZdS)		ButtonBoxzgButtonBox - A container for pushbuttons.
    Subwidgets are the buttons added with the add method.
    NcKs&tj||dddg||dS)NZtixButtonBoxorientationrN)rMr3)rrVr#r$rrrr3'szButtonBox.__init__cKsD|jj|jd||j||}t|||j|<|S)z$Add a button with given name to box.add)rrr;r"_dummyButtonrU)rr'r#r$Zbtnrrrr+s*z
ButtonBox.addcCs,||jkr(|jj|jd|dS)Ninvoke)rUrrr;)rr'rrrr2szButtonBox.invoke)r-r.r/r0r3rrrrrrr#src@sXeZdZdZdiddZddZddZd	d
ZddZdS)
ComboBoxaComboBox - 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 optionNcKstj||dddddg||t|d|jd<t|d|jd<t|d|jd<t|d	|jd	<y0t|d
|jd
<t|d|jd<Wntk
rYnXdS)NZtixComboBoxZeditableZdropdownfancyrNrentryarrowslistboxtickcross)rMr3rrU_dummyEntryr_dummyScrolledListBox	TypeError)rrVr#r$rrrr3Ds

zComboBox.__init__cCs|jj|jd|dS)NZ
addhistory)rrr;)rr!rrradd_historyVszComboBox.add_historycCs|jj|jd|dS)NZ
appendhistory)rrr;)rr!rrrappend_historyYszComboBox.append_historycCs |jj|jd||dS)Ninsert)rrr;)rindexr!rrrr\szComboBox.insertcCs|jj|jd|dS)Npick)rrr;)rrrrrr_sz
ComboBox.pick)	r-r.r/r0r3rrrrrrrrr6src@sXeZdZdZdiddZddZddZd	d
Zdd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       LabelNcKs{tj||ddg||t|d|jd<t|d|jd<t|d|jd<t|d|jd<dS)NZ
tixControlrNincrdecrrr)rMr3rrUrr)rrVr#r$rrrr3ps
zControl.__init__cCs|jj|jddS)Nr)rrr;)rrrr	decrementwszControl.decrementcCs|jj|jddS)Nr)rrr;)rrrr	incrementzszControl.incrementcCs|jj|jddS)Nr)rrr;)rrrrr}szControl.invokecCs|jj|jddS)Nupdate)rrr;)rrrrrszControl.update)	r-r.r/r0r3rrrrrrrrrbsrc@s1eZdZdZiddZddZdS)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              ScrollbarcKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZ
tixDirListrNhlistvsbhsb)rMr3_dummyHListrU_dummyScrollbar)rrVr#r$rrrr3szDirList.__init__cCs|jj|jd|dS)Nchdir)rrr;)rdirrrrrsz
DirList.chdirN)r-r.r/r0r3rrrrrrs	rc@s1eZdZdZiddZddZdS)DirTreeaDirTree - 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             ScrollbarcKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZ
tixDirTreerNrrr)rMr3rrUr)rrVr#r$rrrr3szDirTree.__init__cCs|jj|jd|dS)Nr)rrr;)rrrrrrsz
DirTree.chdirN)r-r.r/r0r3rrrrrrs
rc@s%eZdZdZiddZdS)DirSelectBoxaDirSelectBox - 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        ScrolledListBoxcKsOtj||ddg||t|d|jd<t|d|jd<dS)NZtixDirSelectBoxrNdirlistdircbx)rMr3
_dummyDirListrU_dummyFileComboBox)rrVr#r$rrrr3szDirSelectBox.__init__N)r-r.r/r0r3rrrrrsrc@s=eZdZdZiddZddZddZdS)	ExFileSelectBoxaExFileSelectBox - 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       ScrolledListBoxcKstj||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)NZtixExFileSelectBoxrNcancelokhiddentypesrrfilefilelist)rMr3rrU_dummyCheckbutton_dummyComboBoxrr)rrVr#r$rrrr3szExFileSelectBox.__init__cCs|jj|jddS)Nfilter)rrr;)rrrrrszExFileSelectBox.filtercCs|jj|jddS)Nr)rrr;)rrrrrszExFileSelectBox.invokeN)r-r.r/r0r3rrrrrrrs
rc@s=eZdZdZiddZddZddZdS)	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       DirSelectDialogcKs9tj||ddg||t|d|jd<dS)NZtixDirSelectDialogrNZdirbox)rMr3_dummyDirSelectBoxrU)rrVr#r$rrrr3szDirSelectDialog.__init__cCs|jj|jddS)Npopup)rrr;)rrrrrszDirSelectDialog.popupcCs|jj|jddS)Npopdown)rrr;)rrrrrszDirSelectDialog.popdownN)r-r.r/r0r3rrrrrrrsrc@s=eZdZdZiddZddZddZdS)	ExFileSelectDialogzExFileSelectDialog - MS Windows style file select dialog.
    It provides a convenient method for the user to select files.

    Subwidgets       Class
    ----------       -----
    fsbox       ExFileSelectBoxcKs9tj||ddg||t|d|jd<dS)NZtixExFileSelectDialogrNfsbox)rMr3_dummyExFileSelectBoxrU)rrVr#r$rrrr3szExFileSelectDialog.__init__cCs|jj|jddS)Nr)rrr;)rrrrr	szExFileSelectDialog.popupcCs|jj|jddS)Nr)rrr;)rrrrrszExFileSelectDialog.popdownN)r-r.r/r0r3rrrrrrrsrc@s=eZdZdZiddZddZddZdS)	
FileSelectBoxaExFileSelectBox - 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{tj||ddg||t|d|jd<t|d|jd<t|d|jd<t|d|jd<dS)NZtixFileSelectBoxrNrrr	selection)rMr3rrUr)rrVr#r$rrrr3s
zFileSelectBox.__init__cCs|jj|jddS)Nr)rrr;)rrrrapply_filter$szFileSelectBox.apply_filtercCs|jj|jddS)Nr)rrr;)rrrrr'szFileSelectBox.invokeN)r-r.r/r0r3rrrrrrrsrc@s=eZdZdZiddZddZddZdS)	FileSelectDialogzFileSelectDialog - Motif style file select dialog.

    Subwidgets       Class
    ----------       -----
    btns       StdButtonBox
    fsbox       FileSelectBoxcKsOtj||ddg||t|d|jd<t|d|jd<dS)NZtixFileSelectDialogrNZbtnsr)rMr3_dummyStdButtonBoxrU_dummyFileSelectBox)rrVr#r$rrrr34szFileSelectDialog.__init__cCs|jj|jddS)Nr)rrr;)rrrrr:szFileSelectDialog.popupcCs|jj|jddS)Nr)rrr;)rrrrr=szFileSelectDialog.popdownN)r-r.r/r0r3rrrrrrr+src@s=eZdZdZiddZddZddZdS)		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       EntrycKsRtj||dddg||t|d|jd<t|d|jd<dS)NZtixFileEntryZ
dialogtyperNZbuttonr)rMr3rrUr)rrVr#r$rrrr3LszFileEntry.__init__cCs|jj|jddS)Nr)rrr;)rrrrrRszFileEntry.invokecCsdS)Nr)rrrrfile_dialogUszFileEntry.file_dialogN)r-r.r/r0r3rrrrrrr@s	rc@seZdZdZdiddZiddZdiddZd	d
ZddZd
ddddZ	ddZ
ddZddZddZ
ddZddZddZddZid d!Zid"d#Zd$d%Zd&d'ZeZd(d)Zd*d+Zd,d-Zid.d/Zid0d1Zd2d3Zd4d5Zd6d7Zd8d9Zd:d;Z d<d=Z!dd>d?Z"d@dAZ#dBdCZ$dDdEZ%dFdGZ&dHdIZ'dJdKZ(dLdMZ)dNdOZ*dPdQZ+dRdSZ,idTdUZ-idVdWZ.dXdYZ/dZd[Z0d\d]Z1id^d_Z2d`daZ3dbdcZ4idddeZ5dfdgZ6ddhdiZ7djdkZ8dS)lHListaHList - 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 - NoneNcKs&tj||dddg||dS)NZtixHListcolumnsrN)rMr3)rrVr#r$rrrr3aszHList.__init__cKs(|jj|jd||j||S)Nr)rrr;r")rrr#r$rrrresz	HList.addcKs4|sd}|jj|jd||j||S)Nr7Zaddchild)rrr;r")rryr#r$rrr	add_childhs	zHList.add_childcCs |jj|jdd|dS)Nanchorset)rrr;)rrrrr
anchor_setnszHList.anchor_setcCs|jj|jdddS)Nrclear)rrr;)rrrranchor_clearqszHList.anchor_clearrcCsK|s%|jj|jdd||S|jj|jdd|d|SdS)Nrwidthz-char)rrr;)rcolrcharsrrrcolumn_widthtszHList.column_widthcCs|jj|jdddS)Nrmall)rrr;)rrrr
delete_all{szHList.delete_allcCs |jj|jdd|dS)Nrmr)rrr;)rrrrrdelete_entry~szHList.delete_entrycCs |jj|jdd|dS)NrmZ
offsprings)rrr;)rrrrrdelete_offspringsszHList.delete_offspringscCs |jj|jdd|dS)NrmZsiblings)rrr;)rrrrrdelete_siblingsszHList.delete_siblingscCs |jj|jdd|dS)Ndragsiter)rrr;)rrrrrdragsite_setszHList.dragsite_setcCs|jj|jdddS)Nrr)rrr;)rrrrdragsite_clearszHList.dragsite_clearcCs |jj|jdd|dS)Ndropsiter)rrr;)rrrrrdropsite_setszHList.dropsite_setcCs|jj|jdddS)Nrr)rrr;)rrrrdropsite_clearszHList.dropsite_clearcKs/|jj|jdd||j||dS)Nheaderrg)rrr;r")rrr#r$rrr
header_createszHList.header_createcKsT|dkr%|j|jdd|S|jj|jdd||j||dS)Nrr)rr;rrr")rrr#r$rrrheader_configureszHList.header_configurecCs|jj|jdd||S)Nrr)rrr;)rroptrrrheader_cgetszHList.header_cgetcCs(|jj|jj|jdd|S)NrZexist)rZ
getbooleanrr;)rrrrr
header_existsszHList.header_existscCs |jj|jdd|dS)Nrrm)rrr;)rrrrr
header_deleteszHList.header_deletecCs|jj|jdd|S)Nrsize)rrr;)rrrrrheader_sizeszHList.header_sizecCs |jj|jdd|dS)Nhider)rrr;)rrrrr
hide_entryszHList.hide_entrycKs/|jj|jdd||j||dS)N	indicatorrg)rrr;r")rrr#r$rrrindicator_creates	zHList.indicator_createcKsT|dkr%|j|jdd|S|jj|jdd||j||dS)Nrr)rr;rrr")rrr#r$rrrindicator_configures
	zHList.indicator_configurecCs|jj|jdd||S)Nrr)rrr;)rrrrrrindicator_cgetszHList.indicator_cgetcCs|jj|jdd|S)Nrexists)rrr;)rrrrrindicator_existsszHList.indicator_existscCs |jj|jdd|dS)Nrrm)rrr;)rrrrrindicator_deleteszHList.indicator_deletecCs|jj|jdd|S)Nrr)rrr;)rrrrrindicator_sizeszHList.indicator_sizecCs|jj|jddS)NrHr)rrr;)rrrrinfo_anchorszHList.info_anchorcCs+|j|jj|jdd|p*dS)NrHbbox)_getintsrrr;)rrrrr	info_bboxszHList.info_bboxcCs.|jj|jdd|}|jj|S)NrHr|)rrr;rD)rrr~rrr
info_childrenszHList.info_childrencCs|jj|jdd|S)NrHdata)rrr;)rrrrr	info_dataszHList.info_datacCs|jj|jddS)NrHr)rrr;)rrrr
info_dragsiteszHList.info_dragsitecCs|jj|jddS)NrHr)rrr;)rrrr
info_dropsiteszHList.info_dropsitecCs|jj|jdd|S)NrHr)rrr;)rrrrrinfo_existsszHList.info_existscCs|jj|jdd|S)NrHr)rrr;)rrrrrinfo_hiddenszHList.info_hiddencCs|jj|jdd|S)NrHnext)rrr;)rrrrr	info_nextszHList.info_nextcCs|jj|jdd|S)NrHry)rrr;)rrrrrinfo_parentszHList.info_parentcCs|jj|jdd|S)NrHprev)rrr;)rrrrr	info_prevszHList.info_prevcCs+|jj|jdd}|jj|S)NrHr)rrr;rD)rr~rrrinfo_selectionszHList.info_selectioncCs"|jj|jdd|||S)Nitemr)rrr;)rrrrrrr	item_cgetszHList.item_cgetc	KsZ|dkr(|j|jdd||S|jj|jdd|||j||dS)Nr
r)rr;rrr")rrrr#r$rrritem_configureszHList.item_configurec	Ks2|jj|jdd|||j||dS)Nr
rg)rrr;r")rrrr#r$rrritem_creates	zHList.item_createcCs|jj|jdd||S)Nr
r)rrr;)rrrrrritem_existsszHList.item_existscCs#|jj|jdd||dS)Nr
rm)rrr;)rrrrrritem_deleteszHList.item_deletecCs|jj|jd||S)N	entrycget)rrr;)rrrrrrrszHList.entrycgetcKsN|dkr"|j|jd|S|jj|jd||j||dS)Nentryconfigure)rr;rrr")rrr#r$rrrrszHList.entryconfigurecCs|jj|jd|S)Nnearest)rrr;)rrFrrrr	sz
HList.nearestcCs|jj|jd|dS)Nsee)rrr;)rrrrrrsz	HList.seecKs,|jj|jdd|j||dS)Nrr)rrr;r")rr#r$rrrselection_clearszHList.selection_clearcCs|jj|jdd|S)Nrincludes)rrr;)rrrrrselection_includesszHList.selection_includescCs#|jj|jdd||dS)Nrr)rrr;)rfirstlastrrr
selection_setszHList.selection_setcCs|jj|jdd|S)Nshowr)rrr;)rrrrr
show_entryszHList.show_entry)9r-r.r/r0r3rrrrrrrrrrrrrrrrrZheader_existrrrrrrrrrrrrrrrrrrrrr	rrr
rrrrrrrrrrrrrrrYslrc@s(eZdZdZdiddZdS)	InputOnlyz?InputOnly - Invisible widget. Unix only.

    Subwidgets - NoneNcKs tj||dd||dS)NZtixInputOnly)rMr3)rrVr#r$rrrr3 szInputOnly.__init__)r-r.r/r0r3rrrrrsrc@s(eZdZdZdiddZdS)
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       EntryNcKsRtj||dddg||t|d|jd<t|d|jd<dS)NZ
tixLabelEntry	labelsiderNrr)rMr3rrUr)rrVr#r$rrrr3-szLabelEntry.__init__)r-r.r/r0r3rrrrr#src@s(eZdZdZdiddZdS)
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       FrameNcKsRtj||dddg||t|d|jd<t|d|jd<dS)NZ
tixLabelFramerrNrframe)rMr3rrU_dummyFrame)rrVr#r$rrrr3>szLabelFrame.__init__)r-r.r/r0r3rrrrr3s	rc@sXeZdZdZiddZiddZddZdd	Zd
dZd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.cKsktj||ddg||t|ddd|jd<t|d|jd<t|d|jd<dS)NZtixListNoteBookrNZpanerqrrZshlist)rMr3_dummyPanedWindowrUr_dummyScrolledHList)rrVr#r$rrrr3Ms
zListNoteBook.__init__cKsI|jj|jd||j||t|||j|<|j|S)Nr)rrr;r"rorU)rr'r#r$rrrrUs(zListNoteBook.addcCs
|j|S)N)ra)rr'rrrpageZszListNoteBook.pagecCsU|jj|jj|jd}g}x$|D]}|j|j|q1W|S)Npages)rrtrr;rOra)rrcretrErrrr&]s
$
zListNoteBook.pagescCs|jj|jd|dS)Nraise)rrr;)rr'rrr
raise_pageeszListNoteBook.raise_pageN)	r-r.r/r0r3rr%r&r)rrrrr"Esr"c@s(eZdZdZdiddZdS)MeterzuThe Meter widget can be used to show the progress of a background
    job which may take a long time to execute.
    NcKs#tj||ddg||dS)NZtixMeterrN)rMr3)rrVr#r$rrrr3mszMeter.__init__)r-r.r/r0r3rrrrr*hsr*c@sseZdZdZdiddZiddZddZd	d
ZddZd
dZ	ddZ
dS)NoteBookzNoteBook - Multi-page container widget (tabbed notebook metaphor).

    Subwidgets       Class
    ----------       -----
    nbframe       NoteBookFrame
    <pages>       page widgets added dynamically with the add methodNcKs?tj||ddg||t|ddd|jd<dS)NZtixNoteBookrNZnbframerqr)rMr3rorU)rrVr#r$rrrr3yszNoteBook.__init__cKsI|jj|jd||j||t|||j|<|j|S)Nr)rrr;r"rorU)rr'r#r$rrrr~s(zNoteBook.addcCs8|jj|jd||j|j|j|=dS)Nrm)rrr;rUr8)rr'rrrrmszNoteBook.deletecCs
|j|S)N)ra)rr'rrrr%sz
NoteBook.pagecCsU|jj|jj|jd}g}x$|D]}|j|j|q1W|S)Nr&)rrtrr;rOra)rrcr'rErrrr&s
$
zNoteBook.pagescCs|jj|jd|dS)Nr()rrr;)rr'rrrr)szNoteBook.raise_pagecCs|jj|jdS)Nraised)rrr;)rrrrr,szNoteBook.raised)r-r.r/r0r3rrmr%r&r)r,rrrrr+qsr+c@seZdZdS)
NoteBookFrameN)r-r.r/rrrrr-sr-c@sgeZdZdZiddZiddZiddZdd	Zd
dZdd
Z	dS)
OptionMenuzOptionMenu - creates a menu button of options.

    Subwidget       Class
    ---------       -----
    menubutton      Menubutton
    menu            MenucKsOtj||ddg||t|d|jd<t|d|jd<dS)NZ
tixOptionMenurN
menubuttonmenu)rMr3_dummyMenubuttonrU
_dummyMenu)rrVr#r$rrrr3szOptionMenu.__init__cKs/|jj|jdd||j||dS)Nrcommand)rrr;r")rr'r#r$rrradd_commandszOptionMenu.add_commandcKs/|jj|jdd||j||dS)NrZ	separator)rrr;r")rr'r#r$rrr
add_separatorszOptionMenu.add_separatorcCs|jj|jd|dS)Nrm)rrr;)rr'rrrrmszOptionMenu.deletecCs|jj|jd|dS)Ndisable)rrr;)rr'rrrr6szOptionMenu.disablecCs|jj|jd|dS)Nenable)rrr;)rr'rrrr7szOptionMenu.enableN)
r-r.r/r0r3r4r5rmr6r7rrrrr.sr.c@sseZdZdZiddZiddZddZdd	Zd
dZidd
Z	ddZ
dS)PanedWindowaPanedWindow - 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
    ----------       -----
    <panes>       g/p widgets added dynamically with the add method.cKs&tj||dddg||dS)NZtixPanedWindowrrN)rMr3)rrVr#r$rrrr3szPanedWindow.__init__cKsO|jj|jd||j||t||dd|j|<|j|S)Nrrrr)rrr;r"rorU)rr'r#r$rrrrs(zPanedWindow.addcCs8|jj|jd||j|j|j|=dS)Nrm)rrr;rUr8)rr'rrrrmszPanedWindow.deletecCs|jj|jd|dS)NrB)rrr;)rr'rrrrBszPanedWindow.forgetcCs|jj|jd||S)Npanecget)rrr;)rrrrrrr9szPanedWindow.panecgetcKsN|dkr"|j|jd|S|jj|jd||j||dS)N
paneconfigure)rr;rrr")rrr#r$rrrr:szPanedWindow.paneconfigurecs;jjjjjd}fdd|DS)Npanescsg|]}j|qSr)ra)rJrE)rrrrKs	z%PanedWindow.panes.<locals>.<listcomp>)rrDrr;)rrcr)rrr;s$zPanedWindow.panesN)r-r.r/r0r3rrmrBr9r:r;rrrrr8s	r8c@sIeZdZdZiddZddZddZdd	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       MenucKsOtj||ddg||t|d|jd<t|d|jd<dS)NZtixPopupMenurNr/r0)rMr3r1rUr2)rrVr#r$rrrr3szPopupMenu.__init__cCs |jj|jd|jdS)Nr)rrr;)rrrrrrszPopupMenu.bind_widgetcCs |jj|jd|jdS)Nr)rrr;)rrrrrrszPopupMenu.unbind_widgetcCs&|jj|jd|j||dS)NZpost)rrr;)rrrErFrrrpost_widgetszPopupMenu.post_widgetN)r-r.r/r0r3rrr=rrrrr<s
	r<c@sUeZdZdZiddZddZddZdd	Zd
dZdS)
ResizeHandlez;Internal widget to draw resize handles on Scrolled widgets.c	KsAddddddddd	g	}tj||d
|||dS)NrNr3ZcursorfgZcursorbgZ
handlesizeZ	hintcolorZ	hintwidthrErFZtixResizeHandle)rMr3)rrVr#r$flagsrrrr3s
	zResizeHandle.__init__cCs |jj|jd|jdS)NZattachwidget)rrr;)rrrrr
attach_widgetszResizeHandle.attach_widgetcCs |jj|jd|jdS)NZdetachwidget)rrr;)rrrrr
detach_widgetszResizeHandle.detach_widgetcCs |jj|jd|jdS)Nr)rrr;)rrrrrrszResizeHandle.hidecCs |jj|jd|jdS)Nr)rrr;)rrrrrrszResizeHandle.showN)	r-r.r/r0r3r@rArrrrrrr>s
r>c@s%eZdZdZiddZdS)
ScrolledHListz0ScrolledHList - HList with automatic scrollbars.cKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZtixScrolledHListrNrrr)rMr3rrUr)rrVr#r$rrrr3s

zScrolledHList.__init__N)r-r.r/r0r3rrrrrBsrBc@s%eZdZdZiddZdS)ScrolledListBoxz4ScrolledListBox - Listbox with automatic scrollbars.cKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZtixScrolledListBoxrNlistboxrr)rMr3
_dummyListboxrUr)rrVr#r$rrrr3#szScrolledListBox.__init__N)r-r.r/r0r3rrrrrCsrCc@s%eZdZdZiddZdS)ScrolledTextz.ScrolledText - Text with automatic scrollbars.cKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZtixScrolledTextrNrrr)rMr3
_dummyTextrUr)rrVr#r$rrrr3-szScrolledText.__init__N)r-r.r/r0r3rrrrrF)srFc@s%eZdZdZiddZdS)
ScrolledTListz0ScrolledTList - TList with automatic scrollbars.cKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZtixScrolledTListrNZtlistrr)rMr3_dummyTListrUr)rrVr#r$rrrr37s

zScrolledTList.__init__N)r-r.r/r0r3rrrrrH3srHc@s%eZdZdZiddZdS)ScrolledWindowz2ScrolledWindow - Window with automatic scrollbars.cKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZtixScrolledWindowrNrrr)rMr3r!rUr)rrVr#r$rrrr3BszScrolledWindow.__init__N)r-r.r/r0r3rrrrrJ>srJc@s@eZdZdZiddZiddZddZdS)	SelectzSelect - 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	KsEtj||ddddddg||t|d|jd<dS)NZ	tixSelectZ	allowzeroradiorrrNr)rMr3rrU)rrVr#r$rrrr3Os

zSelect.__init__cKsI|jj|jd||j||t|||j|<|j|S)Nr)rrr;r"rrU)rr'r#r$rrrrVs(z
Select.addcCs|jj|jd|dS)Nr)rrr;)rr'rrrr[sz
Select.invokeN)r-r.r/r0r3rrrrrrrKHsrKc@s(eZdZdZdiddZdS)Shellz'Toplevel window.

    Subwidgets - NoneNcKs&tj||dddg||dS)NZtixShellrNtitle)rMr3)rrVr#r$rrrr3cszShell.__init__)r-r.r/r0r3rrrrrM^srMc@sLeZdZdZdiddZddZddZd	d
ZdS)DialogShellzToplevel 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 - NoneNcKs5tj||ddddddddg||dS)	NZtixDialogShellrNrNZmappedZ	minheightZminwidthryZ	transient)rMr3)rrVr#r$rrrr3os
	zDialogShell.__init__cCs|jj|jddS)Nr)rrr;)rrrrrvszDialogShell.popdowncCs|jj|jddS)Nr)rrr;)rrrrryszDialogShell.popupcCs|jj|jddS)Ncenter)rrr;)rrrrrP|szDialogShell.center)r-r.r/r0r3rrrPrrrrrOfs
rOc@s4eZdZdZdiddZddZdS)StdButtonBoxz@StdButtonBox - Standard Button Box (OK, Apply, Cancel and Help) NcKs~tj||dddg||t|d|jd<t|d|jd<t|d|jd<t|d|jd<dS)NZtixStdButtonBoxrrNrapplyrhelp)rMr3rrU)rrVr#r$rrrr3szStdButtonBox.__init__cCs,||jkr(|jj|jd|dS)Nr)rUrrr;)rr'rrrrszStdButtonBox.invoke)r-r.r/r0r3rrrrrrQsrQc@sHeZdZdZdiddZddZddZd	d
ZddZdd
dZ	ddZ
ddZddZddZ
iddZddZddZddZdd Zd!d"Zd#d$Zd%d&Zd'd(Zd)d*Zd+d,Zid-d.Zd/d0Zdd1d2ZdS)3TListaTList - 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 - NoneNcKs#tj||ddg||dS)NZtixTListrN)rMr3)rrVr#r$rrrr3szTList.__init__cCs |jj|jdd|dS)Nactiver)rrr;)rrrrr
active_setszTList.active_setcCs|jj|jdddS)NrUr)rrr;)rrrractive_clearszTList.active_clearcCs |jj|jdd|dS)Nrr)rrr;)rrrrrrszTList.anchor_setcCs|jj|jdddS)Nrr)rrr;)rrrrrszTList.anchor_clearcCs |jj|jd||dS)Nrm)rrr;)rfrom_torrrrmszTList.deletecCs |jj|jdd|dS)Nrr)rrr;)rrrrrrszTList.dragsite_setcCs|jj|jdddS)Nrr)rrr;)rrrrrszTList.dragsite_clearcCs |jj|jdd|dS)Nrr)rrr;)rrrrrrszTList.dropsite_setcCs|jj|jdddS)Nrr)rrr;)rrrrrszTList.dropsite_clearcKs,|jj|jd||j||dS)Nr)rrr;r")rrr#r$rrrrszTList.insertcCs|jj|jddS)NrHrU)rrr;)rrrrinfo_activeszTList.info_activecCs|jj|jddS)NrHr)rrr;)rrrrrszTList.info_anchorcCs|jj|jdd|S)NrHZdown)rrr;)rrrrr	info_downszTList.info_downcCs|jj|jdd|S)NrHleft)rrr;)rrrrr	info_leftszTList.info_leftcCs|jj|jdd|S)NrHright)rrr;)rrrrr
info_rightszTList.info_rightcCs+|jj|jdd}|jj|S)NrHr)rrr;rD)rr~rrrr	szTList.info_selectioncCs|jj|jddS)NrHr)rrr;)rrrr	info_sizeszTList.info_sizecCs|jj|jdd|S)NrHZup)rrr;)rrrrrinfo_upsz
TList.info_upcCs|jj|jd||S)Nr)rrr;)rrErFrrrrsz
TList.nearestcCs|jj|jd|dS)Nr)rrr;)rrrrrrsz	TList.seecKs,|jj|jdd|j||dS)Nrr)rrr;r")rr#r$rrrrszTList.selection_clearcCs|jj|jdd|S)Nrr)rrr;)rrrrrrszTList.selection_includescCs#|jj|jdd||dS)Nrr)rrr;)rrrrrrrszTList.selection_set)r-r.r/r0r3rVrWrrrmrrrrrrZrr[r]r_r	r`rarrrrrrrrrrTs2rTc@sgeZdZdZdiddZddZddZd	d
ZddZd
ddZ	dS)TreezTree - 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.NcKsetj||ddg||t|d|jd<t|d|jd<t|d|jd<dS)NZtixTreerNrrr)rMr3rrUr)rrVr#r$rrrr3s
z
Tree.__init__cCs|jj|jddS)aThis 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;)rrrrrcszTree.autosetmodecCs|jj|jd|dS)z8Close the entry given by entryPath if its mode is close.closeN)rrr;)r	entrypathrrrrdsz
Tree.closecCs|jj|jd|S)z9Returns the current mode of the entry given by entryPath.getmode)rrr;)rrerrrrfszTree.getmodecCs|jj|jd|dS)z6Open the entry given by entryPath if its mode is open.openN)rrr;)rrerrrrgsz	Tree.openZnonecCs |jj|jd||dS)aThis 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;)rremoderrrrhs
zTree.setmode)
r-r.r/r0r3rcrdrfrgrhrrrrrbsrbc@seZdZdZdiddZddZddZd	d
ZddZd
ddZ	ddZ
d
ddZdS)	CheckListzThe 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.
    NcKshtj||dddg||t|d|jd<t|d|jd<t|d|jd<dS)NZtixCheckListrNrLrrr)rMr3rrUr)rrVr#r$rrrr3s
zCheckList.__init__cCs|jj|jddS)aThis 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.rcN)rrr;)rrrrrcszCheckList.autosetmodecCs|jj|jd|dS)z8Close the entry given by entryPath if its mode is close.rdN)rrr;)rrerrrrd$szCheckList.closecCs|jj|jd|S)z9Returns the current mode of the entry given by entryPath.rf)rrr;)rrerrrrf(szCheckList.getmodecCs|jj|jd|dS)z6Open the entry given by entryPath if its mode is open.rgN)rrr;)rrerrrrg,szCheckList.openZoncCs7|jj|jj|jd|}|jj|S)zReturns 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)rrtrr;rD)rrir~rrrrk0s'zCheckList.getselectioncCs|jj|jd|S)z(Returns the current status of entryPath.	getstatus)rrr;)rrerrrrl7szCheckList.getstatuscCs |jj|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;)rrerirrrrm;szCheckList.setstatus)r-r.r/r0r3rcrdrfrgrkrlrmrrrrrjsrjc@seZdZdddZdS)rr
cCstj||||dS)N)ror3)rrVr'rqrrrr3Gsz_dummyButton.__init__N)r-r.r/r3rrrrrFsrc@seZdZdddZdS)rr
cCstj||||dS)N)ror3)rrVr'rqrrrr3Ksz_dummyCheckbutton.__init__N)r-r.r/r3rrrrrJsrc@seZdZdddZdS)rr
cCstj||||dS)N)ror3)rrVr'rqrrrr3Osz_dummyEntry.__init__N)r-r.r/r3rrrrrNsrc@seZdZdddZdS)r!r
cCstj||||dS)N)ror3)rrVr'rqrrrr3Ssz_dummyFrame.__init__N)r-r.r/r3rrrrr!Rsr!c@seZdZdddZdS)rr
cCstj||||dS)N)ror3)rrVr'rqrrrr3Wsz_dummyLabel.__init__N)r-r.r/r3rrrrrVsrc@seZdZdddZdS)rEr
cCstj||||dS)N)ror3)rrVr'rqrrrr3[sz_dummyListbox.__init__N)r-r.r/r3rrrrrEZsrEc@seZdZdddZdS)r2r
cCstj||||dS)N)ror3)rrVr'rqrrrr3_sz_dummyMenu.__init__N)r-r.r/r3rrrrr2^sr2c@seZdZdddZdS)r1r
cCstj||||dS)N)ror3)rrVr'rqrrrr3csz_dummyMenubutton.__init__N)r-r.r/r3rrrrr1bsr1c@seZdZdddZdS)rr
cCstj||||dS)N)ror3)rrVr'rqrrrr3gsz_dummyScrollbar.__init__N)r-r.r/r3rrrrrfsrc@seZdZdddZdS)rGr
cCstj||||dS)N)ror3)rrVr'rqrrrr3ksz_dummyText.__init__N)r-r.r/r3rrrrrGjsrGc@seZdZdddZdS)rr
cCs\tj||||t|d|jd<t|d|jd<t|d|jd<dS)NrDrr)ror3rErUr)rrVr'rqrrrr3osz_dummyScrolledListBox.__init__N)r-r.r/r3rrrrrnsrc@seZdZdddZdS)rr
cCstj||||dS)N)ror3)rrVr'rqrrrr3vsz_dummyHList.__init__N)r-r.r/r3rrrrrusrc@seZdZdddZdS)r$r
cCs\tj||||t|d|jd<t|d|jd<t|d|jd<dS)Nrrr)ror3rrUr)rrVr'rqrrrr3zsz_dummyScrolledHList.__init__N)r-r.r/r3rrrrr$ysr$c@seZdZdddZdS)rIr
cCstj||||dS)N)ror3)rrVr'rqrrrr3sz_dummyTList.__init__N)r-r.r/r3rrrrrIsrIc@seZdZdddZdS)rr
cCstj|||d|gt|d|jd<t|d|jd<t|d|jd<t|d|jd<y0t|d|jd<t|d|jd<Wntk
rYnXdS)Nrrrrrrr)ror3rrUrrrr)rrVr'rqrrrr3s
z_dummyComboBox.__init__N)r-r.r/r3rrrrrsrc@seZdZdddZdS)rr
cCs\tj||||t|d|jd<t|d|jd<t|d|jd<dS)Nrrr)ror3rrUr)rrVr'rqrrrr3sz_dummyDirList.__init__N)r-r.r/r3rrrrrsrc@seZdZdddZdS)rr
cCsFtj||||t|d|jd<t|d|jd<dS)Nrr)ror3rrUr)rrVr'rqrrrr3sz_dummyDirSelectBox.__init__N)r-r.r/r3rrrrrsrc@seZdZdddZdS)rr
cCstj||||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)	Nrrrrrrrr)ror3rrUrrr)rrVr'rqrrrr3sz_dummyExFileSelectBox.__init__N)r-r.r/r3rrrrrsrc@seZdZdddZdS)rr
cCsrtj||||t|d|jd<t|d|jd<t|d|jd<t|d|jd<dS)Nrrrr)ror3rrUr)rrVr'rqrrrr3s
z_dummyFileSelectBox.__init__N)r-r.r/r3rrrrrsrc@seZdZdddZdS)rr
cCs0tj||||t|d|jd<dS)Nr)ror3rrU)rrVr'rqrrrr3sz_dummyFileComboBox.__init__N)r-r.r/r3rrrrrsrc@seZdZdddZdS)rr
cCsrtj||||t|d|jd<t|d|jd<t|d|jd<t|d|jd<dS)NrrRrrS)ror3rrU)rrVr'rqrrrr3s
z_dummyStdButtonBox.__init__N)r-r.r/r3rrrrrsrc@seZdZdddZdS)_dummyNoteBookFramercCstj||||dS)N)ror3)rrVr'rqrrrr3sz_dummyNoteBookFrame.__init__N)r-r.r/r3rrrrrnsrnc@seZdZdddZdS)r#r
cCstj||||dS)N)ror3)rrVr'rqrrrr3sz_dummyPanedWindow.__init__N)r-r.r/r3rrrrr#sr#cCs|jjd|jS)zzReturns the qualified path name for the widget. Normally used to set
    default options for subwidgets. See tixwidgets.pyZ
tixOptionName)rrr;)rrrr
OptionNamesrocCsGd}x:|jD],}|d|d|d||d}qW|S)Nr7z{{z} {z - z}} )keys)dictstyperrrFileTypeLists*rtc@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.r/r0rrrrrusruc@seZdZdZdiddZddZddZd	d
ZdddZdd
dZ	ddZ
ddZddZdddZ
ddZddZddZddZdd Zdd!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}||_tj||d|||dS)NZtixGrid)r#rMr3)rrVr#r$rrrrr3s	z
Grid.__init__cCs|jj|dddS)zRemoves the selection anchor.rrN)rr)rrrrr	szGrid.anchor_clearcCs|j|jj|ddS)z3Get the (x,y) coordinate of the current anchor cellrr*)rrr)rrrr
anchor_get
szGrid.anchor_getcCs |jj|dd||dS)z/Set the selection anchor to the cell at (x, y).rrN)rr)rrErFrrrrszGrid.anchor_setcCsH|dkr(|jj|dd|n|jj|dd||dS)zdDelete rows between from_ and to inclusive.
        If to is not provided,  delete only row at from_Nrmr)rr)rrXrYrrr
delete_rowszGrid.delete_rowcCsH|dkr(|jj|dd|n|jj|dd||dS)zjDelete columns between from_ and to inclusive.
        If to is not provided,  delete only column at from_Nrmr)rr)rrXrYrrr
delete_columnszGrid.delete_columncCs|jj|dddS)zUIf any cell is being edited, de-highlight the cell  and  applies
        the changes.editrRN)rr)rrrr
edit_apply%szGrid.edit_applycCs |jj|dd||dS)zmHighlights  the  cell  at  (x, y) for editing, if the -editnotify
        command returns True for this cell.rzrN)rr)rrErFrrredit_set*sz
Grid.edit_setcCs<|r |ddkr d|}|jj|d|||S)z&Get the option value for cell at (x,y)rrr)rr)rrErFrrrrr/s
zGrid.entrycgetcKs|jd||f||S)Nr)Z
_configure)rrErFr#r$rrrr5szGrid.entryconfigurecCs%|j|jj|dd||S)z+Return True if display item exists at (x,y)rHr)Z_getbooleanrr)rrErFrrrr;szGrid.info_existscCs|jj|dd||S)NrHr)rr)rrErFrrrr?szGrid.info_bboxcCs#|jj|dd|||dS)zMoves 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.moverN)rr)rrXrYoffsetrrrmove_columnCszGrid.move_columncCs#|jj|dd|||dS)zMoves 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)rrXrYr~rrrmove_rowIsz
Grid.move_rowcCs"|j|jj|d||S)z8Return coordinate of cell nearest pixel coordinate (x,y)r)rrr)rrErFrrrrOszGrid.nearestcKsQ|j|j|}|dk	r1d|f|}|jj|d|||dS)Nz	-itemtyper)r"r#rr)rrErFrr$argsrrrrYszGrid.setc	Ks7|jj|jj|jdd||ji|S)aQueries 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 follwing:
              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.rr)rrtrr;r")rrr$rrrsize_column_s!zGrid.size_columnc	Ks4|jj|jj|dd||ji|S)aQueries 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 follwing:
              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.rr)rrtrr")rrr$rrrsize_rowysz
Grid.size_rowcCs |jj|jd||dS)z7Clears the cell at (x, y) by removing its display item.unsetN)rrr;)rrErFrrrrsz
Grid.unset)r-r.r/r0r3rrwrrxryr{r|rrrrrrrrrrrrrrrrvs(
	
rvc@s(eZdZdZdiddZdS)ScrolledGridzScrolled Grid widgetsNcKs/g}||_tj||d|||dS)NZtixScrolledGrid)r#rMr3)rrVr#r$rrrrr3s	zScrolledGrid.__init__)r-r.r/r0r3rrrrrsrrr )wr4r2rZ	TkVersionImportErrorZ_tkinterZWINDOWZTEXTZSTATUSZ	IMMEDIATEZIMAGEZ	IMAGETEXTZBALLOONZAUTOZ	ACROSSTOPASCIIZCELLZCOLUMNZ
DECREASINGZ
INCREASINGZINTEGERZMAINMAXZREALZROWZS_REGIONZX_REGIONZY_REGIONZ
TCL_DONT_WAITZTCL_WINDOW_EVENTSZTCL_FILE_EVENTSZTCL_TIMER_EVENTSZTCL_IDLE_EVENTSZTCL_ALL_EVENTSrr1r9rS	__bases__rMrorrrrrrrrrrrrrrZXViewZYViewrrrrr"r*r+r-r.r8r<r>rBrCrFrHrJrKrMrOrQrTrbrjZButtonrZCheckbuttonrZEntryrZFramer!ZLabelrZListboxrEZMenur2Z
Menubuttonr1Z	ScrollbarrZTextrGrrr$rIrrrrrrrrnr#rortrurvrrrrr<module>s
-81,!"#	()


S.7