a
    «ˆc‰  ã                   @   s   d Z ddd„ZdS )z?
Collection of utility functions common to different toolkits.
Nc           	      C   s~   ddl m}m} g d¢}g d¢}d}t||ƒD ]\}}|d |||¡7 }q.|d7 }|| dd	d
|d�}| ¡ |krv|jS dS dS )a  Popup a dialog asking for an image name to save the scene to.
    This is used mainly to save a scene in full screen mode. Returns a
    filename, returns empty string if action was cancelled. `parent` is
    the parent widget over which the dialog will be popped up.
    é    )Ú
FileDialogÚOK)z*.pngz*.jpgz*.tiffz*.bmpz*.psz*.epsz*.pdfz*.texz*.ribz*.wrlz*.ooglz*.vrmlz*.objz*.ivz*.povz*.x3d)ZPNGZJPGZTIFFZBitmapZ
PostScriptZEPSZPDFZTexZRIBZWRLZGeomviewZVRMLZ	WavefrontzOpen InventorZPovrayZX3DÚ z{} ({})|{}|z"Determine by extension (*.*)|(*.*)zSave scene to imagezsave aszsnapshot.png)ÚparentÚtitleÚactionÚdefault_filenameÚwildcardN)Z
pyface.apir   r   ÚzipÚformatÚopenÚpath)	r   r   r   Ú
extensionsZdescriptionsr	   ÚdescriptionÚ	extensionÚdialog© r   úT/home/yuhw/wc/wire-cell-python/wcpy/lib/python3.9/site-packages/tvtk/pyface/utils.pyÚ
popup_save   s$    þýr   )N)Ú__doc__r   r   r   r   r   Ú<module>   s   