Moray Plugin SDK Documentation
This release of the Plugin SDK can be used by Moray V3.5 (Build 9065) and later.

CSceneInterface CFilesInterface CMenuInterface CImportInterface
CExportInterface CObjectInterface CExternalInterface
CPluginDialog CPluginObject
CAttributes CProgressBar C support Compiler Settings

What's New

CPluginDialog

The CPluginDialog is a base class implementation of a CDialog-derived dialog that a plugin which implements a new object type via the Object Interface can use to derive its dialog from.

Plugins based on MFC should use this base class in conjunction with the CPluginObject to implement a new object.


Reference List of Functions

By Function Group Alphabetically
m_pObject
m_pScene
m_pSceneFuncs
SetObject
SetSceneInterface
InitFromObject
OnValueChangedObject
OnGetControlInfoObject
InitFromObject
OnGetControlInfoObject
OnValueChangedObject
SetObject
SetSceneInterface
m_pObject
m_pScene
m_pSceneFuncs



 

m_pObject


   CPluginObject* m_pObject;

The member variable m_pObject is a pointer to the CPluginObject-derived object that is currently selected.

See Also

CPluginObject


Top
 

m_pScene


   CSceneInterface* m_pScene;

The member variable m_pScene is a pointer to a Scene Interface. It is provided as a convenience and is not initialized by the class. If the dialog requires use of the scene interface the plugin must use the SetSceneInterface function to set the pointer.

See Also

CSceneInterface, SetSceneInterface


Top
 

m_pSceneFuncs


   LPMRY_SCENEFUNCS m_pSceneFuncs;

The member variable m_pSceneFuncs is a pointer to the function table of the scene interface pointed to by m_pScene. For a description of the function table, see MRY_SCENEFUNCS.


Top
 

SetObject

The function SetObject is called when an object associated with the Object interface which uses this dialog is selected.

    virtual void SetObject(CPluginObject* pObject);

Parameters

pObject

Contains a pointer to the object that was selected.

Remarks

The default implementation of this function calls the InitFromObject function, which is the only function a derived dialog is required to implement.

The derived dialog will probably not need to implement this function.

See Also

CPluginObject


Top
 

SetSceneInterface

The function SetSceneInterface can be called to set the Scene Interface.

    virtual void SetSceneInterface(CSceneInterface* pScene);

Parameters

pScene

Contains the pointer to a CSceneInterface.

Remarks

If the dialog requires a Scene Interface and the function setting up the dialog has retrieved one, this function can be used to inform the dialog of the interface pointer. This function is never called by Moray, the plugin does not need to use, it is provided in the base class merely as a convenience because many plugin objects are going to find that a Scene Interface is needed.


Top
 

InitFromObject

The function InitFromObject is called when an object associated with the Object interface which uses this dialog is selected.

    virtual void InitFromObject()=0;

Remarks

This is a pure virtual function, so the derived class must implement this call. The dialog should update all the controls from the new object.

This is the only function that the derived class is required to implement.

See Also

SetObject


Top
 

OnValueChangedObject

The function OnValueChangedObject is called when a value associated with a control in this dialog changes.

    virtual long OnValueChangedObject(long hObject, int nID, double dValue);

Parameters

hObject

Contains the handle of the object instance currently associated with the dialog.

nID

Contains the ID of the control that has changed.

dValue

Contains the new value of the control.

Return Values

For return values, see ValueChanged.

Remarks

This function is called only if for IDs that have been configured such that they are Moray spinners or sliders.

The default implementation of this function is to route this call to the OnValueChanged function of the plugin object.

The derived dialog will probably not need to implement this function.


Top
 

OnGetControlInfoObject

The function OnGetControlInfoObject determines whether Moray should handle the control with a certain ID.

    virtual long OnGetControlInfoObject(long hObject, int nID, LPMRY_CONTROL_INFO pCtrl);

Parameters

hObject

Contains the handle of the object to query for the dialog control.

nID

Contains the ID of the control of this objects dialog on the Modify Tab.

pCtrl

Contains a pointer to the MRY_CONTROL_INFO struct that holds the control information.

Return Values

TRUE

should be returned if the control associated with the ID should use Morays spinners or sliders.

FALSE

should be returned if the control associated with the ID will be handled by the plugin.

Remarks

Moray allows a plugin to use its spinners and sliders in any custom dialogs it adds to the Modify Tab. This is recommended for all floating point and integer values that are present on the Modify Tab. The spinners are basically an edit box with an up and down arrow that allows the user to increment, decrement or drag the value with the mouse.
When the user changes the spinners or sliders, Moray calls the OnValueChangedObject function.

The default implementation of this function is to route this call to the GetControlInfo function of the plugin object.

The derived dialog will probably not need to implement this function.


Top