EventWatcher Class |
The static events on RhinoDoc are never raised for headless documents (a headless document is one created with CreateHeadless(String) or 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.
Namespace: Rhino
The EventWatcher type exposes the following members.
| Name | Description | |
|---|---|---|
| EventWatcher |
Creates a new event watcher and begins watching.
|
| Name | Description | |
|---|---|---|
| IncludeHeadlessDocuments |
Gets whether this watcher also receives events for headless documents.
|
| Name | Description | |
|---|---|---|
| Dispose |
Stops watching and releases the underlying native watcher.
| |
| Equals | Determines whether the specified object is equal to the current object. (Inherited from Object.) | |
| Finalize | Releases the native watcher if Dispose was not called. (Overrides ObjectFinalize.) | |
| GetHashCode | Serves as the default hash function. (Inherited from Object.) | |
| GetType | Gets the Type of the current instance. (Inherited from Object.) | |
| MemberwiseClone | Creates a shallow copy of the current Object. (Inherited from Object.) | |
| ToString | Returns a string that represents the current object. (Inherited from Object.) |
| Name | Description | |
|---|---|---|
| AddRhinoObject | Raised when a new object is added to a document. | |
| BeginOpenDocument | Raised when a document open operation begins. | |
| CloseDocument | Raised when a document is closed. | |
| DeleteRhinoObject | Raised when an object is deleted from a document. | |
| EndOpenDocument | Raised when a document open operation ends. | |
| NewDocument | Raised when a new document is created. | |
| PurgeRhinoObject | Raised when an object is purged from a document. | |
| ReplaceRhinoObject | Raised when an object is about to be replaced. | |
| UndeleteRhinoObject | Raised when a previously deleted object is un-deleted. |