CFrame



Implements Frame control.

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

class CFrame :public virtual IFrame, public CControl
{
public:
    enum STATE // Possible states 
    {
        stNormal,
        stHovered,
        stActive, // Modal or focused control is on it 
        stDisabled
    };

    enum FRAME_STATE // Frame states 
    {
        fsNormal,
        fsMinimized,
        fsMaximized
    };

    enum BUTTON_STATE // Frame caption button states 
    {
        bstInactiveNormal, // Frame is not active 
        bstInactiveHovered, // Frame is inactive and button is hovered 
        bstInactiveDisabled, // Frame is inactive and button is disabled 
        bstNormal, // Normal state 
        bstHovered, // Button is hovered 
        bstActive, // Button is active(mouse button was down on it but not released yet) 
        bstActiveHovered, // Button is active and hovered 
        bstDisabled // Button is disabled 
    };
public:
    void(*OnMinimize)(IFrame *sender); // Event called when frame has been minimized 
    void(*OnMaximize)(IFrame *sender); // Event called when frame has been maximized 
    void(*OnRestore)(IFrame *sender); // Event called when frame has been restored 
    void(*OnClose)(IFrame *sender, CLOSE_ACTION &action); // Event called when frame is about to be closed 

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

    IControl *getControl(const int index) override;
    IControl *getControl(const String &name) override;
    IControl *getControl(const PointF &position) override;
    RectF getClientRect() override;
    RectF getRenderRect() override;
    CURSOR_TYPE getCursor() override;

    bool setConstraints(const RectF &value) override;
    bool setDPI(const Point &value) override;

    String getCaption() override;
    bool isMinimizable() override;
    bool isMaximizable() override;
    bool isClosable() override;
    bool isResizable() override;
    bool isMovable() override;
    bool isMinimized() override;
    bool isMaximized() override;

    bool setCaption(const String &value) override;
    bool setMinimizable(const bool value) override;
    bool setMaximizable(const bool value) override;
    bool setClosable(const bool value) override;
    bool setResizable(const bool value) override;
    bool setMovable(const bool value) override;

    bool Show() override;
    bool ShowModal() override;
    bool Hide() override;
    bool Minimize() override;
    bool Maximize() override;
    bool Restore() override;

    CFrame();
    CFrame(IForm *parent);
    CFrame(IControl *parent);

    STATE getState(); // Return state 
    FRAME_STATE getFrameState() const; // Return frame state 
    // Return layout properties 
    Color getShadowColor(const STATE state) const;
    PointF getShadowShift(const STATE state) const;
    int getShadowRadius(const STATE state) const;
    RectF getOuterBorderWidth() const;
    RectF getBorderRadius() const;
    RectC getOuterBorderColor(const STATE state) const;
    Color getOuterLeftBorderColor(const STATE state) const;
    Color getOuterTopBorderColor(const STATE state) const;
    Color getOuterRightBorderColor(const STATE state) const;
    Color getOuterBottomBorderColor(const STATE state) const;
    RectF getMiddleBorderWidth() const;
    RectC getMiddleBorderColor(const STATE state) const;
    Color getMiddleLeftBorderColor(const STATE state) const;
    Color getMiddleTopBorderColor(const STATE state) const;
    Color getMiddleRightBorderColor(const STATE state) const;
    Color getMiddleBottomBorderColor(const STATE state) const;
    Gradient *getMiddleBorderGradient(const STATE state);
    RectF getInnerBorderWidth() const;
    RectC getInnerBorderColor(const STATE state) const;
    Color getInnerLeftBorderColor(const STATE state) const;
    Color getInnerTopBorderColor(const STATE state) const;
    Color getInnerRightBorderColor(const STATE state) const;
    Color getInnerBottomBorderColor(const STATE state) const;
    Color getBackgroundColor(const STATE state) const;
    Gradient *getBackgroundGradient(const STATE state);
    float getCaptionPadding() const;
    Color getCaptionColor(const STATE state) const;
    Color getCaptionShadowColor(const STATE state) const;
    PointF getCaptionShadowShift(const STATE state) const;
    int getCaptionShadowRadius(const STATE state) const;
    float getMinimizedWidth() const;
    bool isUseMask() const; // Whether to use mask 

    // Return minimize-restore button layout properties 
    bool isBtnMinimizeRestoreDisplayDisabled() const;
    PointF getBtnMinimizeRestoreSize() const;
    RectF getBtnMinimizeRestoreBorderWidth() const;
    RectF getBtnMinimizeRestoreBorderRadius() const;
    RectF getBtnMinimizeRestoreIconPadding() const;
    RectC getBtnMinimizeRestoreBorderColor(const BUTTON_STATE state) const;
    Color getBtnMinimizeRestoreLeftBorderColor(const BUTTON_STATE state) const;
    Color getBtnMinimizeRestoreTopBorderColor(const BUTTON_STATE state) const;
    Color getBtnMinimizeRestoreRightBorderColor(const BUTTON_STATE state) const;
    Color getBtnMinimizeRestoreBottomBorderColor(const BUTTON_STATE state) const;
    Color getBtnMinimizeRestoreBackgroundColor(const BUTTON_STATE state) const;
    Gradient *getBtnMinimizeRestoreBackgroundGradient(const BUTTON_STATE state);
    Color getBtnMinimizeRestoreShadowColor(const BUTTON_STATE state) const;
    PointF getBtnMinimizeRestoreShadowShift(const BUTTON_STATE state) const;
    int getBtnMinimizeRestoreShadowRadius(const BUTTON_STATE state) const;
    BUTTON_STATE getBtnMinimizeRestoreState();

    // Return maximize-restore button layout properties 
    bool isBtnMaximizeRestoreDisplayDisabled() const;
    PointF getBtnMaximizeRestoreSize() const;
    RectF getBtnMaximizeRestoreBorderWidth() const;
    RectF getBtnMaximizeRestoreBorderRadius() const;
    RectF getBtnMaximizeRestoreIconPadding() const;
    RectC getBtnMaximizeRestoreBorderColor(const BUTTON_STATE state) const;
    Color getBtnMaximizeRestoreLeftBorderColor(const BUTTON_STATE state) const;
    Color getBtnMaximizeRestoreTopBorderColor(const BUTTON_STATE state) const;
    Color getBtnMaximizeRestoreRightBorderColor(const BUTTON_STATE state) const;
    Color getBtnMaximizeRestoreBottomBorderColor(const BUTTON_STATE state) const;
    Color getBtnMaximizeRestoreBackgroundColor(const BUTTON_STATE state) const;
    Gradient *getBtnMaximizeRestoreBackgroundGradient(const BUTTON_STATE state);
    Color getBtnMaximizeRestoreShadowColor(const BUTTON_STATE state) const;
    PointF getBtnMaximizeRestoreShadowShift(const BUTTON_STATE state) const;
    int getBtnMaximizeRestoreShadowRadius(const BUTTON_STATE state) const;
    BUTTON_STATE getBtnMaximizeRestoreState();

    // Return close button layout properties 
    bool isBtnCloseDisplayDisabled() const;
    PointF getBtnCloseSize() const;
    RectF getBtnCloseBorderWidth() const;
    RectF getBtnCloseBorderRadius() const;
    RectF getBtnCloseIconPadding() const;
    RectC getBtnCloseBorderColor(const BUTTON_STATE state) const;
    Color getBtnCloseLeftBorderColor(const BUTTON_STATE state) const;
    Color getBtnCloseTopBorderColor(const BUTTON_STATE state) const;
    Color getBtnCloseRightBorderColor(const BUTTON_STATE state) const;
    Color getBtnCloseBottomBorderColor(const BUTTON_STATE state) const;
    Color getBtnCloseBackgroundColor(const BUTTON_STATE state) const;
    Gradient *getBtnCloseBackgroundGradient(const BUTTON_STATE state);
    Color getBtnCloseShadowColor(const BUTTON_STATE state) const;
    PointF getBtnCloseShadowShift(const BUTTON_STATE state) const;
    int getBtnCloseShadowRadius(const BUTTON_STATE state) const;
    BUTTON_STATE getBtnCloseState();

    // Set layout properties 
    bool setShadowColor(const STATE state, const Color &value);
    bool setShadowShift(const STATE state, const PointF &value);
    bool setShadowRadius(const STATE state, const int value);
    bool setOuterBorderWidth(const RectF &value);
    bool setBorderRadius(const RectF &value);
    bool setOuterBorderColor(const STATE state, const RectC &value);
    bool setOuterLeftBorderColor(const STATE state, const Color &value);
    bool setOuterTopBorderColor(const STATE state, const Color &value);
    bool setOuterRightBorderColor(const STATE state, const Color &value);
    bool setOuterBottomBorderColor(const STATE state, const Color &value);
    bool setMiddleBorderWidth(const RectF &value);
    bool setMiddleBorderColor(const STATE state, const RectC &value);
    bool setMiddleLeftBorderColor(const STATE state, const Color &value);
    bool setMiddleTopBorderColor(const STATE state, const Color &value);
    bool setMiddleRightBorderColor(const STATE state, const Color &value);
    bool setMiddleBottomBorderColor(const STATE state, const Color &value);
    bool setInnerBorderWidth(const RectF &value);
    bool setInnerBorderColor(const STATE state, const RectC &value);
    bool setInnerLeftBorderColor(const STATE state, const Color &value);
    bool setInnerTopBorderColor(const STATE state, const Color &value);
    bool setInnerRightBorderColor(const STATE state, const Color &value);
    bool setInnerBottomBorderColor(const STATE state, const Color &value);
    bool setBackgroundColor(const STATE state, const Color &value);
    bool setCaptionPadding(const float value);
    bool setCaptionColor(const STATE state, const Color &value);
    bool setCaptionShadowColor(const STATE state, const Color &value);
    bool setCaptionShadowShift(const STATE state, const PointF &value);
    bool setCaptionShadowRadius(const STATE state, const int value);
    bool setUseMask(const bool value); // Set whether to use mask 
    bool setMinimizedWidth(const float value);

    // Set minimize-restore button layout properties 
    bool setBtnMinimizeRestoreDisplayDisabled(const bool value);
    bool setBtnMinimizeRestoreSize(const PointF &value);
    bool setBtnMinimizeRestoreBorderWidth(const RectF &value);
    bool setBtnMinimizeRestoreBorderRadius(const RectF &value);
    bool setBtnMinimizeRestoreIconPadding(const RectF &value);
    bool setBtnMinimizeRestoreBorderColor(const BUTTON_STATE state, const RectC &value);
    bool setBtnMinimizeRestoreLeftBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMinimizeRestoreTopBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMinimizeRestoreRightBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMinimizeRestoreBottomBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMinimizeRestoreBackgroundColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMinimizeRestoreShadowColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMinimizeRestoreShadowShift(const BUTTON_STATE state, const PointF &value);
    bool setBtnMinimizeRestoreShadowRadius(const BUTTON_STATE state, const int value);

    // Set maximize-restore button layout properties 
    bool setBtnMaximizeRestoreDisplayDisabled(const bool value);
    bool setBtnMaximizeRestoreSize(const PointF &value);
    bool setBtnMaximizeRestoreBorderWidth(const RectF &value);
    bool setBtnMaximizeRestoreBorderRadius(const RectF &value);
    bool setBtnMaximizeRestoreIconPadding(const RectF &value);
    bool setBtnMaximizeRestoreBorderColor(const BUTTON_STATE state, const RectC &value);
    bool setBtnMaximizeRestoreLeftBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMaximizeRestoreTopBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMaximizeRestoreRightBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMaximizeRestoreBottomBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMaximizeRestoreBackgroundColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMaximizeRestoreShadowColor(const BUTTON_STATE state, const Color &value);
    bool setBtnMaximizeRestoreShadowShift(const BUTTON_STATE state, const PointF &value);
    bool setBtnMaximizeRestoreShadowRadius(const BUTTON_STATE state, const int value);

    // Set close button layout properties 
    bool setBtnCloseDisplayDisabled(const bool value);
    bool setBtnCloseSize(const PointF &value);
    bool setBtnCloseBorderWidth(const RectF &value);
    bool setBtnCloseBorderRadius(const RectF &value);
    bool setBtnCloseIconPadding(const RectF &value);
    bool setBtnCloseBorderColor(const BUTTON_STATE state, const RectC &value);
    bool setBtnCloseLeftBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnCloseTopBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnCloseRightBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnCloseBottomBorderColor(const BUTTON_STATE state, const Color &value);
    bool setBtnCloseBackgroundColor(const BUTTON_STATE state, const Color &value);
    bool setBtnCloseShadowColor(const BUTTON_STATE state, const Color &value);
    bool setBtnCloseShadowShift(const BUTTON_STATE state, const PointF &value);
    bool setBtnCloseShadowRadius(const BUTTON_STATE state, const int value);
};
Namespace: nitisa::standard
Include: Standard/Controls/Frame/Frame.h