From c90f78df080a9891930ee346b0ad87498ba5b697 Mon Sep 17 00:00:00 2001 From: rtk0c Date: Sun, 30 May 2021 23:00:41 -0700 Subject: Initial work on templates UI --- core/src/Model/Template/TableTemplate.hpp | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'core/src/Model/Template/TableTemplate.hpp') 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 mCells; std::vector mArrayGroups; - int mTableWidth; - int mTableHeight; + std::vector mRowHeights; + std::vector 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); -- cgit v1.2.3-70-g09d2