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>
14 #define MM_TS_LAZY_SET 1
17 @interface MMTextStorage
: NSTextStorage
{
18 NSMutableAttributedString
*attribString
;
19 int maxRows
, maxColumns
;
21 int actualRows
, actualColumns
;
23 NSAttributedString
*emptyRowString
;
25 NSColor
*defaultBackgroundColor
;
26 //NSMutableParagraphStyle *paragraphStyle;
30 - (NSDictionary
*)attributesAtIndex
:(unsigned)index
31 effectiveRange
:(NSRangePointer
)aRange
;
32 - (void)replaceCharactersInRange
:(NSRange
)aRange
33 withString
:(NSString
*)aString
;
34 - (void)setAttributes
:(NSDictionary
*)attributes range
:(NSRange
)aRange
;
38 - (void)getMaxRows
:(int*)rows columns
:(int*)cols
;
39 - (void)setMaxRows
:(int)rows columns
:(int)cols
;
40 - (void)replaceString
:(NSString
*)string atRow
:(int)row column
:(int)col
41 withFlags
:(int)flags foregroundColor
:(NSColor
*)fg
42 backgroundColor
:(NSColor
*)bg
;
43 - (void)deleteLinesFromRow
:(int)row lineCount
:(int)count
44 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
45 color
:(NSColor
*)color
;
46 - (void)insertLinesAtRow
:(int)row lineCount
:(int)count
47 scrollBottom
:(int)bottom left
:(int)left right
:(int)right
48 color
:(NSColor
*)color
;
49 - (void)clearBlockFromRow
:(int)row1 column
:(int)col1 toRow
:(int)row2
50 column
:(int)col2 color
:(NSColor
*)color
;
51 - (void)clearAllWithColor
:(NSColor
*)color
;
52 - (void)setDefaultColorsBackground
:(NSColor
*)bgColor
53 foreground
:(NSColor
*)fgColor
;
54 - (void)setFont
:(NSFont
*)newFont
;
57 - (NSSize
)calculateAverageFontSize
;
58 - (NSRect
)rectForRowsInRange
:(NSRange
)range
;
59 - (NSRect
)rectForColumnsInRange
:(NSRange
)range
;
60 - (unsigned)offsetFromRow
:(int)row column
:(int)col
;
61 - (BOOL
)resizeToFitSize
:(NSSize
)size
;
62 - (NSSize
)fitToSize
:(NSSize
)size
;
63 - (NSSize
)fitToSize
:(NSSize
)size rows
:(int *)rows columns
:(int *)columns
;
67 /* vim: set filetype=objc: */