|
GL Studio C++ Runtime API
|
#include <events.h>
Public Types | |
| typedef DisplayObject *(T::* | EventSenderCbType) (DisplayEvent *ev) |
| Typedef for a event callback function pointer. | |
Public Member Functions | |
| void | Active (bool val) |
| bool | Active () |
| EventCompressor (T *objectPtr, EventSenderCbType cb) | |
| bool | CompressEvent (const DisplayEvent &ev) |
| void | SendAnyCompressedEvents () |
| Passes along the resulting compressed event to the target object's callback function. | |
Protected Attributes | |
| MouseEvent | _lastCompressedEvent |
| The result of event compression, i.e. what all the other events boiled down to. | |
| bool | _lastEventWasCompressed |
| If true, the event we're passing along was compressed. | |
| EventSenderCbType | _handleCb |
| The callback function that will process this event. | |
| T * | _objectPtr |
| The object containing the callback function. | |
| bool | _sendingCompressed |
| Flag set to avoid compressing an already compressed event (infinite loop). | |
| bool | _active |
| If active, events will be compressed, i.e. multiple MOUSE_DRAG will be boiled down to one equivalent MOUSE_DRAG. | |
Event Compressor
|
inline |
Construct a new EventCompressor object to compress events for the given object.
| objectPtr | The object to receive compressed events, contains the callback function. |
| cb | The callback function to receive compressed events. |
|
inline |
|
inline |
Set the current active state for event compression.
| val | The new active state to set. |
|
inline |
Caller should stop processing this event if returns true Caller MUST call SendAnyCompressedEvents() before drawing to make sure any saved events are processed.
| ev | The event to compress. |