Skip to content
Permalink
master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Go to file
 
 
Cannot retrieve contributors at this time
#ifndef DOCUMENT_PAGE_H
#define DOCUMENT_PAGE_H
#include "DocumentParagraph.h"
#include <vector>
#include <memory>
class DocumentPage
{
public:
DocumentPage(int maxWidth, int maxHeight);
DocumentPage(int maxWidth, int maxHeight, int pageNum);
DocumentPage(DocumentPage &page);
~DocumentPage();
void ClearPage();
std::string GetLine(int lineNum);
int GetLineLength(int lineNum);
int GetNumLines();
int GetNumParagraphs();
int GetPageNum();
std::shared_ptr<DocumentParagraph> GetParagraph(int i);
std::shared_ptr<DocumentParagraph> GetParagraphContainingLine(int &lineNum);
std::shared_ptr<DocumentParagraph> GetLastParagraph();
int AppendParagraph(std::vector<std::shared_ptr<std::string>> &paragraph, int pNum); // Returns int of last successful word insertion
void ContinueParagraph();
private:
std::vector<std::shared_ptr<DocumentParagraph>> dParas;
// Attributes
int maxWidth;
int maxHeight;
int pageNum;
DocumentPage *prevPage;
bool resumeNextAppend;
};
#endif /* DOCUMENT_PAGE_H */