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

Listbox component which supports multi selection, custom element layouts. More...

Inheritance diagram for SCR_ListBoxComponent:
[legend]

Public Member Functions

int AddItem (string item, Managed data=null, ResourceName itemLayout=string.Empty)
 
int AddItemAndIcon (string item, ResourceName imageOrImageset, string iconName, Managed data=null, ResourceName itemLayout=string.Empty)
 
void RemoveItem (int item)
 
Managed GetItemData (int item)
 
int GetItemCount ()
 
int FindItemWithData (Managed data)
 Returns ID of item with same user data as propvided. Returns -1 if not found or null was passed.
 
array< int > GetSelectedItems (bool selected=true)
 Returns IDs of selected items.
 
int GetSelectedItem ()
 Returns ID of currently selected item, if multiselection is disabled. Otherwise returns -1.
 
SCR_ListBoxElementComponent GetElementComponent (int item)
 Returns list box element with given ID Probably you want to use it in very rare cases...
 
bool IsItemSelected (int item)
 Returns true if item with given ID is selected.
 
void AddSeparator (string text)
 
void SetFocusOnFirstItem ()
 
bool GetFocused ()
 Returns true when any list entry is focused.
 
void Clear ()
 Removes all items and separators from the listbox.
 
void SetItemSelected (int item, bool selected, bool invokeOnChanged=true, bool instant=false)
 
void SetAllItemsSelected (bool selected, bool invokeOnChanged=true)
 
void SetItemText (int item, string text)
 
override void HandlerAttached (Widget w)
 

Public Attributes

ref ScriptInvoker m_OnChanged = new ScriptInvoker()
 

Protected Member Functions

void VisualizeSelection (int item, bool selected, bool instant=false)
 
int _AddItem (string item, Managed data, out SCR_ListBoxElementComponent compOut, ResourceName itemLayout=string.Empty)
 
void _SetItemSelected (int item, bool selected, bool invokeOnChanged, bool instant=false)
 
string GetUniqueWidgetName ()
 
void OnItemClick (SCR_ListBoxElementComponent comp)
 

Protected Attributes

ResourceName m_sElementLayout
 
ResourceName m_sSeparatorLayout
 
bool m_bMultiSelection
 
VerticalLayoutWidget m_wList
 
ref array< SCR_ListBoxElementComponentm_aElementComponents = {}
 
int m_iCurrentItem = -1
 
int m_iWidgetNameNextId
 

Detailed Description

Listbox component which supports multi selection, custom element layouts.

!!! This is not entirely finished, use at own risk.

Member Function Documentation

◆ _AddItem()

int SCR_ListBoxComponent._AddItem ( string  item,
Managed  data,
out SCR_ListBoxElementComponent  compOut,
ResourceName  itemLayout = string::Empty 
)
protected

◆ _SetItemSelected()

void SCR_ListBoxComponent._SetItemSelected ( int  item,
bool  selected,
bool  invokeOnChanged,
bool  instant = false 
)
protected

◆ AddItem()

int SCR_ListBoxComponent.AddItem ( string  item,
Managed  data = null,
ResourceName  itemLayout = string::Empty 
)
Parameters
[in]item
[in]data
[in]itemLayout
Returns

◆ AddItemAndIcon()

int SCR_ListBoxComponent.AddItemAndIcon ( string  item,
ResourceName  imageOrImageset,
string  iconName,
Managed  data = null,
ResourceName  itemLayout = string::Empty 
)
Parameters
[in]item
[in]imageOrImageset
[in]iconName
[in]data
[in]itemLayout
Returns

◆ AddSeparator()

void SCR_ListBoxComponent.AddSeparator ( string  text)
Parameters
[in]text

◆ Clear()

void SCR_ListBoxComponent.Clear ( )

Removes all items and separators from the listbox.

◆ FindItemWithData()

int SCR_ListBoxComponent.FindItemWithData ( Managed  data)

Returns ID of item with same user data as propvided. Returns -1 if not found or null was passed.

◆ GetElementComponent()

SCR_ListBoxElementComponent SCR_ListBoxComponent.GetElementComponent ( int  item)

Returns list box element with given ID Probably you want to use it in very rare cases...

◆ GetFocused()

bool SCR_ListBoxComponent.GetFocused ( )

Returns true when any list entry is focused.

◆ GetItemCount()

int SCR_ListBoxComponent.GetItemCount ( )
Returns

◆ GetItemData()

Managed SCR_ListBoxComponent.GetItemData ( int  item)
Parameters
[in]item
Returns

◆ GetSelectedItem()

int SCR_ListBoxComponent.GetSelectedItem ( )

Returns ID of currently selected item, if multiselection is disabled. Otherwise returns -1.

◆ GetSelectedItems()

array< int > SCR_ListBoxComponent.GetSelectedItems ( bool  selected = true)

Returns IDs of selected items.

◆ GetUniqueWidgetName()

string SCR_ListBoxComponent.GetUniqueWidgetName ( )
protected

◆ HandlerAttached()

override void SCR_ListBoxComponent.HandlerAttached ( Widget  w)

◆ IsItemSelected()

bool SCR_ListBoxComponent.IsItemSelected ( int  item)

Returns true if item with given ID is selected.

◆ OnItemClick()

void SCR_ListBoxComponent.OnItemClick ( SCR_ListBoxElementComponent  comp)
protected

◆ RemoveItem()

void SCR_ListBoxComponent.RemoveItem ( int  item)
Parameters
[in]item

◆ SetAllItemsSelected()

void SCR_ListBoxComponent.SetAllItemsSelected ( bool  selected,
bool  invokeOnChanged = true 
)
Parameters
[in]selected
[in]invokeOnChanged

◆ SetFocusOnFirstItem()

void SCR_ListBoxComponent.SetFocusOnFirstItem ( )

◆ SetItemSelected()

void SCR_ListBoxComponent.SetItemSelected ( int  item,
bool  selected,
bool  invokeOnChanged = true,
bool  instant = false 
)
Parameters
[in]item
[in]selected
[in]invokeOnChanged

◆ SetItemText()

void SCR_ListBoxComponent.SetItemText ( int  item,
string  text 
)
Parameters
[in]item
[in]text

◆ VisualizeSelection()

void SCR_ListBoxComponent.VisualizeSelection ( int  item,
bool  selected,
bool  instant = false 
)
protected

Member Data Documentation

◆ m_aElementComponents

ref array<SCR_ListBoxElementComponent> SCR_ListBoxComponent.m_aElementComponents = {}
protected

◆ m_bMultiSelection

bool SCR_ListBoxComponent.m_bMultiSelection
protected

◆ m_iCurrentItem

int SCR_ListBoxComponent.m_iCurrentItem = -1
protected

◆ m_iWidgetNameNextId

int SCR_ListBoxComponent.m_iWidgetNameNextId
protected

◆ m_OnChanged

ref ScriptInvoker SCR_ListBoxComponent.m_OnChanged = new ScriptInvoker()

◆ m_sElementLayout

ResourceName SCR_ListBoxComponent.m_sElementLayout
protected

◆ m_sSeparatorLayout

ResourceName SCR_ListBoxComponent.m_sSeparatorLayout
protected

◆ m_wList

VerticalLayoutWidget SCR_ListBoxComponent.m_wList
protected

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