Implements Color list item.
You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.
class CListItemColor :public virtual IListItemColor, public CListItem
{
public:
enum STATE // Possible states
{
stNormal,
stHovered,
stSelected,
stSelectedHovered,
stActive,
stActiveHovered,
stActiveSelected,
stActiveSelectedHovered,
stDisabled
};
public:
void(*OnClick)(IListItem *sender); // Called when clicked
CListItemColor();
CListItemColor(const Color &color, const String &caption);
~CListItemColor() override;
IListItemService *QueryService() override;
String getCaption() override;
Color getColor() override;
bool setCaption(const String &value) override;
bool setColor(const Color &value) override;
IListItem *Clone() override;
bool Copy(IListItem *dest) override;
STATE getState(); // Return current state
// Return layout properties
TEXT_ALIGN getAlign();
RectF getPadding() const;
bool isTextAtRight() const;
Color getCaptionColor(const STATE state) const;
Color getCaptionShadowColor(const STATE state) const;
int getCaptionShadowRadius(const STATE state) const;
PointF getCaptionShadowShift(const STATE state) const;
Color getBackgroundColor(const STATE state) const;
Gradient *getBackgroundGradient(const STATE state);
RectF getBorderWidth(const STATE state) const;
RectF getBorderRadius(const STATE state) const;
RectC getBorderColor(const STATE state) const;
Color getLeftBorderColor(const STATE state) const;
Color getTopBorderColor(const STATE state) const;
Color getRightBorderColor(const STATE state) const;
Color getBottomBorderColor(const STATE state) const;
RectF getColorBorderWidth(const STATE state) const;
RectF getColorBorderRadius(const STATE state) const;
RectF getColorPadding(const STATE state) const;
RectC getColorBorderColor(const STATE state) const;
Color getColorLeftBorderColor(const STATE state) const;
Color getColorTopBorderColor(const STATE state) const;
Color getColorRightBorderColor(const STATE state) const;
Color getColorBottomBorderColor(const STATE state) const;
// Set layout properties
bool setAlign(const TEXT_ALIGN value);
bool setPadding(const RectF &value);
bool setTextAtRight(const bool value);
bool setCaptionColor(const STATE state, const Color &value);
bool setCaptionShadowColor(const STATE state, const Color &value);
bool setCaptionShadowRadius(const STATE state, const int value);
bool setCaptionShadowShift(const STATE state, const PointF &value);
bool setBackgroundColor(const STATE state, const Color &value);
bool setBorderWidth(const STATE state, const RectF &value);
bool setBorderRadius(const STATE state, const RectF &value);
bool setBorderColor(const STATE state, const RectC &value);
bool setLeftBorderColor(const STATE state, const Color &value);
bool setTopBorderColor(const STATE state, const Color &value);
bool setRightBorderColor(const STATE state, const Color &value);
bool setBottomBorderColor(const STATE state, const Color &value);
bool setColorBorderWidth(const STATE state, const RectF &value);
bool setColorBorderRadius(const STATE state, const RectF &value);
bool setColorPadding(const STATE state, const RectF &value);
bool setColorBorderColor(const STATE state, const RectC &value);
bool setColorLeftBorderColor(const STATE state, const Color &value);
bool setColorTopBorderColor(const STATE state, const Color &value);
bool setColorRightBorderColor(const STATE state, const Color &value);
bool setColorBottomBorderColor(const STATE state, const Color &value);
};
Namespace: | nitisa::standard |
Include: | Standard/ListItems/Color/ListItemColor.h |