mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-10-05 16:42:58 +00:00
Fixed synthax in CPTextView
This commit is contained in:
1 parent
776f68c9dd
commit
f13c96839e
6 files changed
+18
-19
No files matched your search
@@ -49,10 +49,10 @@
|
||||
var kTypefaceIndex_Normal = 0,
|
||||
kTypefaceIndex_Italic = 1,
|
||||
kTypefaceIndex_Bold = 2,
|
||||
kTypefaceIndex_BoldItalic = 3;
|
||||
kTypefaceIndex_BoldItalic = 3,
|
||||
kToolbarHeight = 32,
|
||||
kBorderSpacing = 6,
|
||||
kInnerSpacing = 2;
|
||||
kInnerSpacing = 2,
|
||||
kNothingChanged = 0,
|
||||
kFontNameChanged = 1,
|
||||
kTypefaceChanged = 2,
|
||||
@@ -60,7 +60,7 @@ var kTypefaceIndex_Normal = 0,
|
||||
kTextColorChanged = 4,
|
||||
kBackgroundColorChanged = 5,
|
||||
kUnderlineChanged = 6,
|
||||
kWeightChanged = 7;
|
||||
kWeightChanged = 7,
|
||||
_sharedFontPanel;
|
||||
|
||||
// FIXME<!> Locale support
|
||||
@@ -76,9 +76,7 @@ var _availableTraits= [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
|
||||
|
||||
- (id)initWithFrame:(CGRect)rect
|
||||
{
|
||||
self = [super initWithFrame:rect];
|
||||
|
||||
if (self)
|
||||
if (self = [super initWithFrame:rect])
|
||||
{
|
||||
_textStorage = [[CPTextStorage alloc] init];
|
||||
_layoutManager = [[CPLayoutManager alloc] init];
|
||||
|
||||
@@ -81,7 +81,9 @@ _oncontextmenuhandler = function () { return false; };
|
||||
}
|
||||
}
|
||||
|
||||
return ((-first - 1) >= 0) ? result : CPNotFound;
|
||||
var result = -first - 1;
|
||||
|
||||
return result >= 0 ? result : CPNotFound;
|
||||
}
|
||||
|
||||
@end
|
||||
@@ -410,12 +412,10 @@ var _objectsInRange = function(aList, aRange)
|
||||
*/
|
||||
@implementation CPLayoutManager : CPObject
|
||||
{
|
||||
Class _lineFragmentFactory @accessors(setter:setLineFragmentFactory:);
|
||||
CPMutableArray _textContainers @accessors(getter=textContainers);
|
||||
CPTextStorage _textStorage @accessors(property=textStorage);
|
||||
CPTypesetter _typesetter @accessors(property=typesetter);
|
||||
|
||||
id _delegate;
|
||||
Class _lineFragmentFactory @accessors(setter=setLineFragmentFactory:);
|
||||
CPMutableArray _textContainers @accessors(getter=textContainers);
|
||||
CPTextStorage _textStorage @accessors(property=textStorage);
|
||||
CPTypesetter _typesetter @accessors(property=typesetter);
|
||||
|
||||
CPMutableArray _lineFragments;
|
||||
CPMutableArray _lineFragmentsForRescue;
|
||||
@@ -778,7 +778,7 @@ var _objectsInRange = function(aList, aRange)
|
||||
|
||||
- (CPRange)glyphRangeForBoundingRect:(CGRect)aRect inTextContainer:(CPTextContainer)container
|
||||
{
|
||||
var c = [_lineFragments count];
|
||||
var c = [_lineFragments count],
|
||||
range;
|
||||
|
||||
for (var i = 0; i < c; i++)
|
||||
|
||||
@@ -31,6 +31,8 @@ var _sharedDefaultParagraphStyle,
|
||||
|
||||
CPLeftTabStopType = 0;
|
||||
|
||||
@global CPLeftTextAlignment
|
||||
|
||||
/*
|
||||
CPLeftTextAlignment = 0;
|
||||
CPCenterTextAlignment = 1;
|
||||
|
||||
@@ -145,7 +145,7 @@ CPLineMovesUp = 4;
|
||||
|
||||
- (void)textViewFrameChanged:(CPNotification)aNotification
|
||||
{
|
||||
var newSize = CGMakeSize([_textView frame].size.width, _size.height);
|
||||
var newSize = CGSizeMake([_textView frame].size.width, _size.height);
|
||||
|
||||
[self setContainerSize:newSize];
|
||||
}
|
||||
|
||||
@@ -789,7 +789,7 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
|
||||
- (void)moveDown:(id)sender
|
||||
{
|
||||
if (!isSelectable)
|
||||
if (!_isSelectable)
|
||||
return;
|
||||
|
||||
var fraction = [],
|
||||
|
||||
@@ -65,8 +65,7 @@ function _points2twips(a) { return (a) * 20.0; }
|
||||
|
||||
+ (CPString)produceRTF:(CPAttributedString)aText documentAttributes:(CPDictionary)dict
|
||||
{
|
||||
var mynew = [self new],
|
||||
data;
|
||||
var mynew = [self new];
|
||||
|
||||
return [mynew RTFDStringFromAttributedString:aText documentAttributes:dict];
|
||||
}
|
||||
@@ -172,7 +171,7 @@ function _points2twips(a) { return (a) * 20.0; }
|
||||
|
||||
- (CPString)documentAttributes
|
||||
{
|
||||
if (!docDitc)
|
||||
if (!docDict)
|
||||
return @"";
|
||||
|
||||
var result,
|
||||
|
||||
Reference in new issue
Block a user