Phoenix Logo

phoenix_title 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 Class Hierarchy

Inheritance diagram for class FileTypeInfo:

method_summary Methods Summary

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

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.


Methods



__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 wx.MimeTypesManager.AddFallbacks .



__init__ (self, mimeType)

Constructor specifying just the MIME type name.

Use the various setter methods below to fully initialize the object.

Parameters: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).

Parameters:
  • mimeType (string) –
  • openCmd (string) –
  • printCmd (string) –
  • description (string) –
  • extension (string) –



__init__ (self, sArray)

Constuctor using an array of string elements corresponding to the parameters of the constructor above in the same order.

Parameters:sArray (list of strings) –





AddExtension(self, ext)

Add another extension associated with this file type.

Parameters:ext (string) –

New in version 2.9.2.



GetDescription(self)

Get the long, user visible description.

Return type:string


GetExtensions(self)

Get the array of all extensions.

Return type:list of strings


GetExtensionsCount(self)

Get the number of extensions.

Return type:int


GetIconFile(self)

Get the icon filename.

Return type:string


GetIconIndex(self)

Get the index of the icon within the icon file.

Return type:int


GetMimeType(self)

Get the MIME type.

Return type:string


GetOpenCommand(self)

Get the open command.

Return type:string


GetPrintCommand(self)

Get the print command.

Return type:string


GetShortDesc(self)

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

Return type:string


SetDescription(self, description)

Set the file type description.

Parameters:description (string) –

New in version 2.9.2.



SetIcon(self, iconFile, iconIndex=0)

Set the icon information.

Parameters:
  • iconFile (string) –
  • iconIndex (int) –


SetOpenCommand(self, command)

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

Parameters:command (string) –

New in version 2.9.2.



SetPrintCommand(self, command)

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

Parameters: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.

Parameters:shortDesc (string) –

Properties



Description

See GetDescription and SetDescription



Extensions

See GetExtensions



ExtensionsCount

See GetExtensionsCount



IconFile

See GetIconFile



IconIndex

See GetIconIndex



MimeType

See GetMimeType



OpenCommand

See GetOpenCommand and SetOpenCommand



PrintCommand

See GetPrintCommand and SetPrintCommand



ShortDesc

See GetShortDesc and SetShortDesc