Arma Reforger Script API
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
MenuRootComponent Interface Reference

Widget component which can tap to MenuRootBase events. More...

Inheritance diagram for MenuRootComponent:
[legend]

Public Member Functions

MenuRootBase GetMenu ()
 Get the menu instance.
 
Widget GetWidget ()
 Get widget to which the component belongs to.
 
void AddComponent (MenuRootSubComponent component)
 Register subcomponent to this root component.
 
void RemoveComponent (MenuRootSubComponent component)
 Unregister subcomponent from this root component.
 
MenuRootSubComponent FindComponent (TypeName type, bool showError=false)
 Find first subcomponent of given type.
 
int FindComponents (TypeName type, notnull out array< MenuRootSubComponent > outComponents)
 Find all subcomponents of given type.
 
void Init (MenuRootBase menu)
 
override void HandlerAttached (Widget w)
 

Static Public Member Functions

static MenuRootComponent GetRootOf (Widget widget)
 Get the component.
 
static MenuRootComponent GetRootOf (MenuBase menu)
 Get the component.
 

Protected Member Functions

void InitNotRoot ()
 
void ExecInit (Widget w)
 

Protected Attributes

Widget m_Widget
 
MenuRootBase m_Menu
 
ref array< MenuRootSubComponentm_aComponents = {}
 

Detailed Description

Widget component which can tap to MenuRootBase events.

Doesn't need to be added manually, will be created the first time GetComponent() function is called. Subcomponents (MenuRootSubComponent) can access menu and its handlers through this root.

Member Function Documentation

◆ AddComponent()

void MenuRootComponent.AddComponent ( MenuRootSubComponent  component)

Register subcomponent to this root component.

Parameters
componentSubcomponent

◆ ExecInit()

void MenuRootComponent.ExecInit ( Widget  w)
protected

◆ FindComponent()

MenuRootSubComponent MenuRootComponent.FindComponent ( TypeName  type,
bool  showError = false 
)

Find first subcomponent of given type.

Parameters
typeSubcomponent type
Returns
Subcomponent

◆ FindComponents()

int MenuRootComponent.FindComponents ( TypeName  type,
notnull out array< MenuRootSubComponent outComponents 
)

Find all subcomponents of given type.

Parameters
typeSubcomponent type
[out]outCOmponentsArray to be filled with all compatible subcomponents
Returns
Number of matching subcomponents

◆ GetMenu()

MenuRootBase MenuRootComponent.GetMenu ( )

Get the menu instance.

Returns
Menu

◆ GetRootOf() [1/2]

static MenuRootComponent MenuRootComponent.GetRootOf ( MenuBase  menu)
static

Get the component.

Parameters
menuMenu of which the root widget is used
Returns
Root component on which events can be invoked.

◆ GetRootOf() [2/2]

static MenuRootComponent MenuRootComponent.GetRootOf ( Widget  widget)
static

Get the component.

Parameters
widgetWidget of which the root widget is used
Returns
Root component to which events can be attached

◆ GetWidget()

Widget MenuRootComponent.GetWidget ( )

Get widget to which the component belongs to.

Returns
Widget

◆ HandlerAttached()

override void MenuRootComponent.HandlerAttached ( Widget  w)

◆ Init()

void MenuRootComponent.Init ( MenuRootBase  menu)

◆ InitNotRoot()

void MenuRootComponent.InitNotRoot ( )
protected

◆ RemoveComponent()

void MenuRootComponent.RemoveComponent ( MenuRootSubComponent  component)

Unregister subcomponent from this root component.

Parameters
componentSubcomponent

Member Data Documentation

◆ m_aComponents

ref array<MenuRootSubComponent> MenuRootComponent.m_aComponents = {}
protected

◆ m_Menu

MenuRootBase MenuRootComponent.m_Menu
protected

◆ m_Widget

Widget MenuRootComponent.m_Widget
protected

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