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 class State // Control and arrows states
{
Normal, // Normal
Hovered, // Hovered
Active, // Mouse button was down over arrow and not released yet
Disabled // 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);
BorderColor getUpArrowOuterBorderColor(const State state);
RectF getUpArrowMiddleBorderWidth(const State state);
BorderColor getUpArrowMiddleBorderColor(const State state);
RectF getUpArrowInnerBorderWidth(const State state);
BorderColor 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);
BorderColor getDownArrowOuterBorderColor(const State state);
RectF getDownArrowMiddleBorderWidth(const State state);
BorderColor getDownArrowMiddleBorderColor(const State state);
RectF getDownArrowInnerBorderWidth(const State state);
BorderColor 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 BorderColor &value);
bool setUpArrowMiddleBorderWidth(const State state, const RectF &value);
bool setUpArrowMiddleBorderColor(const State state, const BorderColor &value);
bool setUpArrowInnerBorderWidth(const State state, const RectF &value);
bool setUpArrowInnerBorderColor(const State state, const BorderColor &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 BorderColor &value);
bool setDownArrowMiddleBorderWidth(const State state, const RectF &value);
bool setDownArrowMiddleBorderColor(const State state, const BorderColor &value);
bool setDownArrowInnerBorderWidth(const State state, const RectF &value);
bool setDownArrowInnerBorderColor(const State state, const BorderColor &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 |