Rhino C++ API  8.6
Public Types | Public Member Functions | List of all members
CRhRdkEventWatcher Class Reference

#include <RhRdkEventWatcher.h>

Public Types

enum  AttachReason : unsigned int {
  AttachReason::Attach, AttachReason::Change, AttachReason::Undo, AttachReason::Open,
  AttachReason::Edit
}
 
enum  AutoDeletionStateChange : unsigned int { AutoDeletionStateChange::Enter, AutoDeletionStateChange::Leave }
 
enum  DetachReason : unsigned int {
  DetachReason::Detach, DetachReason::Change, DetachReason::Undo, DetachReason::Delete,
  DetachReason::Edit
}
 
enum  eCRMChanged { eCRMChanged::kSingleObject = 0, eCRMChanged::kWholeDocument = 1, eCRMChanged::kDocumentRenderMeshes = 2 }
 
enum  rendering_info {
  ri_save_support_files = 1, ri_dithering = 2, ri_gamma = 3, ri_use_linear_workflow = 4,
  ri_tone_mapping = 5, ri_tone_mapper_params = 6, ri_custom_reflective_env = 7, ri_rhino_settings = 8,
  ri_render_channels = 9, ri_safe_frame = 10, ri_ground_plane = 11, ri_skylight = 12,
  ri_sun = 13, ri_background_env = 14, ri_custom_skylight_env = 15, ri_gamma_linear_workflow = 16,
  ri_post_effects = 17, ri_force32bit = 0xFFFFFFFF
}
 

Public Member Functions

 CRhRdkEventWatcher (bool bAutoRegister=true)
 
virtual ~CRhRdkEventWatcher ()
 
virtual void Enable (bool bEnable) const
 
virtual void * EVF (const wchar_t *wszFunc, void *pvData)
 
virtual bool IsEnabled (void) const
 
virtual RDK_DEPRECATED void OnAddRhinoObject (CRhinoDoc &, CRhinoObject &)
 
virtual void OnAllFactoriesAdded (void)
 
virtual RDK_DEPRECATED void OnAutomaticParamChanged (HWND, DWORD_PTR)
 
virtual void OnCacheImageChanged (void)
 
virtual void OnClientPlugInUnloading (const UUID &uuidPlugIn)
 
virtual RDK_DEPRECATED void OnContentAdded (const CRhRdkContent *)
 
virtual void OnContentAddedByUser (const CRhRdkDocument &rdkDoc, const CRhRdkContentArray &aContent, bool bNameWasLoaded)
 
virtual void OnContentAttached (const CRhRdkDocument &rdkDoc, const CRhRdkContent &c, AttachReason r)
 
virtual void OnContentAutoDeletion (const CRhRdkDocument &rdkDoc, const CRhRdkContent &c, AutoDeletionStateChange change)
 
virtual void OnContentBlossomBegin (const CRhRdkBasicMaterial &v4Material)
 
virtual RDK_DEPRECATED void OnContentBlossomEnd (const CRhRdkBasicMaterial &)
 
virtual void OnContentBlossomEnd (const CRhRdkBasicMaterial *pBlossom)
 
virtual void OnContentChanged (const CRhRdkContent &c, const CRhRdkContent &old, RhRdkChangeContext cc)
 
virtual RDK_DEPRECATED void OnContentChanged (const CRhRdkContent *, RhRdkChangeContext)
 
virtual RDK_DEPRECATED void OnContentCurrencyChanged (const wchar_t *, const CRhRdkContent *)
 
virtual RDK_DEPRECATED void OnContentDeleted (void)
 
virtual RDK_DEPRECATED void OnContentDeleting (const CRhRdkContent *)
 
virtual void OnContentDetached (const CRhRdkDocument &rdkDoc, const CRhRdkContent &c, DetachReason r)
 
virtual void OnContentDetaching (const CRhRdkDocument &rdkDoc, const CRhRdkContent &c, DetachReason r)
 
virtual RDK_DEPRECATED void OnContentEditorActivated (const IRhRdkContentEditor &)
 
virtual RDK_DEPRECATED void OnContentEditorExtended (bool)
 
virtual void OnContentFilterChanged (const CRhRdkDocument &rdkDoc, const CRhRdkUuidCollection &excludedRenderEngines)
 
virtual RDK_DEPRECATED void OnContentFilterChanged (const CRhRdkUuidCollection &)
 
virtual void OnContentGroupIdChanged (const CRhRdkContent &c, const UUID &uuidGroupNew, const UUID &uuidGroupOld)
 
virtual void OnContentListCleared (const CRhRdkDocument &rdkDoc, const IRhRdkContentList &list)
 
virtual RDK_DEPRECATED void OnContentListCleared (const IRhRdkContentList &)
 
virtual void OnContentListClearing (const CRhRdkDocument &rdkDoc, const IRhRdkContentList &list)
 
virtual RDK_DEPRECATED void OnContentListClearing (const IRhRdkContentList &)
 
virtual void OnContentListLoaded (const CRhRdkDocument &rdkDoc, const IRhRdkContentList &list)
 
virtual RDK_DEPRECATED void OnContentListLoaded (const IRhRdkContentList &)
 
virtual RDK_DEPRECATED void OnContentMoved (const CRhRdkContent *, const CRhRdkContent *, const IRhRdkContentEditor *)
 
virtual void OnContentNotesChanged (const CRhRdkContent &c)
 
virtual void OnContentNotesChanging (const CRhRdkContent &c)
 
virtual void OnContentRenamed (const CRhRdkContent &c)
 
virtual RDK_DEPRECATED void OnContentRenamed (const CRhRdkContent *)
 
virtual void OnContentRenaming (const CRhRdkContent &c)
 
virtual void OnContentReplaced (const CRhRdkDocument &rdkDoc, const CRhRdkContent &newContent)
 
virtual RDK_DEPRECATED void OnContentReplaced (CRhRdkContent *)
 
virtual RDK_DEPRECATED void OnContentReplacing (const CRhRdkContent *)
 
virtual void OnContentReplacing (const CRhRdkDocument &rdkDoc, const CRhRdkContent &oldContent)
 
virtual RDK_DEPRECATED void OnContentSelected (const CRhRdkContent *, const IRhRdkContentEditor &)
 
virtual void OnContentSelection (const CRhRdkContentArray &aContentSel, const CRhRdkContentArray &aContentEdit, const UUID &uuidEditor)
 
virtual void OnContentTagsChanged (const CRhRdkContent &c)
 
virtual void OnContentTagsChanging (const CRhRdkContent &c)
 
virtual RDK_DEPRECATED void OnContentUpdateMarkers (const CRhRdkContent *)
 
virtual void OnContentUpdateMarkers (const CRhRdkDocument &rdkDoc, CRhRdkContent::Kinds kind)
 
virtual void OnContentUpdatePreview (const CRhRdkContent &c)
 
virtual RDK_DEPRECATED void OnContentUpdatePreview (const CRhRdkContent *)
 
virtual void OnCurrentEnvironmentChanged (const CRhRdkDocument &rdkDoc, IRhRdkCurrentEnvironment::Usage usage, const CRhRdkContent *pContent)
 
virtual void OnCustomEvent (const UUID &uuidCode, void *pvContext)
 
virtual void OnCustomRenderMeshesChanged (const CRhRdkDocument &rdkDoc, const CRhinoObject *pObject, eCRMChanged crmc)
 
virtual void OnDecalAdded (const CRhinoObject &obj, const IRhRdkDecal &decal)
 
virtual void OnDecalDeleted (const CRhinoObject &obj, RDK_DECAL_CRC old_decal_crc)
 
virtual void OnDecalModified (const CRhinoObject &obj, const IRhRdkDecal &decal, RDK_DECAL_CRC old_decal_crc)
 
virtual RDK_DEPRECATED void OnDeleteRhinoObject (CRhinoDoc &, CRhinoObject &)
 
virtual void OnDisplayUpdateBegin (void)
 
virtual void OnDisplayUpdateEnded (void)
 
virtual RDK_DEPRECATED void OnDocumentSettingsChanged (UINT, UINT_PTR)
 
virtual void OnFactoryAdded (const CRhRdkContentFactory &factory)
 
virtual void OnFactoryDeleted (CRhRdkContent::Kinds kind)
 
virtual void OnFactoryDeleting (const CRhRdkContentFactory &factory)
 
virtual void OnGlobalSettingsChanged (void)
 
virtual void OnGroundPlaneSettingsChanged (const CRhRdkDocument &rdkDoc, const IRhRdkGroundPlane &newGP, const IRhRdkGroundPlane &oldGP, const void *pSender)
 
virtual void OnInternalProxyUpdate (const CRhRdkInstanceIdArray &, UINT_PTR)
 
virtual void OnLayerMaterialAssignmentChanged (const CRhinoDoc &doc, const CRhinoLayer &layer, const UUID &uuidInstanceNew, const UUID &uuidInstanceOld)
 
virtual void OnLazyTimer (void)
 
virtual void OnMenuChecksDirty (void)
 
virtual void OnModifyObjectTextureMapping (const CRhRdkDocument &rdkDoc, const CRhinoObject &obj)
 
virtual RDK_DEPRECATED void OnModifyObjectTextureMapping (CRhinoDoc &, const CRhinoObject &)
 
virtual void OnNewRdkDocument (const CRhRdkDocument &)
 
virtual RDK_DEPRECATED void OnNewRdkDocument (void)
 
virtual void OnObjectMaterialAssignmentChanged (const CRhinoDoc &doc, const CRhinoObject &obj, const UUID &uuidInstanceNew, const UUID &uuidInstanceOld)
 
virtual void OnPostEffectSettingsChanged (const CRhRdkDocument &rdkDoc, const void *pSender)
 
virtual void OnPreviewRendered (const CRhinoDib &dib, RhRdkPreviewQuality qual, const CRhRdkPreviewJobSignature &sig)
 
virtual void OnRenderEngineStateChanged (bool bBusy)
 
virtual void OnRendererChanged (void)
 
virtual void OnRenderingDeleted (const IRhRdkRenderingFileInfo &info)
 
virtual RDK_DEPRECATED void OnRenderingFinished (bool bSuccessful)
 
virtual void OnRenderingFinished (const IRhRdkRenderSession &session, bool bSuccess)
 
virtual void OnRenderingLoaded (const IRhRdkRenderingFileInfo &info)
 
virtual void OnRenderingSaved (const IRhRdkRenderingFileInfo &info)
 
virtual void OnRenderingSettingsChanged (const CRhRdkDocument &rdkDoc, rendering_info info, const void *pSender)
 
virtual void OnRenderWindowCloned (const UUID &uuidRenderSessionOld, const UUID &uuidRenderSessionNew)
 
virtual RDK_DEPRECATED void OnReplaceRhinoObject (CRhinoDoc &, CRhinoObject &, CRhinoObject &)
 
virtual void OnRhinoSettingsChanged (const CRhRdkDocument &rdkDoc)
 
virtual void OnSafeFrameSettingsChanged (const CRhRdkDocument &rdkDoc, const IRhRdkSafeFrame &newSF, const IRhRdkSafeFrame &oldSF, const void *pSender)
 
virtual void OnSelectionChanged (const CRhRdkDocument &rdkDoc)
 
virtual RDK_DEPRECATED void OnSelectionChanged (CRhinoDoc &)
 
virtual void OnSkylightSettingsChanged (const CRhRdkDocument &rdkDoc, const IRhRdkSkylight &newSun, const IRhRdkSkylight &oldSun, const void *pSender)
 
virtual void OnSunSettingsChanged (const CRhRdkDocument &rdkDoc, const IRhRdkSun &newSun, const IRhRdkSun &oldSun, const void *pSender)
 
virtual void OnUndoRedo (const CRhRdkDocument &rdkDoc, bool bRedo)
 
virtual void OnUndoRedoBegin (CRhinoDoc &doc)
 
virtual void OnUndoRedoEnded (CRhinoDoc &doc)
 
virtual void OnUpdateAllPreviews (const CRhRdkDocument &rdkDoc)
 
virtual RDK_DEPRECATED void OnUpdateAllPreviews (void)
 
virtual void OnUpdateThumbDropTL (const CRhRdkDocument &)
 
virtual void OnUserDataTransformed (const CRhinoObject &obj)
 
virtual void TextureMappingTableEvent (const CRhRdkDocument &rdkDoc, const ON_TextureMapping &tm)
 
virtual RDK_DEPRECATED void TextureMappingTableEvent (const ON_TextureMapping &)
 

Detailed Description

Base class for auto-registering 'event watchers'. To allow a class to receive events, derive it from CRhRdkEventWatcher and override the methods which you want to be called on. Some of these methods may be called with nullptr pointers. Event handlers must check all incoming pointers for nullptr before dereferencing them unless otherwise stated.

The RDK event 'watcher' is designed to be a replacement for the RDK event 'sink' system. Currently both systems are used at the same time, although event sinks are deprecated and never called. New clients should use event watchers instead of event sinks.

Member Enumeration Documentation

◆ AttachReason

enum CRhRdkEventWatcher::AttachReason : unsigned int
strong

Reason content is being attached to a document.

See also
OnContentAttached,
CRhRdkDocument::AttachContent()
Enumerator
Attach 
Change 
Undo 
Open 
Edit 

◆ AutoDeletionStateChange

enum CRhRdkEventWatcher::AutoDeletionStateChange : unsigned int
strong

Used by the OnContentAutoDeletion event.

Enumerator
Enter 
Leave 

◆ DetachReason

enum CRhRdkEventWatcher::DetachReason : unsigned int
strong

Reason content is being detached from a document or a document decal.

See also
OnContentDetaching,
CRhRdkDocument::DetachContent(),
CRhRdkContent::Delete()
Enumerator
Detach 
Change 
Undo 
Delete 
Edit 

◆ eCRMChanged

Called when a custom render mesh is changed.

Enumerator
kSingleObject 
kWholeDocument 
kDocumentRenderMeshes 

◆ rendering_info

Values for OnRenderingSettingsChanged 'info' parameter.

Enumerator
ri_save_support_files 
ri_dithering 
ri_gamma 
ri_use_linear_workflow 
ri_tone_mapping 
ri_tone_mapper_params 
ri_custom_reflective_env 
ri_rhino_settings 
ri_render_channels 
ri_safe_frame 
ri_ground_plane 
ri_skylight 
ri_sun 
ri_background_env 
ri_custom_skylight_env 
ri_gamma_linear_workflow 
ri_post_effects 
ri_force32bit 

Constructor & Destructor Documentation

◆ CRhRdkEventWatcher()

CRhRdkEventWatcher::CRhRdkEventWatcher ( bool  bAutoRegister = true)

◆ ~CRhRdkEventWatcher()

virtual CRhRdkEventWatcher::~CRhRdkEventWatcher ( )
virtual

Member Function Documentation

◆ Enable()

virtual void CRhRdkEventWatcher::Enable ( bool  bEnable) const
virtual

◆ EVF()

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

Emergency virtual function for future expansion.

◆ IsEnabled()

virtual bool CRhRdkEventWatcher::IsEnabled ( void  ) const
virtual

◆ OnAddRhinoObject()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnAddRhinoObject ( CRhinoDoc ,
CRhinoObject  
)
inlinevirtual

◆ OnAllFactoriesAdded()

virtual void CRhRdkEventWatcher::OnAllFactoriesAdded ( void  )
virtual

Called after all content factories, CCIs, PEPs, registered properties, custom render meshes, content I/O plug-ins and custom plug-ins have been added.

◆ OnAutomaticParamChanged()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnAutomaticParamChanged ( HWND  ,
DWORD_PTR   
)
inlinevirtual

◆ OnCacheImageChanged()

virtual void CRhRdkEventWatcher::OnCacheImageChanged ( void  )
virtual

Called when an image in the thumbnail cache is changed.

◆ OnClientPlugInUnloading()

virtual void CRhRdkEventWatcher::OnClientPlugInUnloading ( const UUID &  uuidPlugIn)
virtual

Called when a client plug-in is about to be unloaded.

Parameters
uuidPlugInis the plug-in id of the client's RDK plug-in.

◆ OnContentAdded()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentAdded ( const CRhRdkContent )
inlinevirtual

If you were watching for OnContentAdded you now probably want to watch for OnContentAttached instead.

◆ OnContentAddedByUser()

virtual void CRhRdkEventWatcher::OnContentAddedByUser ( const CRhRdkDocument rdkDoc,
const CRhRdkContentArray aContent,
bool  bNameWasLoaded 
)
virtual

Called after content is attached to a document by a user action such as Create New, Paste, Duplicate etc.

Parameters
rdkDocis the RDK document the content was attached to.
aContentis an array of content that was added.
bNameWasLoadedis true if content's name was loaded from a file, otherwise false.

◆ OnContentAttached()

virtual void CRhRdkEventWatcher::OnContentAttached ( const CRhRdkDocument rdkDoc,
const CRhRdkContent c,
AttachReason  r 
)
virtual

Called just after a content is attached to a document or a document decal.

Parameters
rdkDocis the RDK document the content was attached to, or the document the decal is attached to.
cis the content that was attached.
ris the reason the content was attached.

◆ OnContentAutoDeletion()

virtual void CRhRdkEventWatcher::OnContentAutoDeletion ( const CRhRdkDocument rdkDoc,
const CRhRdkContent c,
AutoDeletionStateChange  change 
)
virtual

Called when a content enters or leaves the auto-deletion state.

Note
This only applies to content that is attached to a document.
Parameters
rdkDocis the RDK document the content is attached to.
cis the content.
changeis the auto-deletion state change. A content enters the auto-deletion state when its auto-delete flag is true and its use count is lowered from 1 to 0. When in this state, the content is ignored by content UI that would usually display a representation of the content. A content leaves the auto-deletion state when its auto-delete flag is true and its use count is raised from 0 to 1. In this state, the content is displayed by content UI in the usual way.

◆ OnContentBlossomBegin()

virtual void CRhRdkEventWatcher::OnContentBlossomBegin ( const CRhRdkBasicMaterial v4Material)
virtual

Called when a V4 material is about to become an RDK material.

Parameters
v4Materialis the V4 material.

◆ OnContentBlossomEnd() [1/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentBlossomEnd ( const CRhRdkBasicMaterial )
inlinevirtual

◆ OnContentBlossomEnd() [2/2]

virtual void CRhRdkEventWatcher::OnContentBlossomEnd ( const CRhRdkBasicMaterial pBlossom)
virtual

Called after a V4 material has become an RDK material.

Parameters
pBlossomis a pointer to the RDK material, or nullptr if failed.

◆ OnContentChanged() [1/2]

virtual void CRhRdkEventWatcher::OnContentChanged ( const CRhRdkContent c,
const CRhRdkContent old,
RhRdkChangeContext  cc 
)
virtual

Called when a content is changed. Called for all content changes, document or not.

Parameters
cis the content that changed.
oldis the old content. This is a temporary object with a different instance id to the original.
ccis the context of the change.

◆ OnContentChanged() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentChanged ( const CRhRdkContent ,
RhRdkChangeContext   
)
inlinevirtual

◆ OnContentCurrencyChanged()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentCurrencyChanged ( const wchar_t *  ,
const CRhRdkContent  
)
inlinevirtual

◆ OnContentDeleted()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentDeleted ( void  )
inlinevirtual

If you were watching for OnContentDeleted you now probably want to watch for OnContentDetached instead.

◆ OnContentDeleting()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentDeleting ( const CRhRdkContent )
inlinevirtual

If you were watching for OnContentDeleting you now probably want to watch for OnContentDetaching instead.

◆ OnContentDetached()

virtual void CRhRdkEventWatcher::OnContentDetached ( const CRhRdkDocument rdkDoc,
const CRhRdkContent c,
DetachReason  r 
)
virtual

Called just after a content is detached from a document or a document decal.

Parameters
rdkDocis the RDK document the content was detached from or the document the decal is attached to.
cis the content that was detached.
ris the reason the content was detached.

◆ OnContentDetaching()

virtual void CRhRdkEventWatcher::OnContentDetaching ( const CRhRdkDocument rdkDoc,
const CRhRdkContent c,
DetachReason  r 
)
virtual

Called just before a content is detached from a document or a document decal.

Parameters
rdkDocis the RDK document the content is about to be detached from or the document the decal is attached to.
cis the content that is being detached.
ris the reason the content is being detached.

◆ OnContentEditorActivated()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentEditorActivated ( const IRhRdkContentEditor )
inlinevirtual

◆ OnContentEditorExtended()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentEditorExtended ( bool  )
inlinevirtual

◆ OnContentFilterChanged() [1/2]

virtual void CRhRdkEventWatcher::OnContentFilterChanged ( const CRhRdkDocument rdkDoc,
const CRhRdkUuidCollection excludedRenderEngines 
)
virtual

Called when the content filter dialog is dismissed with the OK button.

◆ OnContentFilterChanged() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentFilterChanged ( const CRhRdkUuidCollection )
inlinevirtual

◆ OnContentGroupIdChanged()

virtual void CRhRdkEventWatcher::OnContentGroupIdChanged ( const CRhRdkContent c,
const UUID &  uuidGroupNew,
const UUID &  uuidGroupOld 
)
virtual

Called when a content's group id changes. The group id controls 'instancing'. Contents with the same group id stay in synch with each other's settings.

Parameters
cis the content.
uuidGroupNewis the new group id.
uuidGroupOldis the old group id.

◆ OnContentListCleared() [1/2]

virtual void CRhRdkEventWatcher::OnContentListCleared ( const CRhRdkDocument rdkDoc,
const IRhRdkContentList list 
)
virtual

Called just after a persistent content list has been cleared.

Parameters
rdkDocis the RDK document that the list exists in.
listis the list that was cleared.

◆ OnContentListCleared() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentListCleared ( const IRhRdkContentList )
inlinevirtual

◆ OnContentListClearing() [1/2]

virtual void CRhRdkEventWatcher::OnContentListClearing ( const CRhRdkDocument rdkDoc,
const IRhRdkContentList list 
)
virtual

Called just before a persistent content list is cleared.

Parameters
rdkDocis the RDK document the list exists in.
listis the list being cleared.

◆ OnContentListClearing() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentListClearing ( const IRhRdkContentList )
inlinevirtual

◆ OnContentListLoaded() [1/2]

virtual void CRhRdkEventWatcher::OnContentListLoaded ( const CRhRdkDocument rdkDoc,
const IRhRdkContentList list 
)
virtual

Called just after a persistent content list has been loaded (e.g., from a .3dm file).

Parameters
rdkDocis the RDK document the list exists in.
listis the list that was loaded.

◆ OnContentListLoaded() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentListLoaded ( const IRhRdkContentList )
inlinevirtual

◆ OnContentMoved()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentMoved ( const CRhRdkContent ,
const CRhRdkContent ,
const IRhRdkContentEditor  
)
inlinevirtual

◆ OnContentNotesChanged()

virtual void CRhRdkEventWatcher::OnContentNotesChanged ( const CRhRdkContent c)
virtual

Called after a content's notes have been changed. Called for all contents, document or not.

Parameters
cis the content whose notes were changed.

◆ OnContentNotesChanging()

virtual void CRhRdkEventWatcher::OnContentNotesChanging ( const CRhRdkContent c)
virtual

Called before a content's notes are changed. Called for all contents, document or not.

Parameters
cis the content whose notes are changing.

◆ OnContentRenamed() [1/2]

virtual void CRhRdkEventWatcher::OnContentRenamed ( const CRhRdkContent c)
virtual

Called after a content's name has been changed. Called for all contents, document or not.

Parameters
cis the content that was renamed.

◆ OnContentRenamed() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentRenamed ( const CRhRdkContent )
inlinevirtual

◆ OnContentRenaming()

virtual void CRhRdkEventWatcher::OnContentRenaming ( const CRhRdkContent c)
virtual

Called before a content's name is changed. Called for all contents, document or not.

Parameters
cis the content that is being renamed.

◆ OnContentReplaced() [1/2]

virtual void CRhRdkEventWatcher::OnContentReplaced ( const CRhRdkDocument rdkDoc,
const CRhRdkContent newContent 
)
virtual

Called just after a content is replaced in the document. Replacing a content involves several operations: 1. Detaching the old content, 2. Deleting the old content, 3. Attaching the new content. Together, the OnContentReplacing() and OnContentReplaced() events bracket this operation enabling clients to determine when the sequence begins and ends.

Parameters
newContentis the content that has replaced the old content.

◆ OnContentReplaced() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentReplaced ( CRhRdkContent )
inlinevirtual

◆ OnContentReplacing() [1/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentReplacing ( const CRhRdkContent )
inlinevirtual

◆ OnContentReplacing() [2/2]

virtual void CRhRdkEventWatcher::OnContentReplacing ( const CRhRdkDocument rdkDoc,
const CRhRdkContent oldContent 
)
virtual

Called just before a content is replaced in the document. Replacing a content involves several operations: 1. Detaching the old content, 2. Deleting the old content, 3. Attaching the new content. Together, the OnContentReplacing() and OnContentReplaced() events bracket this operation enabling clients to determine when the sequence begins and ends.

Parameters
oldContentis the content that is about to be replaced.

◆ OnContentSelected()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentSelected ( const CRhRdkContent ,
const IRhRdkContentEditor  
)
inlinevirtual

◆ OnContentSelection()

virtual void CRhRdkEventWatcher::OnContentSelection ( const CRhRdkContentArray aContentSel,
const CRhRdkContentArray aContentEdit,
const UUID &  uuidEditor 
)
virtual

Called when one or more contents are selected in an editor.

Parameters
aContentSelis the array of contents being selected.
aContentEditis the array of contents that can actually be edited. Some contents in the selection may not be editable because of modal editing restrictions or because they are surrogates or reference contents.
uuidEditoris the id of the editor the content is being selected in.

◆ OnContentTagsChanged()

virtual void CRhRdkEventWatcher::OnContentTagsChanged ( const CRhRdkContent c)
virtual

Called after a content's tags have been changed. Called for all contents, document or not.

Parameters
cis the content whose tags were changed.

◆ OnContentTagsChanging()

virtual void CRhRdkEventWatcher::OnContentTagsChanging ( const CRhRdkContent c)
virtual

Called before a content's tags are changed. Called for all contents, document or not.

Parameters
cis the content whose tags are changing.

◆ OnContentUpdateMarkers() [1/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentUpdateMarkers ( const CRhRdkContent )
inlinevirtual

◆ OnContentUpdateMarkers() [2/2]

virtual void CRhRdkEventWatcher::OnContentUpdateMarkers ( const CRhRdkDocument rdkDoc,
CRhRdkContent::Kinds  kind 
)
virtual

This event is used internally by RDK. Do not override this method.

◆ OnContentUpdatePreview() [1/2]

virtual void CRhRdkEventWatcher::OnContentUpdatePreview ( const CRhRdkContent c)
virtual

Called when a content preview needs to be updated.

Parameters
cis the content whose preview needs to be updated.

◆ OnContentUpdatePreview() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnContentUpdatePreview ( const CRhRdkContent )
inlinevirtual

◆ OnCurrentEnvironmentChanged()

virtual void CRhRdkEventWatcher::OnCurrentEnvironmentChanged ( const CRhRdkDocument rdkDoc,
IRhRdkCurrentEnvironment::Usage  usage,
const CRhRdkContent pContent 
)
virtual

Called when a 'current environment' is changed. There are three current environment 'usages' which are marked in the thumbnail editor with small triangles. This event is sent when a new environment is made current or when a current environment is deleted so that there is no current environment for that usage.

See also
CRhRdkEnvironment::eUsage.
Parameters
rdkDocis the document that the content is attached to.
usageis the environment usage that was changed.
pContentis a pointer to the content. This pointer will be null if no environment is current for the specified usage.

◆ OnCustomEvent()

virtual void CRhRdkEventWatcher::OnCustomEvent ( const UUID &  uuidCode,
void *  pvContext 
)
virtual

Custom event.

◆ OnCustomRenderMeshesChanged()

virtual void CRhRdkEventWatcher::OnCustomRenderMeshesChanged ( const CRhRdkDocument rdkDoc,
const CRhinoObject pObject,
eCRMChanged  crmc 
)
virtual

◆ OnDecalAdded()

virtual void CRhRdkEventWatcher::OnDecalAdded ( const CRhinoObject obj,
const IRhRdkDecal decal 
)
virtual

◆ OnDecalDeleted()

virtual void CRhRdkEventWatcher::OnDecalDeleted ( const CRhinoObject obj,
RDK_DECAL_CRC  old_decal_crc 
)
virtual

◆ OnDecalModified()

virtual void CRhRdkEventWatcher::OnDecalModified ( const CRhinoObject obj,
const IRhRdkDecal decal,
RDK_DECAL_CRC  old_decal_crc 
)
virtual

◆ OnDeleteRhinoObject()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnDeleteRhinoObject ( CRhinoDoc ,
CRhinoObject  
)
inlinevirtual

◆ OnDisplayUpdateBegin()

virtual void CRhRdkEventWatcher::OnDisplayUpdateBegin ( void  )
virtual

Called when a display update bracket begins.

See also
CRhRdkDisplayUpdate

◆ OnDisplayUpdateEnded()

virtual void CRhRdkEventWatcher::OnDisplayUpdateEnded ( void  )
virtual

Called when a display update bracket has ended.

See also
CRhRdkDisplayUpdate

◆ OnDocumentSettingsChanged()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnDocumentSettingsChanged ( UINT  ,
UINT_PTR   
)
inlinevirtual

OnDocumentSettingsChanged has been replaced by individual events:

OnRenderingSettingsChanged replaces CRhRdkEventSinkBase::rendering OnSunSettingsChanged replaces CRhRdkEventSinkBase::document_sun OnSafeFrameSettingsChanged replaces CRhRdkEventSinkBase::safe_frame OnGroundPlaneSettingsChanged replaces CRhRdkEventSinkBase::ground_plane OnPostEffectSettingsChanged replaces CRhRdkEventSinkBase::post_effects OnContentFilterChanged replaces CRhRdkEventSinkBase::content_filter OnCustomRenderMeshesChanged replaces CRhRdkEventSinkBase::custom_render_mesh OnUndoRedo replaces CRhRdkEventSinkBase::all

◆ OnFactoryAdded()

virtual void CRhRdkEventWatcher::OnFactoryAdded ( const CRhRdkContentFactory factory)
virtual

Called when a content factory is added to the factories collection.

◆ OnFactoryDeleted()

virtual void CRhRdkEventWatcher::OnFactoryDeleted ( CRhRdkContent::Kinds  kind)
virtual

Called when a content factory has been deleted.

◆ OnFactoryDeleting()

virtual void CRhRdkEventWatcher::OnFactoryDeleting ( const CRhRdkContentFactory factory)
virtual

Called when a content factory is about to be deleted.

◆ OnGlobalSettingsChanged()

virtual void CRhRdkEventWatcher::OnGlobalSettingsChanged ( void  )
virtual

Called after any RDK global settings have been changed.

◆ OnGroundPlaneSettingsChanged()

virtual void CRhRdkEventWatcher::OnGroundPlaneSettingsChanged ( const CRhRdkDocument rdkDoc,
const IRhRdkGroundPlane newGP,
const IRhRdkGroundPlane oldGP,
const void *  pSender 
)
virtual

Called after the document ground plane settings have been changed.

Parameters
rdkDocis the document whose ground plane was changed.
newGPis an interface which provides the settings after the change.
oldGPis an interface which provides the settings before the change.
pSenderis for internal use only.

◆ OnInternalProxyUpdate()

virtual void CRhRdkEventWatcher::OnInternalProxyUpdate ( const CRhRdkInstanceIdArray ,
UINT_PTR   
)
inlinevirtual

◆ OnLayerMaterialAssignmentChanged()

virtual void CRhRdkEventWatcher::OnLayerMaterialAssignmentChanged ( const CRhinoDoc doc,
const CRhinoLayer layer,
const UUID &  uuidInstanceNew,
const UUID &  uuidInstanceOld 
)
virtual

Called when a layer's material assignment has changed.

Parameters
docis the document.
layeris the Rhino layer in the document layer table.
uuidInstanceNewis the new RDK material assignment. May be nil.
uuidInstanceOldis the old RDK material assignment. May be nil.

◆ OnLazyTimer()

virtual void CRhRdkEventWatcher::OnLazyTimer ( void  )
virtual

Called approximately every 300 milliseconds.

◆ OnMenuChecksDirty()

virtual void CRhRdkEventWatcher::OnMenuChecksDirty ( void  )
virtual

OBSOLETE - not called.

◆ OnModifyObjectTextureMapping() [1/2]

virtual void CRhRdkEventWatcher::OnModifyObjectTextureMapping ( const CRhRdkDocument rdkDoc,
const CRhinoObject obj 
)
virtual

◆ OnModifyObjectTextureMapping() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnModifyObjectTextureMapping ( CRhinoDoc ,
const CRhinoObject  
)
inlinevirtual

◆ OnNewRdkDocument() [1/2]

virtual void CRhRdkEventWatcher::OnNewRdkDocument ( const CRhRdkDocument )
virtual

Called after a new document has been created or loaded.

◆ OnNewRdkDocument() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnNewRdkDocument ( void  )
inlinevirtual

◆ OnObjectMaterialAssignmentChanged()

virtual void CRhRdkEventWatcher::OnObjectMaterialAssignmentChanged ( const CRhinoDoc doc,
const CRhinoObject obj,
const UUID &  uuidInstanceNew,
const UUID &  uuidInstanceOld 
)
virtual

Called when an object's material assignment has changed.

Parameters
docis the document.
objis the Rhino object in the document.
uuidInstanceNewis the new RDK material assignment. May be nil.
uuidInstanceOldis the old RDK material assignment. May be nil.

◆ OnPostEffectSettingsChanged()

virtual void CRhRdkEventWatcher::OnPostEffectSettingsChanged ( const CRhRdkDocument rdkDoc,
const void *  pSender 
)
virtual

Called after the document post effect settings have been changed.

Parameters
rdkDocis the document whose post effects were changed.
pSenderis for internal use only.

◆ OnPreviewRendered()

virtual void CRhRdkEventWatcher::OnPreviewRendered ( const CRhinoDib dib,
RhRdkPreviewQuality  qual,
const CRhRdkPreviewJobSignature &  sig 
)
virtual

Called when a preview has been rendered. If you are implementing a UI which is interested in previews, you can check the quality and signature and optionally copy the dib for use in your UI.

Parameters
dibis the rendered preview.
qualis the quality of the rendered preview.
sigis the job signature of the rendered preview.

◆ OnRenderEngineStateChanged()

virtual void CRhRdkEventWatcher::OnRenderEngineStateChanged ( bool  bBusy)
virtual

Called when a render engine becomes busy or idle during preview updates.

◆ OnRendererChanged()

virtual void CRhRdkEventWatcher::OnRendererChanged ( void  )
virtual

Called when Rhino's current renderer has changed.

◆ OnRenderingDeleted()

virtual void CRhRdkEventWatcher::OnRenderingDeleted ( const IRhRdkRenderingFileInfo info)
virtual

Called when a rendering has been deleted. These are stored in .rimage files.

Parameters
infocontains information about the file that was deleted.

◆ OnRenderingFinished() [1/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnRenderingFinished ( bool  bSuccessful)
virtual

This event is deprecated in favor of the one below. THIS EVENT IS NO LONGER SENT.

◆ OnRenderingFinished() [2/2]

virtual void CRhRdkEventWatcher::OnRenderingFinished ( const IRhRdkRenderSession session,
bool  bSuccess 
)
virtual

Called when rendering finishes.

Parameters
bSuccessis true if rendering completed sucessfully, else false.

◆ OnRenderingLoaded()

virtual void CRhRdkEventWatcher::OnRenderingLoaded ( const IRhRdkRenderingFileInfo info)
virtual

Called when a rendering has been loaded. These are stored in .rimage files.

Parameters
infocontains information about the file that was loaded.

◆ OnRenderingSaved()

virtual void CRhRdkEventWatcher::OnRenderingSaved ( const IRhRdkRenderingFileInfo info)
virtual

Called when a rendering has been saved. These are stored in .rimage files.

Parameters
infocontains information about the file that was saved.

◆ OnRenderingSettingsChanged()

virtual void CRhRdkEventWatcher::OnRenderingSettingsChanged ( const CRhRdkDocument rdkDoc,
rendering_info  info,
const void *  pSender 
)
virtual

Called after the document rendering settings have been changed.

Parameters
rdkDocis the document whose settings were changed.
infoindicates what was changed.
pSenderis for internal use only.

◆ OnRenderWindowCloned()

virtual void CRhRdkEventWatcher::OnRenderWindowCloned ( const UUID &  uuidRenderSessionOld,
const UUID &  uuidRenderSessionNew 
)
virtual

Called when a render window has been cloned.

Parameters
uuidRenderSessionOldis the render session id of the original render window.
uuidRenderSessionNewis the render session id of the cloned render window.

◆ OnReplaceRhinoObject()

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnReplaceRhinoObject ( CRhinoDoc ,
CRhinoObject ,
CRhinoObject  
)
inlinevirtual

◆ OnRhinoSettingsChanged()

virtual void CRhRdkEventWatcher::OnRhinoSettingsChanged ( const CRhRdkDocument rdkDoc)
virtual

Called when certain Rhino settings are changed through an RDK document.

See also
IRhRdkRhinoSettings

◆ OnSafeFrameSettingsChanged()

virtual void CRhRdkEventWatcher::OnSafeFrameSettingsChanged ( const CRhRdkDocument rdkDoc,
const IRhRdkSafeFrame newSF,
const IRhRdkSafeFrame oldSF,
const void *  pSender 
)
virtual

Called after the document safe frame settings have been changed.

Parameters
rdkDocis the document whose safe frame was changed.
newSFis an interface which provides the settings after the change.
oldSFis an interface which provides the settings before the change.
pSenderis for internal use only.

◆ OnSelectionChanged() [1/2]

virtual void CRhRdkEventWatcher::OnSelectionChanged ( const CRhRdkDocument rdkDoc)
virtual

Called when the number of selected Rhino objects changes.

◆ OnSelectionChanged() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnSelectionChanged ( CRhinoDoc )
inlinevirtual

◆ OnSkylightSettingsChanged()

virtual void CRhRdkEventWatcher::OnSkylightSettingsChanged ( const CRhRdkDocument rdkDoc,
const IRhRdkSkylight newSun,
const IRhRdkSkylight oldSun,
const void *  pSender 
)
virtual

Called after the document skylight settings have been changed.

Parameters
rdkDocis the document whose skylight was changed.
newSunis an interface which provides the settings after the change.
oldSunis an interface which provides the settings before the change.
pSenderis for internal use only.

◆ OnSunSettingsChanged()

virtual void CRhRdkEventWatcher::OnSunSettingsChanged ( const CRhRdkDocument rdkDoc,
const IRhRdkSun newSun,
const IRhRdkSun oldSun,
const void *  pSender 
)
virtual

Called after the document sun settings have been changed.

Parameters
rdkDocis the document whose sun was changed.
newSunis an interface which provides the settings after the change.
oldSunis an interface which provides the settings before the change.
pSenderis for internal use only.

◆ OnUndoRedo()

virtual void CRhRdkEventWatcher::OnUndoRedo ( const CRhRdkDocument rdkDoc,
bool  bRedo 
)
virtual

Called after undo or redo has occurred for document settings.

Parameters
rdkDocis the document that changed.
bRedois false for undo or true for redo.

◆ OnUndoRedoBegin()

virtual void CRhRdkEventWatcher::OnUndoRedoBegin ( CRhinoDoc doc)
virtual

Called when an undo or redo operation begins.

◆ OnUndoRedoEnded()

virtual void CRhRdkEventWatcher::OnUndoRedoEnded ( CRhinoDoc doc)
virtual

Called when an undo or redo operation has ended.

◆ OnUpdateAllPreviews() [1/2]

virtual void CRhRdkEventWatcher::OnUpdateAllPreviews ( const CRhRdkDocument rdkDoc)
virtual

Called when all content previews need to be updated.

◆ OnUpdateAllPreviews() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::OnUpdateAllPreviews ( void  )
inlinevirtual

◆ OnUpdateThumbDropTL()

virtual void CRhRdkEventWatcher::OnUpdateThumbDropTL ( const CRhRdkDocument )
inlinevirtual

◆ OnUserDataTransformed()

virtual void CRhRdkEventWatcher::OnUserDataTransformed ( const CRhinoObject obj)
virtual

Called after any RDK user data has been transformed This can be used to capture decal transformation.

◆ TextureMappingTableEvent() [1/2]

virtual void CRhRdkEventWatcher::TextureMappingTableEvent ( const CRhRdkDocument rdkDoc,
const ON_TextureMapping tm 
)
virtual

◆ TextureMappingTableEvent() [2/2]

virtual RDK_DEPRECATED void CRhRdkEventWatcher::TextureMappingTableEvent ( const ON_TextureMapping )
inlinevirtual