Mini Shell

Direktori : /opt/cppython/lib/python3.8/tkinter/__pycache__/
Upload File :
Current File : //opt/cppython/lib/python3.8/tkinter/__pycache__/tix.cpython-38.pyc

U

��eg-,�@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�text�statusZ	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�*/opt/cppython/lib/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__rr r*r+r.r/r1r2rrrrrGs


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)�tkinterr7�__init__�os�environr0r�eval)rZ
screenNameZbaseNameZ	classNameZtixlibrrrr:�szTk.__init__cCs|�dd�tj�|�dS)NZWM_DELETE_WINDOW�)�protocolr9r7�destroy�rrrrr@�sz
Tk.destroy)NNr8�r3r4r5r6r:r@rrrrr7�s
r7c@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)rC�form�r�key�valuerrr�__setitem__�szForm.__setitem__cCs|j�dd|j�S)NrD�check�rrrFrArrrrN�sz
Form.checkcCs|j�dd|j�dS)NrD�forgetrOrArrrrP�szForm.forgetrcCs`|sJ|sJ|j�dd|j�}|j�|�}d}|D]}||j�|�f}q.|S|j�dd|j||�S)NrD�gridr)rrrF�	splitlistZgetint)rZxsizeZysize�x�y�zrrrrQ�sz	Form.gridNcCs>|s|j�dd|j�S|ddkr*d|}|j�dd|j|�S)NrD�inforr"rOrrrrrV�s
z	Form.infocs(�fdd��j��j�dd�j��D�S)Ncsg|]}��|��qSr)�
_nametowidget��.0rSrArr�
<listcomp>szForm.slaves.<locals>.<listcomp>rD�slaves�rrRrrFrArrArr[s
���zForm.slaves)rr)N)r3r4r5r6rGrIrMrNrPrQrVr[rrrrrC�s


rCc@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�_setuprrrFrG�subwidget_list)	r�masterrbZstatic_optionsr(r)�extra�k�vrrrr:s$zTixWidget.__init__cCs ||jkr|j|St|��dSrH)re�AttributeErrorr,rrr�__getattr__Gs

zTixWidget.__getattr__cCs|j�d|j|�dS)z1Set a variable without calling its action routineZtixSetSilentNrO)rrLrrr�
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�lenrFrW)rr-�nrrr�	subwidgetPs

zTixWidget.subwidgetcCsZ|��}|sgSg}|D]<}|t|j�dd�}z|�|�|��WqYqXq|S)zReturn all subwidgets.rmN)�_subwidget_namesrqrFr_rW)r�namesZretlistr-rrr�subwidgets_allZszTixWidget.subwidgets_allcCs0z|j�|jd|�WStk
r*YdSXdS)z7Get a subwidget name (returns a String, not a Widget !)rsN)rrrFror,rrrrniszTixWidget._subwidget_namecCs<z |j�|jdd�}|j�|�WStk
r6YdSXdS)z"Return the name of all subwidgets.Z
subwidgetsz-allN)rrrFrRro)rrSrrrrtps
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%�reprrtrr)rrrLrur-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)rra�callable�	_registerrr)rZimgtyper(rfr)r^rhrirrr�image_create�s
zTixWidget.image_createcCs.z|j�dd|�Wntk
r(YnXdS)Nr�delete)rrro)rZimgnamerrr�image_delete�szTixWidget.image_delete)r3r4r5r6r:rkrlrsrvrnrtrxr|r~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)rmc
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)Nrm�.r-r)�destroy_physically�check_intermediate���)rnrqrF�splitr]r:�range�joinrW�KeyErrorrr�)rrfr-r�r��pathZplist�parent�irr�wrrrr:�s0



�zTixSubWidget.__init__cCsjt|j���D]}|��q|j|jjkr6|jj|j=|j|jjkrP|jj|j=|jrf|j�	d|j
�dS)Nr@)r`�children�valuesr@rprfrer�rrrF�r�crrrr@�s
zTixSubWidget.destroyN)rmrmrBrrrrr�s
�
 rc@sVeZdZdZifdd�dd�Zdd�Zdd	�Zd
d�Zdd
�Zifdd�Z	dd�Z
dS)�DisplayStylezRDisplayStyle - handle configuration options shared by
    (multiple) Display ItemsN)rfcKs\|s2d|kr|d}nd|kr(|d}n
t�d�}|j|_|jjd|f|�||���|_dS)NZ	refwindowzcreate display styleZtixDisplayStyle)r9Z_get_default_rootrrr&�	stylename)r�itemtyper(rfr)rrrr:�s



�zDisplayStyle.__init__cCs|jSrH)r�rArrr�__str__�szDisplayStyle.__str__cCsH|r|rt||f�}n|r|}d}|��D]\}}|d||f}q*|S)Nrr")rra)rr(r)Zoptsrhrirrrr&�szDisplayStyle._optionscCs|j�|jd�dS�Nr}�rrr�rArrrr}�szDisplayStyle.deletecCs|j�|jdd||�dS)Nr!�-%sr�rJrrrrM�szDisplayStyle.__setitem__cKs|j|jdf|�||���S)Nr!)r#r�r&r'rrrrG�s�
�zDisplayStyle.configcCs|j�|jdd|�S)Nrr�r�)rrKrrr�__getitem__�szDisplayStyle.__getitem__)r3r4r5r6r:r�r&r}rMrGr�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]r:�_dummyLabelre�rrfr(r)Zstaticrrrr:	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�bindNrE)r�widgetr(r)rrr�bind_widgetszBalloon.bind_widgetcCs|j�|jd|j�dS�NZunbindrO�rr�rrr�
unbind_widgetszBalloon.unbind_widget)r3r4r5r6r:r�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]r:�rrfr(r)rrrr:s

�zButtonBox.__init__cKs4|jj|jd|f|�||���}t||�|j|<|S)z$Add a button with given name to box.�add�rrrFr&�_dummyButtonre)rr-r(r)Zbtnrrrr�#s z
ButtonBox.addcCs ||jkr|j�|jd|�dS�N�invoke�rerrrFr,rrrr�*s
zButtonBox.invoke�r3r4r5r6r:r�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]r:r�re�_dummyEntryr��_dummyScrolledListBox�	TypeErrorr�rrrr:<s 

��
zComboBox.__init__cCs|j�|jd|�dS)NZ
addhistoryrO�rr%rrr�add_historyNszComboBox.add_historycCs|j�|jd|�dS)NZ
appendhistoryrOr�rrr�append_historyQszComboBox.append_historycCs|j�|jd||�dS�N�insertrO)r�indexr%rrrr�TszComboBox.insertcCs|j�|jd|�dS)N�pickrO�rr�rrrr�Wsz
ComboBox.pick)	r3r4r5r6r:r�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]r:r�rer�r�r�rrrr:hs
zControl.__init__cCs|j�|jd�dS)Nr�rOrArrr�	decrementoszControl.decrementcCs|j�|jd�dS)Nr�rOrArrr�	incrementrszControl.incrementcCs|j�|jd�dSr�rOrArrrr�uszControl.invokecCs|j�|jd�dS)N�updaterOrArrrr�xszControl.update)	r3r4r5r6r:r�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]r:�_dummyHListre�_dummyScrollbarr�rrrr:�szDirList.__init__cCs|j�|jd|�dS�N�chdirrO�r�dirrrrr��sz
DirList.chdirN�r3r4r5r6r:r�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�rrrr:�szDirTree.__init__cCs|j�|jd|�dSr�rOr�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]r:�
_dummyDirListre�_dummyFileComboBoxr�rrrr:�szDirSelectBox.__init__N�r3r4r5r6r:rrrrr��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]r:r�re�_dummyCheckbutton�_dummyComboBoxr�r�r�rrrr:�szExFileSelectBox.__init__cCs|j�|jd�dS�N�filterrOrArrrr��szExFileSelectBox.filtercCs|j�|jd�dSr�rOrArrrr��szExFileSelectBox.invokeN)r3r4r5r6r:r�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]r:�_dummyDirSelectBoxrer�rrrr:�s
�zDirSelectDialog.__init__cCs|j�|jd�dS�N�popuprOrArrrr��szDirSelectDialog.popupcCs|j�|jd�dS�N�popdownrOrArrrr��szDirSelectDialog.popdownN�r3r4r5r6r:r�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]r:�_dummyExFileSelectBoxrer�rrrr:�s
�zExFileSelectDialog.__init__cCs|j�|jd�dSr�rOrArrrr�szExFileSelectDialog.popupcCs|j�|jd�dSr�rOrArrrr�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]r:r�rer�r�rrrr:s
zFileSelectBox.__init__cCs|j�|jd�dSr�rOrArrr�apply_filterszFileSelectBox.apply_filtercCs|j�|jd�dSr�rOrArrrr�szFileSelectBox.invokeN)r3r4r5r6r:r�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]r:�_dummyStdButtonBoxre�_dummyFileSelectBoxr�rrrr:,s
�zFileSelectDialog.__init__cCs|j�|jd�dSr�rOrArrrr�2szFileSelectDialog.popupcCs|j�|jd�dSr�rOrArrrr�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]r:r�rer�r�rrrr:Ds
�zFileEntry.__init__cCs|j�|jd�dSr�rOrArrrr�JszFileEntry.invokecCsdSrHrrArrr�file_dialogMszFileEntry.file_dialogN)r3r4r5r6r:r�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�rrrr:Ys

�zHList.__init__cKs |jj|jd|f|�||���S�Nr�rE�rr�r(r)rrrr�]sz	HList.addcKs(|sd}|jj|jd|f|�||���S)Nr>ZaddchildrE)rr�r(r)rrr�	add_child`s�
�zHList.add_childcCs|j�|jdd|�dS�N�anchor�setrO�rr�rrr�
anchor_setfszHList.anchor_setcCs|j�|jdd�dS�Nr��clearrOrArrr�anchor_cleariszHList.anchor_clearrcCs6|s|j�|jdd||�S|j�|jdd|d|�SdS)Nr
�widthz-charrO)r�colr�charsrrr�column_widthls�zHList.column_widthcCs|j�|jdd�dS)Nr}�allrOrArrr�
delete_allsszHList.delete_allcCs|j�|jdd|�dS)Nr}r�rOrrrr�delete_entryvszHList.delete_entrycCs|j�|jdd|�dS)Nr}Z
offspringsrOrrrr�delete_offspringsyszHList.delete_offspringscCs|j�|jdd|�dS)Nr}ZsiblingsrOrrrr�delete_siblings|szHList.delete_siblingscCs|j�|jdd|�dS�N�dragsiter�rOr�rrr�dragsite_setszHList.dragsite_setcCs|j�|jdd�dS�NrrrOrArrr�dragsite_clear�szHList.dragsite_clearcCs|j�|jdd|�dS�N�dropsiter�rOr�rrr�dropsite_set�szHList.dropsite_setcCs|j�|jdd�dS�NrrrOrArrr�dropsite_clear�szHList.dropsite_clearcKs&|jj|jdd|f|�||���dS)N�headerryrE�rrr(r)rrr�
header_create�szHList.header_createcKs@|dkr|�|jdd|�S|jj|jdd|f|�||���dS)Nrr!�r#rFrrr&rrrr�header_configure�s

�zHList.header_configurecCs|j�|jdd||�S)NrrrO)rr�optrrr�header_cget�szHList.header_cgetcCs|j�|j�|jdd|��S)NrZexist)rZ
getbooleanrrF�rrrrr�
header_exists�szHList.header_existscCs|j�|jdd|�dS)Nrr}rOrrrr�
header_delete�szHList.header_deletecCs|j�|jdd|�S)Nr�sizerOrrrr�header_size�szHList.header_sizecCs|j�|jdd|�dS)N�hider�rOrrrr�
hide_entry�szHList.hide_entrycKs&|jj|jdd|f|�||���dS)N�	indicatorryrEr�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&rrO�rr�rrrr�indicator_cget�szHList.indicator_cgetcCs|j�|jdd|�S)Nr&�existsrOrrrr�indicator_exists�szHList.indicator_existscCs|j�|jdd|�dS)Nr&r}rOrrrr�indicator_delete�szHList.indicator_deletecCs|j�|jdd|�S)Nr&r"rOrrrr�indicator_size�szHList.indicator_sizecCs|j�|jdd�S�NrVr�rOrArrr�info_anchor�szHList.info_anchorcCs|�|j�|jdd|��pdS�NrVZbbox)�_getintsrrrFrrrr�	info_bbox�s
��zHList.info_bboxcCs |j�|jdd|�}|j�|�S)NrVr��rrrFrR)rr�r�rrr�
info_children�szHList.info_childrencCs|j�|jdd|�S)NrV�datarOrrrr�	info_data�szHList.info_datacCs|j�|jdd�S)NrVrrOrArrr�
info_dragsite�szHList.info_dragsitecCs|j�|jdd�S)NrVrrOrArrr�
info_dropsite�szHList.info_dropsitecCs|j�|jdd|�S)NrVr+rOrrrr�info_exists�szHList.info_existscCs|j�|jdd|�S)NrVr�rOrrrr�info_hidden�szHList.info_hiddencCs|j�|jdd|�S)NrV�nextrOrrrr�	info_next�szHList.info_nextcCs|j�|jdd|�S)NrVr�rOrrrr�info_parent�szHList.info_parentcCs|j�|jdd|�S)NrV�prevrOrrrr�	info_prev�szHList.info_prevcCs|j�|jdd�}|j�|�S�NrVr�r4r�rrr�info_selection�szHList.info_selectioncCs|j�|jdd|||�S)N�itemrrO)rr�rrrrr�	item_cget�szHList.item_cgetcKsD|dkr|�|jdd||�S|jj|jdd||f|�||���dS)NrCr!r�rr�rr(r)rrr�item_configure�s

�zHList.item_configurecKs(|jj|jdd||f|�||���dS)NrCryrErErrr�item_create�s�
�zHList.item_createcCs|j�|jdd||�S)NrCr+rO�rr�rrrr�item_exists�szHList.item_existscCs|j�|jdd||�dS)NrCr}rOrHrrr�item_delete�szHList.item_deletecCs|j�|jd||�S)N�	entrycgetrOr)rrrrK�szHList.entrycgetcKs<|dkr|�|jd|�S|jj|jd|f|�||���dS�N�entryconfigurerr�rrrrM�s

�zHList.entryconfigurecCs|j�|jd|�S�N�nearestrO)rrTrrrrOsz
HList.nearestcCs|j�|jd|�dS�N�seerOrrrrrQsz	HList.seecKs$|jj|jddf|�||���dS�Nr�rrEr'rrr�selection_clearszHList.selection_clearcCs|j�|jdd|�S�Nr�ZincludesrOrrrr�selection_includes
szHList.selection_includescCs|j�|jdd||�dS�Nr�r�rO�r�firstZlastrrr�
selection_set
szHList.selection_setcCs|j�|jdd|�S)N�showr�rOrrrr�
show_entryszHList.show_entry)rNN)N)N)9r3r4r5r6r:r�r�rrrr
rrr
rrrrrrrr Zheader_existr!r#r%r'r(r*r,r-r.r0r3r5r7r8r9r:r;r=r>r@rBrDrFrGrIrJrKrMrOrQrSrUrYr[rrrrr�Qsl


r�c@seZdZdZdifdd�ZdS)�	InputOnlyz?InputOnly - Invisible widget. Unix only.

    Subwidgets - NoneNcKst�||dd||�dS)NZtixInputOnlyr�r�rrrr:szInputOnly.__init__r�rrrrr\sr\c@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]r:r�rer�r�rrrr:%s
�zLabelEntry.__init__r�rrrrr]s	r]c@seZdZdZdifdd�ZdS)�
LabelFrameaeLabelFrame - Labelled Frame container. Packages a frame widget
    and a label into one mega widget. To create widgets inside a
    LabelFrame widget, one creates the new widgets relative to the
    frame subwidget and manage them inside the frame subwidget.

    Subwidgets       Class
    ----------       -----
    label       Label
    frame       FrameNcKs<t�||dddg||�t|d�|jd<t|d�|jd<dS)NZ
tixLabelFramer^r^r��frame)r]r:r�re�_dummyFramer�rrrr:6s
�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]r:�_dummyPanedWindowrer��_dummyScrolledHListr�rrrr:Es�zListNoteBook.__init__cKs:|jj|jd|f|�||���t||�|j|<|j|Sr��rrrFr&rre�rr-r(r)rrrr�Ms zListNoteBook.addcCs
|�|�SrH�rsr,rrr�pageRszListNoteBook.pagecCs:|j�|j�|jd��}g}|D]}|�|�|��q |S�N�pages�rrRrrFr_rs�rru�retrSrrrrjUs
zListNoteBook.pagescCs|j�|jd|�dS�N�raiserOr,rrr�
raise_page]szListNoteBook.raise_pageN)	r3r4r5r6r:r�rhrjrprrrrrb=srbc@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�rrrr:es

�zMeter.__init__r�rrrrrq`srqc@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]r:rrer�rrrr:qs�zNoteBook.__init__cKs:|jj|jd|f|�||���t||�|j|<|j|Sr�rerfrrrr�vs zNoteBook.addcCs,|j�|jd|�|j|��|j|=dSr��rrrFrer@r,rrrr}{szNoteBook.deletecCs
|�|�SrHrgr,rrrrh�sz
NoteBook.pagecCs:|j�|j�|jd��}g}|D]}|�|�|��q |Srirkrlrrrrj�s
zNoteBook.pagescCs|j�|jd|�dSrnrOr,rrrrp�szNoteBook.raise_pagecCs|j�|jd�S)N�raisedrOrArrrrt�szNoteBook.raised)r3r4r5r6r:r�r}rhrjrprtrrrrrrisrrc@seZdZdS)�
NoteBookFrameN)r3r4r5rrrrru�sruc@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]r:�_dummyMenubuttonre�
_dummyMenur�rrrr:�szOptionMenu.__init__cKs&|jj|jdd|f|�||���dS)Nr��commandrErfrrr�add_command�szOptionMenu.add_commandcKs&|jj|jdd|f|�||���dS)Nr�Z	separatorrErfrrr�
add_separator�szOptionMenu.add_separatorcCs|j�|jd|�dSr�rOr,rrrr}�szOptionMenu.deletecCs|j�|jd|�dS)N�disablerOr,rrrr�szOptionMenu.disablecCs|j�|jd|�dS)N�enablerOr,rrrr��szOptionMenu.enableN)
r3r4r5r6r:r}r~r}rr�rrrrrv�srvc@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�rrrr:�szPanedWindow.__init__cKs>|jj|jd|f|�||���t||dd�|j|<|j|S)Nr�r)r�rerfrrrr��s
 �zPanedWindow.addcCs,|j�|jd|�|j|��|j|=dSr�rsr,rrrr}�szPanedWindow.deletecCs|j�|jd|�dS)NrPrOr,rrrrP�szPanedWindow.forgetcCs|j�|jd||�S)N�panecgetrOr)rrrr��szPanedWindow.panecgetcKs<|dkr|�|jd|�S|jj|jd|f|�||���dS)N�
paneconfigurerr�rrrr��szPanedWindow.paneconfigurecs*�j��j��jd��}�fdd�|D�S)N�panescsg|]}��|��qSrrgrXrArrrZ�sz%PanedWindow.panes.<locals>.<listcomp>r\)rrurrArr��szPanedWindow.panesN)r3r4r5r6r:r�r}rPr�r�r�rrrrr��s
r�c@s4eZdZdZifdd�Zdd�Zdd�Zdd	�Zd
S)�	PopupMenuaPopupMenu widget can be used as a replacement of the tk_popup command.
    The advantage of the Tix PopupMenu widget is it requires less application
    code to manipulate.


    Subwidgets       Class
    ----------       -----
    menubutton       Menubutton
    menu       MenucKs:t�||ddg||�t|d�|jd<t|d�|jd<dS)NZtixPopupMenur^rwrxryr�rrrr:�szPopupMenu.__init__cCs|j�|jd|j�dS)Nr�rOr�rrrr��szPopupMenu.bind_widgetcCs|j�|jd|j�dSr�rOr�rrrr��szPopupMenu.unbind_widgetcCs|j�|jd|j||�dS)NZpostrO)rr�rSrTrrr�post_widget�szPopupMenu.post_widgetN)r3r4r5r6r:r�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^r|ZcursorfgZcursorbgZ
handlesizeZ	hintcolorZ	hintwidthrSrTZtixResizeHandler�)rrfr(r)�flagsrrrr:�s�
�zResizeHandle.__init__cCs|j�|jd|j�dS)NZattachwidgetrOr�rrr�
attach_widgetszResizeHandle.attach_widgetcCs|j�|jd|j�dS)NZdetachwidgetrOr�rrr�
detach_widgetszResizeHandle.detach_widgetcCs|j�|jd|j�dS)Nr$rOr�rrrr$szResizeHandle.hidecCs|j�|jd|j�dS)NrZrOr�rrrrZ	szResizeHandle.showN)	r3r4r5r6r:r�r�r$rZrrrrr��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�rrrr:s�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]r:�
_dummyListboxrer�r�rrrr:szScrolledListBox.__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]r:�
_dummyTextrer�r�rrrr:%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]r:�_dummyTListrer�r�rrrr:/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]r:rarer�r�rrrr::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�rrrr:Gs
��zSelect.__init__cKs:|jj|jd|f|�||���t||�|j|<|j|Sr�r�rfrrrr�Ns z
Select.addcCs|j�|jd|�dSr�rOr,rrrr�Ssz
Select.invokeNr�rrrrr�@sr�c@seZdZdZdifdd�ZdS)�Shellz'Toplevel window.

    Subwidgets - NoneNcKst�||dddg||�dS)NZtixShellr^�titler�r�rrrr:[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�rrrr:gs��zDialogShell.__init__cCs|j�|jd�dSr�rOrArrrr�nszDialogShell.popdowncCs|j�|jd�dSr�rOrArrrr�qszDialogShell.popupcCs|j�|jd�dS)N�centerrOrArrrr�tszDialogShell.center)r3r4r5r6r:r�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]r:r�rer�rrrr:zs
�zStdButtonBox.__init__cCs ||jkr|j�|jd|�dSr�r�r,rrrr��s
zStdButtonBox.invoke)r3r4r5r6r:r�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�rrrr:�szTList.__init__cCs|j�|jdd|�dS)N�activer�rOr�rrr�
active_set�szTList.active_setcCs|j�|jdd�dS)Nr�rrOrArrr�active_clear�szTList.active_clearcCs|j�|jdd|�dSr�rOr�rrrr�szTList.anchor_setcCs|j�|jdd�dSrrOrArrrr�szTList.anchor_clearcCs|j�|jd||�dSr�rO�r�from_�torrrr}�szTList.deletecCs|j�|jdd|�dSrrOr�rrrr�szTList.dragsite_setcCs|j�|jdd�dSrrOrArrrr�szTList.dragsite_clearcCs|j�|jdd|�dSrrOr�rrrr�szTList.dropsite_setcCs|j�|jdd�dSrrOrArrrr�szTList.dropsite_clearcKs$|jj|jd|f|�||���dSr�rE)rr�r(r)rrrr��szTList.insertcCs|j�|jdd�S)NrVr�rOrArrr�info_active�szTList.info_activecCs|j�|jdd�Sr/rOrArrrr0�szTList.info_anchorcCs|j�|jdd|�S)NrVZdownrOr�rrr�	info_down�szTList.info_downcCs|j�|jdd|�S)NrV�leftrOr�rrr�	info_left�szTList.info_leftcCs|j�|jdd|�S)NrV�rightrOr�rrr�
info_right�szTList.info_rightcCs|j�|jdd�}|j�|�SrAr4r�rrrrB�szTList.info_selectioncCs|j�|jdd�S)NrVr"rOrArrr�	info_size�szTList.info_sizecCs|j�|jdd|�S)NrVZuprOr�rrr�info_up�sz
TList.info_upcCs|j�|jd||�SrNrO�rrSrTrrrrO�sz
TList.nearestcCs|j�|jd|�dSrPrOr�rrrrQ�sz	TList.seecKs$|jj|jddf|�||���dSrRrEr'rrrrS�szTList.selection_clearcCs|j�|jdd|�SrTrOr�rrrrU�szTList.selection_includescCs|j�|jdd||�dSrVrOrWrrrrY�szTList.selection_set)N)N)r3r4r5r6r:r�r�rrr}rrrrr�r�r0r�r�r�rBr�r�rOrQrSrUrYrrrrr��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�rrrr:�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.�autosetmodeNrOrArrrr��szTree.autosetmodecCs|j�|jd|�dS�z8Close the entry given by entryPath if its mode is close.�closeNrO�r�	entrypathrrrr��sz
Tree.closecCs|j�|jd|�S�z9Returns the current mode of the entry given by entryPath.�getmoderOr�rrrr��szTree.getmodecCs|j�|jd|�dS�z6Open the entry given by entryPath if its mode is open.�openNrOr�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.�setmodeNrO�rr��moderrrr��s
zTree.setmode)r�)
r3r4r5r6r:r�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�rrrr:s
�zCheckList.__init__cCs|j�|jd�dSr�rOrArrrr�szCheckList.autosetmodecCs|j�|jd|�dSr�rOr�rrrr�szCheckList.closecCs|j�|jd|�Sr�rOr�rrrr� szCheckList.getmodecCs|j�|jd|�dSr�rOr�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�getselectionr\)rr�rrrr�(szCheckList.getselectioncCs|j�|jd|�S)z(Returns the current status of entryPath.�	getstatusrOr�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.�	setstatusNrOr�rrrr�2szCheckList.setstatus)r�)r�)r3r4r5r6r:r�r�r�r�r�r�r�rrrrr�s
r�c@seZdZddd�ZdS)r�rmcCst�||||�dSrH�rr:�rrfr-r�rrrr:>sz_dummyButton.__init__N)rm�r3r4r5r:rrrrr�=sr�c@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:Bsz_dummyCheckbutton.__init__N)rmr�rrrrr�Asr�c@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:Fsz_dummyEntry.__init__N)rmr�rrrrr�Esr�c@seZdZddd�ZdS)rarmcCst�||||�dSrHr�r�rrrr:Jsz_dummyFrame.__init__N)rmr�rrrrraIsrac@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:Nsz_dummyLabel.__init__N)rmr�rrrrr�Msr�c@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:Rsz_dummyListbox.__init__N)rmr�rrrrr�Qsr�c@seZdZddd�ZdS)r{rmcCst�||||�dSrHr�r�rrrr:Vsz_dummyMenu.__init__N)rmr�rrrrr{Usr{c@seZdZddd�ZdS)rzrmcCst�||||�dSrHr�r�rrrr:Zsz_dummyMenubutton.__init__N)rmr�rrrrrzYsrzc@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:^sz_dummyScrollbar.__init__N)rmr�rrrrr�]sr�c@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:bsz_dummyText.__init__N)rmr�rrrrr�asr�c@seZdZddd�ZdS)r�rmcCsDt�||||�t|d�|jd<t|d�|jd<t|d�|jd<dS)Nr�r�r�)rr:r�rer�r�rrrr:fsz_dummyScrolledListBox.__init__N)rmr�rrrrr�esr�c@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:msz_dummyHList.__init__N)rmr�rrrrr�lsr�c@seZdZddd�ZdS)rdrmcCsDt�||||�t|d�|jd<t|d�|jd<t|d�|jd<dS�Nr�r�r��rr:r�rer�r�rrrr:qsz_dummyScrolledHList.__init__N)rmr�rrrrrdpsrdc@seZdZddd�ZdS)r�rmcCst�||||�dSrHr�r�rrrr:xsz_dummyTList.__init__N)rmr�rrrrr�wsr�c@seZdZddd�ZdS)r�rmcCs�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�)rr:r�rer�r�r�r�r�rrrr:|s�
z_dummyComboBox.__init__N)rmr�rrrrr�{sr�c@seZdZddd�ZdS)r�rmcCsDt�||||�t|d�|jd<t|d�|jd<t|d�|jd<dSr�r�r�rrrr:�sz_dummyDirList.__init__N)rmr�rrrrr��sr�c@seZdZddd�ZdS)r�rmcCs4t�||||�t|d�|jd<t|d�|jd<dS)Nr�r�)rr:r�rer�r�rrrr:�sz_dummyDirSelectBox.__init__N)rmr�rrrrr��sr�c@seZdZddd�ZdS)r�rmcCs�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�)rr:r�rer�r�r�r�rrrr:�sz_dummyExFileSelectBox.__init__N)rmr�rrrrr��sr�c@seZdZddd�ZdS)r�rmcCsTt�||||�t|d�|jd<t|d�|jd<t|d�|jd<t|d�|jd<dS)Nr�r�r�r�)rr:r�rer�r�rrrr:�s
z_dummyFileSelectBox.__init__N)rmr�rrrrr��sr�c@seZdZddd�ZdS)r�rmcCs$t�||||�t|d�|jd<dS)Nr�)rr:r�rer�rrrr:�sz_dummyFileComboBox.__init__N)rmr�rrrrr��sr�c@seZdZddd�ZdS)r�rmcCsTt�||||�t|d�|jd<t|d�|jd<t|d�|jd<t|d�|jd<dS)Nr�r�r�r�)rr:r�rer�rrrr:�s
z_dummyStdButtonBox.__init__N)rmr�rrrrr��sr�c@seZdZddd�ZdS)�_dummyNoteBookFramercCst�||||�dSrHr�r�rrrr:�sz_dummyNoteBookFrame.__init__N)rr�rrrrr��sr�c@seZdZddd�ZdS)rcrmcCst�||||�dSrHr�r�rrrr:�sz_dummyPanedWindow.__init__N)rmr�rrrrrc�srccCs|j�d|j�S)zzReturns the qualified path name for the widget. Normally used to set
    default options for subwidgets. See tixwidgets.pyZ
tixOptionNamerO)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)r3r4r5r6rrrrr��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]r:r�rrrr:�sz
Grid.__init__cCs|j�|dd�dS)zRemoves the selection anchor.r�rNrrArrrrszGrid.anchor_clearcCs|�|j�|dd��S)z3Get the (x,y) coordinate of the current anchor cellr�r0�r2rrrArrr�
anchor_getszGrid.anchor_getcCs|j�|dd||�dS)z/Set the selection anchor to the cell at (x, y).r�r�Nrr�rrrrszGrid.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_Nr}rrr�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_Nr}r
rr�rrr�
delete_columnszGrid.delete_columncCs|j�|dd�dS)zUIf any cell is being edited, de-highlight the cell  and  applies
        the changes.�editr�NrrArrr�
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"rKr)rrSrTrrrrrK&szGrid.entrycgetcKs|�d||f||�SrL)Z
_configure)rrSrTr(r)rrrrM,szGrid.entryconfigurec	Cs|�|j�|dd||��S)z+Return True if display item exists at (x,y)rVr+)Z_getbooleanrrr�rrrr:2szGrid.info_existscCs|j�|dd||�Sr1rr�rrrr36szGrid.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�rNrr�rrr�move_row@sz
Grid.move_rowcCs|�|j�|d||��S)z8Return coordinate of cell nearest pixel coordinate (x,y)rOr�r�rrrrOFszGrid.nearestcKs>|�|j|�}|dk	r"d|f|}|jj|d||f|��dS)Nz	-itemtyper�)r&r(rr)rrSrTr�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.r"r
)rrRrrFr&�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.r"r)rrRrr&r�rrr�size_rowps�
�z
Grid.size_rowcCs|j�|jd||�dS)z7Clears the cell at (x, y) by removing its display item.�unsetNrOr�rrrr��sz
Grid.unset)N)N)N)N)r3r4r5r6r:rr�rr�r�r�r�rKrMr:r3r�r�rOr�r�r�r�rrrrr��s(	




r�c@seZdZdZdifdd�ZdS)�ScrolledGridzScrolled Grid widgetsNcKs"g}||_t�||d|||�dS)NZtixScrolledGridr�r�rrrr:�szScrolledGrid.__init__r�rrrrr��sr�)ur;r9rZ_tkinterZWINDOWZTEXTZSTATUSZ	IMMEDIATEZIMAGEZ	IMAGETEXTZBALLOONZAUTOZ	ACROSSTOP�ASCIIZCELLZCOLUMNZ
DECREASINGZ
INCREASINGZINTEGERZMAIN�MAXZREALZROWZS_REGIONZX_REGIONZY_REGIONZ
TCL_DONT_WAITZTCL_WINDOW_EVENTSZTCL_FILE_EVENTSZTCL_TIMER_EVENTSZTCL_IDLE_EVENTSZTCL_ALL_EVENTSrr7rCrc�	__bases__r]rr�r�r�r�r�r�r�r�r�r�r�r�r�r�ZXViewZYViewr�r\r]r_rbrqrrrurvr�r�r�r�r�r�r�r�r�r�r�r�r�r�r�ZButtonr�ZCheckbuttonr�ZEntryr�ZFrameraZLabelr�ZListboxr�ZMenur{Z
MenubuttonrzZ	Scrollbarr�ZTextr�r�r�rdr�r�r�r�r�r�r�r�r�rcr�r�r�r�r�rrrr�<module>s�-
8/,!"C#	()


S.6

*

Zerion Mini Shell 1.0