Permalink
Cannot retrieve contributors at this time
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?
CSE3150_Project/DocumentPage.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
41 lines (33 sloc)
1.02 KB
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#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>> ¶graph, 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 */ |