git-svn-id: http://macvim.googlecode.com/svn/trunk@206 96c4425d-ca35-0410-94e5-3396d5...
[MacVim/jjgod.git] / MMTextStorage.h
blob1a87213a001cbb00de70a3a2b77cb8675ba4c774
1 /* vi:set ts=8 sts=4 sw=4 ft=objc:
3 * VIM - Vi IMproved by Bram Moolenaar
4 * MacVim GUI port by Bjorn Winckler
6 * Do ":help uganda" in Vim to read copying and usage conditions.
7 * Do ":help credits" in Vim to see a list of people who contributed.
8 * See README.txt for an overview of the Vim source code.
9 */
11 #import <Cocoa/Cocoa.h>
16 @interface MMTextStorage : NSTextStorage {
17 NSMutableAttributedString *attribString;
18 int maxRows, maxColumns;
19 int actualRows, actualColumns;
20 NSAttributedString *emptyRowString;
21 NSFont *font;
22 NSColor *defaultBackgroundColor;
23 NSSize cellSize;
26 - (NSString *)string;
27 - (NSDictionary *)attributesAtIndex:(unsigned)index
28 effectiveRange:(NSRangePointer)aRange;
29 - (void)replaceCharactersInRange:(NSRange)aRange
30 withString:(NSString *)aString;
31 - (void)setAttributes:(NSDictionary *)attributes range:(NSRange)aRange;
33 - (int)maxRows;
34 - (int)maxColumns;
35 - (void)getMaxRows:(int*)rows columns:(int*)cols;
36 - (void)setMaxRows:(int)rows columns:(int)cols;
37 - (void)replaceString:(NSString *)string atRow:(int)row column:(int)col
38 withFlags:(int)flags foregroundColor:(NSColor *)fg
39 backgroundColor:(NSColor *)bg specialColor:(NSColor *)sp;
40 - (void)deleteLinesFromRow:(int)row lineCount:(int)count
41 scrollBottom:(int)bottom left:(int)left right:(int)right
42 color:(NSColor *)color;
43 - (void)insertLinesAtRow:(int)row lineCount:(int)count
44 scrollBottom:(int)bottom left:(int)left right:(int)right
45 color:(NSColor *)color;
46 - (void)clearBlockFromRow:(int)row1 column:(int)col1 toRow:(int)row2
47 column:(int)col2 color:(NSColor *)color;
48 - (void)clearAllWithColor:(NSColor *)color;
49 - (void)setDefaultColorsBackground:(NSColor *)bgColor
50 foreground:(NSColor *)fgColor;
51 - (void)setFont:(NSFont*)newFont;
52 - (NSFont*)font;
53 - (NSSize)size;
54 - (NSSize)cellSize;
55 - (NSRect)rectForRowsInRange:(NSRange)range;
56 - (NSRect)rectForColumnsInRange:(NSRange)range;
57 - (unsigned)characterIndexForRow:(int)row column:(int)col;
58 - (BOOL)resizeToFitSize:(NSSize)size;
59 - (NSSize)fitToSize:(NSSize)size;
60 - (NSSize)fitToSize:(NSSize)size rows:(int *)rows columns:(int *)columns;
62 @end