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 class FixedCellState // Fixed rows and columns cell states 
    {
        Normal, // Normal state 
        Hovered, // Mouse pointer is over the cell 
        Down, // Mouse button was down over the cell 
        Disabled // 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 FixedCellState state) const; // Return fixed cell background color 
    Gradient *getFixedCellBackgroundGradient(const FixedCellState state); // Return fixed cell background gradient 
    RectF getFixedCellBorderWidth(const FixedCellState state) const; // Return fixed cell border widths 
    BorderColor getFixedCellBorderColor(const FixedCellState state) const; // Return fixed cell border colors 

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