跳转到主要内容

DrawableListItemsInterface

A drawable list items interface. Used to pass the allocated array of drawable elements to ScrollList::setDrawables(), ScrollWheel::setDrawables() or ScrollWheelWithSelectionStyle::setDrawables(). Provides easy access to each element in the array as well as the size of the array.

See: ScrollList::setDrawables, ScrollWheel::setDrawables, ScrollWheelWithSelectionStyle::setDrawables

Inherited by: DrawableListItems< TYPE, SIZE >

Public Functions

virtual Drawable *getDrawable(int16_t index) =0
Gets a drawable at a given index.
virtual int16_tgetNumberOfDrawables() =0
Gets number of drawables.
virtual ~DrawableListItemsInterface()
Finalizes an instance of the DrawableListItemsInterface class.

Public Functions Documentation

getDrawable

virtual Drawable * getDrawable(int16_tindex)

Gets a drawable at a given index.

Parameters:
indexZero-based index of the drawable.
Returns:

Null if it fails, else the drawable.

Reimplemented by: touchgfx::DrawableListItems::getDrawable

getNumberOfDrawables

virtual int16_t getNumberOfDrawables()=0

Gets number of drawables.

Returns:

The number of drawables.

Reimplemented by: touchgfx::DrawableListItems::getNumberOfDrawables

~DrawableListItemsInterface

Finalizes an instance of the DrawableListItemsInterface class.