Class StringListAdapterBase

List adapter providing strings only.

class StringListAdapterBase
  : ListAdapterBase;

Constructors

NameDescription
this () create empty string list adapter.
this (items) Init with array of string resource IDs.
this (items) Init with array of unicode strings.
this (items) Init with array of StringListValue.

Fields

NameTypeDescription
_iconIds string[]
_intIds int[]
_items UIStringCollection
_lastItemIndex int
_states uint[]
_stringIds string[]
adapterChanged Signal!(dcanvas.widgets.lists.OnAdapterChangeHandler)Handle items change

Properties

NameTypeDescription
itemCount[get] intreturns number of widgets in list
items[get] const(UIStringCollection)Access to items collection.
items[set] StringListAdapterBaseReplace items collection.
wantKeyEvents[get] boolreturn true to receive keyboard events
wantMouseEvents[get] boolreturn true to receive mouse events

Methods

NameDescription
add (item, index) add new item
add (item, index) add new string resource item
add (item, index) add new raw dstring item
clear () remove all items
itemId (index) returns integer item id by index (if supported)
itemState (index) return list item's state flags
itemStringId (index) returns string item id by index (if supported)
remove (index) remove item by index
resetItemState (index, flags) reset one or more list item's state flags, returns updated state
setItemState (index, flags) set one or more list item's state flags, returns updated state
connect (handler) connect adapter change handler
disconnect (handler) disconnect adapter change handler
itemWidget (index) return list item widget by item index
onThemeChanged () called when theme is changed
updateViews () notify listeners about list items changes
updateStatesLength ()

Aliases

NameDescription
~this