Arma Reforger Script API
Loading...
Searching...
No Matches
SCR_WidgetTools Interface Reference

Static Public Member Functions

static Widget FindWidgetInChildren (Widget w, WidgetType type)
 Search for widget of specific type in itslef and all its children, recursively.
 
static Widget FindWidgetInChildren (Widget w, TypeName type)
 Search for widget with UI component in widget and all its children, recursively.
 
static Widget FindWidgetInParents (Widget w, WidgetType type)
 Search for widget of specific type in itself and all its parents.
 
static ScriptedWidgetEventHandler FindHandlerInChildren (Widget w, TypeName type)
 Search for UI component in widget and all its children, recursively.
 
static ScriptedWidgetEventHandler FindHandlerInParents (Widget w, TypeName type)
 Search for UI component in widget and all its parents.
 
static bool InHierarchy (Widget w, Widget parent)
 Check if a widget is in another widget's hierarchy.
 
static bool IsChildOf (Widget w, notnull Widget parent, out int depth=0)
 Check if a widget is in another widget's hierarchy.
 
static void RemoveChildrenFromHierarchy (Widget w)
 Remove all child widgets from hierarchy.
 
static MenuBase FindMenu (Widget w)
 Find menu to which the widget belongs to.
 
static string GetHierarchyLog (Widget w, string delimiter=" / ")
 Get full hierarchy path towards a widget.
 
static ScriptedWidgetEventHandler FindHandlerOnWidget (Widget root, string widgetName, TypeName type)
 Find widget handler in widget by name inside given widget.
 

Member Function Documentation

◆ FindHandlerInChildren()

static ScriptedWidgetEventHandler SCR_WidgetTools.FindHandlerInChildren ( Widget w,
TypeName type )
static

Search for UI component in widget and all its children, recursively.

Parameters
wQueried widget
typeType of desired UI component
Returns
UI component, or null of not found

◆ FindHandlerInParents()

static ScriptedWidgetEventHandler SCR_WidgetTools.FindHandlerInParents ( Widget w,
TypeName type )
static

Search for UI component in widget and all its parents.

Parameters
wQueried widget
typeType of desired UI component
Returns
UI component, or null of not found

◆ FindHandlerOnWidget()

static ScriptedWidgetEventHandler SCR_WidgetTools.FindHandlerOnWidget ( Widget root,
string widgetName,
TypeName type )
static

Find widget handler in widget by name inside given widget.

Parameters
rootWidget
widgetNamestring
typetypename
Returns
ScriptedWidgetEventHandler handler

◆ FindMenu()

static MenuBase SCR_WidgetTools.FindMenu ( Widget w)
static

Find menu to which the widget belongs to.

Must not be called for ScriptedWidgetComponent.HandlerAttached(), it's too early.

Parameters
wQueried widget
Returns
Menu, or null if the widget is not part of any menu

◆ FindWidgetInChildren() [1/2]

static Widget SCR_WidgetTools.FindWidgetInChildren ( Widget w,
TypeName type )
static

Search for widget with UI component in widget and all its children, recursively.

Parameters
wQueried widget
typeType of desired UI component
Returns
Widget, or null if not found

◆ FindWidgetInChildren() [2/2]

static Widget SCR_WidgetTools.FindWidgetInChildren ( Widget w,
WidgetType type )
static

Search for widget of specific type in itslef and all its children, recursively.

Parameters
wQueried widget
typeType of desired widget
Returns
Widget, or null if not found

◆ FindWidgetInParents()

static Widget SCR_WidgetTools.FindWidgetInParents ( Widget w,
WidgetType type )
static

Search for widget of specific type in itself and all its parents.

Parameters
wQueried widget
typeType of desired widget
Returns
Widget, or null of not found

◆ GetHierarchyLog()

static string SCR_WidgetTools.GetHierarchyLog ( Widget w,
string delimiter = " / " )
static

Get full hierarchy path towards a widget.

Parameters
wWidget
delimeterString added between widget names
Returns
Path

◆ InHierarchy()

static bool SCR_WidgetTools.InHierarchy ( Widget w,
Widget parent )
static

Check if a widget is in another widget's hierarchy.

Parameters
wQueried widget
parentQueried parent
Returns
True if Widget 'w' is 'parent' or one if its children, recursively.

◆ IsChildOf()

static bool SCR_WidgetTools.IsChildOf ( Widget w,
notnull Widget parent,
out int depth = 0 )
static

Check if a widget is in another widget's hierarchy.

If we reach the parent after performing more than 0 steps then the Widget is a child

Parameters
wQueried widget
parentQueried parent
Returns
True if Widget 'w' is one of Widget 'parent' children, recursively.

◆ RemoveChildrenFromHierarchy()

static void SCR_WidgetTools.RemoveChildrenFromHierarchy ( Widget w)
static

Remove all child widgets from hierarchy.

Parameters
wParent widget

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