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 class State // Possible states
{
Normal,
Hovered,
Selected,
SelectedHovered,
Active,
ActiveHovered,
ActiveSelected,
ActiveSelectedHovered,
Disabled
};
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
TextAlign 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;
BorderColor 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;
BorderColor 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 TextAlign 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 BorderColor &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 BorderColor &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 |