Blender  V3.3
spreadsheet_draw.hh
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-or-later */
2 
3 #pragma once
4 
5 #include "BLI_vector.hh"
6 
7 struct ARegion;
8 struct bContext;
9 struct uiBlock;
10 
11 namespace blender::ed::spreadsheet {
12 
15  int xmin, ymin;
16  int width, height;
17 };
18 
20  public:
24  int tot_rows = 0;
25  int tot_columns = 0;
26 
28  virtual ~SpreadsheetDrawer();
29 
30  virtual void draw_top_row_cell(int column_index, const CellDrawParams &params) const;
31 
32  virtual void draw_left_column_cell(int row_index, const CellDrawParams &params) const;
33 
34  virtual void draw_content_cell(int row_index,
35  int column_index,
36  const CellDrawParams &params) const;
37 
38  virtual int column_width(int column_index) const;
39 };
40 
42  ARegion *region,
43  const SpreadsheetDrawer &spreadsheet_drawer);
44 
45 } // namespace blender::ed::spreadsheet
virtual void draw_top_row_cell(int column_index, const CellDrawParams &params) const
virtual int column_width(int column_index) const
virtual void draw_left_column_cell(int row_index, const CellDrawParams &params) const
virtual void draw_content_cell(int row_index, int column_index, const CellDrawParams &params) const
uiWidgetBaseParameters params[MAX_WIDGET_BASE_BATCH]
void draw_spreadsheet_in_region(const bContext *C, ARegion *region, const SpreadsheetDrawer &drawer)