CTimePicker



Implements TimePicker control.

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

class CTimePicker :public virtual ITimePicker, public CControl
{
public:
    enum STATE // Control and elements states 
    {
        stNormal, // Normal 
        stHovered, // Mouse pointer is over the control/element 
        stFocused, // Control is focused 
        stFocusedHovered, // Control is focused and mouse pointer is over it 
        stActive, // Mouse button is down on one of the arrows 
        stActiveHovered, // Mouse button is down on one of the arrows and mouse pointer is over the control(or arrow if the state relates to arrow) 
        stDisabled // Disabled 
    };
public:
    // IControl getters 
    RectF getRenderRect() override;

    // IControl setters 
    bool setDPI(const Point &value) override;

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

    // ITimePicker getters 
    int getHour() override; // By default 0 
    int getMinute() override; // By default 0 
    int getSecond() override; // By default 0 
    int getMinHour() override; // By default 0 
    int getMinMinute() override; // By default 0 
    int getMinSecond() override; // By default 0 
    int getMaxHour() override; // By default 23 
    int getMaxMinute() override; // By default 59 
    int getMaxSecond() override; // By default 59 

    // ITimePicker setters 
    bool setHour(const int value) override;
    bool setMinute(const int value) override;
    bool setSecond(const int value) override;
    bool setMinHour(const int value) override;
    bool setMinMinute(const int value) override;
    bool setMinSecond(const int value) override;
    bool setMaxHour(const int value) override;
    bool setMaxMinute(const int value) override;
    bool setMaxSecond(const int value) override;

    CTimePicker(); // Create 
    CTimePicker(IForm *parent); // Create and place on the form 
    CTimePicker(IControl *parent); // Create and place on the parent control 

    // Getters 
    STATE getState(); // Return control state 
    float getTimerInterval() const; // Return update interval when mouse is down over an arrow 
    bool isShowSeconds() const; // Return whether seconds should be shown or not 
    bool isShowArrows() const; // Return whether arrows should be shown or not 
    bool isArrowsAtRight() const; // Return whether arrows at the control right or left side 
    TEXT_ALIGN getContentAlign() const; // Return time horizontal alignment inside control area 
    int getShadowRadius(const STATE state) const; // Return control shadow radius. "state" is the control state 
    PointF getShadowShift(const STATE state) const; // Return control shadow shift. "state" is the control state 
    Color getShadowColor(const STATE state) const; // Return control shadow color. "state" is the control state 
    RectF getBorderRadius(const STATE state) const; // Return control corner radiuses. "state" is the control state 
    RectF getOuterBorderWidth(const STATE state) const; // Return control outer border widths. "state" is the control state 
    RectC getOuterBorderColor(const STATE state) const; // Return control outer border colors. "state" is the control state 
    RectF getInnerBorderWidth(const STATE state) const; // Return control inner border widths. "state" is the control state 
    RectC getInnerBorderColor(const STATE state) const; // Return control inner border colors. "state" is the control state 
    Color getBackgroundColor(const STATE state) const; // Return control background color. "state" is the control state 
    Gradient *getBackgroundGradient(const STATE state); // Return control background gradient. "state" is the control state 
    RectF getUpArrowBorderRadius(const STATE state) const; // Return up-arrow area corner radiuses. "state" is the arrow state 
    RectF getUpArrowOuterBorderWidth(const STATE state) const; // Return up-arrow area outer border widths. "state" is the arrow state 
    RectF getUpArrowInnerBorderWidth(const STATE state) const; // Return up-arrow area inner border widths. "state" is the arrow state 
    RectC getUpArrowOuterBorderColor(const STATE state) const; // Return up-arrow area outer border colors. "state" is the arrow state 
    RectC getUpArrowInnerBorderColor(const STATE state) const; // Return up-arrow area inner border colors. "state" is the arrow state 
    Color getUpArrowBackgroundColor(const STATE state) const; // Return up-arrow area background color. "state" is the arrow state 
    Gradient *getUpArrowBackgroundGradient(const STATE state); // Return up-arrow area background gradient. "state" is the arrow state 
    RectF getUpArrowPadding(const STATE state) const; // Return up-arrow area padding. "state" is the arrow state 
    Color getUpArrowColor1(const STATE state) const; // Return up-arrow first point color. "state" is the arrow state 
    Color getUpArrowColor2(const STATE state) const; // Return up-arrow second point color. "state" is the arrow state 
    Color getUpArrowColor3(const STATE state) const; // Return up-arrow third point color. "state" is the arrow state 
    RectF getDownArrowBorderRadius(const STATE state) const; // Return down-arrow area corner radiuses. "state" is the arrow state 
    RectF getDownArrowOuterBorderWidth(const STATE state) const; // Return down-arrow area outer border widths. "state" is the arrow state 
    RectF getDownArrowInnerBorderWidth(const STATE state) const; // Return down-arrow area inner border widths. "state" is the arrow state 
    RectC getDownArrowOuterBorderColor(const STATE state) const; // Return down-arrow area outer border colors. "state" is the arrow state 
    RectC getDownArrowInnerBorderColor(const STATE state) const; // Return down-arrow area inner border colors. "state" is the arrow state 
    Color getDownArrowBackgroundColor(const STATE state) const; // Return down-arrow area background color. "state" is the arrow state 
    Gradient *getDownArrowBackgroundGradient(const STATE state); // Return down-arrow area background gradient. "state" is the arrow state 
    RectF getDownArrowPadding(const STATE state) const; // Return down-arrow area padding. "state" is the arrow state 
    Color getDownArrowColor1(const STATE state) const; // Return down-arrow first point color. "state" is the arrow state 
    Color getDownArrowColor2(const STATE state) const; // Return down-arrow second point color. "state" is the arrow state 
    Color getDownArrowColor3(const STATE state) const; // Return down-arrow third point color. "state" is the arrow state 
    float getArrowDistance(const STATE state) const; // Return distance between up and down arrows. "state" is the control state 
    Color getElementBackgroundColor(const STATE state) const; // Return element(hours, minutes, seconds) background color. "state" is the element state 
    Gradient *getElementBackgroundGradient(const STATE state); // Return element(hours, minutes, seconds) background gradient. "state" is the element state 
    Color getElementColor(const STATE state) const; // Return element(hours, minutes, seconds) text color. "state" is the element state 
    float getPadding(const STATE state) const; // Return distance between borders/arrows and content. "state" is the control state 

    // Setters 
    bool setTimerInterval(const float value); // Set update interval when mouse is down over an arrow 
    bool setShowSeconds(const bool value); // Set whether seconds should be shown or not 
    bool setShowArrows(const bool value); // Set whether arrows should be shown or not 
    bool setArrowsAtRight(const bool value); // Set whether arrows at the control right or left side 
    bool setContentAlign(const TEXT_ALIGN value); // Set time horizontal alignment inside control area 
    bool setShadowRadius(const STATE state, const int value); // Set control shadow radius. "state" is the control state 
    bool setShadowShift(const STATE state, const PointF &value); // Set control shadow shift. "state" is the control state 
    bool setShadowColor(const STATE state, const Color &value); // Set control shadow color. "state" is the control state 
    bool setBorderRadius(const STATE state, const RectF &value); // Set control corner radiuses. "state" is the control state 
    bool setOuterBorderWidth(const STATE state, const RectF &value); // Set control outer border widths. "state" is the control state 
    bool setOuterBorderColor(const STATE state, const RectC &value); // Set control outer border colors. "state" is the control state 
    bool setInnerBorderWidth(const STATE state, const RectF &value); // Set control inner border widths. "state" is the control state 
    bool setInnerBorderColor(const STATE state, const RectC &value); // Set control inner border colors. "state" is the control state 
    bool setBackgroundColor(const STATE state, const Color &value); // Set control background color. "state" is the control state 
    bool setUpArrowBorderRadius(const STATE state, const RectF &value); // Set up-arrow area corner radiuses. "state" is the arrow state 
    bool setUpArrowOuterBorderWidth(const STATE state, const RectF &value); // Set up-arrow area outer border widths. "state" is the arrow state 
    bool setUpArrowInnerBorderWidth(const STATE state, const RectF &value); // Set up-arrow area inner border widths. "state" is the arrow state 
    bool setUpArrowOuterBorderColor(const STATE state, const RectC &value); // Set up-arrow area outer border colors. "state" is the arrow state 
    bool setUpArrowInnerBorderColor(const STATE state, const RectC &value); // Set up-arrow area inner border colors. "state" is the arrow state 
    bool setUpArrowBackgroundColor(const STATE state, const Color &value); // Set up-arrow area background color. "state" is the arrow state 
    bool setUpArrowPadding(const STATE state, const RectF &value); // Set up-arrow area padding. "state" is the arrow state 
    bool setUpArrowColor1(const STATE state, const Color &value); // Set up-arrow first point color. "state" is the arrow state 
    bool setUpArrowColor2(const STATE state, const Color &value); // Set up-arrow second point color. "state" is the arrow state 
    bool setUpArrowColor3(const STATE state, const Color &value); // Set up-arrow third point color. "state" is the arrow state 
    bool setDownArrowBorderRadius(const STATE state, const RectF &value); // Set down-arrow area corner radiuses. "state" is the arrow state 
    bool setDownArrowOuterBorderWidth(const STATE state, const RectF &value); // Set down-arrow area outer border widths. "state" is the arrow state 
    bool setDownArrowInnerBorderWidth(const STATE state, const RectF &value); // Set down-arrow area inner border widths. "state" is the arrow state 
    bool setDownArrowOuterBorderColor(const STATE state, const RectC &value); // Set down-arrow area outer border colors. "state" is the arrow state 
    bool setDownArrowInnerBorderColor(const STATE state, const RectC &value); // Set down-arrow area inner border colors. "state" is the arrow state 
    bool setDownArrowBackgroundColor(const STATE state, const Color &value); // Set down-arrow area background color. "state" is the arrow state 
    bool setDownArrowPadding(const STATE state, const RectF &value); // Set down-arrow area padding. "state" is the arrow state 
    bool setDownArrowColor1(const STATE state, const Color &value); // Set down-arrow first point color. "state" is the arrow state 
    bool setDownArrowColor2(const STATE state, const Color &value); // Set down-arrow second point color. "state" is the arrow state 
    bool setDownArrowColor3(const STATE state, const Color &value); // Set down-arrow third point color. "state" is the arrow state 
    bool setArrowDistance(const STATE state, const float value); // Set distance between up and down arrows. "state" is the control state 
    bool setElementBackgroundColor(const STATE state, const Color &value); // Set element(hours, minutes, seconds) background color. "state" is the element state 
    bool setElementColor(const STATE state, const Color &value); // Set element(hours, minutes, seconds) text color. "state" is the element state 
    bool setPadding(const STATE state, const float value); // Set distance between borders/arrows and content. "state" is the control state 

    bool ActivateHours(); // Activate hours part 
    bool ActivateMinutes(); // Activate minutes part 
    bool ActivateSeconds(); // Activate seconds part 
};
Namespace: nitisa::standard
Include: Standard/Controls/TimePicker/TimePicker.h