33 lines
847 B
C
33 lines
847 B
C
#ifndef VIEW_H
|
|
#define VIEW_H
|
|
|
|
#include "Window.h"
|
|
#include "Text.h"
|
|
|
|
struct View_struct {
|
|
Window window;
|
|
Text text;
|
|
int tabWidth;
|
|
int origin;
|
|
int cursorLine;
|
|
int cursorCharacter;
|
|
};
|
|
|
|
typedef struct View_struct *View;
|
|
|
|
extern View View_create(Window window, Text text, int tabWidth);
|
|
extern void View_destroy(View this);
|
|
extern void View_setTabWidth(View this, int tabWidth);
|
|
extern void View_updateCursorPosition(View this);
|
|
extern void View_paint(View this);
|
|
extern int View_lastLineIndex(View this);
|
|
extern void View_moveToLine(View this, int index);
|
|
extern void View_moveToHead(View this);
|
|
extern void View_moveToTail(View this);
|
|
extern void View_moveUp(View this, int repeat);
|
|
extern void View_moveDown(View this, int repeat);
|
|
extern void View_moveLeft(View this, int repeat);
|
|
extern void View_moveRight(View this, int repeat);
|
|
|
|
#endif
|