The EventHandler class is the base class for any event handler that can be created. All custom event handlers should inherit from this. More...
Public Types | |
enum | HandleResult { HandleResult.Handled = 0, HandleResult.NotHandled = 1 } |
Enumeration of the values the EventHandler uses to indicate if it handled an event. More... | |
Public Member Functions | |
override void | Dispose () |
EventHandler () | |
The default constructor creates an EventHandler object not subscribed to any event. More... | |
EventHandler (HPS.EventHandler in_that) | |
The copy constructor creates a new EventHandler object that points to the same underlying impl as the source EventHandler. More... | |
override HPS.Type | ObjectType () |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object. More... | |
bool | Subscribe (HPS.EventDispatcher in_dispatcher, IntPtr in_type) |
Add this EventHandler object to the list of subscribers for events of the specified type on the specified EventDispatcher. More... | |
bool | UnSubscribe (HPS.EventDispatcher in_dispatcher, IntPtr in_type) |
Remove this EventHandler object from the list of subscribers for events of the specified type on the specified EventDispatcher. More... | |
bool | UnSubscribe (HPS.EventDispatcher in_dispatcher) |
Remove this EventHandler object from the list of subscribers for all events on the specified EventDispatcher. More... | |
void | UnSubscribeEverything () |
Remove this EventHandler object from all events on all EventDispatchers. More... | |
override void | Reset () |
Resets this object to its initial, uninitialized state. More... | |
void | Shutdown () |
Notifies the EventDispatcher that this handler is being invalidated and no further events should be dispatched to it. This method must be called in any derived class destructors. More... | |
virtual HPS.EventHandler.HandleResult | Handle (HPS.Event in_event) |
Function that gets triggered if this EventHandler receives an event it is subscribed to. This should be overridden by subclasses of EventHandler to perform any custom behavior. More... | |
delegate HPS.Type | EventHandlerDelegate_0 () |
delegate void | EventHandlerDelegate_1 () |
delegate HPS.EventHandler.HandleResult | EventHandlerDelegate_2 (IntPtr in_event) |
delegate bool | EventHandlerDelegate_3 () |
![]() | |
IntPtr | GetClassID () |
Object (HPS.Object in_that) | |
The move constructor creates an Object by transferring the underlying impl of the rvalue reference to this Object thereby avoiding a copy and allocation. More... | |
HPS.Type | Type () |
This function returns the true type of the underlying object. This function is useful for finding the type of smart pointer objects that have been cast to more generic types. More... | |
virtual bool | Empty () |
Indicates whether this object has any values set on it. More... | |
bool | HasType (HPS.Type in_mask) |
This function indicates whether this Object has the given Type mask. More... | |
IntPtr | GetInstanceID () |
Returns an identifier that can be used to identify which instance of a class an object is. Different keys and controls will return the same value if they are backed by the same database resource. More... | |
Protected Member Functions | |
override void | deleteCptr () |
override IntPtr | GetNonDirectorClassID () |
Additional Inherited Members | |
![]() | |
static IntPtr | ClassID< T > () |
![]() | |
HandleRef | cptr |
HandleRef | scptr |
bool | cMemOwn |
The EventHandler class is the base class for any event handler that can be created. All custom event handlers should inherit from this.
Enumeration of the values the EventHandler uses to indicate if it handled an event.
Enumerator | |
---|---|
Handled |
The event was handled by this EventHandler. Consume the event if possible. |
NotHandled |
The event was not handled by this EventHandler. Pass to the next handler if any or if possible. |
|
inline |
The default constructor creates an EventHandler object not subscribed to any event.
|
inline |
The copy constructor creates a new EventHandler object that points to the same underlying impl as the source EventHandler.
in_that | The source <ref refid="class_h_p_s_1_1_event_handler" kindref="compound">EventHandler</ref> to point to. |
|
inlinevirtual |
Function that gets triggered if this EventHandler receives an event it is subscribed to. This should be overridden by subclasses of EventHandler to perform any custom behavior.
in_event | <ref refid="class_h_p_s_1_1_event" kindref="compound">Event</ref> which was triggered. |
|
inlinevirtual |
This function returns the type the object, as declared. This does not necessarily give the true type of the underlying object.
Reimplemented from HPS.Object.
|
inlinevirtual |
Resets this object to its initial, uninitialized state.
Reimplemented from HPS.Object.
|
inline |
Notifies the EventDispatcher that this handler is being invalidated and no further events should be dispatched to it. This method must be called in any derived class destructors.
|
inline |
Add this EventHandler object to the list of subscribers for events of the specified type on the specified EventDispatcher.
in_dispatcher | Dispatcher from which to receive events of the given type. |
in_type | Type of event to receive from the dispatcher. |
|
inline |
Remove this EventHandler object from the list of subscribers for events of the specified type on the specified EventDispatcher.
in_dispatcher | Dispatcher from which to no longer receive events of the given type. |
in_type | Type of event to no longer receive from the dispatcher. |
|
inline |
Remove this EventHandler object from the list of subscribers for all events on the specified EventDispatcher.
in_dispatcher | Dispatcher from which to no longer receive events. |
|
inline |
Remove this EventHandler object from all events on all EventDispatchers.