3
ÌœŸW‰  ã               @   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} ddddddd	d
ddddddddg}dddddddddddddd d!d"g}d#}x(t||ƒD ]\}}|d$j|||ƒ7 }qhW |d%7 }|| d&d'd(|d)�}|jƒ |kr²|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ÚOKz*.pngz*.jpgz*.tiffz*.bmpz*.psz*.epsz*.pdfz*.texz*.ribz*.wrlz*.ooglz*.vrmlz*.objz*.ivz*.povz*.x3dZPNGZJPGZTIFFZBitmapZ
PostScriptZEPSZPDFZTexZRIBZWRLZGeomviewZVRMLZ	WavefrontzOpen InventorZPovrayÚX3DÚ z{} ({})|{}|z"Determine by extension (*.*)|(*.*)zSave scene to imagezsave aszsnapshot.png)ÚparentÚtitleÚactionZdefault_filenameÚwildcardN)Ú
pyface.apir   r   ÚzipÚformatÚopenÚpath)	r   r   r   Ú
extensionsÚdescriptionsr	   ÚdescriptionÚ	extensionZdialog© r   úT/home/yuhw/wc/wire-cell-python/venv/lib/python3.6/site-packages/tvtk/pyface/utils.pyÚ
popup_save   s,    




r   )N)Ú__doc__r   r   r   r   r   Ú<module>   s   