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

#include <input_handler.h>

Inheritance diagram for KeyboardMethodCallback< T >:
KeyboardCallbackBase

Public Types

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

Public Member Functions

 KeyboardMethodCallback (Callback method, T *object)
 
void Call (KeyboardEvent *ev) override
 
virtual bool IsValid () const override
 
virtual void Call (KeyboardEvent *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::KeyboardMethodCallback< 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

◆ KeyboardMethodCallback()

KeyboardMethodCallback ( Callback  method,
T *  object 
)
inline

Constructor

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

Member Function Documentation

◆ Call()

void Call ( KeyboardEvent ev)
inlineoverridevirtual

Call the callback with the provided display event.

Parameters
evThe event to process.

Implements KeyboardCallbackBase.

◆ IsValid()

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

Implements KeyboardCallbackBase.


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