CPageControl



Implements PageControl control.

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

class CPageControl :public virtual IPageControl, public CControl
{
public:
    enum class HeaderPosition // Tabs header position 
    {
        Left,
        Top,
        Right,
        Bottom
    };

    enum class ScrollState // Scrolling states 
    {
        Normal,
        Hovered,
        Active,
        ActiveHovered,
        Disabled
    };

    enum class TabState // Tab header states 
    {
        Normal,
        Hovered,
        Active,
        ActiveFocused,
        Disabled
    };
public:
    void(*OnActivateTabSheet)(IControl *sender, const int index); // Event called when tab has been activated 

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

    RectF getClientRect() override;
    bool isFocusByMouse() override;
    
    int getTabSheetCount() override;
    ITabSheet *getTabSheet(const int index) override;
    ITabSheet *getActiveTabSheet() override;
    int getActiveIndex() override;

    bool setDPI(const Point &value) override;
    bool setActiveIndex(const int value) override;
    bool setActiveTabSheet(ITabSheet *value) override;

    bool AttachControl(IControl *control) override;
    bool InsertControl(IControl *control, const int before) override;

    IControl *CreateChild() override;
    ITabSheet *CreateTabSheet() override;
    ITabSheet *CreateTabSheet(const int before) override;
    bool AddTabSheet(ITabSheet *tab) override;
    bool InsertTabSheet(ITabSheet *tab, const int before) override;
    bool DeleteTabSheet(const int index) override;
    bool DeleteTabSheet(ITabSheet *tab) override;
    bool DeleteTabSheets() override;

    CPageControl();
    CPageControl(IForm *parent);
    CPageControl(IControl *parent);

    // Return layout properties 
    PointF getHeaderSize() const;
    HeaderPosition getHeaderPosition() const;
    bool isMultiline() const;
    RectF getBorderWidth() const;
    BorderColor getBorderColor() const;
    Color getLeftBorderColor() const;
    Color getTopBorderColor() const;
    Color getRightBorderColor() const;
    Color getBottomBorderColor() const;
    Color getBackgroundColor() const;
    Gradient *getBackgroundGradient();
    PointF getHeaderShift() const;
    RectF getHeaderPadding() const;
    float getHeaderBorderWidth() const;
    Color getHeaderBorderColor(const TabState state) const;
    Color getHeaderBackgroundColor(const TabState state) const;
    Gradient *getHeaderBackgroundGradient(const TabState state);
    Color getCaptionColor(const TabState state) const;
    Color getCaptionShadowColor(const TabState state) const;
    PointF getCaptionShadowShift(const TabState state) const;
    int getCaptionShadowRadius(const TabState state) const;
    IImageList *getImageList();
    float getScrollArrowSize() const;
    RectF getScrollBorderWidth() const;
    RectF getScrollBorderRadius() const;
    BorderColor getScrollBorderColor(const ScrollState state) const;
    Color getScrollLeftBorderColor(const ScrollState state) const;
    Color getScrollTopBorderColor(const ScrollState state) const;
    Color getScrollRightBorderColor(const ScrollState state) const;
    Color getScrollBottomBorderColor(const ScrollState state) const;
    Color getScrollBackgroundColor(const ScrollState state) const;
    Gradient *getScrollBackgroundGradient(const ScrollState state);
    Color getScrollArrowColor(const ScrollState state) const;
    RectF getIconPadding() const;
    bool isUseMask() const; // Whether to use mask 
    float getScrollInterval() const; // Return scroll interval(in seconds) 
    float getDeltaScrollTimer() const;
    float getDeltaScrollWheel() const;

    // Set layout properties 
    bool setHeaderSize(const PointF &value);
    bool setHeaderPosition(const HeaderPosition value);
    bool setMultiline(const bool value);
    bool setBorderWidth(const RectF &value);
    bool setBorderColor(const BorderColor &value);
    bool setLeftBorderColor(const Color &value);
    bool setTopBorderColor(const Color &value);
    bool setRightBorderColor(const Color &value);
    bool setBottomBorderColor(const Color &value);
    bool setBackgroundColor(const Color &value);
    bool setHeaderShift(const PointF &value);
    bool setHeaderPadding(const RectF &value);
    bool setHeaderBorderWidth(const float value);
    bool setHeaderBorderColor(const TabState state, const Color &value);
    bool setHeaderBackgroundColor(const TabState state, const Color &value);
    bool setCaptionColor(const TabState state, const Color &value);
    bool setCaptionShadowColor(const TabState state, const Color &value);
    bool setCaptionShadowShift(const TabState state, const PointF &value);
    bool setCaptionShadowRadius(const TabState state, const int value);
    bool setImageList(IImageList *value);
    bool setScrollArrowSize(const float value);
    bool setScrollBorderWidth(const RectF &value);
    bool setScrollBorderRadius(const RectF &value);
    bool setScrollBackgroundColor(const ScrollState state, const Color &value);
    bool setScrollBorderColor(const ScrollState state, const BorderColor &value);
    bool setScrollLeftBorderColor(const ScrollState state, const Color &value);
    bool setScrollTopBorderColor(const ScrollState state, const Color &value);
    bool setScrollRightBorderColor(const ScrollState state, const Color &value);
    bool setScrollBottomBorderColor(const ScrollState state, const Color &value);
    bool setScrollArrowColor(const ScrollState state, const Color &value);
    bool setIconPadding(const RectF &value);
    bool setUseMask(const bool value); // Set whether to use mask 
    bool setScrollInterval(const float value); // Set scroll interval(in seconds) 
    bool setDeltaScrollTimer(const float value);
    bool setDeltaScrollWheel(const float value);
};
Namespace: nitisa::standard
Include: Standard/Controls/PageControl/PageControl.h