MQExportPlugin class

(new in Rev2.40)

MQExportPlugin class inherits MQBasePlugin class, and provides functions necessary for an implementation of an export plug-in.

You can make a export plug-in with a simple implementation and without taking care of complex message procedures between a plug-in and a main part of Metasequoia by inheriting this MQExportPlugin class and implementing required virtual functions.

In MQExportPlugin class, each plug-in member functions and messages are declared as virtual functions. It is necessary to implement the virtual function in the inherited class.

 

Class
MQExportPlugin Constructor
~MQExportPlugin Destructor
Declared in super class
GetPlugInID Get a plug-in ID
GetPlugInName Get a plug-in name
Plug-in
GetPlugInType Get a plug-in type
EnumFileType Enumerate file types
EnumFileExt Enumerate file extensions
ExportFile Save a file
Supplemental functions for the super class
OpenSetting Open a setting file
CloseSetting Close a setting file
GetResourceString Get a resource string
GetSettingValue Get a setting value
GetSystemColor Get a system color
GetResourceCursor Get a default mouse cursor
GetScreenMouseCursor Get a mouse cursor for a screen
SetScreenMouseCursor Set a mouse cursor for a screen
SendUserMessage Send a plug-in own message to the other plug-ins
SetDrawProxyObject Set a draw proxy object
GetEditOption Get edit options
GetSceneOption Get display options of the scene

MQExportPlugin::MQExportPlugin();

This method is a constructor.


virtual MQExportPlugin::~MQExportPlugin();

This method is a destructor. It is defined as a virtual function.


virtual int MQExportPlugin::GetPlugInType();

Return value
A plug-in type
[MQPLUGIN_TYPE_EXPORT] Export plug-in

This method implements a virtual function declared by MQBasePlugin::GetPlugInType(). No additional implementation is necessary in an inherited class.


virtual const char *MQExportPlugin::EnumFileType(int index);

index
An index of a type of a file
Return value
A name of the file type

It gets a file extension with the specified index. The extension is used in a file dialog.

This function is called when Metasequoia starts up. The 'index' is called sequentially from 0, and the call ends  when this function returns NULL.

This method implements a virtual function declared by MQEnumFileType(). No additional implementation is necessary in an inherited class.


virtual const char *MQExportPlugin::EnumFileExt(int index);

index
An index of a type of a file
Return value
An extension

It gets a file extension with the specified index. The extension is used in a file dialog.

This function is called when Metasequoia starts up. The 'index' is called sequentially from 0, and the call ends  when this function returns NULL.

This method implements a virtual function declared by MQEnumFileExt(). No additional implementation is necessary in an inherited class.


virtual BOOL MQExportPlugin::ExportFile(int index, const wchar_t *filename, MQDocument doc);

index
An index of a type of a file
filename
A filename (full path)
doc
A document
Return value
Succeeded or failed
[TRUE] Succeeded to export
[FALSE] Failed to export

It saves data to a file.

This method implements a virtual function declared by MQExportFileW(). No additional implementation is necessary in an inherited class.

(in Rev4.70)

A type of filename has been changed from char to wchar_t.