Fixed bug where bold/italic font didn't render at the right width
[MacVim/jjgod.git] / MMTextStorage.h
blob0768793ca52bfe227c0d7544195b0b64d111aec0
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 NSFont *boldFont;
23 NSFont *italicFont;
24 NSFont *boldItalicFont;
25 NSColor *defaultBackgroundColor;
26 NSColor *defaultForegroundColor;
27 NSSize cellSize;
30 - (NSString *)string;
31 - (NSDictionary *)attributesAtIndex:(unsigned)index
32 effectiveRange:(NSRangePointer)aRange;
33 - (void)replaceCharactersInRange:(NSRange)aRange
34 withString:(NSString *)aString;
35 - (void)setAttributes:(NSDictionary *)attributes range:(NSRange)aRange;
37 - (int)maxRows;
38 - (int)maxColumns;
39 - (void)getMaxRows:(int*)rows columns:(int*)cols;
40 - (void)setMaxRows:(int)rows columns:(int)cols;
41 - (void)replaceString:(NSString *)string atRow:(int)row column:(int)col
42 withFlags:(int)flags foregroundColor:(NSColor *)fg
43 backgroundColor:(NSColor *)bg specialColor:(NSColor *)sp;
44 - (void)deleteLinesFromRow:(int)row lineCount:(int)count
45 scrollBottom:(int)bottom left:(int)left right:(int)right
46 color:(NSColor *)color;
47 - (void)insertLinesAtRow:(int)row lineCount:(int)count
48 scrollBottom:(int)bottom left:(int)left right:(int)right
49 color:(NSColor *)color;
50 - (void)clearBlockFromRow:(int)row1 column:(int)col1 toRow:(int)row2
51 column:(int)col2 color:(NSColor *)color;
52 - (void)clearAllWithColor:(NSColor *)color;
53 - (void)setDefaultColorsBackground:(NSColor *)bgColor
54 foreground:(NSColor *)fgColor;
55 - (void)setFont:(NSFont *)newFont;
56 - (NSFont *)font;
57 - (NSColor *)defaultBackgroundColor;
58 - (NSColor *)defaultForegroundColor;
59 - (NSSize)size;
60 - (NSSize)cellSize;
61 - (NSRect)rectForRowsInRange:(NSRange)range;
62 - (NSRect)rectForColumnsInRange:(NSRange)range;
63 - (unsigned)characterIndexForRow:(int)row column:(int)col;
64 - (BOOL)resizeToFitSize:(NSSize)size;
65 - (NSSize)fitToSize:(NSSize)size;
66 - (NSSize)fitToSize:(NSSize)size rows:(int *)rows columns:(int *)columns;
68 @end