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 HEADER_POSITION // Tabs header position 
    {
        hpLeft,
        hpTop,
        hpRight,
        hpBottom
    };

    enum SCROLL_STATE // Scrolling states 
    {
        ssNormal,
        ssHovered,
        ssActive,
        ssActiveHovered,
        ssDisabled
    };

    enum TAB_STATE // Tab header states 
    {
        tsNormal,
        tsHovered,
        tsActive,
        tsActiveFocused,
        tsDisabled
    };
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;
    HEADER_POSITION getHeaderPosition() const;
    bool isMultiline() const;
    RectF getBorderWidth() const;
    RectC 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 TAB_STATE state) const;
    Color getHeaderBackgroundColor(const TAB_STATE state) const;
    Gradient *getHeaderBackgroundGradient(const TAB_STATE state);
    Color getCaptionColor(const TAB_STATE state) const;
    Color getCaptionShadowColor(const TAB_STATE state) const;
    PointF getCaptionShadowShift(const TAB_STATE state) const;
    int getCaptionShadowRadius(const TAB_STATE state) const;
    IImageList *getImageList();
    float getScrollArrowSize() const;
    RectF getScrollBorderWidth() const;
    RectF getScrollBorderRadius() const;
    RectC getScrollBorderColor(const SCROLL_STATE state) const;
    Color getScrollLeftBorderColor(const SCROLL_STATE state) const;
    Color getScrollTopBorderColor(const SCROLL_STATE state) const;
    Color getScrollRightBorderColor(const SCROLL_STATE state) const;
    Color getScrollBottomBorderColor(const SCROLL_STATE state) const;
    Color getScrollBackgroundColor(const SCROLL_STATE state) const;
    Gradient *getScrollBackgroundGradient(const SCROLL_STATE state);
    Color getScrollArrowColor(const SCROLL_STATE 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 HEADER_POSITION value);
    bool setMultiline(const bool value);
    bool setBorderWidth(const RectF &value);
    bool setBorderColor(const RectC &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 TAB_STATE state, const Color &value);
    bool setHeaderBackgroundColor(const TAB_STATE state, const Color &value);
    bool setCaptionColor(const TAB_STATE state, const Color &value);
    bool setCaptionShadowColor(const TAB_STATE state, const Color &value);
    bool setCaptionShadowShift(const TAB_STATE state, const PointF &value);
    bool setCaptionShadowRadius(const TAB_STATE 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 SCROLL_STATE state, const Color &value);
    bool setScrollBorderColor(const SCROLL_STATE state, const RectC &value);
    bool setScrollLeftBorderColor(const SCROLL_STATE state, const Color &value);
    bool setScrollTopBorderColor(const SCROLL_STATE state, const Color &value);
    bool setScrollRightBorderColor(const SCROLL_STATE state, const Color &value);
    bool setScrollBottomBorderColor(const SCROLL_STATE state, const Color &value);
    bool setScrollArrowColor(const SCROLL_STATE 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