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/VerbatimFormatter.h
Go to fileThis commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
57 lines (44 sloc)
1.26 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 VERBATIM_FORMATTER_H | |
#define VERBATIM_FORMATTER_H | |
#include "EditorDataController.h" | |
#include "FormatterInterface.h" | |
class VerbatimFormatter: public FormatterImplementation | |
{ | |
public: | |
VerbatimFormatter(EditorDataController *edc); | |
~VerbatimFormatter(); | |
// Settings | |
virtual void SetMaxWidth(int maxWidth); | |
virtual int GetMaxWidth(); | |
virtual void SetMaxHeight(int maxHeight); | |
virtual int GetMaxHeight(); | |
// Render Methods | |
virtual void Build(); | |
virtual int GetRenderableLineCount(); | |
virtual std::shared_ptr<std::string> GetLine(int x); | |
virtual void GetCursorPosition(int &row, int &col); | |
virtual void SetCursorPosition(int row, int col); | |
// Cursor Conversion | |
virtual void GridToCursor(int &row, int &col); | |
virtual void CursorToGrid(int &row, int &col); | |
// Actions | |
virtual void HandleMoveLeft(); | |
virtual void HandleMoveRight(); | |
virtual void HandleMoveUp(); | |
virtual void HandleMoveDown(); | |
virtual void HandlePageUp(); | |
virtual void HandlePageDown(); | |
virtual void HandleHome(); | |
virtual void HandleEnd(); | |
private: | |
void AdjustCoordinates(); | |
EditorDataController *edc; | |
// Window Adjustment | |
int ra,ca; | |
// View info | |
// Cursor Info | |
int x,y; | |
// Window size | |
int rows,cols; | |
}; | |
#endif /* VERBATIM_FORMATTER_H */ |