mirror of
https://git.code.sf.net/p/quake/quakeforge
synced 2024-11-13 16:37:30 +00:00
e15f2097df
Putting it in Editor worked as a proof of concept, but it seems those always turn out to need tweaking like this because the concept proves itself to be generally worthwhile :P
38 lines
897 B
Objective-C
38 lines
897 B
Objective-C
#ifndef __qwaq_editor_editor_h
|
|
#define __qwaq_editor_editor_h
|
|
|
|
#include "editor/editbuffer.h"
|
|
#include "ui/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
|
|
Point base;
|
|
Point cursor;
|
|
unsigned line_count;
|
|
string filename;
|
|
}
|
|
+(Editor *)withRect:(Rect)rect file:(string)filename;
|
|
-(string)filename;
|
|
-scrollUp:(unsigned) count;
|
|
-scrollDown:(unsigned) count;
|
|
-scrollLeft:(unsigned) count;
|
|
-scrollRight:(unsigned) count;
|
|
|
|
-recenter:(int) force;
|
|
-gotoLine:(unsigned) line;
|
|
-highlightLine;
|
|
-(string)getWordAt:(Point) pos; // view relative coordinates
|
|
@end
|
|
|
|
#endif//__qwaq_editor_editor_h
|