Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.UIEngine2.Window.WindowsLayer Class Reference

Detailed Description

Defines layer of windows.

Inheritance diagram for Doloro.UIEngine2.Window.WindowsLayer:
Collaboration diagram for Doloro.UIEngine2.Window.WindowsLayer:

Classes

struct  SearchContext
 Container with information about window. More...
 

Public Member Functions

 WindowsLayer (Window main, params IWindowRuntimeRegisterEntry[] followers)
 Creates an instance of new windows group. More...
 
void Add (IWindowRuntimeRegisterEntry entry)
 Adding entry to the register. More...
 
bool Release (IWindowRuntimeRegisterEntry entry)
 Releasing instance into the register. Looking in deep of hierarchy. More...
 
IWindowRuntimeRegisterEntry GetFollower (int idx)
 Returns follower by index. More...
 
int IndexOf (IWindowRuntimeRegisterEntry entity)
 Returns index of entity among the followers. More...
 
WindowsLayer MorphToLayer (Window window)
 Morphing window entry to the WindowsLayer that allows to bond extra windows to them. More...
 
WindowsLayer GetLayer (Window window, out bool isMainOfLayer)
 Trying to find layer that contains window as Main or raw Followers Window instance. More...
 
bool GetWindow< T > (out SearchContext< T > context)
 Looking for Window in hierarchy. More...
 
List< SearchContext< T > > GetWindows< T > ()
 Looking for windows among hierarchy. More...
 
void Close ()
 Closes Followers. Next closes Main. More...
 
void Hide ()
 Hides Followers. Next hides Main. More...
 
void Open ()
 Opens Main. Next opens entire Followers. More...
 
void Execute (Action< IWindowRuntimeRegisterEntry > entryHandler, bool mainFirst=false)
 Handles group entries in order: Followers => Main More...
 
void Execute (Action< IWindowRuntimeRegisterEntry, bool > entryHandler, bool mainFirst=false)
 Handles group entries in order: Followers => Main More...
 
bool MoveToTop (IWindowRuntimeRegisterEntry entry)
 Moving entity to hierarchy top. More...
 
ICollection< T > ToCollection< T > ()
 Collecting elements form the layer's hierarchy to the collection. More...
 
void OnGUI (bool updateLayout)
 Perform layer pipeline.
 

Properties

static WindowsLayer ActiveRoot [get, set]
 Singletone instance of the root windows layer.
 
int Count [get]
 Count of windows in hierarchy.
 
int FollowerCount [get]
 Count of follower at the layer with computing hierarchy depth.
 
WindowsLayer Root [get]
 Returns root of the layers hierarchy.
 
Window RootWindow [get]
 Returns root window from the hierarchy.
 
bool IsRoot [get]
 Is the root layer or not?
 
WindowsLayer Parent [get]
 Parent layer.
 
Window Main [get]
 Main entity that redirects events to the followers.
 
WindowStateOptions WindowState [get]
 State of the Main window that commutated to entire followers collection. More...
 
Vector2 Position [get, set]
 Position of the Main window. More...
 
Vector2 Size [get, set]
 Size of the Main window. More...
 
Rect ScreenSpaceRect [get, set]
 Returns elements's rect at screen space. More...
 

Constructor & Destructor Documentation

◆ WindowsLayer()

Doloro.UIEngine2.Window.WindowsLayer.WindowsLayer ( Window  main,
params IWindowRuntimeRegisterEntry[]  followers 
)

Creates an instance of new windows group.

Parameters
mainMain window that is commutates logic to the children.
followersWindows that following events of the Main window.

Member Function Documentation

◆ Add()

void Doloro.UIEngine2.Window.WindowsLayer.Add ( IWindowRuntimeRegisterEntry  entry)

Adding entry to the register.

Parameters
entry

◆ Close()

void Doloro.UIEngine2.Window.WindowsLayer.Close ( )

Closes Followers. Next closes Main.

Implements Doloro.UIEngine2.IWindowRuntimeRegisterEntry.

◆ Execute() [1/2]

void Doloro.UIEngine2.Window.WindowsLayer.Execute ( Action< IWindowRuntimeRegisterEntry entryHandler,
bool  mainFirst = false 
)

Handles group entries in order: Followers => Main

Parameters
entryHandlerHandler that calling for each entry.
mainFirstCalls Main before Followers in case of true.

◆ Execute() [2/2]

void Doloro.UIEngine2.Window.WindowsLayer.Execute ( Action< IWindowRuntimeRegisterEntry, bool >  entryHandler,
bool  mainFirst = false 
)

Handles group entries in order: Followers => Main

Parameters
entryHandlerIWindowRuntimeRegisterEntry - entry boolean - is entity Main of the layer. Handler that calling for each entry.
mainFirstCalls Main before Followers in case of true.

◆ GetFollower()

IWindowRuntimeRegisterEntry Doloro.UIEngine2.Window.WindowsLayer.GetFollower ( int  idx)

Returns follower by index.

Parameters
idxIndex of follower.
Returns
Reference to entity.

◆ GetLayer()

WindowsLayer Doloro.UIEngine2.Window.WindowsLayer.GetLayer ( Window  window,
out bool  isMainOfLayer 
)

Trying to find layer that contains window as Main or raw Followers Window instance.

Parameters
windowWindow to search.
isMainOfLayerTrue in case window is Main of the layer. False in case if found among followers.
Returns
Parent layer if found. Null otherwise.

Store last search results, so try to call all the searches for the same parent in row to prevent deep hierarchy scan.

◆ GetWindow< T >()

bool Doloro.UIEngine2.Window.WindowsLayer.GetWindow< T > ( out SearchContext< T >  context)

Looking for Window in hierarchy.

Template Parameters
TType of the window to search.
Parameters
context
Returns
Result of search.
Type Constraints
T :Window 

◆ GetWindows< T >()

List< SearchContext< T > > Doloro.UIEngine2.Window.WindowsLayer.GetWindows< T > ( )

Looking for windows among hierarchy.

Template Parameters
TStart layer.
Returns
Collection of windows from top to bottom.
Type Constraints
T :Window 

◆ Hide()

void Doloro.UIEngine2.Window.WindowsLayer.Hide ( )

Hides Followers. Next hides Main.

Implements Doloro.UIEngine2.IWindowRuntimeRegisterEntry.

◆ IndexOf()

int Doloro.UIEngine2.Window.WindowsLayer.IndexOf ( IWindowRuntimeRegisterEntry  entity)

Returns index of entity among the followers.

Parameters
entityEntity to search.
Returns
Index if found. -1 otherwise.

◆ MorphToLayer()

WindowsLayer Doloro.UIEngine2.Window.WindowsLayer.MorphToLayer ( Window  window)

Morphing window entry to the WindowsLayer that allows to bond extra windows to them.

Parameters
windowWindow at the hierarchy layer that will change internal container.

◆ MoveToTop()

bool Doloro.UIEngine2.Window.WindowsLayer.MoveToTop ( IWindowRuntimeRegisterEntry  entry)

Moving entity to hierarchy top.

Parameters
entryEntity bond to the layer.
Returns
Is moved?

◆ Open()

void Doloro.UIEngine2.Window.WindowsLayer.Open ( )

Opens Main. Next opens entire Followers.

Not allows to open something that isn't in the branch middle avoiding parents. Redirects call to the Root in case if IsRoot false.

Implements Doloro.UIEngine2.IWindowRuntimeRegisterEntry.

◆ Release()

bool Doloro.UIEngine2.Window.WindowsLayer.Release ( IWindowRuntimeRegisterEntry  entry)

Releasing instance into the register. Looking in deep of hierarchy.

Parameters
entryEntry for release.
Returns
Result of releasing. False means that entry not found.

◆ ToCollection< T >()

ICollection< T > Doloro.UIEngine2.Window.WindowsLayer.ToCollection< T > ( )

Collecting elements form the layer's hierarchy to the collection.

Template Parameters
TType of hierarchy object.
Returns
Collection of elements instances found in hierarchy.

Property Documentation

◆ Position

Vector2 Doloro.UIEngine2.Window.WindowsLayer.Position
getset

Position of the Main window.

Exceptions
NotSupportedExceptionMain is null.

Implements Doloro.UIEngine2.IWindowRuntimeRegisterEntry.

◆ ScreenSpaceRect

Rect Doloro.UIEngine2.Window.WindowsLayer.ScreenSpaceRect
getset

Returns elements's rect at screen space.

Cords counting from top left corner. Useful for full screen operations, like comparing with mouse position or etc.

Implements Doloro.UIEngine2.IWindowRuntimeRegisterEntry.

◆ Size

Vector2 Doloro.UIEngine2.Window.WindowsLayer.Size
getset

Size of the Main window.

Exceptions
NotSupportedExceptionMain is null.

Implements Doloro.UIEngine2.IWindowRuntimeRegisterEntry.

◆ WindowState

WindowStateOptions Doloro.UIEngine2.Window.WindowsLayer.WindowState
get

State of the Main window that commutated to entire followers collection.

Exceptions
NotSupportedExceptionMain is null.

Main

Implements Doloro.UIEngine2.IWindowRuntimeRegisterEntry.


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