Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub Class Reference

Detailed Description

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.

Inheritance diagram for Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub:
Collaboration diagram for Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub:

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

Member Function Documentation

◆ SharedEvent()

delegate void Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub.SharedEvent ( Object  sender,
object[]  args 
)

Delegate that defines signature of sharable event handler.

Parameters
senderRe-translator that initialized the event.
argsData shared with event.

◆ ShareEvent()

void Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub.ShareEvent ( Object  sender,
string  eventCode,
params object[]  args 
)

Forwards event to singed handlers.

Parameters
senderConnector that initialized current shared event.
eventCodeShared event code.
argsData shared along with event.

Member Data Documentation

◆ registry

Dictionary<string, ICollection<SharedEvent> > Doloro.UIEngine2.Modules.VirtualHub.VirtualUIHub.registry
protected
Initial value:
=
new Dictionary<string, ICollection<SharedEvent>>()

Registry that contains event handlers subscribed on the event codes.


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