EventWatcher
An instance-based watcher for document and object events that can be notified for headless documents.
The static events on RhinoDoc are never raised for headless documents (a headless document is one created with RhinoDoc.CreateHeadless(string) or RhinoDoc.OpenHeadless(string), as used by Rhino.Inside and Rhino.Compute). Create an EventWatcher with includeHeadlessDocuments set to true to receive events for those documents as well.
IMPORTANT: When watching headless documents, events may be raised on a thread other than the main/UI thread, because headless documents can be created and read on background threads. Handlers must be thread-safe and must not assume they are running on the UI thread.
Call Dispose() when the watcher is no longer needed to stop receiving events and release the underlying native watcher.
Constructors
Creates a new event watcher and begins watching.
Parameters:
| includeHeadlessDocuments (bool) | When true, events are also raised for headless documents. In this case handlers may be invoked on a non-UI thread (see the remarks on EventWatcher). |
Finalizer
Properties
Methods
Events
Raised when a new object is added to a document.
Raised when a document open operation begins.
Raised when a document is closed.
Raised when an object is deleted from a document.
Raised when a document open operation ends.
Raised when a new document is created.
Raised when an object is purged from a document.
Raised when an object is about to be replaced.
Raised when a previously deleted object is un-deleted.