.. wxPython Phoenix documentation

   This file was generated by Phoenix's sphinx generator and associated
   tools, do not edit by hand.

   Copyright: (c) 2011-2017 by Total Control Software
   License:   wxWindows License

.. include:: headings.inc



.. _wx.FileTypeInfo:

==========================================================================================================================================
|phoenix_title|  **wx.FileTypeInfo**
==========================================================================================================================================

Container of information about :ref:`wx.FileType`.          

This class simply stores information associated with the file type. It doesn't do anything on its own and is used only to allow constructing :ref:`wx.FileType`  from it (instead of specifying all the constituent pieces separately) and also with :meth:`wx.MimeTypesManager.AddFallbacks` .           




|

|class_hierarchy| Class Hierarchy
=================================

.. raw:: html

   <div id="toggleBlock" onclick="return toggleVisibility(this)" class="closed" style="cursor:pointer;">
   <img id="toggleBlock-trigger" src="_static/images/closed.png"/>
   Inheritance diagram for class <strong>FileTypeInfo</strong>:
   </div>
   <div id="toggleBlock-summary" style="display:block;"></div>
   <div id="toggleBlock-content" style="display:none;">
   <p class="graphviz">
   <center><img src="_static/images/inheritance/wx.FileTypeInfo_inheritance.png" alt="Inheritance diagram of FileTypeInfo" usemap="#dummy" class="inheritance"/></center>
   </div>
   <script type="text/javascript">toggleVisibilityOnLoad(document.getElementById('toggleBlock'))</script>
   <map id="dummy" name="dummy"> <area shape="rect" id="node1" href="wx.FileTypeInfo.html" title="wx.FileTypeInfo" alt="" coords="5,5,117,35"/> </map> 
   </p>

|


|method_summary| Methods Summary
================================

================================================================================ ================================================================================
:meth:`~wx.FileTypeInfo.__init__`                                                Default constructor creates an invalid file type info object.
:meth:`~wx.FileTypeInfo.AddExtension`                                            Add another extension associated with this file type.
:meth:`~wx.FileTypeInfo.GetDescription`                                          Get the long, user visible description.
:meth:`~wx.FileTypeInfo.GetExtensions`                                           Get the array of all extensions.
:meth:`~wx.FileTypeInfo.GetExtensionsCount`                                      Get the number of extensions.
:meth:`~wx.FileTypeInfo.GetIconFile`                                             Get the icon filename.
:meth:`~wx.FileTypeInfo.GetIconIndex`                                            Get the index of the icon within the icon file.
:meth:`~wx.FileTypeInfo.GetMimeType`                                             Get the MIME type.
:meth:`~wx.FileTypeInfo.GetOpenCommand`                                          Get the open command.
:meth:`~wx.FileTypeInfo.GetPrintCommand`                                         Get the print command.
:meth:`~wx.FileTypeInfo.GetShortDesc`                                            Get the short description (only used under Win32 so far)
:meth:`~wx.FileTypeInfo.SetDescription`                                          Set the file type description.
:meth:`~wx.FileTypeInfo.SetIcon`                                                 Set the icon information.
:meth:`~wx.FileTypeInfo.SetOpenCommand`                                          Set the command to be used for opening files of this type.
:meth:`~wx.FileTypeInfo.SetPrintCommand`                                         Set the command to be used for printing files of this type.
:meth:`~wx.FileTypeInfo.SetShortDesc`                                            Set the short description for the files of this type.
================================================================================ ================================================================================


|


|property_summary| Properties Summary
=====================================

================================================================================ ================================================================================
:attr:`~wx.FileTypeInfo.Description`                                             See :meth:`~wx.FileTypeInfo.GetDescription` and :meth:`~wx.FileTypeInfo.SetDescription`
:attr:`~wx.FileTypeInfo.Extensions`                                              See :meth:`~wx.FileTypeInfo.GetExtensions`
:attr:`~wx.FileTypeInfo.ExtensionsCount`                                         See :meth:`~wx.FileTypeInfo.GetExtensionsCount`
:attr:`~wx.FileTypeInfo.IconFile`                                                See :meth:`~wx.FileTypeInfo.GetIconFile`
:attr:`~wx.FileTypeInfo.IconIndex`                                               See :meth:`~wx.FileTypeInfo.GetIconIndex`
:attr:`~wx.FileTypeInfo.MimeType`                                                See :meth:`~wx.FileTypeInfo.GetMimeType`
:attr:`~wx.FileTypeInfo.OpenCommand`                                             See :meth:`~wx.FileTypeInfo.GetOpenCommand` and :meth:`~wx.FileTypeInfo.SetOpenCommand`
:attr:`~wx.FileTypeInfo.PrintCommand`                                            See :meth:`~wx.FileTypeInfo.GetPrintCommand` and :meth:`~wx.FileTypeInfo.SetPrintCommand`
:attr:`~wx.FileTypeInfo.ShortDesc`                                               See :meth:`~wx.FileTypeInfo.GetShortDesc` and :meth:`~wx.FileTypeInfo.SetShortDesc`
================================================================================ ================================================================================


|


|api| Class API
===============


.. class:: wx.FileTypeInfo(object)

   **Possible constructors**::

       FileTypeInfo()
       
       FileTypeInfo(mimeType)
       
       FileTypeInfo(mimeType, openCmd, printCmd, description, extension)
       
       FileTypeInfo(sArray)
       
   
   Container of information about FileType.



   .. method:: __init__(self, *args, **kw)



      |overload| Overloaded Implementations:

      **~~~**

      
      **__init__** `(self)`
      
      Default constructor creates an invalid file type info object.                  
      
      Such invalid/empty object should be used to terminate the list of file types passed to :meth:`wx.MimeTypesManager.AddFallbacks` .                   
      
      
      
      
      **~~~**

      
      **__init__** `(self, mimeType)`
      
      Constructor specifying just the MIME type name.                  
      
      Use the various setter methods below to fully initialize the object. 
      
                      
      
      
      :param `mimeType`: 
      :type `mimeType`: string
      
      
      
      
      
      
      .. versionadded:: 2.9.2 
           
      
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, mimeType, openCmd, printCmd, description, extension)`
      
      Constructor allowing to specify all the fields at once.                  
      
      This is a vararg constructor taking an arbitrary number of extensions after the first four required parameters. The list must be terminated by  ``NullPtr`` , notice that   ``NULL``   can't be used here in portable code (C++0x   ``nullptr``   can be used as well if your compiler supports it).                   
      
      
      :param `mimeType`: 
      :type `mimeType`: string
      :param `openCmd`: 
      :type `openCmd`: string
      :param `printCmd`: 
      :type `printCmd`: string
      :param `description`: 
      :type `description`: string
      :param `extension`: 
      :type `extension`: string
      
      
      
      
      
      
      **~~~**

      
      **__init__** `(self, sArray)`
      
      Constuctor using an array of string elements corresponding to the parameters of the constructor above in the same order.                  
      
      
      :param `sArray`: 
      :type `sArray`: list of strings
      
      
      
      
      
      
      **~~~**






   .. method:: AddExtension(self, ext)

      Add another extension associated with this file type.                  

                


      :param `ext`: 
      :type `ext`: string






      .. versionadded:: 2.9.2 
     








   .. method:: GetDescription(self)

      Get the long, user visible description.                  

      :rtype: `string`








   .. method:: GetExtensions(self)

      Get the array of all extensions.                  

      :rtype: `list of strings`








   .. method:: GetExtensionsCount(self)

      Get the number of extensions.                  

      :rtype: `int`








   .. method:: GetIconFile(self)

      Get the icon filename.                  

      :rtype: `string`








   .. method:: GetIconIndex(self)

      Get the index of the icon within the icon file.                  

      :rtype: `int`








   .. method:: GetMimeType(self)

      Get the MIME type.                  

      :rtype: `string`








   .. method:: GetOpenCommand(self)

      Get the open command.                  

      :rtype: `string`








   .. method:: GetPrintCommand(self)

      Get the print command.                  

      :rtype: `string`








   .. method:: GetShortDesc(self)

      Get the short description (only used under Win32 so far)                  

      :rtype: `string`








   .. method:: SetDescription(self, description)

      Set the file type description.                  

                


      :param `description`: 
      :type `description`: string






      .. versionadded:: 2.9.2 
     








   .. method:: SetIcon(self, iconFile, iconIndex=0)

      Set the icon information.                  


      :param `iconFile`: 
      :type `iconFile`: string
      :param `iconIndex`: 
      :type `iconIndex`: int







   .. method:: SetOpenCommand(self, command)

      Set the command to be used for opening files of this type.                  

                


      :param `command`: 
      :type `command`: string






      .. versionadded:: 2.9.2 
     








   .. method:: SetPrintCommand(self, command)

      Set the command to be used for printing files of this type.                  

                


      :param `command`: 
      :type `command`: string






      .. versionadded:: 2.9.2 
     








   .. method:: SetShortDesc(self, shortDesc)

      Set the short description for the files of this type.                  

      This is only used under MSW for some of the registry keys used for the file type registration.                  


      :param `shortDesc`: 
      :type `shortDesc`: string







   .. attribute:: Description

      See :meth:`~wx.FileTypeInfo.GetDescription` and :meth:`~wx.FileTypeInfo.SetDescription`


   .. attribute:: Extensions

      See :meth:`~wx.FileTypeInfo.GetExtensions`


   .. attribute:: ExtensionsCount

      See :meth:`~wx.FileTypeInfo.GetExtensionsCount`


   .. attribute:: IconFile

      See :meth:`~wx.FileTypeInfo.GetIconFile`


   .. attribute:: IconIndex

      See :meth:`~wx.FileTypeInfo.GetIconIndex`


   .. attribute:: MimeType

      See :meth:`~wx.FileTypeInfo.GetMimeType`


   .. attribute:: OpenCommand

      See :meth:`~wx.FileTypeInfo.GetOpenCommand` and :meth:`~wx.FileTypeInfo.SetOpenCommand`


   .. attribute:: PrintCommand

      See :meth:`~wx.FileTypeInfo.GetPrintCommand` and :meth:`~wx.FileTypeInfo.SetPrintCommand`


   .. attribute:: ShortDesc

      See :meth:`~wx.FileTypeInfo.GetShortDesc` and :meth:`~wx.FileTypeInfo.SetShortDesc`

