Arma Reforger Explorer 1.7.0.54
Arma Reforger Code Explorer by Zeroy - Thanks to MisterOutofTime
Loading...
Searching...
No Matches
SCR_ListBoxComponent Class Reference
Inheritance diagram for SCR_ListBoxComponent:
ScriptedWidgetComponent

Protected Member Functions

int AddItem (string item, Managed data=null, ResourceName itemLayout=string.Empty)
int AddItemAndIcon (string item, ResourceName imageOrImageset, string iconName, out SCR_ListBoxElementComponent outComp, 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< intGetSelectedItems (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)
bool IsItemSelected (int item)
 Returns true if item with given ID is selected.
Widget 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)
void VisualizeSelection (int item, bool selected, bool instant=false)
override void HandlerAttached (Widget w)
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.

Definition at line 4 of file SCR_ListBoxComponent.c.

Member Function Documentation

◆ _AddItem()

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

Definition at line 287 of file SCR_ListBoxComponent.c.

◆ _SetItemSelected()

void SCR_ListBoxComponent::_SetItemSelected ( int item,
bool selected,
bool invokeOnChanged,
bool instant = false )
inlineprotected

Definition at line 326 of file SCR_ListBoxComponent.c.

◆ AddItem()

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

Definition at line 40 of file SCR_ListBoxComponent.c.

◆ AddItemAndIcon()

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

Definition at line 58 of file SCR_ListBoxComponent.c.

◆ AddSeparator()

Widget SCR_ListBoxComponent::AddSeparator ( string text)
inlineprotected
Parameters
[in]text

Definition at line 176 of file SCR_ListBoxComponent.c.

◆ Clear()

void SCR_ListBoxComponent::Clear ( )
inlineprotected

Removes all items and separators from the listbox.

Definition at line 217 of file SCR_ListBoxComponent.c.

◆ FindItemWithData()

int SCR_ListBoxComponent::FindItemWithData ( Managed data)
inlineprotected

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

Definition at line 106 of file SCR_ListBoxComponent.c.

◆ GetElementComponent()

SCR_ListBoxElementComponent SCR_ListBoxComponent::GetElementComponent ( int item)
inlineprotected

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

Definition at line 155 of file SCR_ListBoxComponent.c.

◆ GetFocused()

bool SCR_ListBoxComponent::GetFocused ( )
inlineprotected

Returns true when any list entry is focused.

Definition at line 199 of file SCR_ListBoxComponent.c.

◆ GetItemCount()

int SCR_ListBoxComponent::GetItemCount ( )
inlineprotected
Returns

Definition at line 99 of file SCR_ListBoxComponent.c.

◆ GetItemData()

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

Definition at line 89 of file SCR_ListBoxComponent.c.

◆ GetSelectedItem()

int SCR_ListBoxComponent::GetSelectedItem ( )
inlineprotected

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

Definition at line 144 of file SCR_ListBoxComponent.c.

◆ GetSelectedItems()

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

Returns IDs of selected items.

Definition at line 127 of file SCR_ListBoxComponent.c.

◆ GetUniqueWidgetName()

string SCR_ListBoxComponent::GetUniqueWidgetName ( )
inlineprotected

Definition at line 351 of file SCR_ListBoxComponent.c.

◆ HandlerAttached()

override void SCR_ListBoxComponent::HandlerAttached ( Widget w)
inlineprotected

Definition at line 279 of file SCR_ListBoxComponent.c.

◆ IsItemSelected()

bool SCR_ListBoxComponent::IsItemSelected ( int item)
inlineprotected

Returns true if item with given ID is selected.

Definition at line 165 of file SCR_ListBoxComponent.c.

◆ OnItemClick()

void SCR_ListBoxComponent::OnItemClick ( SCR_ListBoxElementComponent comp)
inlineprotected

Definition at line 359 of file SCR_ListBoxComponent.c.

◆ RemoveItem()

void SCR_ListBoxComponent::RemoveItem ( int item)
inlineprotected
Parameters
[in]item

Definition at line 75 of file SCR_ListBoxComponent.c.

◆ SetAllItemsSelected()

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

Definition at line 247 of file SCR_ListBoxComponent.c.

◆ SetFocusOnFirstItem()

void SCR_ListBoxComponent::SetFocusOnFirstItem ( )
inlineprotected

Definition at line 189 of file SCR_ListBoxComponent.c.

◆ SetItemSelected()

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

Definition at line 232 of file SCR_ListBoxComponent.c.

◆ SetItemText()

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

Definition at line 260 of file SCR_ListBoxComponent.c.

◆ VisualizeSelection()

void SCR_ListBoxComponent::VisualizeSelection ( int item,
bool selected,
bool instant = false )
inlineprotected

Definition at line 273 of file SCR_ListBoxComponent.c.

Member Data Documentation

◆ m_aElementComponents

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

Definition at line 24 of file SCR_ListBoxComponent.c.

◆ m_bMultiSelection

bool SCR_ListBoxComponent::m_bMultiSelection
protected

Definition at line 19 of file SCR_ListBoxComponent.c.

◆ m_iCurrentItem

int SCR_ListBoxComponent::m_iCurrentItem = -1
protected

Definition at line 27 of file SCR_ListBoxComponent.c.

◆ m_iWidgetNameNextId

int SCR_ListBoxComponent::m_iWidgetNameNextId
protected

Definition at line 30 of file SCR_ListBoxComponent.c.

◆ m_sElementLayout

ResourceName SCR_ListBoxComponent::m_sElementLayout
protected

Definition at line 13 of file SCR_ListBoxComponent.c.

◆ m_sSeparatorLayout

ResourceName SCR_ListBoxComponent::m_sSeparatorLayout
protected

Definition at line 16 of file SCR_ListBoxComponent.c.

◆ m_wList

VerticalLayoutWidget SCR_ListBoxComponent::m_wList
protected

Definition at line 21 of file SCR_ListBoxComponent.c.


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