Doloro GDK 22 .1.0 Beta
by Tauri Interactive
Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout Class Reference

Detailed Description

Runtime workspace zone.

Allows dynamic splitting workspace on sub-workspaces with continues maintaining certain ration or pixel size.

Init time options works only in case if both fields initFirstSubWorkspace and initSecondSubWorkspace are not null. Use it if you has your own manual defined layout to apply the state.

Inheritance diagram for Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout:
Collaboration diagram for Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout:

Classes

class  RuntimeWorkspaceLayoutRegister
 The engine-site register that bond DoloroUI and internal engine GUI callbacks. More...
 

Public Types

enum  InitSplitValueSourceOptions { Manual , SplitterTransform }
 Declares the source of init time input value. More...
 
enum  ReleaseOrderOptions { ContentDrop , ContentToRoot , First , Second }
 Defines zone content release policy. More...
 
enum  SearchDirectionOptions { Left , Right , Bottom , Top }
 Defines direction of search in screen coordinates. More...
 
enum  SplitDirectionOptions { None = 0 , Verticaly = 1 , Horizontaly = 2 }
 Defines how the workspace splitted. More...
 
enum  SplitDirectionOrderOptions { Verticaly = 1 , Horizontaly = 2 }
 Input order that defines direction of splitter. More...
 
enum  SplitTypeOptions { Ratio , FirstFixed , SecondFixed }
 Defines a splitter behavior model. More...
 

Public Member Functions

float MoveSplitterLeftOn (float value)
 Trying to move splitter left on defined shift value. More...
 
float MoveSplitterRightOn (float value)
 Trying to move splitter right on defined shift value. More...
 
float MoveSplitterDownOn (float value)
 Trying to move splitter down on defined shift value. More...
 
float MoveSplitterUpOn (float value)
 Trying to move splitter up on defined shift value. More...
 
void Split (SplitDirectionOrderOptions direction)
 Splitting workspace by half. More...
 
void Split (float splitterPosition, SplitTypeOptions type, SplitDirectionOrderOptions direction)
 Splitting workspace More...
 
void Release (ReleaseOrderOptions option)
 Releasing sub-workspace. More...
 
void SetSplitterPosition (Vector2 position)
 Trying to place splitter at the screen space position. More...
 
bool IsChildOf (RuntimeWorkspaceLayout layout)
 Checks is the layout is child of some another layout. More...
 
int GetParentBranch ()
 Checks the branch index of the layout relative to direct parent layout. More...
 
int GetParentBranch (RuntimeWorkspaceLayout parent)
 Checks the branch index of the layout relative for certain parent layout. More...
 
RuntimeWorkspaceLayout FindParentLayoutInHierarchyByDirection (SplitDirectionOrderOptions option)
 Looking for layout in hierarchy with requested split direction type. More...
 
virtual RuntimeWorkspaceLayout FindParentLayoutInHierarchyByDirection (SplitDirectionOrderOptions option, List< RuntimeWorkspaceLayout > callStack)
 Looking for layout in parent hierarchy with requested split direction type. More...
 
RuntimeWorkspaceLayout FindParentLayoutInHierarchyByDirection (SplitDirectionOrderOptions option, int requiredBranchIdx)
 Looking for layout where hierarchy branched to the certain branch. More...
 
RuntimeWorkspaceLayout FindParentLayoutInHierarchyByDirection (SplitDirectionOrderOptions option, List< RuntimeWorkspaceLayout > callStack, int requiredBranchIdx)
 Looking for layout where hierarchy branched to the certain branch. More...
 
RuntimeWorkspaceSplitter FindSplitterByDirection (SearchDirectionOptions direction)
 Looking for Splitter next to workspace layout side into the hierarchy. More...
 
ICollection< RuntimeWorkspaceLayoutFindOuterLayoutsNextToSplitter (SearchDirectionOptions splitterSide)
 Looking for child layouts that has a Splitter as its own at certain bound side. More...
 
void RecomputeRelatedSplitters ()
 Recomputes position of entire splitters next to the layout.
 
void Repaint ()
 Repaints element along with its children.
 
void RescanForParent ()
 Looking for parent element.
 
void Focus ()
 Focusing element.
 
void Unfocus ()
 Turning off focus from element and all the elements above in the stack.
 
void CallClick ()
 Simulates click above the element.
 
void CallContextMenu ()
 Simulates calling context menu over the element.
 
virtual bool IsChildOf (AGUIElement element)
 Checks is the element is a child of another element. More...
 
virtual void OnInput ()
 Handler that will be called for elements in input priority order. use to modify data along with input instead of using OnElementGUI. More...
 
virtual void OnElementGUI ()
 Calling each draw frame. Use to update showing data. More...
 

Static Public Member Functions

static void RecomputeIsolatedBoundsForLayout (RuntimeWorkspaceLayout source)
 Recomputed allowed size bounds for layout and relative layouts. More...
 
static Rect DetectBounds (RuntimeWorkspaceLayout source)
 Detecting bounds that is friendly for entire elements related for the layout. More...
 
static Rect DetectBounds (RuntimeWorkspaceLayout source, out List< RuntimeWorkspaceLayout > horizontalRelatedLayouts, out List< RuntimeWorkspaceLayout > verticalRelatedLayouts)
 Detecting bounds that is friendly for entire elements related for the layout. More...
 
static Rect DetectBounds (RuntimeWorkspaceLayout source, ICollection< RuntimeWorkspaceLayout > layoutsCollection, out List< RuntimeWorkspaceLayout > horizontalRelatedLayouts, out List< RuntimeWorkspaceLayout > verticalRelatedLayouts)
 
static AGUIElement FindParentGUIElement (Transform element)
 Looking for parent GUI element. More...
 
static AGUIElement FindRoot (AGUIElement hierarchyElement)
 Looking for root element at the hierarchy branch. More...
 

Static Public Attributes

static Vector2 SafeBounds = Vector2.one
 Min size safe bounds for the layout.
 

Protected Member Functions

override void OnClampedSizeChanged ()
 Should be called in case if MinSize or MaxSize is modified. More...
 
override void OnSizeChanged ()
 Occurs when layout size is changed. More...
 
override void OnMoved ()
 Occurs when layout moved. More...
 
virtual void OnLayoutConfigurationChanged ()
 
virtual Vector2 SimulateFreespaceSplitterPosition (float splitValue)
 Computes position of the Splitter with certain SplitValue without extra checks of the next layouts colliding encounters. More...
 
sealed override void Awake ()
 Calls base AGUIElement features and applies init time settings in case if requested. More...
 
override void OnDestroy ()
 Occurs before object destroy. More...
 
virtual void OnIntialization ()
 Uses instead of Awake to allow initialize the child component avoiding awaiting of Awake call. More...
 
void MarkWorkpsaceAsInitialized ()
 
virtual void OnEnable ()
 Occurs when component enabled.
 
virtual void OnDisable ()
 Occurs when component disabled.
 
virtual void OnTransformChildrenChanged ()
 Occurs when children list has been changed.
 
virtual void OnTransformParentChanged ()
 Occurs when parent object has been changed.
 
virtual void OnFocus ()
 Occurs when element requested on focus. More...
 
virtual void OnLostFocus ()
 Occurs when UI loosing focus. More...
 
virtual void OnHoverBegin ()
 Occurs when pointer starts hovering the element. More...
 
virtual void OnHover ()
 Occurs when the pointer is over the element.
 
virtual void OnHoverEnd ()
 Occurs when pointer ending hovering the element. More...
 
virtual void OnDragBegin ()
 Occurs when pointer is start drag process.
 
virtual void OnDrag ()
 Occurs each frame when you drags the element. More...
 
virtual void OnDragEnd ()
 Occurs when dragging element from ElementOnAction is released. More...
 
virtual void OnPointerDown ()
 Occurs when LBM pressed above hovering element. More...
 
virtual void OnPointerUp ()
 Occurs when LBM released above hovering element. More...
 
virtual void OnContextMenu ()
 Occurs when you calling context menu with focused element. More...
 

Static Protected Member Functions

static ICollection< T > GetOuterLayoutsByType< T > ()
 Returns collection of outer layouts related to the type. More...
 
static void PutToOuterLayoutsDataBase (AWorkspaceProvider layout)
 Putting the runtime layout to the outer state. More...
 
static void ReleaseFromOuterLayoutsDataBase (AWorkspaceProvider layout)
 Releasing layout from the outer state. More...
 
static IEnumerator< AWorkspaceProviderGetOuterLayoutsEnumerator ()
 Returns enumerator of entire final layouts. More...
 

Package Functions

void SetMinSize (Vector2 size, int branch)
 Applying min size to the branch slot. More...
 
void SetSizeClamp (Vector2 minSize, Vector2 maxSize, int branch)
 Applying size clamp to the branch slot. More...
 
void SetMaxSize (Vector2 size, int branch)
 Applying max size to the branch slot. More...
 
bool IsLocalHierarchyChildOf (AWorkspaceProvider layout)
 Checking parent relation in local hierarchy branch. More...
 
bool IsLocalHierarchyChildOf (AGUIElement element)
 Checks is the element is child of another element in local hierarchy. More...
 
void PointerLogicConveyor (Vector2 pointerPosition, Rect[] masks)
 Conveyor that handles pointer related events. More...
 

Static Package Functions

static void OnNewEventBegin ()
 Occurs when new UI event started.
 

Properties

override Vector2 MinSize [get]
 Min size allowed to the layout branch according with internal ActiveContent claims.
 
override Vector2 MaxSize [get]
 Max size allowed to the layout branch according with internal ActiveContent claims.
 
bool isWorkspaceUpdateListenerOn [get, set]
 Enables\disables layout update along with WorkspaceLayout.LayoutUpdated event.
 
override string WorkspaceKey [get, set]
 The unique workspace key that will be used to bond layout to the WorkspaceLayout service. More...
 
override Vector2 Size [get, set]
 The size of the operating rect. More...
 
static string RWLResourcesPath [get, set]
 Path to resources folder related to the Runtime Workspace Layout module.
 
static RuntimeWorkspaceLayout leftZonePrefab [get, set]
 Prefab that will be instantiated for the left zone. Should has vertical splitter pined to right.
 
static RuntimeWorkspaceLayout rightZonePrefab [get, set]
 Prefab that will be instantiated for the right zone.
 
static RuntimeWorkspaceLayout topZonePrefab [get, set]
 Prefab that will be instantiated for the top zone.
 
static RuntimeWorkspaceLayout bottomZonePrefab [get, set]
 Prefab that will be instantiated for the bottom zone. Should has vertical splitter pined to top.
 
override AWorkspaceGUIElement ActiveContent [get, set]
 Active child content active at the moment.
 
virtual bool IsSplitted [get]
 Is workspace splitted.
 
RuntimeWorkspaceSplitter Splitter [get]
 Reference to active splitter.
 
virtual RuntimeWorkspaceLayout FirstSubWorspace [get]
 Reference to first child workspace. More...
 
virtual RuntimeWorkspaceLayout SecondSubWorspace [get]
 Reference to second child workspace. More...
 
SplitDirectionOptions SplitDirection [get, set]
 Direction of workspace split.
 
SplitTypeOptions SplitType [get]
 Type of the splitter applied to the workspace.
 
virtual float SplitValue [get, set]
 Position of splitter. More...
 
Rect ContentScreenSpace [get, set]
 Returns content related screen space in Window friendly coordinates system.
 
bool IsRootWorkspaceLayout [get]
 Is the workspace layout is root of the layout branch.
 
AWorkspaceProvider RootWorkspaceLayout [get]
 Returns reference to root workspace at layouts branch.
 
AWorkspaceProvider ParentWorkspaceLayout [get, protected set]
 Reference to parent workspace if exists.
 
AWorkspaceProvider ParentWorkspaceLayoutInternal [get, set]
 Value that handling with the ParentWorkspaceLayout
 
static HashSet< AWorkspaceProviderOuterLayouts = new HashSet<AWorkspaceProvider>() [get]
 Hash set that contains layouts that has no children.
 
virtual RectTransform ContentLayout [get, set]
 Safe property to access content layout. In case if content value is null returns the object rect itself.
 
virtual AGUIElement ContentAsGUIElemet [get]
 Returns first detected GUI element at the ContentLayout. Creates new Modules.Controls.GUIElement in case if not found.
 
bool IsMask [get, set]
 If true then will crop the pointer events out of bounds for children.
 
bool IsRaycastTarget [get, set]
 Defines is the element will handle mouse click events. More...
 
bool IsActive [get]
 
bool IsFocused [get]
 Checks is the element registered at the FocusStack
 
bool IsHovered [get]
 Is the element hovered at the moment.
 
bool IsRoot [get, set]
 Is the element is at the bottom of engine hierarchy.
 
AGUIElement FocusedChild [get]
 Returns focused child. Null if not exist.
 
ReadOnlyCollection< AGUIElementChildren = new ReadOnlyCollection<AGUIElement>(new AGUIElement[0]) [get]
 Collection of element children. More...
 
Rect LocalRect [get]
 Returns rect of the bond RectTransform component.
 
Rect ScreenSpaceRect [get, set]
 Returns elements's rect at screen space. More...
 
Vector2 ScreenSpacePostion [get, set]
 Returns elements's position at screen space. More...
 
Rect RaycastRect [get]
 Screen space rect with applied RaycastPadding parameters.
 
Vector4 RaycastPadding [get, set]
 Defines offset of the ray casting box along with the physical size.
 
Window ParentWindow [get]
 Reference to the parent window. Null if element is free.
 
AGUIElement ParentGUIElement [get, protected set]
 Parent GUI element. Drops ParentWindow stored reference to null.
 
RectTransform BondRectTransform [get]
 Buffer that contains bond rect transform.
 
static AGUIElement ElementOnAction [get]
 Reference to last dragged element. More...
 
static bool IsMouseDragOn [get]
 True when some elements is now at the drag state.
 
virtual Vector2 Position [get, set]
 Position of element at the screen. More...
 
virtual Vector2 LocalPosition [get, set]
 Position relative to the parent element.
 
virtual bool OnStackTopWhenFocused [get]
 Defines if the element would be moved at the top of focus stack or will stay the same position when it focused. More...
 
virtual bool IsVisibleForEngine [get]
 Defines is the element is visible for internal engine features. In case of false will be skipped during common callbacks.
 

Events

Action< AClampedWorkspaceProviderClampedSizeChanged
 Occurs when MinSize or MaxSize is modified.
 
static Action< AWorkspaceProviderActiveContentChanged
 Occurs when ActiveContent property is changed.
 
Action< AGUIElementFocused
 Occurs when element is focused.
 
Action< AGUIElementFocusLost
 Occurs when element loosing focus.
 
Action< AGUIElementHoverStarted
 Occurs when pointer crossing element's rect bounds.
 
Action< AGUIElementHovered
 Occurs each time when GUI is changed and pointer is over the element.
 
Action< AGUIElementHoverEnded
 Occurs when pointer leaving the element's rect.
 
Action< AGUIElementDragStarted
 Occurs when drag process is starting.
 
Action< AGUIElementDraged
 Occurs during element drag process.
 
Action< AGUIElementDragEnded
 Occurs when element drag is ended.
 
Action< AGUIElementPointerDown
 Occurs when element pressed with LMB.
 
Action< AGUIElementPointerUp
 Occurs when element LB has been released with the pointer above element.
 
Action< AGUIElementContextMenuCalled
 Occurs when user calling context menu for element.
 
Action< AGUIElementMoved
 Occurs when element is moved.
 
Action< AGUIElementSizeChanged
 Occurs when element Size changed.
 

Member Enumeration Documentation

◆ InitSplitValueSourceOptions

Declares the source of init time input value.

Enumerator
Manual 

Initial splitter value will be defined manually.

SplitterTransform 

Splitter value would be computed from Splitter's transform position pre-defined at editor.

◆ ReleaseOrderOptions

Defines zone content release policy.

Enumerator
ContentDrop 

All the content will be dropped.

ContentToRoot 

Divided workspaces will collapsed to single one. Content of both workspaces will attached to new common zone.

First 

Releasing first sub-workspace with included content.

Second 

Releasing second sub-workspace with included content.

◆ SearchDirectionOptions

Defines direction of search in screen coordinates.

Enumerator
Left 

Looks to left.

Right 

Looks to right.

Bottom 

Looks to bottom.

Top 

Looks to top.

◆ SplitDirectionOptions

Defines how the workspace splitted.

Enumerator
None 

Workspace has no split.

Verticaly 

Workspace divided with horizontal splitter.

Horizontaly 

Workspace divided with vertical splitter.

◆ SplitDirectionOrderOptions

Input order that defines direction of splitter.

Enumerator
Verticaly 

Workspace will divided with horizontally splitter.

Horizontaly 

Workspace will divided with vertical splitter.

◆ SplitTypeOptions

Defines a splitter behavior model.

Enumerator
Ratio 

Workspace divided with ratio.

FirstFixed 

First sub-workspace has fixed pixel size.

SecondFixed 

Second sub-workspace has fixed pixel size.

Member Function Documentation

◆ Awake()

sealed override void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.Awake ( )
protectedvirtual

Calls base AGUIElement features and applies init time settings in case if requested.

Reimplemented from Doloro.UIEngine2.AWorkspaceProvider.

◆ DetectBounds() [1/3]

static Rect Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.DetectBounds ( RuntimeWorkspaceLayout  source)
static

Detecting bounds that is friendly for entire elements related for the layout.

Parameters
sourceSource layout that was initiator of the process.
Returns
[x,y] - min size [width,height] - max size

◆ DetectBounds() [2/3]

static Rect Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.DetectBounds ( RuntimeWorkspaceLayout  source,
ICollection< RuntimeWorkspaceLayout layoutsCollection,
out List< RuntimeWorkspaceLayout horizontalRelatedLayouts,
out List< RuntimeWorkspaceLayout verticalRelatedLayouts 
)
static

Todo:
Maybe demands adding of search in multi layered layouts hierarchy.

Detecting bounds that is friendly for entire elements related for the layout.

Parameters
sourceSource layout that was initiator of the process.
layoutsCollectionCollection of layouts that can be related to the source.
horizontalRelatedLayoutsCollection of outer layouts that are placed at the same raw.
verticalRelatedLayoutsCollection of outer layouts that are placed at the same column.
Returns
[x,y] - min size [width,height] - max size

◆ DetectBounds() [3/3]

static Rect Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.DetectBounds ( RuntimeWorkspaceLayout  source,
out List< RuntimeWorkspaceLayout horizontalRelatedLayouts,
out List< RuntimeWorkspaceLayout verticalRelatedLayouts 
)
static

Detecting bounds that is friendly for entire elements related for the layout.

Parameters
sourceSource layout that was initiator of the process.
horizontalRelatedLayoutsCollection of outer layouts that are placed at the same raw.
verticalRelatedLayoutsCollection of outer layouts that are placed at the same column.
Returns
[x,y] - min size [width,height] - max size

◆ FindOuterLayoutsNextToSplitter()

ICollection< RuntimeWorkspaceLayout > Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.FindOuterLayoutsNextToSplitter ( SearchDirectionOptions  splitterSide)

Looking for child layouts that has a Splitter as its own at certain bound side.

Parameters
splitterSideSide of splitter relative to child layout.
Returns
Collection of child layouts those have the Splitter at correct side.

◆ FindParentGUIElement()

static AGUIElement Doloro.UIEngine2.AGUIElement.FindParentGUIElement ( Transform  element)
staticinherited

Looking for parent GUI element.

Parameters
elementSource element transform.
Returns
Parent AGUIElement is exist. Null if root.

◆ FindParentLayoutInHierarchyByDirection() [1/4]

RuntimeWorkspaceLayout Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.FindParentLayoutInHierarchyByDirection ( SplitDirectionOrderOptions  option)

Looking for layout in hierarchy with requested split direction type.

Parameters
optionRequested layout splitter direction.
Returns
Layout with looking split in case if found. Null otherwise.

◆ FindParentLayoutInHierarchyByDirection() [2/4]

RuntimeWorkspaceLayout Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.FindParentLayoutInHierarchyByDirection ( SplitDirectionOrderOptions  option,
int  requiredBranchIdx 
)

Looking for layout where hierarchy branched to the certain branch.

Parameters
optionRequested layout splitter direction.
requiredBranchIdxRequired branch direction. 0 - primary branch. 1 - secondary branch
Returns

◆ FindParentLayoutInHierarchyByDirection() [3/4]

virtual RuntimeWorkspaceLayout Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.FindParentLayoutInHierarchyByDirection ( SplitDirectionOrderOptions  option,
List< RuntimeWorkspaceLayout callStack 
)
virtual

Looking for layout in parent hierarchy with requested split direction type.

Parameters
optionRequested layout splitter direction.
callStackHistory of hierarchy searches. First is the last entered.


Returns
Layout with looking split in case if found. Null otherwise.

◆ FindParentLayoutInHierarchyByDirection() [4/4]

RuntimeWorkspaceLayout Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.FindParentLayoutInHierarchyByDirection ( SplitDirectionOrderOptions  option,
List< RuntimeWorkspaceLayout callStack,
int  requiredBranchIdx 
)

Looking for layout where hierarchy branched to the certain branch.

Parameters
optionRequested layout splitter direction.
callStackHistory of hierarchy searches. First is the last entered.


Parameters
requiredBranchIdxRequired branch direction. 0 - primary branch. 1 - secondary branch
Returns

◆ FindRoot()

static AGUIElement Doloro.UIEngine2.AGUIElement.FindRoot ( AGUIElement  hierarchyElement)
staticinherited

Looking for root element at the hierarchy branch.

Parameters
hierarchyElementElement of hierarchy.
Returns
Root element at the branch.

◆ FindSplitterByDirection()

RuntimeWorkspaceSplitter Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.FindSplitterByDirection ( SearchDirectionOptions  direction)

Looking for Splitter next to workspace layout side into the hierarchy.

Parameters
directionSide direction.
Returns
Splitter if found by direction. Null otherwise.

◆ GetOuterLayoutsByType< T >()

static ICollection< T > Doloro.UIEngine2.AWorkspaceProvider.GetOuterLayoutsByType< T > ( )
staticprotectedinherited

Returns collection of outer layouts related to the type.

Template Parameters
TThe time derived from the AWorkspaceProvider.
Returns
Collection of workspace providers related to the type.
Type Constraints
T :AWorkspaceProvider 

◆ GetOuterLayoutsEnumerator()

static IEnumerator< AWorkspaceProvider > Doloro.UIEngine2.AWorkspaceProvider.GetOuterLayoutsEnumerator ( )
staticprotectedinherited

Returns enumerator of entire final layouts.

Returns

◆ GetParentBranch() [1/2]

int Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.GetParentBranch ( )

Checks the branch index of the layout relative to direct parent layout.

Returns

Index of the branch.

Not provides extra checks of hierarchy to performance goals. In case if current layout isn't child of parent layout the result will be always 1. Call IsChildOf(RuntimeWorkspaceLayout) before if you not sure about hierarchy state.

Exceptions
ArgumentOutOfRangeExceptionparent has not branches.

◆ GetParentBranch() [2/2]

int Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.GetParentBranch ( RuntimeWorkspaceLayout  parent)

Checks the branch index of the layout relative for certain parent layout.

Parameters
parentParent layout.
Returns

Index of the branch.

Not provides extra checks of hierarchy to performance goals. In case if current layout isn't child of parent layout the result will be always 1. Call IsChildOf(RuntimeWorkspaceLayout) before if you not sure about hierarchy state.

Exceptions
ArgumentOutOfRangeExceptionparent has not branches.

◆ IsChildOf() [1/2]

virtual bool Doloro.UIEngine2.AGUIElement.IsChildOf ( AGUIElement  element)
virtualinherited

Checks is the element is a child of another element.

Parameters
elementTarget element.
Returns

Virtual logic that can be re-implemented to allow creation of virtual hierarchy.

◆ IsChildOf() [2/2]

bool Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.IsChildOf ( RuntimeWorkspaceLayout  layout)

Checks is the layout is child of some another layout.

Parameters
layoutSupposed parent.
Returns
Result of hierarchy check.

◆ IsLocalHierarchyChildOf() [1/2]

bool Doloro.UIEngine2.AGUIElement.IsLocalHierarchyChildOf ( AGUIElement  element)
packageinherited

Checks is the element is child of another element in local hierarchy.

Parameters
elementElement to check.
Returns
true in case if child. false otherwise.

◆ IsLocalHierarchyChildOf() [2/2]

bool Doloro.UIEngine2.AWorkspaceProvider.IsLocalHierarchyChildOf ( AWorkspaceProvider  layout)
packageinherited

Checking parent relation in local hierarchy branch.

Parameters
layoutPossible parent layout.
Returns
Result of parental relations check.

◆ MoveSplitterDownOn()

float Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.MoveSplitterDownOn ( float  value)

Trying to move splitter down on defined shift value.

Parameters
valueValue of the shift.
Returns
Applied shift. Could be lesser in case if requested shift not allowed due to the another layouts or root layout size in common.

◆ MoveSplitterLeftOn()

float Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.MoveSplitterLeftOn ( float  value)

Trying to move splitter left on defined shift value.

Parameters
valueValue of the shift.
Returns
Applied shift. Could be lesser in case if requested shift not allowed due to the another layouts or root layout size in common.

◆ MoveSplitterRightOn()

float Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.MoveSplitterRightOn ( float  value)

Trying to move splitter right on defined shift value.

Parameters
valueValue of the shift.
Returns
Applied shift. Could be lesser in case if requested shift not allowed due to the another layouts or root layout size in common.

◆ MoveSplitterUpOn()

float Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.MoveSplitterUpOn ( float  value)

Trying to move splitter up on defined shift value.

Parameters
valueValue of the shift.
Returns
Applied shift. Could be lesser in case if requested shift not allowed due to the another layouts or root layout size in common.

◆ OnClampedSizeChanged()

override void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.OnClampedSizeChanged ( )
protectedvirtual

Should be called in case if MinSize or MaxSize is modified.

Reimplemented from Doloro.UIEngine2.AClampedWorkspaceProvider.

◆ OnContextMenu()

virtual void Doloro.UIEngine2.AGUIElement.OnContextMenu ( )
protectedvirtualinherited

Occurs when you calling context menu with focused element.

Reimplemented in Doloro.UIEngine2.Modules.ElementsCollection.GUIElementHighlighter, and Doloro.UIEngine2.Modules.Tabs.TabGUIElement.

◆ OnDestroy()

override void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.OnDestroy ( )
protectedvirtual

Occurs before object destroy.

Reimplemented from Doloro.UIEngine2.AGUIElement.

◆ OnDrag()

virtual void Doloro.UIEngine2.AGUIElement.OnDrag ( )
protectedvirtualinherited

Occurs each frame when you drags the element.

Use ElementOnAction to get drag target.

◆ OnDragEnd()

virtual void Doloro.UIEngine2.AGUIElement.OnDragEnd ( )
protectedvirtualinherited

Occurs when dragging element from ElementOnAction is released.

Reimplemented in Doloro.UIEngine2.Controls.TooltipGUIController, and Doloro.UIEngine2.AFreespaceLayoutController.

◆ OnElementGUI()

virtual void Doloro.UIEngine2.AGUIElement.OnElementGUI ( )
virtualinherited

Calling each draw frame. Use to update showing data.

Calling each frame if element displayed. Before self draw call OnElementGUI for all elements in Children collection.

IMPORTANT

Avoid reading inputs here. Use OnInput instead.

Reimplemented in Doloro.UIEngine2.Modules.Context.ContextMenu, Doloro.UIEngine2.Modules.ElementsCollection.GridCollection, and Doloro.UIEngine2.Modules.ElementsCollection.GUIElementHighlighter.

◆ OnFocus()

virtual void Doloro.UIEngine2.AGUIElement.OnFocus ( )
protectedvirtualinherited

Occurs when element requested on focus.

Reimplemented in Doloro.UIEngine2.Window, Doloro.UIEngine2.WindowUIController, and Doloro.UIEngine2.Modules.Tabs.TabGUIElement.

◆ OnHoverBegin()

virtual void Doloro.UIEngine2.AGUIElement.OnHoverBegin ( )
protectedvirtualinherited

Occurs when pointer starts hovering the element.

Reimplemented in Doloro.UIEngine2.Controls.TooltipGUIController, and Doloro.UIEngine2.WindowUIController.

◆ OnHoverEnd()

virtual void Doloro.UIEngine2.AGUIElement.OnHoverEnd ( )
protectedvirtualinherited

Occurs when pointer ending hovering the element.

Reimplemented in Doloro.UIEngine2.Controls.TooltipGUIController, and Doloro.UIEngine2.WindowUIController.

◆ OnInput()

virtual void Doloro.UIEngine2.AGUIElement.OnInput ( )
virtualinherited

Handler that will be called for elements in input priority order. use to modify data along with input instead of using OnElementGUI.

Don't forget call Event.Use in case if event consumed by element. Otherwise event will foes deeper into the focused elements hierarchy.

Reimplemented in Doloro.UIEngine2.Modules.Context.ContextMenu, and Doloro.UIEngine2.Modules.ElementsCollection.GridCollection.

◆ OnIntialization()

virtual void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.OnIntialization ( )
protectedvirtual

Uses instead of Awake to allow initialize the child component avoiding awaiting of Awake call.

Executes only at first time.

◆ OnLayoutConfigurationChanged()

virtual void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.OnLayoutConfigurationChanged ( )
protectedvirtual

Todo:
Not implemented. Occurs when layout settings changed and layout expected to re-build.

◆ OnLostFocus()

virtual void Doloro.UIEngine2.AGUIElement.OnLostFocus ( )
protectedvirtualinherited

Occurs when UI loosing focus.

Reimplemented in Doloro.UIEngine2.Modules.ElementsCollection.AGUIElementsCollection.

◆ OnMoved()

override void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.OnMoved ( )
protectedvirtual

Occurs when layout moved.

Reimplemented from Doloro.UIEngine2.AGUIElement.

◆ OnPointerDown()

◆ OnPointerUp()

virtual void Doloro.UIEngine2.AGUIElement.OnPointerUp ( )
protectedvirtualinherited

Occurs when LBM released above hovering element.

Not occurs in case it there is had been drag event.

Reimplemented in Doloro.UIEngine2.AFreespaceLayoutController, Doloro.UIEngine2.WindowDragController, Doloro.UIEngine2.Modules.Context.ContextMenuItem, and Doloro.UIEngine2.Modules.ElementsCollection.GUIElementHighlighter.

◆ OnSizeChanged()

override void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.OnSizeChanged ( )
protectedvirtual

Occurs when layout size is changed.

Reimplemented from Doloro.UIEngine2.AGUIElement.

◆ PointerLogicConveyor()

void Doloro.UIEngine2.AGUIElement.PointerLogicConveyor ( Vector2  pointerPosition,
Rect[]  masks 
)
packageinherited

Conveyor that handles pointer related events.

Parameters
pointerPositionPosition of pointer at the screen.
masksMasks that should be checked for the element.

◆ PutToOuterLayoutsDataBase()

static void Doloro.UIEngine2.AWorkspaceProvider.PutToOuterLayoutsDataBase ( AWorkspaceProvider  layout)
staticprotectedinherited

Putting the runtime layout to the outer state.

Parameters
layoutTarget layout.

◆ RecomputeIsolatedBoundsForLayout()

static void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.RecomputeIsolatedBoundsForLayout ( RuntimeWorkspaceLayout  source)
static

Recomputed allowed size bounds for layout and relative layouts.

Parameters
sourceTarget layout for recomputing.

The bounds computes only for the single branch and not affected by parallel one. If you need to know the clamped bounds for certain outer bounds with mentioning external effect use DetectBounds(RuntimeWorkspaceLayout) instead.

◆ Release()

void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.Release ( ReleaseOrderOptions  option)

Releasing sub-workspace.

Parameters
optionReleasing option.

◆ ReleaseFromOuterLayoutsDataBase()

static void Doloro.UIEngine2.AWorkspaceProvider.ReleaseFromOuterLayoutsDataBase ( AWorkspaceProvider  layout)
staticprotectedinherited

Releasing layout from the outer state.

Parameters
layoutTarget layout.

◆ SetMaxSize()

void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.SetMaxSize ( Vector2  size,
int  branch 
)
package

Applying max size to the branch slot.

Parameters
sizeTarget size.
branchTarget branch.

◆ SetMinSize()

void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.SetMinSize ( Vector2  size,
int  branch 
)
package

Applying min size to the branch slot.

Parameters
sizeTarget size.
branchTarget branch.

◆ SetSizeClamp()

void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.SetSizeClamp ( Vector2  minSize,
Vector2  maxSize,
int  branch 
)
package

Applying size clamp to the branch slot.

Parameters
minSizeTarget min size.
maxSizeTarget max size.
branchTarget branch.

◆ SetSplitterPosition()

void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.SetSplitterPosition ( Vector2  position)

Trying to place splitter at the screen space position.

Parameters
positionScreen space position. Will automatically clamped to parent workspace bounds. Using only the same axis as splitter.

◆ SimulateFreespaceSplitterPosition()

virtual Vector2 Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.SimulateFreespaceSplitterPosition ( float  splitValue)
protectedvirtual

Computes position of the Splitter with certain SplitValue without extra checks of the next layouts colliding encounters.

Parameters
splitValueSplitValue to simulate.
Returns
Screen space position of the splitter with defined SplitValue in case if not limited with some another layout.

◆ Split() [1/2]

void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.Split ( float  splitterPosition,
SplitTypeOptions  type,
SplitDirectionOrderOptions  direction 
)

Splitting workspace

Parameters
splitterPosition
type
direction
Exceptions
WorkspaceAlreadySplittedExceptionWorkspace already have been splitted. Release(ReleaseOrderOptions) it first.

◆ Split() [2/2]

void Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.Split ( SplitDirectionOrderOptions  direction)

Splitting workspace by half.

Parameters
directionSplit direction.

Property Documentation

◆ Children

ReadOnlyCollection<AGUIElement> Doloro.UIEngine2.AGUIElement.Children = new ReadOnlyCollection<AGUIElement>(new AGUIElement[0])
getinherited

Collection of element children.

Immediately access but has arbitrary order.

◆ ElementOnAction

AGUIElement Doloro.UIEngine2.AGUIElement.ElementOnAction
staticgetinherited

Reference to last dragged element.

Overriding only when new drag begun. Use IsMouseDragOn property to check is the process state.

◆ FirstSubWorspace

virtual RuntimeWorkspaceLayout Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.FirstSubWorspace
get

Reference to first child workspace.

Left zone in case of Horizontal split. Bottom zone in case of Vertical split.

◆ IsActive

bool Doloro.UIEngine2.AGUIElement.IsActive
getinherited

Checks current element activity state.

◆ IsRaycastTarget

bool Doloro.UIEngine2.AGUIElement.IsRaycastTarget
getsetinherited

Defines is the element will handle mouse click events.

Not affects children. Still handles OnHover-like events. Not blocks manual call of CallClick and CallContextMenu API members.

◆ OnStackTopWhenFocused

virtual bool Doloro.UIEngine2.AGUIElement.OnStackTopWhenFocused
getprotectedinherited

Defines if the element would be moved at the top of focus stack or will stay the same position when it focused.

By default elements not changing order by some system like Window module Requires stack modifying to make it possible to update windows order.

Works only for elements with true IsRoot property.

◆ Position

virtual Vector2 Doloro.UIEngine2.AGUIElement.Position
getsetinherited

Position of element at the screen.

Demands RectTransform if not overridden.

◆ ScreenSpacePostion

Vector2 Doloro.UIEngine2.AGUIElement.ScreenSpacePostion
getsetinherited

Returns elements's position at screen space.

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

◆ ScreenSpaceRect

Rect Doloro.UIEngine2.AGUIElement.ScreenSpaceRect
getsetinherited

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.

◆ SecondSubWorspace

virtual RuntimeWorkspaceLayout Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.SecondSubWorspace
get

Reference to second child workspace.

Right zone in case of Horizontal split. Top zone in case of Vertical split.

◆ Size

override Vector2 Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.Size
getset

The size of the operating rect.

Exceptions
NotSupportedExceptionset is not supported.

◆ SplitValue

virtual float Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.SplitValue
getset

Position of splitter.

Measure depends from SplitType. SplitTypeOptions.Ratio: [0,1] SplitTypeOptions.FirstFixed || SplitTypeOptions.SecondFixed: screen bounds.

◆ WorkspaceKey

override string Doloro.UIEngine2.Modules.RuntimeWorkspace.RuntimeWorkspaceLayout.WorkspaceKey
getset

The unique workspace key that will be used to bond layout to the WorkspaceLayout service.

Null or whitespace mean that the layout has no bond.


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