GL Studio C++ Runtime API
MouseMethodCallback< T > Class Template Reference

#include <input_handler.h>

Inheritance diagram for MouseMethodCallback< T >:
MouseCallbackBase

Public Types

typedef void(T::* Callback) (MouseEvent *ev)
 Typedef for a function pointer accepting a mouse event.
 

Public Member Functions

 MouseMethodCallback (Callback method, T *object)
 
void Call (MouseEvent *ev) override
 
virtual bool IsValid () const override
 
virtual void Call (MouseEvent *ev)=0
 
virtual bool IsValid () const =0
 

Protected Attributes

Callback _method
 The function pointer to call back.
 
WeakRef< T > _object
 The object containing the function pointer.
 

Detailed Description

template<class T>
class disti::MouseMethodCallback< T >

Interface for creating a callback from a class method. The class must implement WeakReferenceable. Don't use this directly. Use CreateInputHandlerCallback instead

Constructor & Destructor Documentation

◆ MouseMethodCallback()

MouseMethodCallback ( Callback  method,
T *  object 
)
inline

Constructor

Parameters
methodFunction pointer to call back.
objectThe object containing the function pointer.

Member Function Documentation

◆ Call()

void Call ( MouseEvent ev)
inlineoverridevirtual

Call the callback with the provided display event.

Parameters
evThe event to process.

Implements MouseCallbackBase.

◆ IsValid()

virtual bool IsValid ( ) const
inlineoverridevirtual
Returns
True if the callback is valid to call.

Implements MouseCallbackBase.


The documentation for this class was generated from the following file: