跳转到主要内容

DrawableListItems

An array of drawables used by DrawableList. This class is used to ease the setup of a callback function to get access to a specific drawable in the array.

Example usage:

static const int NUMBER_OF_DRAWABLES = 5;
DrawableListItems<TextAreaWithOneWildcardContainer, NUMBER_OF_DRAWABLES> menuItems;

Template Parameters:

  • TYPE Type of the drawables. Can be a simple drawable, such as Image or a more complex container.
  • SIZE Size of the array. This is the number of drawables to allocate and should be all visible drawables on the screen at any given time.

Inherits from: DrawableListItemsInterface

Public Functions

virtual Drawable *getDrawable(int16_t index)
Gets a drawable at a given index.
virtual int16_tgetNumberOfDrawables()
Gets number of drawables.
TYPE &operator[](int index)
Array indexer operator.

Public Attributes

TYPEelement
The array of drawables.

Additional inherited members

Public Functions inherited from DrawableListItemsInterface

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.

Reimplements: touchgfx::DrawableListItemsInterface::getDrawable

getNumberOfDrawables

virtual int16_t getNumberOfDrawables()

Gets number of drawables.

Returns:

The number of drawables.

Reimplements: touchgfx::DrawableListItemsInterface::getNumberOfDrawables

operator[]

TYPE & operator[](intindex)

Array indexer operator.

Parameters:
indexZero-based index of elements to access.
Returns:

The indexed value.

Public Attributes Documentation

element

TYPE element

The array of drawables.