| GL Studio C++ Runtime API

Public Types | Public Member Functions | Protected Attributes | List of all members
KeyboardMethodCallback< T > Class Template Reference

`#include <input_handler.h>`

Inheritance diagram for KeyboardMethodCallback< T >:

## 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

  method | Function pointer to call back.
  object | The object containing the function pointer.

## Member Function Documentation

## ◆ Call()

void Call | ( | KeyboardEvent * | ev | ) |
| inline override virtual

Call the callback with the provided display event.

Parameters

  ev | The event to process.

Implements KeyboardCallbackBase.

## ◆ IsValid()

virtual bool IsValid | ( |  | ) | const
| inline override virtual

Returns
  True if the callback is valid to call.

Implements KeyboardCallbackBase.

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

- input_handler.h