Palettes::PaletteIterator class

Used to iterate through the items of an editors palette.

PaletteIteratorPtr iterator = new Palettes::PaletteIterator();
iterator->Init(palette);
auto item = iterator->Start();
while (item) {
    // Do something with item...
    item = iterator->Next();
}

Base classes

class DefaultRefCounted
The default implementation of a reference counted class.
class Object
This class represents a basic reference counted object.

Public static variables

static const uint32_t TYPE

Public functions

auto Init(PaletteMain* palette) -> void
auto HasNext() -> bool
auto Start(uint32_t* dstCategoryID = nullptr, int* dstColumn = nullptr, int* dstRow = nullptr, int* dstPageIndex = nullptr) -> PaletteItem*
auto Next(uint32_t* dstCategoryID = nullptr, int* dstColumn = nullptr, int* dstRow = nullptr, int* dstPageIndex = nullptr) -> PaletteItem*
Gets the next element in the iterator.

Public variables

PaletteMainPtr mpPalette
int mCategoryIndex
int mSubCategoryIndex
int mPageIndex
int mItemIndex

Function documentation

PaletteItem* Palettes::PaletteIterator::Next(uint32_t* dstCategoryID = nullptr, int* dstColumn = nullptr, int* dstRow = nullptr, int* dstPageIndex = nullptr)

Gets the next element in the iterator.

Parameters
dstCategoryID out
dstColumn out
dstRow out
dstPageIndex out
Returns The next palette item, or null if the end was reached

Will find the first next palette item that is not null. Returns null if it reaches the end of the palette.