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.
11 #import <Cocoa/Cocoa.h>
16 @interface MMTextStorage
: NSTextStorage
{
17 NSMutableAttributedString
*attribString
;
18 int maxRows
, maxColumns
;
19 int actualRows
, actualColumns
;
20 NSAttributedString
*emptyRowString
;
22 NSColor
*defaultBackgroundColor
;
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
;
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
;
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
;
55 - (NSRect
)rectForRowsInRange
:(NSRange
)range
;
56 - (NSRect
)rectForColumnsInRange
:(NSRange
)range
;
57 - (unsigned)offsetFromRow
:(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
;