Your IP : 3.138.178.162


Current Path : /usr/lib64/python3.8/tkinter/__pycache__/
Upload File :
Current File : //usr/lib64/python3.8/tkinter/__pycache__/tix.cpython-38.pyc

U

e5d-,�@sLddlZddlZddlTddlmZddlZdZdZdZdZdZd	Z	d
Z
dZd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<e%�Z0Gd=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%�Z<GdQdR�dRe%�Z=GdSdT�dTe%�Z>GdUdV�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&�ZZGd�d��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&�ZdGd�d��d�eCe&�ZeGd�d��d�eLe&�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&�ZlGd�d��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
�Zdd�Zd
d�Z	dd�Z
ddd�ZdS)�
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�#/usr/lib64/python3.8/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�cgetr�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
filedialogr)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	getbitmapr�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.
        rZgetimagerr+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�getrr+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resetoptionsr)rZ	newSchemeZ
newFontSetZ
newScmPriorrr�tix_resetoptions�sztixCommand.tix_resetoptions)N)N)N)�__name__�
__module__�__qualname__�__doc__rrr)r*r-r.r0r1rrrrrGs


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)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)�tkinterr6�__init__�os�environr/r�eval)rZ
screenNameZbaseNameZ	classNameZtixlibrrrr9�szTk.__init__cCs|�dd�tj�|�dS)NZWM_DELETE_WINDOW�)Zprotocolr8r6�destroy�rrrrr>�sz
Tk.destroy)NNr7�r2r3r4r5r9r>rrrrr6�s
r6c@sTeZdZdZifdd�ZeZdd�Zdd�Zdd	�Zddd�Z	ddd�Z
dd�Zd
S)�Formz�The Tix Form geometry manager

    Widgets can be arranged by specifying attachments to other widgets.
    See Tix documentation for complete detailscKs"|jjd|jf|�||���dS)N�tixForm�rr�_wr%r&rrr�config�szForm.configcCst�|||i�dS�N)rA�form�r�key�valuerrr�__setitem__�szForm.__setitem__cCs|j�dd|j�S)NrB�check�rrrDr?rrrrL�sz
Form.checkcCs|j�dd|j�dS)NrB�forgetrMr?rrrrN�szForm.forgetrcCs`|sJ|sJ|j�dd|j�}|j�|�}d}|D]}||j�|�f}q.|S|j�dd|j||�S)NrB�gridr)rrrD�	splitlistZgetint)rZxsizeZysize�x�y�zrrrrO�sz	Form.gridNcCs>|s|j�dd|j�S|ddkr*d|}|j�dd|j|�S)NrB�inforr!rMrrrrrT�s
z	Form.infocs(�fdd��j��j�dd�j��D�S)Ncsg|]}��|��qSr)�
_nametowidget��.0rQr?rr�
<listcomp>szForm.slaves.<locals>.<listcomp>rB�slaves�rrPrrDr?rr?rrYs
���zForm.slaves)rr)N)r2r3r4r5rErGrKrLrNrOrTrYrrrrrA�s


rAc@sreZdZdZdddiifdd�Zdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dd�Zidfdd�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}t|���D]&\}}||kr@|d||f}||=q@||_t�|||�|r�|jj||j	f|��|r�t�
||�i|_dS)Nr�optionsr!)r�append�list�items�
widgetName�Widget�_setuprrrDrE�subwidget_list)	r�masterr`Zstatic_optionsr'r(Zextra�k�vrrrr9s$zTixWidget.__init__cCs ||jkr|j|St|��dSrF)rc�AttributeErrorr+rrr�__getattr__Gs

zTixWidget.__getattr__cCs|j�d|j|�dS)z1Set a variable without calling its action routineZtixSetSilentNrM)rrJrrr�
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�lenrDrU)rr,�nrrr�	subwidgetPs

zTixWidget.subwidgetcCsZ|��}|sgSg}|D]<}|t|j�dd�}z|�|�|��WqYqXq|S)zReturn all subwidgets.rjN)�_subwidget_namesrnrDr]rU)r�namesZretlistr,rrr�subwidgets_allZszTixWidget.subwidgets_allcCs0z|j�|jd|�WStk
r*YdSXdS)z7Get a subwidget name (returns a String, not a Widget !)rpN)rrrDrlr+rrrrkiszTixWidget._subwidget_namecCs<z |j�|jdd�}|j�|�WStk
r6YdSXdS)z"Return the name of all subwidgets.Z
subwidgetsz-allN)rrrDrPrl)rrQrrrrqps
zTixWidget._subwidget_namescCs\|dkrdSt|t�st|�}t|t�s0t|�}|��}|D]}|j�|dd||�q<dS)z8Set configuration options for all subwidgets (and self).r=Nr r!)r#r$�reprrqrr)rrrJrrr,rrr�
config_allxs

zTixWidget.config_allcKst|s|}|r|rt||f�}n|r&|}d}|��D]*\}}t|�rL|�|�}|d||f}q2|j�dd|f|�S)Nrr!r�create)rr_�callable�	_registerrr)rZimgtyper'rdr(r\rerfrrr�image_create�s
zTixWidget.image_createcCs.z|j�dd|�Wntk
r(YnXdS)Nr�delete)rrrl)rZimgnamerrr�image_delete�szTixWidget.image_delete)r2r3r4r5r9rhrirprsrkrqruryr{rrrrr[
s�
-
r[c@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)rjc
Cs�|rD|�|�}z$|t|j�dd�}|�d�}Wng}YnX|s`t�||ddd|i�n�|}tt|�d�D]V}d�|d|d��}	z|�|	�}
|
}Wqtt	k
r�t
|||ddd�}YqtXqt|r�|d}t�||ddd|i�||_dS)Nrj�.r,r)�destroy_physically�check_intermediate���)rkrnrD�splitr[r9�range�joinrU�KeyErrorr|r~)rrdr,r~r�pathZplist�parent�iro�wrrrr9�s0



�zTixSubWidget.__init__cCsjt|j���D]}|��q|j|jjkr6|jj|j=|j|jjkrP|jj|j=|jrf|j�	d|j
�dS)Nr>)r^�children�valuesr>rmrdrcr~rrrD�r�crrrr>�s
zTixSubWidget.destroyN)rjrjr@rrrrr|�s
�
 r|c@sVeZdZdZifdd�dd�Zdd�Zdd	�Zd
d�Zdd
�Zifdd�Z	dd�Z
dS)�DisplayStylezRDisplayStyle - handle configuration options shared by
    (multiple) Display ItemsN)rdcKs\|s2d|kr|d}nd|kr(|d}n
t�d�}|j|_|jjd|f|�||���|_dS)NZ	refwindowzcreate display styleZtixDisplayStyle)r8Z_get_default_rootrrr%�	stylename)r�itemtyper'rdr(rrrr9�s



�zDisplayStyle.__init__cCs|jSrF)r�r?rrr�__str__�szDisplayStyle.__str__cCsH|r|rt||f�}n|r|}d}|��D]\}}|d||f}q*|S)Nrr!)rr_)rr'r(Zoptsrerfrrrr%�szDisplayStyle._optionscCs|j�|jd�dS�Nrz�rrr�r?rrrrz�szDisplayStyle.deletecCs|j�|jdd||�dS)Nr �-%sr�rHrrrrK�szDisplayStyle.__setitem__cKs|j|jdf|�||���S)Nr )r"r�r%r&rrrrE�s�
�zDisplayStyle.configcCs|j�|jdd|�S)Nrr�r�)rrIrrr�__getitem__�szDisplayStyle.__getitem__)r2r3r4r5r9r�r%rzrKrEr�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)Nr\ZinstallcolormapZinitwaitZ	statusbarZcursorZ
tixBalloon�labelr�r~�message�r[r9�_dummyLabelrc�rrdr'r(Zstaticrrrr9	s���zBalloon.__init__cKs&|jj|jd|jf|�||���dS)zkBind balloon widget to another.
        One balloon widget may be bound to several widgets at the same time�bindNrC)r�widgetr'r(rrr�bind_widgetszBalloon.bind_widgetcCs|j�|jd|j�dS�NZunbindrM�rr�rrr�
unbind_widgetszBalloon.unbind_widget)r2r3r4r5r9r�r�rrrrr�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�orientationr\�r[r9�rrdr'r(rrrr9s

�zButtonBox.__init__cKs4|jj|jd|f|�||���}t||�|j|<|S)z$Add a button with given name to box.�add�rrrDr%�_dummyButtonrc)rr,r'r(Zbtnrrrr�#s z
ButtonBox.addcCs ||jkr|j�|jd|�dS�N�invoke�rcrrrDr+rrrr�*s
zButtonBox.invoke�r2r3r4r5r9r�r�rrrrr�sr�c@s>eZdZdZdifdd�Zdd�Zdd�Zd	d
�Zdd�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	<z$t|d
�|jd
<t|d�|jd<Wntk
r�YnXdS)NZtixComboBoxZeditableZdropdown�fancyr\r��entry�arrow�slistbox�tick�cross)r[r9r�rc�_dummyEntryr��_dummyScrolledListBox�	TypeErrorr�rrrr9<s 

��
zComboBox.__init__cCs|j�|jd|�dS)NZ
addhistoryrM�rr$rrr�add_historyNszComboBox.add_historycCs|j�|jd|�dS)NZ
appendhistoryrMr�rrr�append_historyQszComboBox.append_historycCs|j�|jd||�dS�N�insertrM)r�indexr$rrrr�TszComboBox.insertcCs|j�|jd|�dS)N�pickrM�rr�rrrr�Wsz
ComboBox.pick)	r2r3r4r5r9r�r�r�r�rrrrr�.s
r�c@s>eZdZdZdifdd�Zdd�Zdd�Zd	d
�Zdd�ZdS)
�Controla�Control - 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
tixControlr\�incr�decrr�r�)r[r9r�rcr�r�r�rrrr9hs
zControl.__init__cCs|j�|jd�dS)Nr�rMr?rrr�	decrementoszControl.decrementcCs|j�|jd�dS)Nr�rMr?rrr�	incrementrszControl.incrementcCs|j�|jd�dSr�rMr?rrrr�uszControl.invokecCs|j�|jd�dS)N�updaterMr?rrrr�xszControl.update)	r2r3r4r5r9r�r�r�r�rrrrr�Zs
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
tixDirListr\�hlist�vsb�hsb�r[r9�_dummyHListrc�_dummyScrollbarr�rrrr9�szDirList.__init__cCs|j�|jd|�dS�N�chdirrM�r�dirrrrr��sz
DirList.chdirN�r2r3r4r5r9r�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
tixDirTreer\r�r�r�r�r�rrrr9�szDirTree.__init__cCs|j�|jd|�dSr�rMr�rrrr��sz
DirTree.chdirNr�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)NZtixDirSelectBoxr\�dirlist�dircbx)r[r9�
_dummyDirListrc�_dummyFileComboBoxr�rrrr9�szDirSelectBox.__init__N�r2r3r4r5r9rrrrr��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)NZtixExFileSelectBoxr\�cancel�ok�hidden�typesr�r��file�filelist)r[r9r�rc�_dummyCheckbutton�_dummyComboBoxr�r�r�rrrr9�szExFileSelectBox.__init__cCs|j�|jd�dS�N�filterrMr?rrrr��szExFileSelectBox.filtercCs|j�|jd�dSr�rMr?rrrr��szExFileSelectBox.invokeN)r2r3r4r5r9r�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)NZtixDirSelectDialogr\Zdirbox)r[r9�_dummyDirSelectBoxrcr�rrrr9�s
�zDirSelectDialog.__init__cCs|j�|jd�dS�N�popuprMr?rrrr��szDirSelectDialog.popupcCs|j�|jd�dS�N�popdownrMr?rrrr��szDirSelectDialog.popdownN�r2r3r4r5r9r�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)NZtixExFileSelectDialogr\�fsbox)r[r9�_dummyExFileSelectBoxrcr�rrrr9�s
�zExFileSelectDialog.__init__cCs|j�|jd�dSr�rMr?rrrr�szExFileSelectDialog.popupcCs|j�|jd�dSr�rMr?rrrr�szExFileSelectDialog.popdownNr�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)NZtixFileSelectBoxr\r�r�r��	selection)r[r9r�rcr�r�rrrr9s
zFileSelectBox.__init__cCs|j�|jd�dSr�rMr?rrr�apply_filterszFileSelectBox.apply_filtercCs|j�|jd�dSr�rMr?rrrr�szFileSelectBox.invokeN)r2r3r4r5r9r�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)NZtixFileSelectDialogr\Zbtnsr�)r[r9�_dummyStdButtonBoxrc�_dummyFileSelectBoxr�rrrr9,s
�zFileSelectDialog.__init__cCs|j�|jd�dSr�rMr?rrrr�2szFileSelectDialog.popupcCs|j�|jd�dSr�rMr?rrrr�5szFileSelectDialog.popdownNr�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
dialogtyper\Zbuttonr�)r[r9r�rcr�r�rrrr9Ds
�zFileEntry.__init__cCs|j�|jd�dSr�rMr?rrrr�JszFileEntry.invokecCsdSrFrr?rrr�file_dialogMszFileEntry.file_dialogN)r2r3r4r5r9r�r�rrrrr�8sr�c@s�eZdZdZdifdd�Zifdd�Zdifdd�Zd	d
�Zdd�Zdldd�Z	dd�Z
dd�Zdd�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 d<d=�Z!dmd>d?�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�columnsr\r�r�rrrr9Ys

�zHList.__init__cKs |jj|jd|f|�||���S�Nr�rC�rr�r'r(rrrr�]sz	HList.addcKs(|sd}|jj|jd|f|�||���S)Nr=ZaddchildrC)rr�r'r(rrr�	add_child`s�
�zHList.add_childcCs|j�|jdd|�dS�N�anchor�setrM�rr�rrr�
anchor_setfszHList.anchor_setcCs|j�|jdd�dS�Nr��clearrMr?rrr�anchor_cleariszHList.anchor_clearrcCs6|s|j�|jdd||�S|j�|jdd|d|�SdS)Nr	�widthz-charrM)r�colr�charsrrr�column_widthls�zHList.column_widthcCs|j�|jdd�dS)Nrz�allrMr?rrr�
delete_allsszHList.delete_allcCs|j�|jdd|�dS)Nrzr�rMr�rrr�delete_entryvszHList.delete_entrycCs|j�|jdd|�dS)NrzZ
offspringsrMr�rrr�delete_offspringsyszHList.delete_offspringscCs|j�|jdd|�dS)NrzZsiblingsrMr�rrr�delete_siblings|szHList.delete_siblingscCs|j�|jdd|�dS�N�dragsiter�rMr�rrr�dragsite_setszHList.dragsite_setcCs|j�|jdd�dS�NrrrMr?rrr�dragsite_clear�szHList.dragsite_clearcCs|j�|jdd|�dS�N�dropsiter�rMr�rrr�dropsite_set�szHList.dropsite_setcCs|j�|jdd�dS�NrrrMr?rrr�dropsite_clear�szHList.dropsite_clearcKs&|jj|jdd|f|�||���dS)N�headerrvrC�rrr'r(rrr�
header_create�szHList.header_createcKs@|dkr|�|jdd|�S|jj|jdd|f|�||���dS)Nrr �r"rDrrr%rrrr�header_configure�s

�zHList.header_configurecCs|j�|jdd||�S)NrrrM)rr�optrrr�header_cget�szHList.header_cgetcCs|j�|j�|jdd|��S)NrZexist)rZ
getbooleanrrD�rrrrr�
header_exists�szHList.header_existscCs|j�|jdd|�dS)NrrzrMrrrr�
header_delete�szHList.header_deletecCs|j�|jdd|�S)Nr�sizerMrrrr�header_size�szHList.header_sizecCs|j�|jdd|�dS)N�hider�rMr�rrr�
hide_entry�szHList.hide_entrycKs&|jj|jdd|f|�||���dS)N�	indicatorrvrCr�rrr�indicator_create�s�
�zHList.indicator_createcKs@|dkr|�|jdd|�S|jj|jdd|f|�||���dS)Nr#r rr�rrr�indicator_configure�s��
�zHList.indicator_configurecCs|j�|jdd||�S)Nr#rrM�rr�rrrr�indicator_cget�szHList.indicator_cgetcCs|j�|jdd|�S)Nr#�existsrMr�rrr�indicator_exists�szHList.indicator_existscCs|j�|jdd|�dS)Nr#rzrMr�rrr�indicator_delete�szHList.indicator_deletecCs|j�|jdd|�S)Nr#rrMr�rrr�indicator_size�szHList.indicator_sizecCs|j�|jdd�S�NrTr�rMr?rrr�info_anchor�szHList.info_anchorcCs|�|j�|jdd|��pdS�NrTZbbox)�_getintsrrrDr�rrr�	info_bbox�s
��zHList.info_bboxcCs |j�|jdd|�}|j�|�S)NrTr��rrrDrP)rr�r�rrr�
info_children�szHList.info_childrencCs|j�|jdd|�S)NrT�datarMr�rrr�	info_data�szHList.info_datacCs|j�|jdd�S)NrTrrMr?rrr�
info_dragsite�szHList.info_dragsitecCs|j�|jdd�S)NrTrrMr?rrr�
info_dropsite�szHList.info_dropsitecCs|j�|jdd|�S)NrTr(rMr�rrr�info_exists�szHList.info_existscCs|j�|jdd|�S)NrTr�rMr�rrr�info_hidden�szHList.info_hiddencCs|j�|jdd|�S)NrT�nextrMr�rrr�	info_next�szHList.info_nextcCs|j�|jdd|�S)NrTr�rMr�rrr�info_parent�szHList.info_parentcCs|j�|jdd|�S)NrT�prevrMr�rrr�	info_prev�szHList.info_prevcCs|j�|jdd�}|j�|�S�NrTr�r1r�rrr�info_selection�szHList.info_selectioncCs|j�|jdd|||�S)N�itemrrM)rr�rrrrr�	item_cget�szHList.item_cgetcKsD|dkr|�|jdd||�S|jj|jdd||f|�||���dS)Nr@r r�rr�rr'r(rrr�item_configure�s

�zHList.item_configurecKs(|jj|jdd||f|�||���dS)Nr@rvrCrBrrr�item_create�s�
�zHList.item_createcCs|j�|jdd||�S)Nr@r(rM�rr�rrrr�item_exists�szHList.item_existscCs|j�|jdd||�dS)Nr@rzrMrErrr�item_delete�szHList.item_deletecCs|j�|jd||�S)N�	entrycgetrMr&rrrrH�szHList.entrycgetcKs<|dkr|�|jd|�S|jj|jd|f|�||���dS�N�entryconfigurerr�rrrrJ�s

�zHList.entryconfigurecCs|j�|jd|�S�N�nearestrM)rrRrrrrLsz
HList.nearestcCs|j�|jd|�dS�N�seerMr�rrrrNsz	HList.seecKs$|jj|jddf|�||���dS�Nr�rrCr&rrr�selection_clearszHList.selection_clearcCs|j�|jdd|�S�Nr�ZincludesrMr�rrr�selection_includes
szHList.selection_includescCs|j�|jdd||�dS�Nr�r�rM�r�firstZlastrrr�
selection_set
szHList.selection_setcCs|j�|jdd|�S)N�showr�rMr�rrr�
show_entryszHList.show_entry)rNN)N)N)9r2r3r4r5r9r�r�r�rrrrr	r
r
rrrrrrrZheader_existrr r"r$r%r'r)r*r+r-r0r2r4r5r6r7r8r:r;r=r?rArCrDrFrGrHrJrLrNrPrRrVrXrrrrr�Qsl


r�c@seZdZdZdifdd�ZdS)�	InputOnlyz?InputOnly - Invisible widget. Unix only.

    Subwidgets - NoneNcKst�||dd||�dS)NZtixInputOnlyr�r�rrrr9szInputOnly.__init__r�rrrrrYsrYc@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�	labelsider\r�r�)r[r9r�rcr�r�rrrr9%s
�zLabelEntry.__init__r�rrrrrZs	rZc@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[r\r��frame)r[r9r�rc�_dummyFramer�rrrr96s
�zLabelFrame.__init__r�rrrrr\+s
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)NZtixListNoteBookr\Zpanerr�r�Zshlist)r[r9�_dummyPanedWindowrcr��_dummyScrolledHListr�rrrr9Es�zListNoteBook.__init__cKs:|jj|jd|f|�||���t||�|j|<|j|Sr��rrrDr%r|rc�rr,r'r(rrrr�Ms zListNoteBook.addcCs
|�|�SrF�rpr+rrr�pageRszListNoteBook.pagecCs:|j�|j�|jd��}g}|D]}|�|�|��q |S�N�pages�rrPrrDr]rp�rrrZretrQrrrrgUs
zListNoteBook.pagescCs|j�|jd|�dS�N�raiserMr+rrr�
raise_page]szListNoteBook.raise_pageN)	r2r3r4r5r9r�rergrlrrrrr_=s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)NZtixMeterr\r�r�rrrr9es

�zMeter.__init__r�rrrrrm`srmc@sReZdZdZdifdd�Zifdd�Zdd�Zd	d
�Zdd�Zd
d�Z	dd�Z
dS)�NoteBookz�NoteBook - Multi-page container widget (tabbed notebook metaphor).

    Subwidgets       Class
    ----------       -----
    nbframe       NoteBookFrame
    <pages>       page widgets added dynamically with the add methodNcKs.t�||ddg||�t|ddd�|jd<dS)NZtixNoteBookr\Znbframerr�)r[r9r|rcr�rrrr9qs�zNoteBook.__init__cKs:|jj|jd|f|�||���t||�|j|<|j|Sr�rbrcrrrr�vs zNoteBook.addcCs,|j�|jd|�|j|��|j|=dSr��rrrDrcr>r+rrrrz{szNoteBook.deletecCs
|�|�SrFrdr+rrrre�sz
NoteBook.pagecCs:|j�|j�|jd��}g}|D]}|�|�|��q |Srfrhrirrrrg�s
zNoteBook.pagescCs|j�|jd|�dSrjrMr+rrrrl�szNoteBook.raise_pagecCs|j�|jd�S)N�raisedrMr?rrrrp�szNoteBook.raised)r2r3r4r5r9r�rzrergrlrprrrrrnisrnc@seZdZdS)�
NoteBookFrameN)r2r3r4rrrrrq�srqc@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
tixOptionMenur\�
menubutton�menu�r[r9�_dummyMenubuttonrc�
_dummyMenur�rrrr9�szOptionMenu.__init__cKs&|jj|jdd|f|�||���dS)Nr��commandrCrcrrr�add_command�szOptionMenu.add_commandcKs&|jj|jdd|f|�||���dS)Nr�Z	separatorrCrcrrr�
add_separator�szOptionMenu.add_separatorcCs|j�|jd|�dSr�rMr+rrrrz�szOptionMenu.deletecCs|j�|jd|�dS)N�disablerMr+rrrr{�szOptionMenu.disablecCs|j�|jd|�dS)N�enablerMr+rrrr|�szOptionMenu.enableN)
r2r3r4r5r9ryrzrzr{r|rrrrrr�srrc@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
    ----------       -----
    <panes>       g/p widgets added dynamically with the add method.cKst�||dddg||�dS)NZtixPanedWindowr�r\r�r�rrrr9�szPanedWindow.__init__cKs>|jj|jd|f|�||���t||dd�|j|<|j|S)Nr�r)rrbrcrrrr��s
 �zPanedWindow.addcCs,|j�|jd|�|j|��|j|=dSr�ror+rrrrz�szPanedWindow.deletecCs|j�|jd|�dS)NrNrMr+rrrrN�szPanedWindow.forgetcCs|j�|jd||�S)N�panecgetrMr&rrrr~�szPanedWindow.panecgetcKs<|dkr|�|jd|�S|jj|jd|f|�||���dS)N�
paneconfigurerr�rrrr�szPanedWindow.paneconfigurecs*�j��j��jd��}�fdd�|D�S)N�panescsg|]}��|��qSrrdrVr?rrrX�sz%PanedWindow.panes.<locals>.<listcomp>rZ)rrrrr?rr��szPanedWindow.panesN)r2r3r4r5r9r�rzrNr~rr�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tixPopupMenur\rsrtrur�rrrr9�szPopupMenu.__init__cCs|j�|jd|j�dS)Nr�rMr�rrrr��szPopupMenu.bind_widgetcCs|j�|jd|j�dSr�rMr�rrrr��szPopupMenu.unbind_widgetcCs|j�|jd|j||�dS)NZpostrM)rr�rQrRrrr�post_widget�szPopupMenu.post_widgetN)r2r3r4r5r9r�r�r�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)Nr\rxZcursorfgZcursorbgZ
handlesizeZ	hintcolorZ	hintwidthrQrRZtixResizeHandler�)rrdr'r(�flagsrrrr9�s�
�zResizeHandle.__init__cCs|j�|jd|j�dS)NZattachwidgetrMr�rrr�
attach_widgetszResizeHandle.attach_widgetcCs|j�|jd|j�dS)NZdetachwidgetrMr�rrr�
detach_widgetszResizeHandle.detach_widgetcCs|j�|jd|j�dS)Nr!rMr�rrrr!szResizeHandle.hidecCs|j�|jd|j�dS)NrWrMr�rrrrW	szResizeHandle.showN)	r2r3r4r5r9r�r�r!rWrrrrr��s
r�c@seZdZdZifdd�ZdS)�
ScrolledHListz0ScrolledHList - HList with automatic scrollbars.cKsJt�||ddg||�t|d�|jd<t|d�|jd<t|d�|jd<dS)NZtixScrolledHListr\r�r�r�r�r�rrrr9s�zScrolledHList.__init__Nr�rrrrr�sr�c@seZdZdZifdd�ZdS)�ScrolledListBoxz4ScrolledListBox - Listbox with automatic scrollbars.cKsJt�||ddg||�t|d�|jd<t|d�|jd<t|d�|jd<dS)NZtixScrolledListBoxr\�listboxr�r�)r[r9�
_dummyListboxrcr�r�rrrr9szScrolledListBox.__init__Nr�rrrrr�sr�c@seZdZdZifdd�ZdS)�ScrolledTextz.ScrolledText - Text with automatic scrollbars.cKsJt�||ddg||�t|d�|jd<t|d�|jd<t|d�|jd<dS)NZtixScrolledTextr\rr�r�)r[r9�
_dummyTextrcr�r�rrrr9%szScrolledText.__init__Nr�rrrrr�!sr�c@seZdZdZifdd�ZdS)�
ScrolledTListz0ScrolledTList - TList with automatic scrollbars.cKsJt�||ddg||�t|d�|jd<t|d�|jd<t|d�|jd<dS)NZtixScrolledTListr\Ztlistr�r�)r[r9�_dummyTListrcr�r�rrrr9/s�zScrolledTList.__init__Nr�rrrrr�+sr�c@seZdZdZifdd�ZdS)�ScrolledWindowz2ScrolledWindow - Window with automatic scrollbars.cKsJt�||ddg||�t|d�|jd<t|d�|jd<t|d�|jd<dS)NZtixScrolledWindowr\rr�r�)r[r9r^rcr�r�rrrr9:szScrolledWindow.__init__Nr�rrrrr�6sr�c@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[r\r�r�r�rrrr9Gs
��zSelect.__init__cKs:|jj|jd|f|�||���t||�|j|<|j|Sr�r�rcrrrr�Ns z
Select.addcCs|j�|jd|�dSr�rMr+rrrr�Ssz
Select.invokeNr�rrrrr�@sr�c@seZdZdZdifdd�ZdS)�Shellz'Toplevel window.

    Subwidgets - NoneNcKst�||dddg||�dS)NZtixShellr\�titler�r�rrrr9[szShell.__init__r�rrrrr�Vsr�c@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)	NZtixDialogShellr\r�ZmappedZ	minheightZminwidthr�Z	transientr�r�rrrr9gs��zDialogShell.__init__cCs|j�|jd�dSr�rMr?rrrr�nszDialogShell.popdowncCs|j�|jd�dSr�rMr?rrrr�qszDialogShell.popupcCs|j�|jd�dS)N�centerrMr?rrrr�tszDialogShell.center)r2r3r4r5r9r�r�r�rrrrr�^s
r�c@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�r\r��applyr��help)r[r9r�rcr�rrrr9zs
�zStdButtonBox.__init__cCs ||jkr|j�|jd|�dSr�r�r+rrrr��s
zStdButtonBox.invoke)r2r3r4r5r9r�rrrrr�wsr�c@s�eZdZdZdifdd�Zdd�Zdd�Zd	d
�Zdd�Zd3d
d�Z	dd�Z
dd�Zdd�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)NZtixTListr\r�r�rrrr9�szTList.__init__cCs|j�|jdd|�dS)N�activer�rMr�rrr�
active_set�szTList.active_setcCs|j�|jdd�dS)Nr�rrMr?rrr�active_clear�szTList.active_clearcCs|j�|jdd|�dSr�rMr�rrrr��szTList.anchor_setcCs|j�|jdd�dSr�rMr?rrrr�szTList.anchor_clearcCs|j�|jd||�dSr�rM�r�from_�torrrrz�szTList.deletecCs|j�|jdd|�dSrrMr�rrrr
�szTList.dragsite_setcCs|j�|jdd�dSrrMr?rrrr�szTList.dragsite_clearcCs|j�|jdd|�dSrrMr�rrrr�szTList.dropsite_setcCs|j�|jdd�dSrrMr?rrrr�szTList.dropsite_clearcKs$|jj|jd|f|�||���dSr�rC)rr�r'r(rrrr��szTList.insertcCs|j�|jdd�S)NrTr�rMr?rrr�info_active�szTList.info_activecCs|j�|jdd�Sr,rMr?rrrr-�szTList.info_anchorcCs|j�|jdd|�S)NrTZdownrMr�rrr�	info_down�szTList.info_downcCs|j�|jdd|�S)NrT�leftrMr�rrr�	info_left�szTList.info_leftcCs|j�|jdd|�S)NrT�rightrMr�rrr�
info_right�szTList.info_rightcCs|j�|jdd�}|j�|�Sr>r1r�rrrr?�szTList.info_selectioncCs|j�|jdd�S)NrTrrMr?rrr�	info_size�szTList.info_sizecCs|j�|jdd|�S)NrTZuprMr�rrr�info_up�sz
TList.info_upcCs|j�|jd||�SrKrM�rrQrRrrrrL�sz
TList.nearestcCs|j�|jd|�dSrMrMr�rrrrN�sz	TList.seecKs$|jj|jddf|�||���dSrOrCr&rrrrP�szTList.selection_clearcCs|j�|jdd|�SrQrMr�rrrrR�szTList.selection_includescCs|j�|jdd||�dSrSrMrTrrrrV�szTList.selection_set)N)N)r2r3r4r5r9r�r�r�rrzr
rrrr�r�r-r�r�r�r?r�r�rLrNrPrRrVrrrrr��s2	
r�c@sHeZdZdZdifdd�Zdd�Zdd�Zd	d
�Zdd�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)NZtixTreer\r�r�r�r�r�rrrr9�s
�z
Tree.__init__cCs|j�|jd�dS�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.�autosetmodeNrMr?rrrr��szTree.autosetmodecCs|j�|jd|�dS�z8Close the entry given by entryPath if its mode is close.�closeNrM�r�	entrypathrrrr��sz
Tree.closecCs|j�|jd|�S�z9Returns the current mode of the entry given by entryPath.�getmoderMr�rrrr��szTree.getmodecCs|j�|jd|�dS�z6Open the entry given by entryPath if its mode is open.�openNrMr�rrrr��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.�setmodeNrM�rr��moderrrr��s
zTree.setmode)r�)
r2r3r4r5r9r�r�r�r�r�rrrrr��sr�c@sZeZdZdZdifdd�Zdd�Zdd�Zd	d
�Zdd�Zddd�Z	dd�Z
ddd�ZdS)�	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tixCheckListr\r�r�r�r�r�r�rrrr9s
�zCheckList.__init__cCs|j�|jd�dSr�rMr?rrrr�szCheckList.autosetmodecCs|j�|jd|�dSr�rMr�rrrr�szCheckList.closecCs|j�|jd|�Sr�rMr�rrrr� szCheckList.getmodecCs|j�|jd|�dSr�rMr�rrrr�$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�getselectionrZ)rr�rrrr�(szCheckList.getselectioncCs|j�|jd|�S)z(Returns the current status of entryPath.�	getstatusrMr�rrrr�.szCheckList.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.�	setstatusNrMr�rrrr�2szCheckList.setstatus)r�)r�)r2r3r4r5r9r�r�r�r�r�r�r�rrrrr�s
r�c@seZdZddd�ZdS)r�rjcCst�||||�dSrF�r|r9�rrdr,r~rrrr9>sz_dummyButton.__init__N)rj�r2r3r4r9rrrrr�=sr�c@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9Bsz_dummyCheckbutton.__init__N)rjr�rrrrr�Asr�c@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9Fsz_dummyEntry.__init__N)rjr�rrrrr�Esr�c@seZdZddd�ZdS)r^rjcCst�||||�dSrFr�r�rrrr9Jsz_dummyFrame.__init__N)rjr�rrrrr^Isr^c@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9Nsz_dummyLabel.__init__N)rjr�rrrrr�Msr�c@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9Rsz_dummyListbox.__init__N)rjr�rrrrr�Qsr�c@seZdZddd�ZdS)rwrjcCst�||||�dSrFr�r�rrrr9Vsz_dummyMenu.__init__N)rjr�rrrrrwUsrwc@seZdZddd�ZdS)rvrjcCst�||||�dSrFr�r�rrrr9Zsz_dummyMenubutton.__init__N)rjr�rrrrrvYsrvc@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9^sz_dummyScrollbar.__init__N)rjr�rrrrr�]sr�c@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9bsz_dummyText.__init__N)rjr�rrrrr�asr�c@seZdZddd�ZdS)r�rjcCsDt�||||�t|d�|jd<t|d�|jd<t|d�|jd<dS)Nr�r�r�)r|r9r�rcr�r�rrrr9fsz_dummyScrolledListBox.__init__N)rjr�rrrrr�esr�c@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9msz_dummyHList.__init__N)rjr�rrrrr�lsr�c@seZdZddd�ZdS)rarjcCsDt�||||�t|d�|jd<t|d�|jd<t|d�|jd<dS�Nr�r�r��r|r9r�rcr�r�rrrr9qsz_dummyScrolledHList.__init__N)rjr�rrrrrapsrac@seZdZddd�ZdS)r�rjcCst�||||�dSrFr�r�rrrr9xsz_dummyTList.__init__N)rjr�rrrrr�wsr�c@seZdZddd�ZdS)r�rjcCs�t�|||d|g�t|d�|jd<t|d�|jd<t|d�|jd<t|d�|jd<z$t|d�|jd<t|d�|jd<Wntk
r�YnXdS)Nr�r�r�r�r�r�r�)r|r9r�rcr�r�r�r�r�rrrr9|s�
z_dummyComboBox.__init__N)rjr�rrrrr�{sr�c@seZdZddd�ZdS)r�rjcCsDt�||||�t|d�|jd<t|d�|jd<t|d�|jd<dSr�r�r�rrrr9�sz_dummyDirList.__init__N)rjr�rrrrr��sr�c@seZdZddd�ZdS)r�rjcCs4t�||||�t|d�|jd<t|d�|jd<dS)Nr�r�)r|r9r�rcr�r�rrrr9�sz_dummyDirSelectBox.__init__N)rjr�rrrrr��sr�c@seZdZddd�ZdS)r�rjcCs�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�)r|r9r�rcr�r�r�r�rrrr9�sz_dummyExFileSelectBox.__init__N)rjr�rrrrr��sr�c@seZdZddd�ZdS)r�rjcCsTt�||||�t|d�|jd<t|d�|jd<t|d�|jd<t|d�|jd<dS)Nr�r�r�r�)r|r9r�rcr�r�rrrr9�s
z_dummyFileSelectBox.__init__N)rjr�rrrrr��sr�c@seZdZddd�ZdS)r�rjcCs$t�||||�t|d�|jd<dS)Nr�)r|r9r�rcr�rrrr9�sz_dummyFileComboBox.__init__N)rjr�rrrrr��sr�c@seZdZddd�ZdS)r�rjcCsTt�||||�t|d�|jd<t|d�|jd<t|d�|jd<t|d�|jd<dS)Nr�r�r�r�)r|r9r�rcr�rrrr9�s
z_dummyStdButtonBox.__init__N)rjr�rrrrr��sr�c@seZdZddd�ZdS)�_dummyNoteBookFramercCst�||||�dSrFr�r�rrrr9�sz_dummyNoteBookFrame.__init__N)rr�rrrrr��sr�c@seZdZddd�ZdS)r`rjcCst�||||�dSrFr�r�rrrr9�sz_dummyPanedWindow.__init__N)rjr�rrrrr`�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
tixOptionNamerM)r�rrr�
OptionName�sr�cCs:d}|��D](}|d|d|d||d}q|S)Nr=z{{z} {z - z}} )�keys)�dict�s�typerrr�FileTypeList�s&r�c@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)r2r3r4r5rrrrr��sr�c@s�eZdZdZdifdd�Zdd�Zdd�Zd	d
�Zd)dd�Zd*d
d�Z	dd�Z
dd�Zdd�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'r[r9r�rrrr9�sz
Grid.__init__cCs|j�|dd�dS)zRemoves the selection anchor.r�rNrr?rrrrszGrid.anchor_clearcCs|�|j�|dd��S)z3Get the (x,y) coordinate of the current anchor cellr�r/�r/rrr?rrr�
anchor_getszGrid.anchor_getcCs|j�|dd||�dS)z/Set the selection anchor to the cell at (x, y).r�r�Nrr�rrrr�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_Nrzr
rr�rrr�
delete_rowszGrid.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_Nrzr	rr�rrr�
delete_columnszGrid.delete_columncCs|j�|dd�dS)zUIf any cell is being edited, de-highlight the cell  and  applies
        the changes.�editr�Nrr?rrr�
edit_applyszGrid.edit_applycCs|j�|dd||�dS)zmHighlights  the  cell  at  (x, y) for editing, if the -editnotify
        command returns True for this cell.r�r�Nrr�rrr�edit_set!sz
Grid.edit_setcCs,|r|ddkrd|}|j�|d|||�S)z&Get the option value for cell at (x,y)rr!rHr)rrQrRrrrrrH&szGrid.entrycgetcKs|�d||f||�SrI)Z
_configure)rrQrRr'r(rrrrJ,szGrid.entryconfigurec	Cs|�|j�|dd||��S)z+Return True if display item exists at (x,y)rTr()Z_getbooleanrrr�rrrr72szGrid.info_existscCs|j�|dd||�Sr.rr�rrrr06szGrid.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	Nr�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
Nrr�rrr�move_row@sz
Grid.move_rowcCs|�|j�|d||��S)z8Return coordinate of cell nearest pixel coordinate (x,y)rLr�r�rrrrLFszGrid.nearestcKs>|�|j|�}|dk	r"d|f|}|jj|d||f|��dS)Nz	-itemtyper�)r%r'rr)rrQrRr�r(�argsrrrr�Ps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.rr	)rrPrrDr%�rr�r(rrr�size_columnVs
�zGrid.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.rr
)rrPrr%r�rrr�size_rowps�
�z
Grid.size_rowcCs|j�|jd||�dS)z7Clears the cell at (x, y) by removing its display item.�unsetNrMr�rrrr��sz
Grid.unset)N)N)N)N)r2r3r4r5r9rr�r�r�r�r�r�rHrJr7r0r�r�rLr�r�r�r�rrrrr��s(	




r�c@seZdZdZdifdd�ZdS)�ScrolledGridzScrolled Grid widgetsNcKs"g}||_t�||d|||�dS)NZtixScrolledGridr�r�rrrr9�szScrolledGrid.__init__r�rrrrr��sr�)ur:r8rZ_tkinterZWINDOWZTEXTZSTATUSZ	IMMEDIATEZIMAGEZ	IMAGETEXTZBALLOONZAUTOZ	ACROSSTOP�ASCIIZCELLZCOLUMNZ
DECREASINGZ
INCREASINGZINTEGERZMAIN�MAXZREALZROWZS_REGIONZX_REGIONZY_REGIONZ
TCL_DONT_WAITZTCL_WINDOW_EVENTSZTCL_FILE_EVENTSZTCL_TIMER_EVENTSZTCL_IDLE_EVENTSZTCL_ALL_EVENTSrr6rAra�	__bases__r[r|r�r�r�r�r�r�r�r�r�r�r�r�r�r�ZXViewZYViewr�rYrZr\r_rmrnrqrrr}r�r�r�r�r�r�r�r�r�r�r�r�r�r�ZButtonr�ZCheckbuttonr�ZEntryr�ZFramer^ZLabelr�ZListboxr�ZMenurwZ
MenubuttonrvZ	Scrollbarr�ZTextr�r�r�rar�r�r�r�r�r�r�r�r�r`r�r�r�r�r�rrrr�<module>s�-
8/,!"C#	()


S.6

*

?>