Changed File and Window menus to follow Apple HIG more closely.
[MacVim/jjgod.git] / MMTextStorage.h
blobf609b38239aa9b4aabb91e2c19984419b4ae69ef
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>
14 #define MM_TS_LAZY_SET 1
17 @interface MMTextStorage : NSTextStorage {
18 NSMutableAttributedString *attribString;
19 int maxRows, maxColumns;
20 #if MM_TS_LAZY_SET
21 int actualRows, actualColumns;
22 #endif
23 NSAttributedString *emptyRowString;
24 NSFont *font;
25 NSColor *defaultBackgroundColor;
26 //NSMutableParagraphStyle *paragraphStyle;
29 - (NSString *)string;
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;
36 - (int)maxRows;
37 - (int)maxColumns;
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;
55 - (NSFont*)font;
56 - (NSSize)size;
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;
65 @end
67 /* vim: set filetype=objc: */