Editor

The editor manager class. Handles all interactions with editors.

May be overridden to override default event implementations.

Members

Functions

handleCallback
void handleCallback(EventMessage msg)

Handles callback messages

initialize
void initialize(DGame instance)

Initializes the editor with a DGame instance.

onInitialize
void onInitialize()
onPausePlay
void onPausePlay()
onStartPlay
void onStartPlay()
onStopPlay
void onStopPlay()

To be overridden

processEvents
void processEvents()

Processes all pending events.

queueEvent
void queueEvent(EventMessage msg)

Register an event from the front end.

registerCallbackHandler
void registerCallbackHandler(UUID id, InternalEventHandler handler)

If a send call requests a callback, register it.

registerDefaultEvents
void registerDefaultEvents()

Register built-in event handlers.

registerEventHandler
UUID registerEventHandler(string key, ResponseType delegate(DataType) event)

Registers an event callback, for when an event with the given key is received.

registerInternalMessageHandler
UUID registerInternalMessageHandler(string key, InternalEventHandler handler)

Register a message internally, after generating a handler for it.

send
void send(string key, DataType value)

Sends a message to all attached editors.

send
void send(string key, DataType value, void delegate(ResponseType) cb)

Sends a message to all attached editors.

shutdown
void shutdown()

Shutsdown the editor interface.

unregisterEventHandler
void unregisterEventHandler(UUID id)

Unregisters an event callback.

update
void update()

Processes pending events.

Manifest constants

CallbackMessageKey
enum CallbackMessageKey;

The message key for callbacks

Meta