Container of information about 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 wx.FileType from it (instead of specifying all the constituent pieces separately) and also with wx.MimeTypesManager.AddFallbacks
.
Default constructor creates an invalid file type info object. |
|
Add another extension associated with this file type. |
|
Get the long, user visible description. |
|
Get the array of all extensions. |
|
Get the number of extensions. |
|
Get the icon filename. |
|
Get the index of the icon within the icon file. |
|
Get the MIME type. |
|
Get the open command. |
|
Get the print command. |
|
Get the short description (only used under Win32 so far) |
|
Set the file type description. |
|
Set the icon information. |
|
Set the command to be used for opening files of this type. |
|
Set the command to be used for printing files of this type. |
|
Set the short description for the files of this type. |
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
wx.
FileTypeInfo
(object)¶Possible constructors:
FileTypeInfo()
FileTypeInfo(mimeType)
FileTypeInfo(mimeType, openCmd, printCmd, description, extension)
FileTypeInfo(sArray)
Container of information about FileType.
__init__
(self, *args, **kw)¶__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 wx.MimeTypesManager.AddFallbacks
.
__init__ (self, mimeType)
Constructor specifying just the MIME type name.
Use the various setter methods below to fully initialize the object.
mimeType (string) –
New in version 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).
mimeType (string) –
openCmd (string) –
printCmd (string) –
description (string) –
extension (string) –
__init__ (self, sArray)
Constructor using an array of string elements corresponding to the parameters of the constructor above in the same order.
sArray (list of strings) –
AddExtension
(self, ext)¶Add another extension associated with this file type.
ext (string) –
New in version 2.9.2.
GetDescription
(self)¶Get the long, user visible description.
string
GetExtensions
(self)¶Get the array of all extensions.
list of strings
GetExtensionsCount
(self)¶Get the number of extensions.
int
GetIconFile
(self)¶Get the icon filename.
string
GetIconIndex
(self)¶Get the index of the icon within the icon file.
int
GetMimeType
(self)¶Get the MIME type.
string
GetOpenCommand
(self)¶Get the open command.
string
GetPrintCommand
(self)¶Get the print command.
string
GetShortDesc
(self)¶Get the short description (only used under Win32 so far)
string
SetDescription
(self, description)¶Set the file type description.
description (string) –
New in version 2.9.2.
SetIcon
(self, iconFile, iconIndex=0)¶Set the icon information.
iconFile (string) –
iconIndex (int) –
SetOpenCommand
(self, command)¶Set the command to be used for opening files of this type.
command (string) –
New in version 2.9.2.
SetPrintCommand
(self, command)¶Set the command to be used for printing files of this type.
command (string) –
New in version 2.9.2.
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.
shortDesc (string) –
Description
¶See GetDescription
and SetDescription
Extensions
¶See GetExtensions
ExtensionsCount
¶IconFile
¶See GetIconFile
IconIndex
¶See GetIconIndex
MimeType
¶See GetMimeType
OpenCommand
¶See GetOpenCommand
and SetOpenCommand
PrintCommand
¶See GetPrintCommand
and SetPrintCommand
ShortDesc
¶See GetShortDesc
and SetShortDesc