Adds first prototype code to create navigation categories, needs majour cleanup and optimisations

This commit is contained in:
Rosia E Evans 2023-10-11 00:19:40 +01:00
parent 2fbec8869d
commit 82e1d9fc0c
23 changed files with 237 additions and 324 deletions

View file

@ -62,23 +62,3 @@ public:
void writePageToFile();
};
/*
* Class to represent the structure of the nav menu, the categories of the pages
*/
// A node can either be a file or a folder, value for each possibility.
struct PageTreeNode
{
std::vector<PageTreeNode> branches;
Page* pageValue;
std::string folderValue;
};
class PageTree
{
private:
PageTreeNode* rootNode;
public:
PageTreeNode* getNodeLinear(int x);
std::vector<PageTreeNode> getTreeAsList();
};