mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-11-29 01:42:03 +00:00
fix of circular imports
This commit is contained in:
1 parent
627d0e4e6f
commit
dacaf293b2
10 files changed
+46
-39
No files matched your search
@@ -24,10 +24,10 @@
|
||||
|
||||
@import "CPControl.j"
|
||||
@import "CPFont.j"
|
||||
@import "CPFontPanel.j"
|
||||
@import "CPFontDescriptor.j"
|
||||
|
||||
@global CPApp
|
||||
@class CPFontPanel
|
||||
|
||||
CPItalicFontMask = 1 << 0;
|
||||
CPBoldFontMask = 1 << 1;
|
||||
@@ -495,4 +495,3 @@ var _CPFontDetectPickTwoDifferentFonts = function(candidates)
|
||||
};
|
||||
|
||||
[CPFontManager setFontManagerFactory:[CPFontManager class]];
|
||||
[CPFontManager setFontPanelFactory:CPFontPanel];
|
||||
+20
-4
@@ -10,10 +10,6 @@
|
||||
* Daniel Boehringer on 8/02/2014.
|
||||
* Copyright Daniel Boehringer on 8/02/2014.
|
||||
*
|
||||
* and
|
||||
*
|
||||
* Emmanuel Maillard on 28/02/2010.
|
||||
* Copyright Emmanuel Maillard 2010.
|
||||
*
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
@@ -60,3 +56,23 @@ CPTextDidBeginEditingNotification = @"CPTextDidBeginEditingNotification";
|
||||
CPTextDidChangeNotification = @"CPTextDidChangeNotification";
|
||||
CPTextDidEndEditingNotification = @"CPTextDidEndEditingNotification";
|
||||
|
||||
/*
|
||||
CPTextView Notifications
|
||||
*/
|
||||
CPTextViewDidChangeSelectionNotification = @"CPTextViewDidChangeSelectionNotification";
|
||||
CPTextViewDidChangeTypingAttributesNotification = @"CPTextViewDidChangeTypingAttributesNotification";
|
||||
|
||||
/*
|
||||
FIXME: move these to CPAttributed string
|
||||
Make use of attributed keys in AppKit
|
||||
*/
|
||||
CPFontAttributeName = @"CPFontAttributeName";
|
||||
CPForegroundColorAttributeName = @"CPForegroundColorAttributeName";
|
||||
CPBackgroundColorAttributeName = @"CPBackgroundColorAttributeName";
|
||||
CPShadowAttributeName = @"CPShadowAttributeName";
|
||||
CPUnderlineStyleAttributeName = @"CPUnderlineStyleAttributeName";
|
||||
CPSuperscriptAttributeName = @"CPSuperscriptAttributeName";
|
||||
CPBaselineOffsetAttributeName = @"CPBaselineOffsetAttributeName";
|
||||
CPAttachmentAttributeName = @"CPAttachmentAttributeName";
|
||||
CPLigatureAttributeName = @"CPLigatureAttributeName";
|
||||
CPKernAttributeName = @"CPKernAttributeName";
|
||||
@@ -35,6 +35,7 @@
|
||||
@import "CPColorPanel.j"
|
||||
@import "CPBrowser.j"
|
||||
@import "CPText.j"
|
||||
@import "CPFontManager.j"
|
||||
|
||||
|
||||
@class CPTextStorage
|
||||
@@ -493,3 +494,4 @@ var _availableTraits= [@"Normal", @"Italic", @"Bold", @"Bold Italic"],
|
||||
}
|
||||
|
||||
@end
|
||||
[CPFontManager setFontPanelFactory:CPFontPanel];
|
||||
@@ -26,9 +26,12 @@
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*/
|
||||
|
||||
@import "CPTextStorage.j"
|
||||
@import "CPText.j"
|
||||
@import "CPTextContainer.j"
|
||||
@import "CGContext.j"
|
||||
@import "CPTypesetter.j"
|
||||
|
||||
@global _MakeRangeFromAbs
|
||||
|
||||
function _RectEqualToRectHorizontally(lhsRect, rhsRect)
|
||||
{
|
||||
|
||||
@@ -23,6 +23,7 @@
|
||||
|
||||
@import <Foundation/CPNotificationCenter.j>
|
||||
@import <Foundation/CPAttributedString.j>
|
||||
@import "CPText.j"
|
||||
|
||||
@class CPLayoutManager;
|
||||
|
||||
@@ -33,20 +34,6 @@ CPTextStorageEditedCharacters = 2;
|
||||
CPTextStorageWillProcessEditingNotification = @"CPTextStorageWillProcessEditingNotification";
|
||||
CPTextStorageDidProcessEditingNotification = @"CPTextStorageDidProcessEditingNotification";
|
||||
|
||||
/*
|
||||
FIXME: move these to CPAttributed string
|
||||
Make use of attributed keys in AppKit
|
||||
*/
|
||||
CPFontAttributeName = @"CPFontAttributeName";
|
||||
CPForegroundColorAttributeName = @"CPForegroundColorAttributeName";
|
||||
CPBackgroundColorAttributeName = @"CPBackgroundColorAttributeName";
|
||||
CPShadowAttributeName = @"CPShadowAttributeName";
|
||||
CPUnderlineStyleAttributeName = @"CPUnderlineStyleAttributeName";
|
||||
CPSuperscriptAttributeName = @"CPSuperscriptAttributeName";
|
||||
CPBaselineOffsetAttributeName = @"CPBaselineOffsetAttributeName";
|
||||
CPAttachmentAttributeName = @"CPAttachmentAttributeName";
|
||||
CPLigatureAttributeName = @"CPLigatureAttributeName";
|
||||
CPKernAttributeName = @"CPKernAttributeName";
|
||||
|
||||
/*!
|
||||
@ingroup appkit
|
||||
|
||||
@@ -59,11 +59,6 @@ _MidRange = function(a1)
|
||||
|
||||
@end
|
||||
|
||||
/*
|
||||
CPTextView Notifications
|
||||
*/
|
||||
CPTextViewDidChangeSelectionNotification = @"CPTextViewDidChangeSelectionNotification";
|
||||
CPTextViewDidChangeTypingAttributesNotification = @"CPTextViewDidChangeTypingAttributesNotification";
|
||||
|
||||
/*
|
||||
CPSelectionGranularity
|
||||
@@ -1404,9 +1399,11 @@ var kDelegateRespondsTo_textShouldBeginEditing
|
||||
{
|
||||
_font = font;
|
||||
var length = [_layoutManager numberOfCharacters];
|
||||
[_textStorage addAttribute:CPFontAttributeName value:_font range:CPMakeRange(0, length)];
|
||||
[_textStorage setFont:_font];
|
||||
[self scrollRangeToVisible:CPMakeRange(length, 0)];
|
||||
if (length)
|
||||
{ [_textStorage addAttribute:CPFontAttributeName value:_font range:CPMakeRange(0, length)];
|
||||
[_textStorage setFont:_font];
|
||||
[self scrollRangeToVisible:CPMakeRange(length, 0)];
|
||||
}
|
||||
}
|
||||
|
||||
- (void)setFont:(CPFont)font range:(CPRange)range
|
||||
|
||||
@@ -27,7 +27,8 @@ e.g. using zaach/jison on github
|
||||
@import <Foundation/CPAttributedString.j>
|
||||
@import <Foundation/CPGeometry.j>
|
||||
@import "CPFontManager.j"
|
||||
@import "CPTextStorage.j"
|
||||
@import "CPText.j"
|
||||
@import "CPParagraphStyle.j"
|
||||
|
||||
var hexTable = [];
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
@import "CPParagraphStyle.j"
|
||||
@import "CPColor.j"
|
||||
@import "CPGraphics.j"
|
||||
@import "CPTextStorage.j"
|
||||
@import "CPText.j"
|
||||
@import "CPFontManager.j"
|
||||
|
||||
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
*/
|
||||
|
||||
@import <AppKit/CPTextView.j>
|
||||
@import <AppKit/RTFProducer.j>
|
||||
@import <AppKit/RTFParser.j>
|
||||
@import <AppKit/_CPRTFProducer.j>
|
||||
@import <AppKit/_CPRTFParser.j>
|
||||
|
||||
@implementation AppController : CPObject
|
||||
{
|
||||
@@ -91,8 +91,8 @@
|
||||
|
||||
- (void) makeRTF:sender
|
||||
{
|
||||
[_textView2 setString: [RTFProducer produceRTF:[_textView textStorage] documentAttributes: @{}] ];
|
||||
var tc = [_RTFParser new];
|
||||
[_textView2 setString: [_CPRTFProducer produceRTF:[_textView textStorage] documentAttributes: @{}] ];
|
||||
var tc = [_CPRTFParser new];
|
||||
var mystr=[tc parseRTF:[_textView2 stringValue]];
|
||||
[_textView selectAll: self];
|
||||
[_textView insertText: mystr];
|
||||
|
||||
@@ -2,9 +2,11 @@
|
||||
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>Main cib file base name</key>
|
||||
<string>MainMenu.cib</string>
|
||||
<key>CPBundleName</key>
|
||||
<string>CPLevelIndicator</string>
|
||||
<key>CPApplicationDelegateClass</key>
|
||||
<string>AppController</string>
|
||||
<key>CPBundleName</key>
|
||||
<string>CPTextViewTest</string>
|
||||
<key>CPPrincipalClass</key>
|
||||
<string>CPApplication</string>
|
||||
</dict>
|
||||
</plist>
|
||||
Reference in new issue
Block a user