Global exporter list

This exporter list is used for determining the default file handler for each registered file type. Every exporter (TOCustomExporter descendand) has the 2 properties FilterText and ExtList that are used for the filter list of open/save dialogs and file type detection.

Use the following procedures to add, remove, find or other use exporters in the global exporter list.
Do no free the exporters manually, they fill be destroyed automatically when removing them from the list. You have to create them, though.

procedure OExportRegisterExporter(const aExporter: TOCustomExporter; const aPos: Integer = -1);
Register an exporter in the global exporter list at a specified position. aPos = -1 means the end of the list.
procedure OExportMoveExporter(const aExporterClass: TOExporterClass; aPos: Integer = -1);
Move an exporter (defined by its class) in the global exporter list to a specified position. aPos = -1 means the end of the list.
procedure OExportUnRegisterExporter(const aExporterClass: TOExporterClass);
All exporters of the specified class will be removed from the global exporter list.
function OExportFindExporter(const aExporterClass: TOExporterClass; out outExporter: TOCustomExporter): Boolean;
Find the registered exporter of the specified class in the global exporter list.
function FileNameToExporter(const aFileName: OWideString; out outExporter: TOCustomExporter): Boolean;
Find the registered exporter for a specified file name.
function FileExtToExporter(aFileExt: OWideString; out outExporter: TOCustomExporter): Boolean;
Find the registered exporter for a specified file extension.
function OExportGetFilter(const aAllFiles: TOExportGetFilterAllFiles): OWideString;
Get the open/save dialog filter text of all registered exporters.
The parameter aAllFiles determines if the option All supported files should be added to the filter and where (oefTop, oefBottom, oefNone).
function FilterIndexToExporter(aIndex: Integer; const aFileName: OWideString;
  const aAllFiles: TOExportGetFilterAllFiles; out outExporter: TOCustomExporter): Boolean;
Find the exporter associated with the index from filter string obtained by OExportGetFilter.
function FileNameToFilterIndex(const aFileName: OWideString; const aAllFiles: TOExportGetFilterAllFiles;
  const aDefFilterIndex: Integer): Integer;
Find the filter index of specified file name for the filter string obtained by OExportGetFilter.
function FileExtToFilterIndex(aFileExt: OWideString; const aAllFiles: TOExportGetFilterAllFiles;
  const aDefFilterIndex: Integer): Integer;
Find the filter index of specified file extension for the filter string obtained by OExportGetFilter.
Categories