2020-03-22 13:03:34 +00:00
|
|
|
#ifndef __qwaq_editor_h
|
|
|
|
#define __qwaq_editor_h
|
|
|
|
|
|
|
|
#include "qwaq-editbuffer.h"
|
|
|
|
#include "qwaq-view.h"
|
|
|
|
|
|
|
|
@class EditBuffer;
|
|
|
|
|
|
|
|
@interface Editor : View
|
|
|
|
{
|
|
|
|
EditBuffer *buffer;
|
|
|
|
DrawBuffer *linebuffer;
|
|
|
|
eb_sel_t selection;
|
|
|
|
unsigned base_index; // top left corner
|
|
|
|
unsigned line_index; // current line
|
2020-03-22 13:42:56 +00:00
|
|
|
unsigned x_index; // horizontal scrolling
|
2020-03-22 13:03:34 +00:00
|
|
|
unsigned char_index; // current character
|
|
|
|
unsigned old_cind; // previous character
|
|
|
|
Point cursor;
|
|
|
|
unsigned line_count;
|
2020-03-24 16:07:58 +00:00
|
|
|
string filename;
|
2020-03-22 13:03:34 +00:00
|
|
|
}
|
|
|
|
-initWithRect:(Rect) rect file:(string) filename;
|
2020-03-24 16:07:58 +00:00
|
|
|
-(string)filename;
|
2020-03-22 13:42:56 +00:00
|
|
|
-scrollUp:(unsigned) count;
|
|
|
|
-scrollDown:(unsigned) count;
|
|
|
|
-scrollLeft:(unsigned) count;
|
|
|
|
-scrollRight:(unsigned) count;
|
2020-03-22 13:03:34 +00:00
|
|
|
@end
|
|
|
|
|
|
|
|
#endif//__qwaq_editor_h
|