| GL Studio C++ Runtime API

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

`#include <callback_caller.h>`

Inheritance diagram for CallbackAttributeNotifier< T >:

## Public Types
typedef void(T::* | MethodType) (void)
| Typedef for function pointer.

## Public Member Functions
| CallbackAttributeNotifier (T *container, const AttributeName &attributeName, MethodType method=NULL)
virtual CallbackMethodCallerBase * | Duplicate () const override
virtual void | SetContainer (DisplayObject *container) override
int | Call (DisplayObject *, DisplayEvent *) override
void | CallType2 (DisplayEvent *, void *=NULL) override
void | CallType3 () override
| Allows for a very simple callback, with no additional data passed. More...
virtual int | Call (DisplayObject *, DisplayEvent *)
virtual void | CallType2 (DisplayEvent *, void *=NULL)
virtual void | CallType3 ()
| Allows for a very simple callback, with no additional data passed. More...
virtual CallbackMethodCallerBase * | Duplicate () const
virtual void | SetContainer (DisplayObject *container)=0

## Protected Attributes
T * | _container
| The object which contains the method to call.
AttributeName | _attributeName
| The associated property name for the callback.
MethodType | _method
| The function pointer to call back.

## Detailed Description

template<class T>
class disti::CallbackAttributeNotifier< T >

A CallbackMethodCallerBase that notifies when properties are changed, and also optionally calls a void callback Version only supports method type 3

## Constructor & Destructor Documentation

## ◆ CallbackAttributeNotifier()

CallbackAttributeNotifier | ( | T * | container,
|  | const AttributeName & | attributeName,
|  | MethodType | method = `NULL`
| ) |  |
| inline

Construct a CallbackAttributeNotifier.

Parameters

  container | The object containing the callback method.
  attributeName | The attribute name to attach the callback to.
  method | The function to call back.

## Member Function Documentation

## ◆ Call()

int Call | ( | DisplayObject * | ,
|  | DisplayEvent * |
| ) |  |
| inline override virtual

This is for mouse and keyboard events.

Returns
  1 if event is handled, 0 otherwise.

Reimplemented from CallbackMethodCallerBase.

## ◆ CallType2()

void CallType2 | ( | DisplayEvent * | ,
|  | void * | = `NULL`
| ) |  |
| inline override virtual

This is used mostly for user events. The callbackData is generally passed in when this object is created.

Reimplemented from CallbackMethodCallerBase.

## ◆ CallType3()

void CallType3 | ( |  | ) |
| inline override virtual

Allows for a very simple callback, with no additional data passed.

Reimplemented from CallbackMethodCallerBase.

## ◆ Duplicate()

virtual CallbackMethodCallerBase * Duplicate | ( |  | ) | const
| inline override virtual

Returns
  A pointer to an exact copy of this callback object.

Reimplemented from CallbackMethodCallerBase.

## ◆ SetContainer()

virtual void SetContainer | ( | DisplayObject * | container | ) |
| inline override virtual

Assign a new object to be the target of this callback.

Parameters

  container | The new target object.

Implements CallbackMethodCallerBase.

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

- callback_caller.h