3
7ßL]ü  ã               @   sX   d Z ddlZddlmZmZmZ ddlmZ ddl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ÚUnicodeÚInt)ÚIDialogc               @   s>   e Zd ZdZeddƒZeZeZeZ	eZ
eZ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save asr   N)Ú__name__Ú
__module__Ú__qualname__Ú__doc__r   Úactionr   Zdefault_directoryÚdefault_filenameZdefault_pathÚ	directoryÚfilenameÚpathZwildcardr   Zwildcard_index© r   r   ú8/tmp/pip-install-5sebvq2j/pyface/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jƒr|}n
dj|ƒ}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ÚsixÚstring_typesÚjoin)ÚclsÚdescriptionÚ	extensionÚpatternr   r   r   Úcreate_wildcardb   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   @   s   
r   )r   r   Z
traits.apir   r   r   Zpyface.i_dialogr   r   r   Úobjectr   r   r   r   r   Ú<module>   s   $