Rhino C++ API  8.5
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
CRhRdkPlugIn Class Referenceabstract

#include <RhRdkPlugIn.h>

Inheritance diagram for CRhRdkPlugIn:
CRhRdkObject CRhRdkRenderPlugIn

Public Types

enum  ePlugInType { rdkPlugIn = 0, rdkRenderPlugIn = 1, force32bit_pit = 0xFFFFFFFF }
 

Public Member Functions

virtual ~CRhRdkPlugIn ()
 
virtual RDK_DEPRECATED void AddCustomEditorActions (IRhRdkActions &, const IRhRdkContentEditor &) const
 
virtual RDK_DEPRECATED void AddCustomEditorMenu (IRhRdkMenu &, const IRhRdkContentEditor &) const
 
virtual RDK_DEPRECATED void AddCustomEditorToolButtons (IRhRdkToolbar &, const IRhRdkContentEditor &) const
 
virtual RDK_DEPRECATED bool AddCustomPlugIn (IRhRdkCustomPlugIn *pPlugIn) const
 
void AddCustomUISections (IRhRdkExpandableContentUI &ui) const
 
virtual bool AddExtension (CRhRdkExtension *pExtension) const
 
virtual void ChangeContentInstanceId (IRhRdkPlugInUsedContentNotifier &ucn)
 
virtual RDK_DEPRECATED void EnableNonModalWindows (bool) const
 
virtual void EnsureDefaultContent (CRhinoDoc *pDoc=RhinoApp().ObsoleteActiveDoc()) const
 
virtual void * EVF (const wchar_t *wszFunc, void *pvData) override
 
virtual UUID GetLicenseCode (const UUID &uuidRequestCode) const
 
virtual CRhRdkVariant GetParameter (const wchar_t *wszName) const
 
virtual bool Icon (CRhinoDib &dibOut) const
 
virtual bool Initialize (void)
 
virtual bool OnAssignMaterial (HWND hwndParent, ON_Material &material)
 
virtual bool OnEditMaterial (HWND hwndParent, ON_Material &material)
 
virtual bool OverrideSunViewportDisplay (void) const
 
virtual UUID PlugInId (void) const =0
 
virtual RDK_DEPRECATED void PlugInRdkVersion (int &iMajorVersion, int &iMinorVersion, int &iBetaRelease) const
 
virtual ePlugInType PlugInType (void) const
 
virtual RDK_DEPRECATED void RegisterCompoundContentImplementors (IRhRdkCompoundContentImplementors &ccis) const
 
virtual RDK_DEPRECATED void RegisterContent (IRhRdkContentFactories &) const
 
virtual RDK_DEPRECATED void RegisterContentIOPlugIns (IRhRdkContentIOPlugIns &ciop) const
 
virtual RDK_DEPRECATED void RegisterCustomPlugIns (void) const
 
virtual RDK_DEPRECATED void RegisterCustomRenderMeshProviders (IRhRdkCustomRenderMeshManager &crmm) const
 
virtual void RegisterExtensions (void) const
 
virtual RDK_DEPRECATED void RegisterPostEffectPlugIns (IRhRdkPostEffectPlugInFactories &pepf) const
 
virtual void ReportUsedContent (IRhRdkPlugInUsedContentNotifier &ucn)
 
virtual CRhinoPlugInRhinoPlugIn (void) const =0
 
virtual bool SetParameter (const wchar_t *wszName, const CRhRdkVariant &vValue)
 
virtual bool SupportsCustomPlugIn (const UUID &uuidInterfaceId) const
 
virtual void Uninitialize (void)
 
virtual RDK_DEPRECATED void UpdateCustomEditorActions (IRhRdkActions &, const IRhRdkContentEditor &) const
 
- Public Member Functions inherited from CRhRdkObject
 CRhRdkObject ()
 
virtual ~CRhRdkObject ()
 
void operator delete (void *buf)
 
void operator delete[] (void *buf)
 
void * operator new (size_t size)
 
void * operator new[] (size_t size)
 

Static Public Member Functions

static UINT QueryFocusMessageNumber (void)
 
- Static Public Member Functions inherited from CRhRdkObject
static void CheckMemory (void)
 
static void PopulateDebuggingInfo (void)
 

Protected Member Functions

 CRhRdkPlugIn ()
 

Detailed Description

Use this base class if your RDK plug-in is a Rhino plug-in but not a Rhino render plug-in. This is the main connection between your plug-in and RDK. You must create a subclass and implement the pure virtual functions so that RDK can communicate with your plug-in.

RDK_SDK_VERSION define:

Note, this define concerns the actual version of the SDK headers, not the version of the executable, which will be updated with service release even if the SDK headers do not change.

The first number is the major version (which corresponds to the Rhino version the RDK is designed to run in. If you compile with (say) version 4.0.0 of the SDK, it will work with all executable RDKs with the same version number. The minor version (the second number) indicates minor non-breaking updates to the SDK. If you use any of the features in the minor update, however it will not link to lesser versions of the RDK.

To ensure that your plug-in works with all versions of the RDK for the platform in question, please ensure that the SDK you are using is the x.0.0 version.

The final number indicates beta/experimental version numbers. You should never use an SDK which has anything other than 0 in the final slot, except for beta releases of your product.

Use the CRhRdkPlugIn::RdkVersion function to determine the actual executable version and date of the RDK plug-in. This will correspond to the RDK_SDK_VERSION it was compiled with. You can also find the compile date of the RDK plug-in using CRhRdkPlugIn::RdkBuildDate().

Member Enumeration Documentation

◆ ePlugInType

Plug-in types.

Enumerator
rdkPlugIn 
rdkRenderPlugIn 
force32bit_pit 

Constructor & Destructor Documentation

◆ ~CRhRdkPlugIn()

virtual CRhRdkPlugIn::~CRhRdkPlugIn ( )
virtual

◆ CRhRdkPlugIn()

CRhRdkPlugIn::CRhRdkPlugIn ( )
protected

Member Function Documentation

◆ AddCustomEditorActions()

virtual RDK_DEPRECATED void CRhRdkPlugIn::AddCustomEditorActions ( IRhRdkActions ,
const IRhRdkContentEditor  
) const
virtual

This method is obsolete. Actions have been replaced with custom tasks.

See also
CRhRdkCustomTask.

◆ AddCustomEditorMenu()

virtual RDK_DEPRECATED void CRhRdkPlugIn::AddCustomEditorMenu ( IRhRdkMenu ,
const IRhRdkContentEditor  
) const
virtual

This method is obsolete. Actions have been replaced with custom tasks.

See also
CRhRdkCustomTask.

◆ AddCustomEditorToolButtons()

virtual RDK_DEPRECATED void CRhRdkPlugIn::AddCustomEditorToolButtons ( IRhRdkToolbar ,
const IRhRdkContentEditor  
) const
virtual

This method is obsolete.

◆ AddCustomPlugIn()

virtual RDK_DEPRECATED bool CRhRdkPlugIn::AddCustomPlugIn ( IRhRdkCustomPlugIn pPlugIn) const
virtual

◆ AddCustomUISections()

void CRhRdkPlugIn::AddCustomUISections ( IRhRdkExpandableContentUI ui) const

◆ AddExtension()

virtual bool CRhRdkPlugIn::AddExtension ( CRhRdkExtension pExtension) const
virtual

Adds an extension to the RDK. If you override this method, please be sure to call the base class. The base class implementation calls RhRdkAddExtension().

See also
CRhRdkExtension
RegisterExtensions()
RhRdkAddExtension

◆ ChangeContentInstanceId()

virtual void CRhRdkPlugIn::ChangeContentInstanceId ( IRhRdkPlugInUsedContentNotifier ucn)
virtual

This is called when merging content into a document during import. If your plug-in is using content, you should override this method to change your record of an instance id.

See also
IRhRdkPlugInUsedContentNotifier for details.

◆ EnableNonModalWindows()

virtual RDK_DEPRECATED void CRhRdkPlugIn::EnableNonModalWindows ( bool  ) const
virtual

This method is obsolete and is never called.

◆ EnsureDefaultContent()

virtual void CRhRdkPlugIn::EnsureDefaultContent ( CRhinoDoc pDoc = RhinoApp().ObsoleteActiveDoc()) const
virtual

Reimplemented in CRhRdkRenderPlugIn.

◆ EVF()

virtual void* CRhRdkPlugIn::EVF ( const wchar_t *  wszFunc,
void *  pvData 
)
overridevirtual

Emergency virtual function for future expansion.

Reimplemented from CRhRdkObject.

Reimplemented in CRhRdkRenderPlugIn.

◆ GetLicenseCode()

virtual UUID CRhRdkPlugIn::GetLicenseCode ( const UUID &  uuidRequestCode) const
virtual

Optionally implement this method to satisfy license requests from RDK service providers, for example custom render mesh providers.

◆ GetParameter()

virtual CRhRdkVariant CRhRdkPlugIn::GetParameter ( const wchar_t *  wszName) const
virtual

Optionally override this method to get a specific parameter in the plug-in.

◆ Icon()

virtual bool CRhRdkPlugIn::Icon ( CRhinoDib dibOut) const
virtual

Optionally override this method to return an icon for the plug-in.

◆ Initialize()

virtual bool CRhRdkPlugIn::Initialize ( void  )
virtual

Initializes the plug-in. Override this method to perform additional initialization. please be sure to call the base class.

Returns
true if the plug-in initialized correctly, false if not - this will usually happen if the RDK the plug-in was built against is older than the RDK that is running and there have been breaking SDK changes in between.

Reimplemented in CRhRdkRenderPlugIn.

◆ OnAssignMaterial()

virtual bool CRhRdkPlugIn::OnAssignMaterial ( HWND  hwndParent,
ON_Material material 
)
virtual

Called in response to clicking the Browse button on Rhino's Properties / Material / Plug-in page or the Layer Material dialog. The default implementation returns false. Override this method to provide an assignment procedure.

◆ OnEditMaterial()

virtual bool CRhRdkPlugIn::OnEditMaterial ( HWND  hwndParent,
ON_Material material 
)
virtual

Called in response to clicking the Edit button on Rhino's Properties / Material / Plug-in page or the Layer Material dialog. The default implementation returns false. Override this method to provide an assignment procedure.

◆ OverrideSunViewportDisplay()

virtual bool CRhRdkPlugIn::OverrideSunViewportDisplay ( void  ) const
virtual

Override this function to tell RDK not to fiddle with the display when displaying the RDK sun. Generally you will do this if you are developing a display conduit and want to deal with the RDK sun yourself.

Returns
true if you intend to deal with the sun, else false (default) to get the RDK to do it.

◆ PlugInId()

virtual UUID CRhRdkPlugIn::PlugInId ( void  ) const
pure virtual

You must implement this method to return the identifier of your RDK plug-in.

Returns
The UUID of the RDK client plug-in.

◆ PlugInRdkVersion()

virtual RDK_DEPRECATED void CRhRdkPlugIn::PlugInRdkVersion ( int &  iMajorVersion,
int &  iMinorVersion,
int &  iBetaRelease 
) const
virtual

You must implement this method to fill in the version numbers of the RDK SDK the plug-in was compiled with. This function should be implemented as follows:

void MyRdkPlugIn::PlugInRdkVersion(int& iMajorVersion, int& iMinorVersion, int& iBetaRelease) const
{
iMajorVersion = RDK_MAJOR_VERSION;
iMinorVersion = RDK_MINOR_VERSION;
iBetaRelease = RDK_BETA_RELEASE;
}

◆ PlugInType()

virtual ePlugInType CRhRdkPlugIn::PlugInType ( void  ) const
inlinevirtual
Returns
plug-in type.

Reimplemented in CRhRdkRenderPlugIn.

◆ QueryFocusMessageNumber()

static UINT CRhRdkPlugIn::QueryFocusMessageNumber ( void  )
static

If your UI has a control that doesn't care about where the focus is, have the control handle this message and return 1. RDK will then periodically move the focus from your control to Rhino's command line. Example usage:

const UINT uQueryFocusMsg = CRhRdkPlugIn::QueryFocusMessageNumber();
...
BEGIN_MESSAGE_MAP(CMyButton, CButton)
ON_REGISTERED_MESSAGE(uQueryFocusMsg, OnQueryFocus)
END_MESSAGE_MAP()
...
LRESULT CMyButton::OnQueryFocus(WPARAM, LPARAM)
{
return 1; // Don't care about focus.
}

◆ RegisterCompoundContentImplementors()

virtual RDK_DEPRECATED void CRhRdkPlugIn::RegisterCompoundContentImplementors ( IRhRdkCompoundContentImplementors ccis) const
virtual

This method is deprecated in favor of RegisterExtensions().

See also
RegisterExtensions()

◆ RegisterContent()

virtual RDK_DEPRECATED void CRhRdkPlugIn::RegisterContent ( IRhRdkContentFactories ) const
virtual

This method is deprecated in favor of RegisterExtensions().

See also
RegisterExtensions()

◆ RegisterContentIOPlugIns()

virtual RDK_DEPRECATED void CRhRdkPlugIn::RegisterContentIOPlugIns ( IRhRdkContentIOPlugIns ciop) const
virtual

This method is deprecated in favor of RegisterExtensions().

See also
RegisterExtensions()

◆ RegisterCustomPlugIns()

virtual RDK_DEPRECATED void CRhRdkPlugIn::RegisterCustomPlugIns ( void  ) const
virtual

◆ RegisterCustomRenderMeshProviders()

virtual RDK_DEPRECATED void CRhRdkPlugIn::RegisterCustomRenderMeshProviders ( IRhRdkCustomRenderMeshManager crmm) const
virtual

This method is deprecated in favor of RegisterExtensions().

See also
RegisterExtensions()

◆ RegisterExtensions()

virtual void CRhRdkPlugIn::RegisterExtensions ( void  ) const
virtual

Optionally override this method to register extensions whose interface is defined by a UUID. Some of these extension types have interface files which are supplied with the RDK SDK (e.g., content factories) and some do not. The latter case is generally reserved for features which are added to the RDK after the initial SDK release and allows us to add extensions without breaking the SDK. To add these extensions your implementation should call AddExtension().

See also
CRhRdkExtension
AddExtension()
RhRdkAddExtension

◆ RegisterPostEffectPlugIns()

virtual RDK_DEPRECATED void CRhRdkPlugIn::RegisterPostEffectPlugIns ( IRhRdkPostEffectPlugInFactories pepf) const
virtual

This method is deprecated in favor of RegisterExtensions().

See also
RegisterExtensions()

◆ ReportUsedContent()

virtual void CRhRdkPlugIn::ReportUsedContent ( IRhRdkPlugInUsedContentNotifier ucn)
virtual

This is called when merging content into a document during import. If your plug-in is using content, you should override this method to report the content being used.

See also
IRhRdkPlugInUsedContentNotifier for details.

◆ RhinoPlugIn()

virtual CRhinoPlugIn& CRhRdkPlugIn::RhinoPlugIn ( void  ) const
pure virtual

You must implement this method to return a reference to your CRhinoPlugIn derived class.

Returns
A reference to your CRhinoPlugIn derived class.

◆ SetParameter()

virtual bool CRhRdkPlugIn::SetParameter ( const wchar_t *  wszName,
const CRhRdkVariant vValue 
)
virtual

Optionally override this method to set a specific parameter in the plug-in. You can use this system to change parameters programatically if these methods are implemented for that plug-in. If you implement this method you must return true. The default implementation is a no-op that returns false.

◆ SupportsCustomPlugIn()

virtual bool CRhRdkPlugIn::SupportsCustomPlugIn ( const UUID &  uuidInterfaceId) const
virtual
Returns
true if you support this custom plug-in type

◆ Uninitialize()

virtual void CRhRdkPlugIn::Uninitialize ( void  )
virtual

Uninitializes the plug-in to perform clean-up when the plug-in is unloaded. Override this method to perform additional clean-up tasks. please be sure to call the base class.

◆ UpdateCustomEditorActions()

virtual RDK_DEPRECATED void CRhRdkPlugIn::UpdateCustomEditorActions ( IRhRdkActions ,
const IRhRdkContentEditor  
) const
virtual

This method is obsolete. Actions have been replaced with custom tasks.

See also
CRhRdkCustomTask.
RDK_BETA_RELEASE
#define RDK_BETA_RELEASE
Definition: RhRdkPlugIn.h:16
CRhRdkPlugIn::QueryFocusMessageNumber
static UINT QueryFocusMessageNumber(void)