|
Kodi Docs 20.0
Kodi is an open source media player and entertainment hub.
|
Used for a scrolling lists of items. Replaces the list control. More...
Classes | |
| class | XBMCAddon::xbmcgui::ControlList |
Functions | |
| XBMCAddon::xbmcgui::ControlList::addItem (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::addItems (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::selectItem (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::removeItem (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::reset () | |
| |
| XBMCAddon::xbmcgui::ControlList::getSpinControl () | |
| |
| XBMCAddon::xbmcgui::ControlList::getSelectedPosition () | |
| |
| XBMCAddon::xbmcgui::ControlList::getSelectedItem () | |
| |
| XBMCAddon::xbmcgui::ControlList::setImageDimensions (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::setSpace (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::setPageControlVisible (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::size () | |
| |
| XBMCAddon::xbmcgui::ControlList::getItemHeight () | |
| |
| XBMCAddon::xbmcgui::ControlList::getSpace () | |
| |
| XBMCAddon::xbmcgui::ControlList::getListItem (...) | |
| |
| XBMCAddon::xbmcgui::ControlList::setStaticContent (...) | |
| |
Used for a scrolling lists of items. Replaces the list control.
Class: ControlList(x, y, width, height[, font, textColor, buttonTexture, buttonFocusTexture,
selectedColor, imageWidth, imageHeight, itemTextXOffset, itemTextYOffset,
itemHeight, space, alignmentY, shadowColor]) The list container is one of several containers used to display items from file lists in various ways. The list container is very flexible - it's only restriction is that it is a list - i.e. a single column or row of items. The layout of the items is very flexible and is up to the skinner.
| x | integer - x coordinate of control. | |||||||||||||||||||||
| y | integer - y coordinate of control. | |||||||||||||||||||||
| width | integer - width of control. | |||||||||||||||||||||
| height | integer - height of control. | |||||||||||||||||||||
| font | [opt] string - font used for items label. (e.g. 'font13') | |||||||||||||||||||||
| textColor | [opt] hexstring - color of items label. (e.g. '0xFFFFFFFF') | |||||||||||||||||||||
| buttonTexture | [opt] string - filename for focus texture. | |||||||||||||||||||||
| buttonFocusTexture | [opt] string - filename for no focus texture. | |||||||||||||||||||||
| selectedColor | [opt] integer - x offset of label. | |||||||||||||||||||||
| imageWidth | [opt] integer - width of items icon or thumbnail. | |||||||||||||||||||||
| imageHeight | [opt] integer - height of items icon or thumbnail. | |||||||||||||||||||||
| itemTextXOffset | [opt] integer - x offset of items label. | |||||||||||||||||||||
| itemTextYOffset | [opt] integer - y offset of items label. | |||||||||||||||||||||
| itemHeight | [opt] integer - height of items. | |||||||||||||||||||||
| space | [opt] integer - space between items. | |||||||||||||||||||||
| alignmentY | [opt] integer - Y-axis alignment of items label
| |||||||||||||||||||||
| shadowColor | [opt] hexstring - color of items label's shadow. (e.g. '0xFF000000') |
Example:
| void XBMCAddon::xbmcgui::ControlList::addItem | ( | ... | ) |
Function: addItem(item) | item | string, unicode or ListItem - item to add. |
Example:
| void XBMCAddon::xbmcgui::ControlList::addItems | ( | ... | ) |
Function: addItems(items) | items | List - list of strings, unicode objects or ListItems to add. |
Large lists benefit considerably, than using the standard addItem()
Example:
| long XBMCAddon::xbmcgui::ControlList::getItemHeight | ( | ) |
Function: getItemHeight() Example:
| XBMCAddon::xbmcgui::ListItem * XBMCAddon::xbmcgui::ControlList::getListItem | ( | ... | ) |
| XBMCAddon::xbmcgui::ListItem * XBMCAddon::xbmcgui::ControlList::getSelectedItem | ( | ) |
Function: getSelectedItem() Example:
| long XBMCAddon::xbmcgui::ControlList::getSelectedPosition | ( | ) |
Function: getSelectedPosition() Example:
| long XBMCAddon::xbmcgui::ControlList::getSpace | ( | ) |
Function: getSpace() Example:
| Control * XBMCAddon::xbmcgui::ControlList::getSpinControl | ( | ) |
Function: getSpinControl() Example:
| void XBMCAddon::xbmcgui::ControlList::removeItem | ( | ... | ) |
Function: removeItem(index) | index | integer - index number of the item to remove. |
Example:
Function: reset() reset() will destroy any ListItem objects in the ControlList if not hold by any other class. Make sure you you don't call addItems() with the previous ListItem references after calling reset(). If you need to preserve the ListItem objects after reset() make sure you store them as members of your WindowXML class (see examples).Examples:
The below example shows you how you can reset the ControlList but this time avoiding ListItem object destruction. The example assumes self as a WindowXMLDialog instance containing a ControlList with id = 800. The class preserves the ListItem objects in a class member variable.
| void XBMCAddon::xbmcgui::ControlList::selectItem | ( | ... | ) |
Function: selectItem(item) | item | integer - index number of the item to select. |
Example:
| void XBMCAddon::xbmcgui::ControlList::setImageDimensions | ( | ... | ) |
Function: setImageDimensions(imageWidth, imageHeight) | imageWidth | [opt] integer - width of items icon or thumbnail. |
| imageHeight | [opt] integer - height of items icon or thumbnail. |
Example:
| void XBMCAddon::xbmcgui::ControlList::setPageControlVisible | ( | ... | ) |
Function: setPageControlVisible(visible) | visible | boolean - True=visible / False=hidden. |
Example:
| void XBMCAddon::xbmcgui::ControlList::setSpace | ( | ... | ) |
Function: setSpace(space) | space | [opt] integer - space between items. |
Example:
| void XBMCAddon::xbmcgui::ControlList::setStaticContent | ( | ... | ) |
Function: setStaticContent(items) | items | List - list of listitems to add. |
Example:
| long XBMCAddon::xbmcgui::ControlList::size | ( | ) |
Function: size() Example: