Kodi Documentation 22.0
Kodi is an open source media player and entertainment hub.
Loading...
Searching...
No Matches
XBMCAddon::xbmcgui::ControlList Class Reference

#include <Control.h>

Inheritance diagram for XBMCAddon::xbmcgui::ControlList:
XBMCAddon::xbmcgui::Control XBMCAddon::AddonClass

Public Member Functions

 ControlList (long x, long y, long width, long height, const char *font=NULL, const char *textColor=NULL, const char *buttonTexture=NULL, const char *buttonFocusTexture=NULL, const char *selectedColor=NULL, long _imageWidth=10, long _imageHeight=10, long _itemTextXOffset=CONTROL_TEXT_OFFSET_X, long _itemTextYOffset=CONTROL_TEXT_OFFSET_Y, long _itemHeight=27, long _space=2, long _alignmentY=XBFONT_CENTER_Y)
 
 ~ControlList () override
 
 addItem (...)
 

Function: addItem(item)


Add a new item to this list control.
 
 addItems (...)
 

Function: addItems(items)


Adds a list of listitems or strings to this list control.
 
 selectItem (...)
 

Function: selectItem(item)


Select an item by index number.
 
 removeItem (...)
 

Function: removeItem(index)


Remove an item by index number.
 
 reset ()
 

Function: reset()


Clear all ListItems in this control list.
 
 getSpinControl ()
 

Function: getSpinControl()


Returns the associated ControlSpin object.
 
 getSelectedPosition ()
 

Function: getSelectedPosition()


Returns the position of the selected item as an integer.
 
 getSelectedItem ()
 

Function: getSelectedItem()


Returns the selected item as a ListItem object.
 
 setImageDimensions (...)
 

Function: setImageDimensions(imageWidth, imageHeight)


Sets the width/height of items icon or thumbnail.
 
 setItemHeight (...)
 

Function: setItemHeight(itemHeight)


Sets the height of items.
 
 setSpace (...)
 

Function: setSpace(space)


Sets the space between items.
 
 setPageControlVisible (...)
 

Function: setPageControlVisible(visible)


Sets the spin control's visible/hidden state.
 
 size ()
 

Function: size()


Returns the total number of items in this list control as an integer.
 
 getItemHeight ()
 

Function: getItemHeight()


Returns the control's current item height as an integer.
 
 getSpace ()
 

Function: getSpace()


Returns the control's space between items as an integer.
 
 getListItem (...)
 

Function: getListItem(index)


Returns a given ListItem in this List.
 
 setStaticContent (...)
 

Function: setStaticContent(items)


Fills a static list with a list of listitems.
 
void sendLabelBind (int tail)
 
bool canAcceptMessages (int actionId) override
 
 ControlList ()=default
 
CGUIControlCreate () override
 
- Public Member Functions inherited from XBMCAddon::xbmcgui::Control
 ~Control () override
 
 getId () inline bool operator
 

Function: getId()


Returns the control's current id as an integer.
 
 getX ()
 

Function: getX()


Returns the control's current X position.
 
 getY ()
 

Function: getY()


Returns the control's current Y position.
 
 getHeight ()
 

Function: getHeight()


Returns the control's current height as an integer.
 
 getWidth ()
 

Function: getWidth()


Returns the control's current width as an integer.
 
 setEnabled (...)
 

Function: setEnabled(enabled)


Sets the control's enabled/disabled state.
 
 setVisible (...)
 

Function: setVisible(visible)


Sets the control's visible/hidden state.
 
 isVisible (...)
 

Function: isVisible()


Get the control's visible/hidden state with respect to the container/window
 
 setVisibleCondition (...)
 

Function: setVisibleCondition(visible[,allowHiddenFocus])


Sets the control's visible condition.
 
 setEnableCondition (...)
 

Function: setEnableCondition(enable)


Sets the control's enabled condition.
 
 setAnimations (...)
 

Function: setAnimations([(event, attr,)*])


Sets the control's animations.
 
 setPosition (...)
 

Function: setPosition(x, y)


Sets the controls position.
 
 setWidth (...)
 

Function: setWidth(width)


Sets the controls width.
 
 setHeight (...)
 

Function: setHeight(height)


Sets the controls height.
 
 setNavigation (...)
 

Function: setNavigation(up, down, left, right)


Sets the controls navigation.
 
 controlUp (...)
 

Function: controlUp(control)


Sets the controls up navigation.
 
 controlDown (...)
 

Function: controlDown(control)


Sets the controls down navigation.
 
 controlLeft (...)
 

Function: controlLeft(control)


Sets the controls left navigation.
 
 controlRight (...)
 

Function: controlRight(control)


Sets the controls right navigation.
 
- Public Member Functions inherited from XBMCAddon::AddonClass
 AddonClass ()
 
virtual ~AddonClass ()
 
const char * GetClassname () const
 
LanguageHookGetLanguageHook ()
 
bool isDeallocating ()
 
void Release () const
 
void Acquire () const
 

Public Attributes

std::vector< AddonClass::Ref< ListItem > > vecItems
 
std::string strFont
 
AddonClass::Ref< ControlSpinpControlSpin
 
KODI::UTILS::COLOR::Color textColor
 
KODI::UTILS::COLOR::Color selectedColor
 
std::string strTextureButton
 
std::string strTextureButtonFocus
 
int imageHeight = 0
 
int imageWidth = 0
 
int itemHeight = 0
 
int space = 0
 
int itemTextOffsetX = 0
 
int itemTextOffsetY = 0
 
uint32_t alignmentY
 
- Public Attributes inherited from XBMCAddon::xbmcgui::Control
int iControlId = 0
 
int iParentId = 0
 
int dwPosX = 0
 
int dwPosY = 0
 
int dwWidth = 0
 
int dwHeight = 0
 
int iControlUp = 0
 
int iControlDown = 0
 
int iControlLeft = 0
 
int iControlRight = 0
 
std::string m_label {}
 
bool m_visible {true}
 
CGUIControlpGUIControl = nullptr
 

Additional Inherited Members

- Static Public Member Functions inherited from XBMCAddon::AddonClass
static short getNumAddonClasses ()
 
- Protected Member Functions inherited from XBMCAddon::xbmcgui::Control
 Control ()=default
 
- Protected Member Functions inherited from XBMCAddon::AddonClass
virtual void deallocating ()
 
- Static Protected Member Functions inherited from XBMCAddon::AddonClass
static short getNextClassIndex ()
 
- Protected Attributes inherited from XBMCAddon::AddonClass
LanguageHooklanguageHook
 

Constructor & Destructor Documentation

◆ ControlList() [1/2]

XBMCAddon::xbmcgui::ControlList::ControlList ( long x,
long y,
long width,
long height,
const char * font = NULL,
const char * textColor = NULL,
const char * buttonTexture = NULL,
const char * buttonFocusTexture = NULL,
const char * selectedColor = NULL,
long _imageWidth = 10,
long _imageHeight = 10,
long _itemTextXOffset = CONTROL_TEXT_OFFSET_X,
long _itemTextYOffset = CONTROL_TEXT_OFFSET_Y,
long _itemHeight = 27,
long _space = 2,
long _alignmentY = XBFONT_CENTER_Y )

◆ ~ControlList()

XBMCAddon::xbmcgui::ControlList::~ControlList ( )
overridedefault

◆ ControlList() [2/2]

XBMCAddon::xbmcgui::ControlList::ControlList ( )
default

Member Function Documentation

◆ canAcceptMessages()

bool XBMCAddon::xbmcgui::ControlList::canAcceptMessages ( int actionId)
inlineoverridevirtual

Reimplemented from XBMCAddon::xbmcgui::Control.

◆ Create()

CGUIControl * XBMCAddon::xbmcgui::ControlList::Create ( )
overridevirtual

Reimplemented from XBMCAddon::xbmcgui::Control.

◆ sendLabelBind()

void XBMCAddon::xbmcgui::ControlList::sendLabelBind ( int tail)

◆ setItemHeight()

void XBMCAddon::xbmcgui::ControlList::setItemHeight ( ...)

Function: setItemHeight(itemHeight)


Sets the height of items.

Parameters
itemHeightinteger - height of items.

Example:

...
cList.setItemHeight(25)
...

Member Data Documentation

◆ alignmentY

uint32_t XBMCAddon::xbmcgui::ControlList::alignmentY

◆ imageHeight

int XBMCAddon::xbmcgui::ControlList::imageHeight = 0

◆ imageWidth

int XBMCAddon::xbmcgui::ControlList::imageWidth = 0

◆ itemHeight

int XBMCAddon::xbmcgui::ControlList::itemHeight = 0

◆ itemTextOffsetX

int XBMCAddon::xbmcgui::ControlList::itemTextOffsetX = 0

◆ itemTextOffsetY

int XBMCAddon::xbmcgui::ControlList::itemTextOffsetY = 0

◆ pControlSpin

AddonClass::Ref<ControlSpin> XBMCAddon::xbmcgui::ControlList::pControlSpin

◆ selectedColor

KODI::UTILS::COLOR::Color XBMCAddon::xbmcgui::ControlList::selectedColor

◆ space

int XBMCAddon::xbmcgui::ControlList::space = 0

◆ strFont

std::string XBMCAddon::xbmcgui::ControlList::strFont

◆ strTextureButton

std::string XBMCAddon::xbmcgui::ControlList::strTextureButton

◆ strTextureButtonFocus

std::string XBMCAddon::xbmcgui::ControlList::strTextureButtonFocus

◆ textColor

KODI::UTILS::COLOR::Color XBMCAddon::xbmcgui::ControlList::textColor

◆ vecItems

std::vector<AddonClass::Ref<ListItem> > XBMCAddon::xbmcgui::ControlList::vecItems

The documentation for this class was generated from the following files: