CCustomDrawGrid



This class implements DrawGrid complete functionality. But it is meant to be used as base class and thus it doesn't have standard constructors and doesn't set any default for the control properties.

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

// There is no items associated with cells. Everywhere where item is argument it is always nullptr 
class CCustomDrawGrid :public virtual IDrawGrid, public CCustomGrid
{
public:
    enum FIXED_CELL_STATE // Fixed rows and columns cell states 
    {
        fcstNormal, // Normal state 
        fcstHovered, // Mouse pointer is over the cell 
        fcstDown, // Mouse button was down over the cell 
        fcstDisabled // The cell is disabled 
    };
public:
    // IControl setters 
    bool setDPI(const Point &value) override;

    // ICustomGrid setters 
    bool setCellOverflowHidden(const int column, const int row, const bool value) override; // Only not fixed cells can be adjusted 
    bool setColumnFixed(const int index, const bool value) override; // Not allowed. Use setFixedColumns() instead 
    bool setColumnOverflowHidden(const int index, const bool value) override; // Only not fixed columns can be adjusted 
    bool setRowFixed(const int index, const bool value) override; // Not allowed. Use setFixedRows() instead 
    bool setRowOverflowHidden(const int index, const bool value) override; // Only fixed rows can be adjusted 

    // IDrawGrid getters 
    int getFixedColumns() override;
    int getFixedRows() override;

    // IDrawGrid setters 
    bool setFixedColumns(const int value) override;
    bool setFixedRows(const int value) override;

    CCustomDrawGrid(const String &class_name);

    // Getters 
    Color getFixedCellBackgroundColor(const FIXED_CELL_STATE state) const; // Return fixed cell background color 
    Gradient *getFixedCellBackgroundGradient(const FIXED_CELL_STATE state); // Return fixed cell background gradient 
    RectF getFixedCellBorderWidth(const FIXED_CELL_STATE state) const; // Return fixed cell border widths 
    RectC getFixedCellBorderColor(const FIXED_CELL_STATE state) const; // Return fixed cell border colors 

    // Setters 
    bool setFixedCellBackgroundColor(const FIXED_CELL_STATE state, const Color &value); // Set fixed cell background color 
    bool setFixedCellBorderWidth(const FIXED_CELL_STATE state, const RectF &value); // Set fixed cell border widths 
    bool setFixedCellBorderColor(const FIXED_CELL_STATE state, const RectC &value); // Set fixed cell border colors 
};
Namespace: nitisa::standard
Include: Standard/Controls/DrawGrid/CustomDrawGrid.h