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

Detailed Description

Provides API for handling layout features. Contains meta-data and runtime data about workspace layout and its dependencies.

See also
AWorkspaceGUIElement

Public Member Functions

 WorkspaceLayout (string key)
 Creating new meta data for the workspace entry. More...
 
 WorkspaceLayout (string key, Rect rect)
 Creating new meta data for the workspace entry. More...
 
bool IsBonded (AWorkspaceGUIElement element)
 Checks is the element bonded to the workspace. More...
 
void BondElement (AWorkspaceGUIElement element)
 Bond element to the layout. More...
 
void ReleaseElement (AWorkspaceGUIElement element)
 Releasing to bond between element and layout. More...
 

Static Public Member Functions

static WorkspaceLayout DefineFullscreenWorkspace (string key)
 Creating full screen workspace entry that can be applied to the windows in future. More...
 
static WorkspaceLayout DefineWorkspace (string key, Rect screenRect)
 Creating workspace entry that can be applied to the windows in future. More...
 
static bool FindWorkspace (string key, out WorkspaceLayout metadata)
 Looking for workspace data by the key. More...
 
static string GetWorkspaceKey (AWorkspaceGUIElement element)
 Looking for workspace with bond to element. More...
 
static WorkspaceLayout BondElementToWorkspace (string workspaceKey, AWorkspaceGUIElement element)
 Bonds element to the workspace layout. More...
 
static void ReleaseWorkspaceBond (AWorkspaceGUIElement element)
 Looking for element's bond and releases it if exist. More...
 

Package Functions

void OnNewLayoutCreated ()
 Informs subscribers about new layout creation.
 

Properties

AWorkspaceGUIElement this[int index] [get]
 Returns bonded root element by index. More...
 
int Count [get]
 Count of bonded elements.
 
string Key [get]
 Key of the workspace.
 
Rect ScreenSpaceRect [get, set]
 Workspace rect related to the screen space coordinates. More...
 
IReadOnlyCollection< AWorkspaceGUIElementBondedElements [get]
 Collection of elements bonded to the layout.
 

Events

Action< WorkspaceLayout, AWorkspaceGUIElementElementBondAttached
 Occurs when BondElement(AWorkspaceGUIElement) or BondElementToWorkspace(string, AWorkspaceGUIElement) has been successfully called.
 
Action< WorkspaceLayout, AWorkspaceGUIElementElementBondDetached
 Occurs when ReleaseElement(AWorkspaceGUIElement) or ReleaseWorkspaceBond(AWorkspaceGUIElement) has been successfully called.
 
static Action< WorkspaceLayoutLayoutUpdated
 Occurs when a workspace is created or has an updated rect settings.
 
static Action< WorkspaceLayoutLayoutCreated
 Occurs when new layout created.
 
static Action< WorkspaceLayoutCollectionChanged
 Occurs when during any element related actions of WorkspaceLayout.
 

Constructor & Destructor Documentation

◆ WorkspaceLayout() [1/2]

Doloro.UIEngine2.WorkspaceLayout.WorkspaceLayout ( string  key)

Creating new meta data for the workspace entry.

Parameters
key

Workspace rect has Full screen size until redefinition.

◆ WorkspaceLayout() [2/2]

Doloro.UIEngine2.WorkspaceLayout.WorkspaceLayout ( string  key,
Rect  rect 
)

Creating new meta data for the workspace entry.

Parameters
keyKey related to the workspace.
rectScreen space rect defined to the

Member Function Documentation

◆ BondElement()

void Doloro.UIEngine2.WorkspaceLayout.BondElement ( AWorkspaceGUIElement  element)

Bond element to the layout.

Parameters
elementTarget element.

◆ BondElementToWorkspace()

static WorkspaceLayout Doloro.UIEngine2.WorkspaceLayout.BondElementToWorkspace ( string  workspaceKey,
AWorkspaceGUIElement  element 
)
static

Bonds element to the workspace layout.

Parameters
workspaceKeyKey of the registered workspace.
elementBonding element.
Returns
Reference to the layout.

Creates new full screen workspace in case if not found be the key.

Exceptions
ArgumentExceptionworkspaceKey is null or whitespace.
ArgumentNullExceptionelement is null.

◆ DefineFullscreenWorkspace()

static WorkspaceLayout Doloro.UIEngine2.WorkspaceLayout.DefineFullscreenWorkspace ( string  key)
static

Creating full screen workspace entry that can be applied to the windows in future.

Parameters
keyWorkspace key in register.
Returns
Meta data of created workspace.

◆ DefineWorkspace()

static WorkspaceLayout Doloro.UIEngine2.WorkspaceLayout.DefineWorkspace ( string  key,
Rect  screenRect 
)
static

Creating workspace entry that can be applied to the windows in future.

Parameters
keyThe unique key of the workspace. Ignores case.
screenRectRect that will define the workspace position at the screen.
Returns
Meta data of created workspace.
Exceptions
ArgumentExceptionkey is null or whitespace.

In case if entry with the same key already exist then updates the rect and inform bond windows about.

◆ FindWorkspace()

static bool Doloro.UIEngine2.WorkspaceLayout.FindWorkspace ( string  key,
out WorkspaceLayout  metadata 
)
static

Looking for workspace data by the key.

Parameters
keyWorkspace key.
metadataWorkspace data if registered.
Returns
Search result.

◆ GetWorkspaceKey()

static string Doloro.UIEngine2.WorkspaceLayout.GetWorkspaceKey ( AWorkspaceGUIElement  element)
static

Looking for workspace with bond to element.

Parameters
element
Returns
Key of the workspace that contains the window instance. Empty string if bond not found.
Exceptions
ArgumentNullExceptionwindow is null.

◆ IsBonded()

bool Doloro.UIEngine2.WorkspaceLayout.IsBonded ( AWorkspaceGUIElement  element)

Checks is the element bonded to the workspace.

Parameters
elementElement to check.
Returns
true in case if was bond with the BondElement(AWorkspaceGUIElement) or BondElementToWorkspace(string, AWorkspaceGUIElement) handler to current workspace instance.

◆ ReleaseElement()

void Doloro.UIEngine2.WorkspaceLayout.ReleaseElement ( AWorkspaceGUIElement  element)

Releasing to bond between element and layout.

Parameters
elementTarget element.
Exceptions
ArgumentNullExceptionelement is null.
KeyNotFoundExceptionElement has no bond with the workspace.

◆ ReleaseWorkspaceBond()

static void Doloro.UIEngine2.WorkspaceLayout.ReleaseWorkspaceBond ( AWorkspaceGUIElement  element)
static

Looking for element's bond and releases it if exist.

Parameters
elementTarget element.
Exceptions
ArgumentNullExceptionelement is null.

Property Documentation

◆ ScreenSpaceRect

Rect Doloro.UIEngine2.WorkspaceLayout.ScreenSpaceRect
getset

Workspace rect related to the screen space coordinates.

Full screen by default. Full screen in case if any width or height is lesser then 0.

◆ this[int index]

AWorkspaceGUIElement Doloro.UIEngine2.WorkspaceLayout.this[int index]
get

Returns bonded root element by index.

Parameters
indexIndex of element in layout catalog.
Returns
REference to element.

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