Kodi Documentation 22.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. @note This class include also all calls from \ref python_xbmcgui_control "Control" @param x integer - x coordinate of control. @param y integer - y coordinate of control. @param width integer - width of control. @param height integer - height of control. @param font [opt] string - font used for items label. (e.g. 'font13') @param textColor [opt] hexstring - color of items label. (e.g. '0xFFFFFFFF') @param buttonTexture [opt] string - filename for focus texture. @param buttonFocusTexture [opt] string - filename for no focus texture. @param selectedColor [opt] integer - x offset of label. @param imageWidth [opt] integer - width of items icon or thumbnail. @param imageHeight [opt] integer - height of items icon or thumbnail. @param itemTextXOffset [opt] integer - x offset of items label. @param itemTextYOffset [opt] integer - y offset of items label. @param itemHeight [opt] integer - height of items. @param space [opt] integer - space between items. @param alignmentY [opt] integer - Y-axis alignment of items label - \ref kodi_gui_font_alignment "Flags for alignment" used as bits to have several together: | Definition name | Bitflag | Description | |-------------------|:----------:|:------------------------------------| | XBFONT_LEFT | 0x00000000 | Align X left | XBFONT_RIGHT | 0x00000001 | Align X right | XBFONT_CENTER_X | 0x00000002 | Align X center | XBFONT_CENTER_Y | 0x00000004 | Align Y center | XBFONT_TRUNCATED | 0x00000008 | Truncated text | XBFONT_JUSTIFIED | 0x00000010 | Justify text | XBFONT_TRUNCATED_LEFT | 0x00000020 | Truncated text from left @param shadowColor [opt] hexstring - color of items label's shadow. (e.g. '0xFF000000') @note You can use the above as keywords for arguments and skip certain optional arguments.\n Once you use a keyword, all following arguments require the keyword.\n After you create the control, you need to add it to the window with addControl(). -------------------------------------------------------------------------- **Example:** ~~~~~~~~~~~~~{.py} ... self.cList = xbmcgui.ControlList(100, 250, 200, 250, 'font14', space=5) ... ~~~~~~~~~~~~~
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:
void XBMCAddon::xbmcgui::ControlList::reset | ( | ) |
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: