Arma Reforger Script API
|
Listbox component which supports multi selection, custom element layouts. More...
Public 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< 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. | |
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) |
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_ListBoxElementComponent > | m_aElementComponents = {} |
int | m_iCurrentItem = -1 |
int | m_iWidgetNameNextId |
Listbox component which supports multi selection, custom element layouts.
!!! This is not entirely finished, use at own risk.
|
protected |
|
protected |
int SCR_ListBoxComponent.AddItem | ( | string | item, |
Managed | data = null , |
||
ResourceName | itemLayout = string::Empty |
||
) |
[in] | item | |
[in] | data | |
[in] | itemLayout |
int SCR_ListBoxComponent.AddItemAndIcon | ( | string | item, |
ResourceName | imageOrImageset, | ||
string | iconName, | ||
out SCR_ListBoxElementComponent | outComp, | ||
Managed | data = null , |
||
ResourceName | itemLayout = string::Empty |
||
) |
[in] | item | |
[in] | imageOrImageset | |
[in] | iconName | |
[in] | data | |
[in] | itemLayout |
Widget SCR_ListBoxComponent.AddSeparator | ( | string | text | ) |
[in] | text |
void SCR_ListBoxComponent.Clear | ( | ) |
Removes all items and separators from the listbox.
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.
SCR_ListBoxElementComponent SCR_ListBoxComponent.GetElementComponent | ( | int | item | ) |
Returns list box element with given ID Probably you want to use it in very rare cases...
bool SCR_ListBoxComponent.GetFocused | ( | ) |
Returns true when any list entry is focused.
int SCR_ListBoxComponent.GetItemCount | ( | ) |
Managed SCR_ListBoxComponent.GetItemData | ( | int | item | ) |
[in] | item |
int SCR_ListBoxComponent.GetSelectedItem | ( | ) |
Returns ID of currently selected item, if multiselection is disabled. Otherwise returns -1.
array< int > SCR_ListBoxComponent.GetSelectedItems | ( | bool | selected = true | ) |
Returns IDs of selected items.
|
protected |
override void SCR_ListBoxComponent.HandlerAttached | ( | Widget | w | ) |
bool SCR_ListBoxComponent.IsItemSelected | ( | int | item | ) |
Returns true if item with given ID is selected.
|
protected |
void SCR_ListBoxComponent.RemoveItem | ( | int | item | ) |
[in] | item |
void SCR_ListBoxComponent.SetAllItemsSelected | ( | bool | selected, |
bool | invokeOnChanged = true |
||
) |
[in] | selected | |
[in] | invokeOnChanged |
void SCR_ListBoxComponent.SetFocusOnFirstItem | ( | ) |
void SCR_ListBoxComponent.SetItemSelected | ( | int | item, |
bool | selected, | ||
bool | invokeOnChanged = true , |
||
bool | instant = false |
||
) |
[in] | item | |
[in] | selected | |
[in] | invokeOnChanged |
void SCR_ListBoxComponent.SetItemText | ( | int | item, |
string | text | ||
) |
[in] | item | |
[in] | text |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
ref ScriptInvoker SCR_ListBoxComponent.m_OnChanged = new ScriptInvoker() |
|
protected |
|
protected |
|
protected |