Implements UpDownEx control.
You can find more information in comments below. Overrided methods can be found in corresponding base classes and interfaces.
class CUpDownEx :public virtual IUpDownEx, 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;
float getMin() override;
float getMax() override;
float getValue() override;
float getStep() override;
IEdit *getAssignedTo() override;
bool setDPI(const Point &value) override;
bool setAlign(const ALIGN value) override;
bool setMin(const float value) override;
bool setMax(const float value) override;
bool setValue(const float value) override;
bool setStep(const float value) override;
bool setAssignedTo(IEdit *value) override;
bool Up() override;
bool Down() override;
CUpDownEx(); // Constructor
CUpDownEx(IForm *parent); // Create and place on form
CUpDownEx(IControl *parent); // Create and place on another control
STATE getState(); // Return current state
int getSigns(); // Return displayable count of digits after point
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 setSigns(const int value); // Set displayable count of digits after point. Should be in range 0..9
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/UpDownEx/UpDownEx.h |