Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
UI Events hub that gathers messages from virtual children and share then to subscribed connectors.
Using for make scalable GUI that can be extended with plug-ins at runtime and still be connected to base UI logic.
You has selection menu and some inspectors that must be updated as soon as new object selected. But all the inspectors are the Window instances that just follows the same RuntimeWorkspace.RuntimeWorkspaceLayout. They separated with virtual hierarchy chains and bunch of semi-parents.
In that case the best way will be to use the virtual UI hub at the root layout and put the UIHubEventRelays to each AGUIElement in the same event's network.
When a player selects a new element in one of the brunches another ones will get those relayed events from the same parent hub.
Public Member Functions | |
delegate void | SharedEvent (Object sender, object[] args) |
Delegate that defines signature of sharable event handler. More... | |
void | Attach (string eventCode, SharedEvent handler) |
Attaches listeners the hub's sharing events. | |
bool | Detach (string eventCode, SharedEvent handler) |
Detaches listeners from the hub's registry. | |
void | ShareEvent (Object sender, string eventCode, params object[] args) |
Forwards event to singed handlers. More... | |
Protected Attributes | |
Dictionary< string, ICollection< SharedEvent > > | registry |
Registry that contains event handlers subscribed on the event codes. More... | |
delegate void Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub.SharedEvent | ( | Object | sender, |
object[] | args | ||
) |
Delegate that defines signature of sharable event handler.
sender | Re-translator that initialized the event. |
args | Data shared with event. |
void Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub.ShareEvent | ( | Object | sender, |
string | eventCode, | ||
params object[] | args | ||
) |
Forwards event to singed handlers.
sender | Connector that initialized current shared event. |
eventCode | Shared event code. |
args | Data shared along with event. |
|
protected |
Registry that contains event handlers subscribed on the event codes.