.. wxPython Phoenix documentation
This file was generated by Phoenix's sphinx generator and associated
tools, do not edit by hand.
Copyright: (c) 2011-2020 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

Inheritance diagram for class
FileTypeInfo:
|
|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() -> None
FileTypeInfo(mimeType : str) -> None
FileTypeInfo(mimeType : str, openCmd : str, printCmd : str, description
: str, extension : str) -> None
FileTypeInfo(sArray : List[str]) -> None
Container of information about FileType.
.. method:: __init__(self, *args, **kw)
|overload| **Overloaded Implementations:**
:html:`
`
**__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` .
:rtype: `None`
:html:`
`
**__init__** `(self, mimeType : str)`
Constructor specifying just the MIME type name.
Use the various setter methods below to fully initialize the object.
:param `mimeType`:
:type `mimeType`: string
:rtype: `None`
.. versionadded:: 2.9.2
:html:`
`
**__init__** `(self, mimeType : str, openCmd : str, printCmd : str, description : str, extension : str)`
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
:rtype: `None`
:html:`
`
**__init__** `(self, sArray : List[str])`
Constructor 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
:rtype: `None`
:html:`
`
.. method:: AddExtension(self, ext : str)
Add another extension associated with this file type.
:param `ext`:
:type `ext`: string
:rtype: `None`
.. versionadded:: 2.9.2
.. method:: GetDescription(self)
Get the long, user visible description.
:rtype: `str`
.. method:: GetExtensions(self)
Get the array of all extensions.
:rtype: `List[str]`
.. method:: GetExtensionsCount(self)
Get the number of extensions.
:rtype: `int`
.. method:: GetIconFile(self)
Get the icon filename.
:rtype: `str`
.. method:: GetIconIndex(self)
Get the index of the icon within the icon file.
:rtype: `int`
.. method:: GetMimeType(self)
Get the MIME type.
:rtype: `str`
.. method:: GetOpenCommand(self)
Get the open command.
:rtype: `str`
.. method:: GetPrintCommand(self)
Get the print command.
:rtype: `str`
.. method:: GetShortDesc(self)
Get the short description (only used under Win32 so far)
:rtype: `str`
.. method:: SetDescription(self, description : str)
Set the file type description.
:param `description`:
:type `description`: string
:rtype: `None`
.. versionadded:: 2.9.2
.. method:: SetIcon(self, iconFile : str, iconIndex: int=0)
Set the icon information.
:param `iconFile`:
:type `iconFile`: string
:param `iconIndex`:
:type `iconIndex`: int
:rtype: `None`
.. method:: SetOpenCommand(self, command : str)
Set the command to be used for opening files of this type.
:param `command`:
:type `command`: string
:rtype: `None`
.. versionadded:: 2.9.2
.. method:: SetPrintCommand(self, command : str)
Set the command to be used for printing files of this type.
:param `command`:
:type `command`: string
:rtype: `None`
.. versionadded:: 2.9.2
.. method:: SetShortDesc(self, shortDesc : str)
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
:rtype: `None`
.. 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`