(new in Rev2.40)
MQBasePlugin class is a base class for all types of plug-ins. It is available as a class library by adding MQBasePlugin.cpp and MQBasePlugin.h to a project. You can make a command plug-in with a simple implementation and without taking care of complex message procedures by returning an inherited class in GetPluginClass().
Several plug-in functions are declared as virtual functions in MQBasePlugin class. It is necessary to implement them in an inherited class.
Class | |
MQBasePlugin | Constructor |
~MQBasePlugin | Destructor |
Plug-in | |
GetPlugInID | Get a plug-in ID |
GetPlugInName | Get a plug-in name |
GetPlugInType | Get a type of a plug-in |
Supplemental functions | |
OpenSetting | Get 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 |
GetLUTCount | Get a number of LUTs |
GetLUTName | Get a LUT's name |
GetLUTData | Get LUT data |
SendUserMessage | Send a plugin-in own message to the other plug-ins |
MQBasePlugin::MQBasePlugin();
It is a constructor.
virtual MQBasePlugin::~MQBasePlugin();
It is a destructor. It is declared as a virtual function.
virtual void MQBasePlugin::GetPlugInID(DWORD *Product, DWORD *ID);
It returns a product(author) name and a product ID as a 64-bit value.
The 'Product' and 'ID' can be random values which do not overlap with others.
This method is declared as a pure virtual function. It conceals MQGetPlugInID() by implementing in an inherited class.
virtual const char *MQBasePlugin::GetPlugInName();
It returns a plug-in name to display on the [About plug-ins] dialog.
This method is declared as a pure virtual function. It conceals MQGetPlugInName() by implementing in an inherited class.
virtual int MQBasePlugin::GetPlugInType();
It returns a type of the plug-in.
This method is declared as a pure virtual function. It conceals MQGetPlugInType() by implementing in an inherited class.
MQSetting *MQBasePlugin::OpenSetting();
It gets a class to access to a "metaseq.setting.xml" file to save settings of Metasequoia. You can load and save plug-in original settings through the class.
The setting class must be delete by CloseSetting().
(in Rev4.00)
A file to access had been changed from "metaseq.ini" into "metaseq.setting.xml".
void MQBasePlugin::CloseSetting(MQSetting *setting);
It closes a setting object opened by OpenSetting().
std::wstring MQBasePlugin::GetResourceString(const char *id);
(new in Rev4.00)
It returns a string defined in command.xml for the current language.
std::wstring MQBasePlugin::GetSettingValue(MQSETTINGVALUE_TYPE type);
(new in Rev4.02)
It returns a setting value in the system.
MQColor MQBasePlugin::GetSystemColor(MQSYSTEMCOLOR_TYPE color_type);
(new in Rev4.02)
It returns a system color.
HCURSOR MQBasePlugin::GetResourceCursor(MQCURSOR_TYPE cursor_type);
(new in Rev2.46)
It gets the specified type of the mouse cursor.
The returned cursor is available for SetScreenMouseCursor() or MQCommandPlugin::SetMouseCursor().
HCURSOR MQBasePlugin::GetScreenMouseCursor();
(new in Rev4.30)
It returns a current mouse cursor for a screen.
void MQBasePlugin::SetScreenMouseCursor(HCURSOR cursor);
(new in Rev4.30)
It changes a mouse cursor for a screen.
Please specify a cursor that is obtained by GetResourceCursor() or is a resource cursor obtained by LoadCursor() of Win32-API with the DLL instance. The operation is not ensured when a predefined cursor obtained by LoadCursor() with the NULL instance is specified.
Please call MQCommandPlugin::SetMouseCursor() if you want to change a cursor for 3D views.
int MQBasePlugin::GetLUTCount();
(new in Rev4.40)
It returns a number of LUTs (color maps) prepared in the system.
const unsigned char *MQBasePlugin::GetLUTData(int index);
(new in Rev4.40)
It returns a LUT (color map) data prepared in the system.
256 colors by a RGB order; total 768 bytes; are contained in the returned pointer.
const unsigned char *MQBasePlugin::GetDefaultLUTData();
(new in Rev4.40)
It returns a default LUT (color map) data prepared in the system.
256 colors by a RGB order; total 768 bytes; are contained in the returned pointer.
int MQBasePlugin::SendUserMessage(MQDocument doc, DWORD target_product, DWORD target_id, const char *description, void *param);
(new in Rev2.41)
It sends an arbitrary message to the other station or command plug-in.
You can send an arbitrary data to the target plug-in by storing a pointer in message.
The message will be sent to all plug-in when you set 0 to target_product and 0 to target_id.
The message is received in MQStationPlugin::OnReceiveUserMessage() of the target plug-in.
Attention: The return value cannot be received correctly in Ver2.4.4 or older version.