wx.FileTypeInfo¶
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
.
Class Hierarchy¶
Methods Summary¶
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. |
Properties Summary¶
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
|
See |
Class API¶
- class wx.FileTypeInfo(object)¶
Possible constructors:
FileTypeInfo() -> None FileTypeInfo(mimeType) -> None FileTypeInfo(mimeType, openCmd, printCmd, description, extension) -> None FileTypeInfo(sArray) -> None
Container of information about FileType.
Methods¶
- __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
.- Return type:
None
__init__ (self, mimeType)
Constructor specifying just the MIME type name.
Use the various setter methods below to fully initialize the object.
- Parameters:
mimeType (string)
- Return type:
None
Added 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 thatNULL
can’t be used here in portable code (C++0xnullptr
can be used as well if your compiler supports it).- Parameters:
mimeType (string)
openCmd (string)
printCmd (string)
description (string)
extension (string)
- Return type:
None
__init__ (self, sArray)
Constructor using an array of string elements corresponding to the parameters of the constructor above in the same order.
- Parameters:
sArray (list of strings)
- Return type:
None
- AddExtension(self, ext)¶
Add another extension associated with this file type.
- Parameters:
ext (string)
- Return type:
None
Added in version 2.9.2.
- GetDescription(self)¶
Get the long, user visible description.
- Return type:
str
- GetExtensions(self)¶
Get the array of all extensions.
- Return type:
List[str]
- GetExtensionsCount(self)¶
Get the number of extensions.
- Return type:
int
- GetIconFile(self)¶
Get the icon filename.
- Return type:
str
- GetIconIndex(self)¶
Get the index of the icon within the icon file.
- Return type:
int
- GetMimeType(self)¶
Get the MIME type.
- Return type:
str
- GetOpenCommand(self)¶
Get the open command.
- Return type:
str
- GetPrintCommand(self)¶
Get the print command.
- Return type:
str
- GetShortDesc(self)¶
Get the short description (only used under Win32 so far)
- Return type:
str
- SetDescription(self, description)¶
Set the file type description.
- Parameters:
description (string)
- Return type:
None
Added in version 2.9.2.
- SetIcon(self, iconFile, iconIndex=0)¶
Set the icon information.
- Parameters:
iconFile (string)
iconIndex (int)
- Return type:
None
- SetOpenCommand(self, command)¶
Set the command to be used for opening files of this type.
- Parameters:
command (string)
- Return type:
None
Added in version 2.9.2.
- SetPrintCommand(self, command)¶
Set the command to be used for printing files of this type.
- Parameters:
command (string)
- Return type:
None
Added 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.
- Parameters:
shortDesc (string)
- Return type:
None
Properties¶
- Description¶
See
GetDescription
andSetDescription
- Extensions¶
See
GetExtensions
- ExtensionsCount¶
- IconFile¶
See
GetIconFile
- IconIndex¶
See
GetIconIndex
- MimeType¶
See
GetMimeType
- OpenCommand¶
See
GetOpenCommand
andSetOpenCommand
- PrintCommand¶
See
GetPrintCommand
andSetPrintCommand
- ShortDesc¶
See
GetShortDesc
andSetShortDesc