Doloro GDK 22 .1.0 Beta
by Tauri Interactive
|
The engine provides embedded core for handling the collection-like UIs with standardized API and predefined bridge between internal logic and high-level collection's features.
The core of the framework implements and encapsulated entire backstage logic for collections powering with an abstract AGUIElementsCollection
class. The class derived from the AGUIElement
supplied with the dui2 core.
The component by itself implements IList<AGUIElement>
interface that allows you to operate it as list of other GUI elements.
Explore API: Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollection
The package supplies you with powerful implementation of the abstract AGUIElementsCollection
that can be used from-box and not demands any extra features development.
The collection provided with the GridCollection
component that.
The component implements collection of uniform features that enough to fulfil any standard task:
Explore API: Doloro.UIEngine2.Modules.ElementsCollection.GridCollection
To simplify loading data to the GUI the core implements AGUIElementsCollectionDataConnector
component that encapsulates bridge between data and Content Inspectors.
Usage of component allows to operate AGUIElementsCollection
as IList
of operating data type.
To encapsulate data loading to the GUI the component requires you to select GUI element instance that implements IContentInspector
interface for an operating type. In such way the controller will instantiate the element from prefab during Add
or Insert
call automatically.
Explore API: Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector
Implementation of a custom data connector is very easy. In case you do not demand any extra features all you need to do is create a new class derived from the AGUIElementsCollectionDataConnector
defining the operating type and expected GUI element type that supports operating type as content.
Member | Requirements | Description |
---|---|---|
YOUR_DATA_TYPE | class | Data type that will be reflected at GUI with the collection elements. |
YOUR_INSPECTOR_TYPE | AGUIElement IContentInspector<SourceType> | Type of expecting GUI element content inspector that will receive the data type member as content . |
The collection module provides you with collection of suitable components that allows to embed collection into virtual hierarchy created with the Virtual UI Hub module features.
The package supplies you with GUICollectionHubEventRelay
component derived from the regular UIHubEventRelay
class that extends it with child element selection event sharing feature.
In case the onSelected
property is true
, the component shares AGUIElement
from collection children as soon as a new one has been selected.
Explore API: Doloro.UIEngine2.Modules.VirtualHub.Extensions.ElementsCollection.GUICollectionHubEventRelay
As pair to Collection's Event Relay the package provides you with such support. The component extends regular UIHubListener
provided with the Virtual UI Hub module.
The module allows to catch events shared with the relay in parental UI hub scope marked with the OnSelected
key. According with this the component implements API to defined handler for selection events in encapsulated way.
Note that the handler receives AGUIElement
as first argument of the handler. Shared element is the one that has been selected in collection.
Explore API: Doloro.UIEngine2.Modules.VirtualHub.Extensions.ElementsCollection.GUICollectionUIHubListener
The package supplies you with an abstract class AContentHolderUIHubListener
compatible with the Content Inspectors features. The component derived from the regular GUICollectionUIHubListener
.
Usage of the class allows to encapsulate content
update at inspector according with selection of compatible object at the scope of parental Virtual UI Hub.
To configure an inspector with the listener you have to create a new class derived from the AContentHolderUIHubListener
with declared type of compatible inspector GUI element and operating content type.
Explore API: Doloro.UIEngine2.Modules.VirtualHub.Extensions.ElementsCollection.AContentHolderUIHubListener{GUIElementType, ContentType}
The package provides you with pre-configured collection layout that can be used as example of source for your custom solutions. All you need to do is move it to your UI. In case you are planning to change it we are strongly recommend you to create a prefab variant from it.
The template prefabs can be found by the following path:
Doloro-GDK \ Doloro-UI-2 \ Resources \ Templates \ Elements Collection
Prefab | Purpose |
---|---|
Horizontal Grid collection | Collection with horizontal order of content elements. |
Vertical Grid collection | Collection with vertical order of content elements. |
Selection | GUI element using as a selection border with pre-configured selection. |
GridCollection
supports line stretching of elements in case you need to created not a cell layout but, locate a single element in line.
To stretch a cell by some axes set it's related size to 0. Undefined size means full layout
.
The pre-configured collections are using GridCollection
components to empower the collection. According with this you may use entire API to manage its features.
If we are talking about more abstract concept of collections management, you have to understand that the AGUIElementsCollection
implements IList<AGUIElement>
, so you may work with elements directly using a regular interface as with AGUIElement
instances.
In case you want to work with collection's content avoiding GUI element representation you have to implement a custom AGUIElementsCollectionDataConnector
. More about here: Development. In that case you may access elements by its value content reference instead addressing the representation.