Class: kodi::gui::CListItem
Selectable window list item
The list item control is used for creating item lists in Kodi.
More...
Class: kodi::gui::CListItem
Selectable window list item
The list item control is used for creating item lists in Kodi.
The with #include <kodi/gui/ListItem.h> given class is used to create a item entry for a list on window and to support it's control.
◆ CListItem()
kodi::gui::CListItem::CListItem |
( |
const std::string & | label = "", |
|
|
const std::string & | label2 = "", |
|
|
const std::string & | path = "" ) |
|
inline |
Class constructor with parameters.
- Parameters
-
[in] | label | [opt] Item label |
[in] | label2 | [opt] Second Item label (if needed) |
[in] | path | [opt] Path to where item is defined |
◆ GetArt()
std::string kodi::gui::CListItem::GetArt |
( |
const std::string & | type | ) |
|
|
inline |
Sets the listitem's art.
- Parameters
-
[in] | type | Type of Art to set
- Some default art values (any string possible):
value (type) | Type |
thumb | string - image filename |
poster | string - image filename |
banner | string - image filename |
fanart | string - image filename |
clearart | string - image filename |
clearlogo | string - image filename |
landscape | string - image filename |
icon | string - image filename |
|
- Returns
- The url to use for Art
◆ GetLabel()
std::string kodi::gui::CListItem::GetLabel |
( |
| ) |
|
|
inline |
Returns the listitem label.
- Returns
- Label of item
◆ GetLabel2()
std::string kodi::gui::CListItem::GetLabel2 |
( |
| ) |
|
|
inline |
Returns the second listitem label.
- Returns
- Second label of item
◆ GetPath()
std::string kodi::gui::CListItem::GetPath |
( |
| ) |
|
|
inline |
Returns the path / filename of this listitem.
- Returns
- Path string
◆ GetProperty()
std::string kodi::gui::CListItem::GetProperty |
( |
const std::string & | key | ) |
|
|
inline |
Returns a listitem property as a string, similar to an infolabel.
- Parameters
-
[in] | key | string - property name. |
- Returns
- string - List item property
- Note
- Key is NOT case sensitive.
You can use the above as keywords for arguments and skip certain optional arguments.
Once you use a keyword, all following arguments require the keyword.
◆ IsSelected()
bool kodi::gui::CListItem::IsSelected |
( |
| ) |
|
|
inline |
Returns the listitem's selected status.
- Returns
- true if selected, otherwise false
◆ Select()
void kodi::gui::CListItem::Select |
( |
bool | selected | ) |
|
|
inline |
To control selection of item in list (also multiple selection, in list on several items possible).
- Parameters
-
[in] | selected | if true becomes set as selected |
◆ SetArt()
void kodi::gui::CListItem::SetArt |
( |
const std::string & | type, |
|
|
const std::string & | url ) |
|
inline |
Sets the listitem's art.
- Parameters
-
[in] | type | Type of Art to set |
[in] | url | The url to use for Art
- Some default art values (any string possible):
value (type) | Type |
thumb | string - image filename |
poster | string - image filename |
banner | string - image filename |
fanart | string - image filename |
clearart | string - image filename |
clearlogo | string - image filename |
landscape | string - image filename |
icon | string - image filename |
|
◆ SetLabel()
void kodi::gui::CListItem::SetLabel |
( |
const std::string & | label | ) |
|
|
inline |
Sets the listitem label.
- Parameters
-
[in] | label | string or unicode - text string. |
◆ SetLabel2()
void kodi::gui::CListItem::SetLabel2 |
( |
const std::string & | label | ) |
|
|
inline |
Sets the listitem's label2.
- Parameters
-
[in] | label | string or unicode - text string. |
◆ SetPath()
void kodi::gui::CListItem::SetPath |
( |
const std::string & | path | ) |
|
|
inline |
Sets the listitem's path.
- Parameters
-
[in] | path | string or unicode - path, activated when item is clicked. |
- Note
- You can use the above as keywords for arguments.
◆ SetProperty()
void kodi::gui::CListItem::SetProperty |
( |
const std::string & | key, |
|
|
const std::string & | value ) |
|
inline |
Sets a listitem property, similar to an infolabel.
- Parameters
-
[in] | key | string - property name. |
[in] | value | string or unicode - value of property. |
- Note
- Key is NOT case sensitive. You can use the above as keywords for arguments and skip certain
optional arguments.
Once you use a keyword, all following arguments require the keyword.
Some of these are treated internally by Kodi, such as the 'StartOffset' property, which is the offset in seconds at which to start playback of an item. Others may be used in the skin to add extra information, such as 'WatchedCount' for tvshow items
◆ ~CListItem()
kodi::gui::CListItem::~CListItem |
( |
| ) |
|
|
inlineoverride |