|
||
The LocationChange Event |
|
|||||||
Synopsis |
The LocationChange event is raised whenever the position of the 3D cursor changes.
|
|
||||||
Delegate |
The LocationChange delegate is declared as follows:
A delegate is similar to a C/C++ function pointer, but delegates are type-safe and can only refer to a method that matches the signature of the delegate. The LocationChange delegate declares a function signature that must be used when installing an event handler for the LocationChange event.
|
|
||||||
Event |
The LocationChange event is declared within Events as follows:
An event maintains a list of methods to call when it is raised (usually in response to an important activity). LocationChange allows your application to subscribe to or unsubscribe from the LocationChange event.
|
|
||||||
Raise method |
The method to raise the LocationChange event is declared within Events as follows:
The SilverSharp assembly will automatically raise the LocationChange event when the 3D Cursor position is changed. It would not be typical for a SilverSharp application to raise the event itself.
|
|
||||||
See Also |
|
|||||||
Example |
The following code shows a sample LocationChange event handler. Note that the method declaration must match the delegate for this event in parameters and return type:
The following example shows how to subscribe to the LocationChange event, assigning the above handler:
The following example shows how to unsubscribe from the LocationChange event, removing the above handler:
|
|