ManaPlus
|
#include <colormodel.h>
Public Member Functions | |
ColorModel () | |
~ColorModel () | |
int | getNumberOfElements () |
std::string | getElementAt (int i) |
const ColorPair * | getColorAt (const int i) const |
StringVect & | getNames () |
size_t | size () |
void | add (const std::string &name, const Color *const color1, const Color *const color2) |
Public Member Functions inherited from ListModel | |
ListModel () | |
virtual | ~ListModel () |
Static Public Member Functions | |
static ColorModel * | createDefault (const Widget2 *const widget) |
Protected Attributes | |
StringVect | mNames |
std::vector< ColorPair > | mColors |
Definition at line 36 of file colormodel.h.
ColorModel::ColorModel | ( | ) |
ColorModel::~ColorModel | ( | ) |
Definition at line 37 of file colormodel.cpp.
void ColorModel::add | ( | const std::string & | name, |
const Color *const | color1, | ||
const Color *const | color2 | ||
) |
Definition at line 61 of file colormodel.cpp.
|
static |
Definition at line 72 of file colormodel.cpp.
References _, addColor, ColorName::BLACK, ColorName::BLUE, ColorName::BROWN, ColorModel(), ColorName::GRAY, ColorName::GREEN, ColorName::ORANGE, ColorName::PINK, ColorName::PURPLE, ColorName::RED, and ColorName::YELLOW.
const ColorPair * ColorModel::getColorAt | ( | const int | i | ) | const |
Definition at line 53 of file colormodel.cpp.
References CAST_S32, CAST_SIZE, and mColors.
Referenced by ColorPage::draw().
|
virtual |
Gets an element at a certain index in the list.
i | An index in the list. |
Implements ListModel.
Definition at line 46 of file colormodel.cpp.
References CAST_SIZE, getNumberOfElements(), and mNames.
|
inline |
|
virtual |
Gets the number of elements in the list.
Implements ListModel.
Definition at line 41 of file colormodel.cpp.
References CAST_S32, and mNames.
Referenced by getElementAt().
|
inline |
|
protected |
Definition at line 67 of file colormodel.h.
Referenced by add(), and getColorAt().
|
protected |
Definition at line 66 of file colormodel.h.
Referenced by add(), getElementAt(), getNames(), getNumberOfElements(), and size().