Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType > Class Template Reference

Detailed Description

Component that provides API to connect source data with AGUIElementsCollection component in uniform way.

Template Parameters
SourceTypeType of data source that can be converted to GUIElementType instance. Must has IGUIConvertible<GUIElementType> interface as defined.
GUIElementTypeAGUIElement derived type that will be instantiated during source type instance connection.
Type Constraints
SourceType :class 
GUIElementType :AGUIElement 
GUIElementType :IContentInspector<SourceType> 
Inheritance diagram for Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >:
Collaboration diagram for Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >:

Classes

class  GUICollectionAsStoragesEnumerator
 Enumerates GUI collection in search of GUIElementType elements to get SourceType content placed within. More...
 

Public Member Functions

void Add (SourceType item)
 Connects new SourceType source to UI. More...
 
void Clear ()
 Clears entire UI. More...
 
bool Contains (SourceType item)
 Checks is the SourceType connected to UI. More...
 
void CopyTo (SourceType[] array, int arrayIndex)
 Copies references of rented storages to the destination array. More...
 
IEnumerator< SourceType > GetEnumerator ()
 Enumerates sources connected with the UI. More...
 
int IndexOf (SourceType item)
 Looking for GUI element with connected SourceType instance. More...
 
void Insert (int index, SourceType item)
 Inserts GUI element connected to the source to the collection. More...
 
bool Remove (SourceType item)
 Removes GUI element of collection with connected storage. More...
 
void RemoveAt (int index)
 Removes GUI element from GUICollectionHubEventRelay.collection by index. More...
 
void Set (ICollection< SourceType > content)
 Loads to UI bunch of SourceTypes. More...
 
void Set (params SourceType[] content)
 Loads to UI bunch of SourceTypes. More...
 

Properties

AGUIElementsCollection CollectionGUI [get]
 Attached collection GUI.
 
GUIElementType ElementTemplatePrefab [get, set]
 Prefab of the GUI element that will be created for SourceType instance during binding to UI.
 
SourceType this[int index] [get, set]
 Provides access to UI element as connected SourceType. More...
 
int Count [get]
 Count of elements placed at the UI. More...
 
bool IsReadOnly [get]
 Redirects to GUICollectionHubEventRelay.collection property.
 

Member Function Documentation

◆ Add()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Add ( SourceType  item)

Connects new SourceType source to UI.

Parameters
itemSourceType to connect.

◆ Clear()

Clears entire UI.

Not releases rented storages.

◆ Contains()

bool Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Contains ( SourceType  item)

Checks is the SourceType connected to UI.

Parameters
itemSourceType to search.
Returns
Result of search. true if connected to the UI.

◆ CopyTo()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.CopyTo ( SourceType[]  array,
int  arrayIndex 
)

Copies references of rented storages to the destination array.

Parameters
arrayDestination array.
arrayIndexStart index to array insert.

In case if GUICollectionHubEventRelay.collection contains elements not derived from GUIElementType such elements will be avoided.

◆ GetEnumerator()

IEnumerator< SourceType > Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.GetEnumerator ( )

Enumerates sources connected with the UI.

Returns
Sources enumerator.

◆ IndexOf()

int Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.IndexOf ( SourceType  item)

Looking for GUI element with connected SourceType instance.

Parameters
itemConnected source to search.
Returns
Index of GUI element in GUICollectionHubEventRelay.collection in case if found. -1 otherwise.

◆ Insert()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Insert ( int  index,
SourceType  item 
)

Inserts GUI element connected to the source to the collection.

Parameters
indexIndexed in collection as insert destination.
itemSource item to GUI attach.

◆ Remove()

bool Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Remove ( SourceType  item)

Removes GUI element of collection with connected storage.

Parameters
itemConnected storage to detach from UI.
Returns
Is GUI element had been found.

◆ RemoveAt()

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.RemoveAt ( int  index)

Removes GUI element from GUICollectionHubEventRelay.collection by index.

Parameters
indexIndex to remove.

◆ Set() [1/2]

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Set ( ICollection< SourceType >  content)

Loads to UI bunch of SourceTypes.

Parameters
contentCollection of rented storages.

◆ Set() [2/2]

void Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.Set ( params SourceType[]  content)

Loads to UI bunch of SourceTypes.

Parameters
contentCollection of rented storages.

Property Documentation

◆ Count

Count of elements placed at the UI.

Note that in case if you add a custom UIEngine2.AGUIElement to the GUICollectionHubEventRelay.collection directly then this element will be count as part of collection.

◆ this[int index]

SourceType Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollectionDataConnector< SourceType, GUIElementType >.this[int index]
getset

Provides access to UI element as connected SourceType.

Parameters
indexIndex of element in UI collection.
Returns
SourceType connected to certain UI element of collection in case if that element instance derived from the GUIElementType. null in case if collection item is manually added UIEngine2.AGUIElement of another type.

In case if UIEngine2.AGUIElement as collection item not derived from GUIElementType then during set operation it will be replaced with Insert(int, SourceType) implementation.


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