mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-28 13:17:42 +00:00
Merge remote-tracking branch 'upstream/main' into Aristo3
This commit is contained in:
@@ -86,8 +86,8 @@ var _availableTraits = [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
|
||||
int _fontChanges;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Class methods
|
||||
// MARK: -
|
||||
// MARK: Class methods
|
||||
|
||||
/*!
|
||||
Check if the shared Font panel exists.
|
||||
@@ -113,8 +113,8 @@ var _availableTraits = [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
|
||||
return NO;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Init methods
|
||||
// MARK: -
|
||||
// MARK: Init methods
|
||||
|
||||
/*! @ignore */
|
||||
- (id)init
|
||||
|
||||
@@ -76,8 +76,8 @@ _oncontextmenuhandler = function () { return false; };
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Init methods
|
||||
// MARK: -
|
||||
// MARK: Init methods
|
||||
|
||||
- (id)init
|
||||
{
|
||||
@@ -103,8 +103,8 @@ _oncontextmenuhandler = function () { return false; };
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Text containes method
|
||||
// MARK: -
|
||||
// MARK: Text containes method
|
||||
|
||||
- (void)insertTextContainer:(CPTextContainer)aContainer atIndex:(int)index
|
||||
{
|
||||
@@ -1132,8 +1132,8 @@ var _objectsInRange = function(aList, aRange)
|
||||
CPMutableArray _runs;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Init methods
|
||||
// MARK: -
|
||||
// MARK: Init methods
|
||||
|
||||
- (id)createDOMElementWithText:(CPString)aString andFont:(CPFont)aFont andColor:(CPColor)aColor
|
||||
{
|
||||
|
||||
@@ -154,8 +154,8 @@ CPRulerOrientationVertical = 1
|
||||
}
|
||||
}
|
||||
}
|
||||
#pragma mark -
|
||||
#pragma mark Context Menu Support
|
||||
// MARK: -
|
||||
// MARK: Context Menu Support
|
||||
|
||||
- (CPMenu)menuForEvent:(CPEvent)anEvent
|
||||
{
|
||||
@@ -385,8 +385,8 @@ CPRulerOrientationVertical = 1
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Interaction Handlers
|
||||
// MARK: -
|
||||
// MARK: Interaction Handlers
|
||||
|
||||
- (void)mouseDown:(CPEvent)anEvent
|
||||
{
|
||||
@@ -500,8 +500,8 @@ CPRulerOrientationVertical = 1
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark DOM Layout Builder
|
||||
// MARK: -
|
||||
// MARK: DOM Layout Builder
|
||||
|
||||
- (void)updateRuler
|
||||
{
|
||||
|
||||
@@ -89,8 +89,8 @@ CPLineMovesUp = 4;
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Init methods
|
||||
// MARK: -
|
||||
// MARK: Init methods
|
||||
|
||||
- (id)initWithContainerSize:(CGSize)aSize
|
||||
{
|
||||
@@ -118,8 +118,8 @@ CPLineMovesUp = 4;
|
||||
[_layoutManager addTextContainer:self];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Setter methods
|
||||
// MARK: -
|
||||
// MARK: Setter methods
|
||||
|
||||
- (void)setContainerSize:(CGSize)someSize
|
||||
{
|
||||
|
||||
@@ -70,8 +70,8 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1,
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Init methods
|
||||
// MARK: -
|
||||
// MARK: Init methods
|
||||
|
||||
- (id)initWithString:(CPString)aString attributes:(CPDictionary)attributes
|
||||
{
|
||||
@@ -99,8 +99,8 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1,
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Delegate methods
|
||||
// MARK: -
|
||||
// MARK: Delegate methods
|
||||
|
||||
- (void)setDelegate:(id <CPTextStorageDelegate>)aDelegate
|
||||
{
|
||||
@@ -121,8 +121,8 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1,
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Layout manager methods
|
||||
// MARK: -
|
||||
// MARK: Layout manager methods
|
||||
|
||||
- (void)addLayoutManager:(CPLayoutManager)aManager
|
||||
{
|
||||
@@ -148,8 +148,8 @@ var CPTextStorageDelegate_textStorageWillProcessEditing_ = 1 << 1,
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Editing methods
|
||||
// MARK: -
|
||||
// MARK: Editing methods
|
||||
|
||||
- (void)processEditing
|
||||
{
|
||||
|
||||
@@ -191,8 +191,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
return editMenu;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Class methods
|
||||
// MARK: -
|
||||
// MARK: Class methods
|
||||
|
||||
/* <!> FIXME
|
||||
just a testing characterSet
|
||||
@@ -200,8 +200,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
Need some CPLocale support and maybe even a FSM...
|
||||
*/
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Init methods
|
||||
// MARK: -
|
||||
// MARK: Init methods
|
||||
|
||||
- (id)initWithFrame:(CGRect)aFrame textContainer:(CPTextContainer)aContainer
|
||||
{
|
||||
@@ -444,8 +444,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
[self _becomeFirstResponder];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Copy and paste methods
|
||||
// MARK: -
|
||||
// MARK: Copy and paste methods
|
||||
|
||||
- (void)copy:(id)sender
|
||||
{
|
||||
@@ -527,8 +527,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
[self _pasteString:[self _stringForPasting]];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Responders method
|
||||
// MARK: -
|
||||
// MARK: Responders method
|
||||
|
||||
- (BOOL)acceptsFirstResponder
|
||||
{
|
||||
@@ -587,8 +587,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Delegate methods
|
||||
// MARK: -
|
||||
// MARK: Delegate methods
|
||||
|
||||
/*!
|
||||
TODO : documentation
|
||||
@@ -647,8 +647,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Key window methods
|
||||
// MARK: -
|
||||
// MARK: Key window methods
|
||||
|
||||
- (void)becomeKeyWindow
|
||||
{
|
||||
@@ -674,8 +674,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Undo redo methods
|
||||
// MARK: -
|
||||
// MARK: Undo redo methods
|
||||
|
||||
- (void)undo:(id)sender
|
||||
{
|
||||
@@ -690,8 +690,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Accessors
|
||||
// MARK: -
|
||||
// MARK: Accessors
|
||||
|
||||
- (CPString)stringValue
|
||||
{
|
||||
@@ -805,8 +805,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Insert characters methods
|
||||
// MARK: -
|
||||
// MARK: Insert characters methods
|
||||
|
||||
- (void)_fixupReplaceForRange:(CPRange)aRange
|
||||
{
|
||||
@@ -864,8 +864,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
_stickyXLocation = MAX(0, _caret._rect.origin.x - 1);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Drawing methods
|
||||
// MARK: -
|
||||
// MARK: Drawing methods
|
||||
|
||||
- (void)drawInsertionPointInRect:(CGRect)aRect color:(CPColor)aColor turnedOn:(BOOL)flag
|
||||
{
|
||||
@@ -928,8 +928,8 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Select methods
|
||||
// MARK: -
|
||||
// MARK: Select methods
|
||||
|
||||
- (void)selectAll:(id)sender
|
||||
{
|
||||
@@ -1060,8 +1060,8 @@ Sets the selection to a range of characters in response to user action.
|
||||
return [_selectionRange];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Keyboard events
|
||||
// MARK: -
|
||||
// MARK: Keyboard events
|
||||
|
||||
- (void)keyDown:(CPEvent)event
|
||||
{
|
||||
@@ -1129,8 +1129,8 @@ Sets the selection to a range of characters in response to user action.
|
||||
[placeholderString addAttribute:_CPAttachmentInvisible value:YES range:rangeToHide];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Mouse Events
|
||||
// MARK: -
|
||||
// MARK: Mouse Events
|
||||
|
||||
- (void)mouseDown:(CPEvent)event
|
||||
{
|
||||
@@ -1852,8 +1852,8 @@ Sets the selection to a range of characters in response to user action.
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Font methods
|
||||
// MARK: -
|
||||
// MARK: Font methods
|
||||
|
||||
- (CPFont)font
|
||||
{
|
||||
@@ -1943,8 +1943,8 @@ Sets the selection to a range of characters in response to user action.
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Color methods
|
||||
// MARK: -
|
||||
// MARK: Color methods
|
||||
|
||||
- (void)changeColor:(id)sender
|
||||
{
|
||||
@@ -1979,8 +1979,8 @@ Sets the selection to a range of characters in response to user action.
|
||||
[_layoutManager textStorage:_textStorage edited:0 range:CPMakeRangeCopy(range) changeInLength:0 invalidatedRange:CPMakeRangeCopy(range)];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Style & Alignment methods
|
||||
// MARK: -
|
||||
// MARK: Style & Alignment methods
|
||||
|
||||
- (void)bold:(id)sender
|
||||
{
|
||||
@@ -2388,8 +2388,8 @@ Sets the selection to a range of characters in response to user action.
|
||||
[_caret setVisibility:YES];
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Dragging operation
|
||||
// MARK: -
|
||||
// MARK: Dragging operation
|
||||
|
||||
- (void)performDragOperation:(CPDraggingInfo)aSender
|
||||
{
|
||||
|
||||
@@ -54,8 +54,8 @@ var CPSystemTypesetterFactory,
|
||||
@implementation CPTypesetter : CPObject
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Class methods
|
||||
// MARK: -
|
||||
// MARK: Class methods
|
||||
|
||||
+ (void)initialize
|
||||
{
|
||||
@@ -122,8 +122,8 @@ var CPSystemTypesetterFactory,
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Class methods
|
||||
// MARK: -
|
||||
// MARK: Class methods
|
||||
|
||||
+ (id)sharedInstance
|
||||
{
|
||||
|
||||
@@ -70,8 +70,8 @@ function _points2twips(a) { return (a) * 20.0; }
|
||||
CPColor ulColor;
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark Class methods
|
||||
// MARK: -
|
||||
// MARK: Class methods
|
||||
|
||||
|
||||
+ (CPString)produceRTF:(CPAttributedString)aText documentAttributes:(CPDictionary)dict
|
||||
@@ -82,8 +82,8 @@ function _points2twips(a) { return (a) * 20.0; }
|
||||
}
|
||||
|
||||
|
||||
#pragma mark -
|
||||
#pragma mark init methods
|
||||
// MARK: -
|
||||
// MARK: init methods
|
||||
|
||||
- (id)init
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user