diff options
author | rtk0c <[email protected]> | 2021-05-30 23:00:41 -0700 |
---|---|---|
committer | rtk0c <[email protected]> | 2021-05-30 23:00:41 -0700 |
commit | c90f78df080a9891930ee346b0ad87498ba5b697 (patch) | |
tree | c4f4c475086337e25cbb985625423591c47310e1 /core/src/Model/Template/TableTemplate.hpp | |
parent | 088da97531935a61870ecada10f06b9b9a8255d1 (diff) |
Initial work on templates UI
Diffstat (limited to 'core/src/Model/Template/TableTemplate.hpp')
-rw-r--r-- | core/src/Model/Template/TableTemplate.hpp | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/core/src/Model/Template/TableTemplate.hpp b/core/src/Model/Template/TableTemplate.hpp index be043a9..688192a 100644 --- a/core/src/Model/Template/TableTemplate.hpp +++ b/core/src/Model/Template/TableTemplate.hpp @@ -1,5 +1,6 @@ #pragma once +#include "Model/Template/Template.hpp" #include "Utils/Vector.hpp" #include "Utils/VectorHash.hpp" #include "cplt_fwd.hpp" @@ -127,19 +128,24 @@ public: /// parametric rows/columns, and grids are also supported. /// /// This current supports exporting to xlsx files. -class TableTemplate +class TableTemplate : public Template { private: std::vector<TableCell> mCells; std::vector<TableCellArrayGroup> mArrayGroups; - int mTableWidth; - int mTableHeight; + std::vector<int> mRowHeights; + std::vector<int> mColumnWidths; public: int GetTableWidth() const; int GetTableHeight() const; void Resize(int newWidth, int newHeight); + int GetRowHeight(int row) const; + void SetRowHeight(int row, int height); + int GetColumnWidth(int column) const; + void SetColumnWidth(int column, int width); + const TableCell& GetCell(Vec2i pos) const; TableCell& GetCell(Vec2i pos); |