a
    ¦ˆc"  ã                   @   sX   d Z ddlZddlmZmZmZmZmZ ddlm	Z	 G dd„ de	ƒZ
G dd„ deƒZdS )	zI The interface for a dialog that allows the user to open/save files etc. é    N)ÚEnumÚ	HasTraitsÚIntÚListÚStr)ÚIDialogc                   @   sX   e Zd ZdZedddƒZeƒ Zeƒ Zeƒ Z	eƒ Z
eƒ Zeƒ Zeeƒ ƒZeƒ ZedƒZdS )ÚIFileDialogzM The interface for a dialog that allows the user to open/save files etc.
    Úopenz
open fileszsave asr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úactionr   Zdefault_directoryÚdefault_filenameZdefault_pathÚ	directoryÚfilenameÚpathr   ÚpathsZwildcardr   Zwildcard_index© r   r   úW/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/pyface/i_file_dialog.pyr      s   
r   c                   @   s<   e Zd ZdZdZdZejdkr$dZndZdZ	e
dd	„ ƒZd
S )ÚMFileDialogz™ The mixin class that contains common code for toolkit specific
    implementations of the IFileDialog interface.

    Implements: create_wildcard()
    zPython files (*.py)|*.py|zText files (*.txt)|*.txt|Úwin32zAll files (*.*)|*.*|zAll files (*)|*zZip files (*.zip)|*.zip|c                 C   s(   t |tƒr|}n
d |¡}d|||f S )zü Creates a wildcard for a given extension.

        Parameters
        ----------
        description : str
            A human-readable description of the pattern.
        extenstion : list
            The wildcard patterns for the extension.
        ú;z%s (%s)|%s|)Ú
isinstanceÚstrÚjoin)ÚclsÚdescriptionÚ	extensionÚpatternr   r   r   Úcreate_wildcardc   s    

zMFileDialog.create_wildcardN)r
   r   r   r   ZWILDCARD_PYZWILDCARD_TXTÚsysÚplatformZWILDCARD_ALLZWILDCARD_ZIPÚclassmethodr    r   r   r   r   r   A   s   
r   )r   r!   Z
traits.apir   r   r   r   r   Zpyface.i_dialogr   r   r   r   r   r   r   Ú<module>   s
   *