CUpDown



Implements UpDown control.

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

class CUpDown :public virtual IUpDown, public CControl
{
public:
    enum STATE // Control and arrows states 
    {
        stNormal, // Normal 
        stHovered, // Hovered 
        stActive, // Mouse button was down over arrow and not released yet 
        stDisabled // Control is disabled 
    };
public:
    // IControl methods 
    void Refresh(const bool refresh_children) override;

    int getMin() override;
    int getMax() override;
    int getValue() override;
    int getStep() override;
    IEdit *getAssignedTo() override;

    bool setDPI(const Point &value) override;
    bool setAlign(const ALIGN value) override;
    bool setMin(const int value) override;
    bool setMax(const int value) override;
    bool setValue(const int value) override;
    bool setStep(const int value) override;
    bool setAssignedTo(IEdit *value) override;

    bool Up() override;
    bool Down() override;

    CUpDown(); // Constructor 
    CUpDown(IForm *parent); // Create and place on form 
    CUpDown(IControl *parent); // Create and place on another control 

    STATE getState(); // Return current state 
    float getTimerInterval(); // Return value change interval when holding mouse button down over up or down arrow 
    float getDistance(const STATE state); // Return distance between up and down arrows 
    // Up arrow style getters 
    RectF getUpArrowOuterBorderWidth(const STATE state);
    RectC getUpArrowOuterBorderColor(const STATE state);
    RectF getUpArrowMiddleBorderWidth(const STATE state);
    RectC getUpArrowMiddleBorderColor(const STATE state);
    RectF getUpArrowInnerBorderWidth(const STATE state);
    RectC getUpArrowInnerBorderColor(const STATE state);
    Color getUpArrowBackgroundColor(const STATE state);
    Gradient *getUpArrowBackgroundGradient(const STATE state);
    RectF getUpArrowPadding(const STATE state);
    Color getUpArrowArrowColor(const STATE state);
    // Down arrow style getters 
    RectF getDownArrowOuterBorderWidth(const STATE state);
    RectC getDownArrowOuterBorderColor(const STATE state);
    RectF getDownArrowMiddleBorderWidth(const STATE state);
    RectC getDownArrowMiddleBorderColor(const STATE state);
    RectF getDownArrowInnerBorderWidth(const STATE state);
    RectC getDownArrowInnerBorderColor(const STATE state);
    Color getDownArrowBackgroundColor(const STATE state);
    Gradient *getDownArrowBackgroundGradient(const STATE state);
    RectF getDownArrowPadding(const STATE state);
    Color getDownArrowArrowColor(const STATE state);

    bool setTimerInterval(const float value); // Set value change interval when holding mouse button down over up or down arrow 
    bool setDistance(const STATE state, const float value); // Set distance between up and down arrows 
    // Up arrow style setters 
    bool setUpArrowOuterBorderWidth(const STATE state, const RectF &value);
    bool setUpArrowOuterBorderColor(const STATE state, const RectC &value);
    bool setUpArrowMiddleBorderWidth(const STATE state, const RectF &value);
    bool setUpArrowMiddleBorderColor(const STATE state, const RectC &value);
    bool setUpArrowInnerBorderWidth(const STATE state, const RectF &value);
    bool setUpArrowInnerBorderColor(const STATE state, const RectC &value);
    bool setUpArrowBackgroundColor(const STATE state, const Color &value);
    bool setUpArrowPadding(const STATE state, const RectF &value);
    bool setUpArrowArrowColor(const STATE state, const Color &value);
    // Down arrow style setters 
    bool setDownArrowOuterBorderWidth(const STATE state, const RectF &value);
    bool setDownArrowOuterBorderColor(const STATE state, const RectC &value);
    bool setDownArrowMiddleBorderWidth(const STATE state, const RectF &value);
    bool setDownArrowMiddleBorderColor(const STATE state, const RectC &value);
    bool setDownArrowInnerBorderWidth(const STATE state, const RectF &value);
    bool setDownArrowInnerBorderColor(const STATE state, const RectC &value);
    bool setDownArrowBackgroundColor(const STATE state, const Color &value);
    bool setDownArrowPadding(const STATE state, const RectF &value);
    bool setDownArrowArrowColor(const STATE state, const Color &value);
};
Namespace: nitisa::standard
Include: Standard/Controls/UpDown/UpDown.h