quakeforge/ruamoko/qwaq/qwaq-editor.h

41 lines
926 B
C
Raw Normal View History

#ifndef __qwaq_editor_h
#define __qwaq_editor_h
#include "qwaq-editbuffer.h"
#include "qwaq-view.h"
@class Editor;
@class EditBuffer;
@class ListenerGroup;
@interface Editor : View
{
EditBuffer *buffer;
DrawBuffer *linebuffer;
eb_sel_t selection;
unsigned base_index; // top left corner
unsigned line_index; // current line
unsigned char_index; // current character
unsigned old_cind; // previous character
2020-03-24 23:28:12 +00:00
Point scroll;
Point cursor;
unsigned line_count;
string filename;
ListenerGroup *onEvent;
}
-initWithRect:(Rect) rect file:(string) filename;
-(ListenerGroup *)onEvent;
-(string)filename;
-scrollUp:(unsigned) count;
-scrollDown:(unsigned) count;
-scrollLeft:(unsigned) count;
-scrollRight:(unsigned) count;
2020-03-24 23:28:12 +00:00
-recenter:(int) force;
-gotoLine:(unsigned) line;
-highlightLine;
-(string)getWordAt:(Point) pos; // view relative coordinates
@end
#endif//__qwaq_editor_h