CSpeedButton



Implements SpeedButton control.

You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.

class CSpeedButton :public virtual ISpeedButton, public CControl
{
public:
    enum STATE // Possible states 
    {
        stNormal,
        stHovered,
        stDown,
        stDownHovered,
        stFocused,
        stFocusedHovered,
        stFocusedDown,
        stFocusedDownHovered,
        stDisabled
    };
public:
    void(*OnDown)(IControl *sender); // Event called when control becomes down 

    // IControl methods 
    void Refresh(const bool refresh_children) override;

    RectF getRenderRect() override;
    bool isFocusByMouse() override;

    int getGroupIndex() override;
    bool isDown() override;

    bool setDPI(const Point &value) override;
    bool setGroupIndex(const int value) override;
    bool setDown(const bool value) override;

    CSpeedButton();
    CSpeedButton(IForm *parent);
    CSpeedButton(IControl *parent);

    STATE getState(); // Return current state 
    // Return layout properties 
    RectF getPadding(const STATE state) const;
    RectF getOuterBorderWidth(const STATE state) const;
    RectF getInnerBorderWidth(const STATE state) const;
    RectF getBorderRadius(const STATE state) const;
    RectC getOuterBorderColor(const STATE state) const;
    Color getLeftOuterBorderColor(const STATE state) const;
    Color getTopOuterBorderColor(const STATE state) const;
    Color getRightOuterBorderColor(const STATE state) const;
    Color getBottomOuterBorderColor(const STATE state) const;
    RectC getInnerBorderColor(const STATE state) const;
    Color getLeftInnerBorderColor(const STATE state) const;
    Color getTopInnerBorderColor(const STATE state) const;
    Color getRightInnerBorderColor(const STATE state) const;
    Color getBottomInnerBorderColor(const STATE state) const;
    Color getBackgroundColor(const STATE state) const;
    Gradient *getBackgroundGradient(const STATE state);
    IImageList *getImageList(const STATE state);
    int getIconIndex(const STATE state) const;
    Color getShadowColor(const STATE state) const;
    PointF getShadowShift(const STATE state) const;
    int getShadowRadius(const STATE state) const;

    // Set layout properties 
    bool setPadding(const STATE state, const RectF &value);
    bool setOuterBorderWidth(const STATE state, const RectF &value);
    bool setInnerBorderWidth(const STATE state, const RectF &value);
    bool setBorderRadius(const STATE state, const RectF &value);
    bool setOuterBorderColor(const STATE state, const RectC &value);
    bool setLeftOuterBorderColor(const STATE state, const Color &value);
    bool setTopOuterBorderColor(const STATE state, const Color &value);
    bool setRightOuterBorderColor(const STATE state, const Color &value);
    bool setBottomOuterBorderColor(const STATE state, const Color &value);
    bool setInnerBorderColor(const STATE state, const RectC &value);
    bool setLeftInnerBorderColor(const STATE state, const Color &value);
    bool setTopInnerBorderColor(const STATE state, const Color &value);
    bool setRightInnerBorderColor(const STATE state, const Color &value);
    bool setBottomInnerBorderColor(const STATE state, const Color &value);
    bool setBackgroundColor(const STATE state, const Color &value);
    bool setImageList(const STATE state, IImageList *value);
    bool setImageList(IImageList *value);
    bool setIconIndex(const STATE state, const int value);
    bool setIconIndex(const int value);
    bool setShadowColor(const STATE state, const Color &value);
    bool setShadowShift(const STATE state, const PointF &value);
    bool setShadowRadius(const STATE state, const int value);
};
Namespace: nitisa::standard
Include: Standard/Controls/SpeedButton/SpeedButton.h