initial commit
This commit is contained in:
parent
ba9027c7ff
commit
c8dd3d393b
7 changed files with 79 additions and 52 deletions
|
@ -19,6 +19,7 @@
|
||||||
1F857063188F11FC00C56A96 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F85703F188F11FC00C56A96 /* Cocoa.framework */; };
|
1F857063188F11FC00C56A96 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1F85703F188F11FC00C56A96 /* Cocoa.framework */; };
|
||||||
1F85706B188F11FC00C56A96 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1F857069188F11FC00C56A96 /* InfoPlist.strings */; };
|
1F85706B188F11FC00C56A96 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 1F857069188F11FC00C56A96 /* InfoPlist.strings */; };
|
||||||
1F85706D188F11FC00C56A96 /* TextEdTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F85706C188F11FC00C56A96 /* TextEdTests.m */; };
|
1F85706D188F11FC00C56A96 /* TextEdTests.m in Sources */ = {isa = PBXBuildFile; fileRef = 1F85706C188F11FC00C56A96 /* TextEdTests.m */; };
|
||||||
|
1F85707A188F27DA00C56A96 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 1F857079188F27DA00C56A96 /* Icon.icns */; };
|
||||||
/* End PBXBuildFile section */
|
/* End PBXBuildFile section */
|
||||||
|
|
||||||
/* Begin PBXContainerItemProxy section */
|
/* Begin PBXContainerItemProxy section */
|
||||||
|
@ -52,6 +53,7 @@
|
||||||
1F857068188F11FC00C56A96 /* TextEdTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TextEdTests-Info.plist"; sourceTree = "<group>"; };
|
1F857068188F11FC00C56A96 /* TextEdTests-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "TextEdTests-Info.plist"; sourceTree = "<group>"; };
|
||||||
1F85706A188F11FC00C56A96 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
1F85706A188F11FC00C56A96 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
|
||||||
1F85706C188F11FC00C56A96 /* TextEdTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextEdTests.m; sourceTree = "<group>"; };
|
1F85706C188F11FC00C56A96 /* TextEdTests.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = TextEdTests.m; sourceTree = "<group>"; };
|
||||||
|
1F857079188F27DA00C56A96 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = "<group>"; };
|
||||||
/* End PBXFileReference section */
|
/* End PBXFileReference section */
|
||||||
|
|
||||||
/* Begin PBXFrameworksBuildPhase section */
|
/* Begin PBXFrameworksBuildPhase section */
|
||||||
|
@ -134,6 +136,7 @@
|
||||||
1F857048188F11FC00C56A96 /* InfoPlist.strings */,
|
1F857048188F11FC00C56A96 /* InfoPlist.strings */,
|
||||||
1F85704B188F11FC00C56A96 /* main.m */,
|
1F85704B188F11FC00C56A96 /* main.m */,
|
||||||
1F85704D188F11FC00C56A96 /* TextEd-Prefix.pch */,
|
1F85704D188F11FC00C56A96 /* TextEd-Prefix.pch */,
|
||||||
|
1F857079188F27DA00C56A96 /* Icon.icns */,
|
||||||
1F85704E188F11FC00C56A96 /* Credits.rtf */,
|
1F85704E188F11FC00C56A96 /* Credits.rtf */,
|
||||||
);
|
);
|
||||||
name = "Supporting Files";
|
name = "Supporting Files";
|
||||||
|
@ -238,6 +241,7 @@
|
||||||
1F85704A188F11FC00C56A96 /* InfoPlist.strings in Resources */,
|
1F85704A188F11FC00C56A96 /* InfoPlist.strings in Resources */,
|
||||||
1F857050188F11FC00C56A96 /* Credits.rtf in Resources */,
|
1F857050188F11FC00C56A96 /* Credits.rtf in Resources */,
|
||||||
1F857059188F11FC00C56A96 /* MainMenu.xib in Resources */,
|
1F857059188F11FC00C56A96 /* MainMenu.xib in Resources */,
|
||||||
|
1F85707A188F27DA00C56A96 /* Icon.icns in Resources */,
|
||||||
);
|
);
|
||||||
runOnlyForDeploymentPostprocessing = 0;
|
runOnlyForDeploymentPostprocessing = 0;
|
||||||
};
|
};
|
||||||
|
|
|
@ -1,11 +1,12 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4439" systemVersion="13A451" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="4514" systemVersion="13B42" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none" useAutolayout="YES">
|
||||||
<dependencies>
|
<dependencies>
|
||||||
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4439"/>
|
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="4514"/>
|
||||||
</dependencies>
|
</dependencies>
|
||||||
<objects>
|
<objects>
|
||||||
<customObject id="-2" userLabel="File's Owner" customClass="Document">
|
<customObject id="-2" userLabel="File's Owner" customClass="Document">
|
||||||
<connections>
|
<connections>
|
||||||
|
<outlet property="textView" destination="AO8-68-5ch" id="Te1-1h-f2k"/>
|
||||||
<outlet property="window" destination="5" id="18"/>
|
<outlet property="window" destination="5" id="18"/>
|
||||||
</connections>
|
</connections>
|
||||||
</customObject>
|
</customObject>
|
||||||
|
@ -13,26 +14,51 @@
|
||||||
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="Window">
|
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" wantsToBeColor="NO" visibleAtLaunch="NO" animationBehavior="default" id="5" userLabel="Window">
|
||||||
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
|
||||||
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
<windowPositionMask key="initialPositionMask" leftStrut="YES" rightStrut="YES" topStrut="YES" bottomStrut="YES"/>
|
||||||
<rect key="contentRect" x="133" y="235" width="507" height="413"/>
|
<rect key="contentRect" x="133" y="235" width="631" height="484"/>
|
||||||
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
|
<rect key="screenRect" x="0.0" y="0.0" width="2560" height="1418"/>
|
||||||
<value key="minSize" type="size" width="94" height="86"/>
|
<value key="minSize" type="size" width="94" height="86"/>
|
||||||
<view key="contentView" id="6">
|
<view key="contentView" id="6">
|
||||||
<rect key="frame" x="0.0" y="0.0" width="507" height="413"/>
|
<rect key="frame" x="0.0" y="0.0" width="631" height="484"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<subviews>
|
<subviews>
|
||||||
<textField verticalHuggingPriority="750" translatesAutoresizingMaskIntoConstraints="NO" id="20">
|
<scrollView focusRingType="none" appearanceType="lightContent" misplaced="YES" autohidesScrollers="YES" horizontalLineScroll="10" horizontalPageScroll="10" verticalLineScroll="10" verticalPageScroll="10" hasHorizontalScroller="NO" usesPredominantAxisScrolling="NO" translatesAutoresizingMaskIntoConstraints="NO" id="Cmv-HN-XSZ">
|
||||||
<rect key="frame" x="120" y="195" width="266" height="22"/>
|
<rect key="frame" x="-1" y="-1" width="633" height="486"/>
|
||||||
<autoresizingMask key="autoresizingMask"/>
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
<textFieldCell key="cell" sendsActionOnEndEditing="YES" alignment="center" title="Your document contents here" id="100020">
|
<clipView key="contentView" focusRingType="none" misplaced="YES" id="ahN-hw-bJE">
|
||||||
<font key="font" metaFont="system" size="18"/>
|
<rect key="frame" x="1" y="1" width="631" height="484"/>
|
||||||
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
<color key="backgroundColor" name="controlColor" catalog="System" colorSpace="catalog"/>
|
<subviews>
|
||||||
</textFieldCell>
|
<textView focusRingType="none" importsGraphics="NO" richText="NO" findStyle="panel" continuousSpellChecking="YES" allowsUndo="YES" usesRuler="YES" usesFontPanel="YES" verticallyResizable="YES" allowsNonContiguousLayout="YES" quoteSubstitution="YES" dashSubstitution="YES" smartInsertDelete="YES" id="AO8-68-5ch">
|
||||||
</textField>
|
<rect key="frame" x="0.0" y="0.0" width="631" height="484"/>
|
||||||
|
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<size key="minSize" width="631" height="484"/>
|
||||||
|
<size key="maxSize" width="10000000" height="10000000"/>
|
||||||
|
<color key="insertionPointColor" white="0.0" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
<size key="minSize" width="631" height="484"/>
|
||||||
|
<size key="maxSize" width="10000000" height="10000000"/>
|
||||||
|
<connections>
|
||||||
|
<binding destination="-2" name="attributedString" keyPath="self.stringModel" id="qPe-H9-THh"/>
|
||||||
|
</connections>
|
||||||
|
</textView>
|
||||||
|
</subviews>
|
||||||
|
<color key="backgroundColor" white="1" alpha="1" colorSpace="calibratedWhite"/>
|
||||||
|
</clipView>
|
||||||
|
<scroller key="horizontalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="YES" id="CQZ-4e-bVe">
|
||||||
|
<rect key="frame" x="-100" y="-100" width="87" height="18"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
</scroller>
|
||||||
|
<scroller key="verticalScroller" hidden="YES" verticalHuggingPriority="750" doubleValue="1" horizontal="NO" id="nR6-Xx-I6j">
|
||||||
|
<rect key="frame" x="617" y="1" width="15" height="484"/>
|
||||||
|
<autoresizingMask key="autoresizingMask"/>
|
||||||
|
</scroller>
|
||||||
|
</scrollView>
|
||||||
</subviews>
|
</subviews>
|
||||||
<constraints>
|
<constraints>
|
||||||
<constraint firstItem="20" firstAttribute="centerX" secondItem="6" secondAttribute="centerX" id="100025"/>
|
<constraint firstItem="Cmv-HN-XSZ" firstAttribute="leading" secondItem="6" secondAttribute="leading" id="JuA-gY-xTl"/>
|
||||||
<constraint firstItem="20" firstAttribute="centerY" secondItem="6" secondAttribute="centerY" id="100026"/>
|
<constraint firstAttribute="bottom" secondItem="Cmv-HN-XSZ" secondAttribute="bottom" id="P1s-Nm-ME6"/>
|
||||||
|
<constraint firstItem="Cmv-HN-XSZ" firstAttribute="top" secondItem="6" secondAttribute="top" id="vnl-7x-Khx"/>
|
||||||
|
<constraint firstAttribute="trailing" secondItem="Cmv-HN-XSZ" secondAttribute="trailing" id="zrP-9m-HiW"/>
|
||||||
</constraints>
|
</constraints>
|
||||||
</view>
|
</view>
|
||||||
<connections>
|
<connections>
|
||||||
|
@ -40,5 +66,6 @@
|
||||||
</connections>
|
</connections>
|
||||||
</window>
|
</window>
|
||||||
<customObject id="-3" userLabel="Application"/>
|
<customObject id="-3" userLabel="Application"/>
|
||||||
|
<userDefaultsController representsSharedInstance="YES" id="T2B-US-Gnt"/>
|
||||||
</objects>
|
</objects>
|
||||||
</document>
|
</document>
|
|
@ -8,6 +8,11 @@
|
||||||
|
|
||||||
#import <Cocoa/Cocoa.h>
|
#import <Cocoa/Cocoa.h>
|
||||||
|
|
||||||
@interface Document : NSDocument
|
@interface Document : NSDocument {
|
||||||
|
NSAttributedString *stringModel;
|
||||||
|
}
|
||||||
|
|
||||||
|
@property (unsafe_unretained) IBOutlet NSTextView *textView;
|
||||||
|
@property (nonatomic, readwrite) NSAttributedString *stringModel;
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
|
@ -9,6 +9,8 @@
|
||||||
#import "Document.h"
|
#import "Document.h"
|
||||||
|
|
||||||
@implementation Document
|
@implementation Document
|
||||||
|
@synthesize textView;
|
||||||
|
@synthesize stringModel;
|
||||||
|
|
||||||
- (id)init
|
- (id)init
|
||||||
{
|
{
|
||||||
|
@ -29,6 +31,7 @@
|
||||||
- (void)windowControllerDidLoadNib:(NSWindowController *)aController
|
- (void)windowControllerDidLoadNib:(NSWindowController *)aController
|
||||||
{
|
{
|
||||||
[super windowControllerDidLoadNib:aController];
|
[super windowControllerDidLoadNib:aController];
|
||||||
|
[self.textView setFont:[NSFont userFixedPitchFontOfSize:16]];
|
||||||
// Add any code here that needs to be executed once the windowController has loaded the document's window.
|
// Add any code here that needs to be executed once the windowController has loaded the document's window.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -39,21 +42,20 @@
|
||||||
|
|
||||||
- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
|
- (NSData *)dataOfType:(NSString *)typeName error:(NSError **)outError
|
||||||
{
|
{
|
||||||
// Insert code here to write your document to data of the specified type. If outError != NULL, ensure that you create and set an appropriate error when returning nil.
|
NSData *data = [[self.textView.textStorage string] dataUsingEncoding:NSUTF8StringEncoding];
|
||||||
// You can also choose to override -fileWrapperOfType:error:, -writeToURL:ofType:error:, or -writeToURL:ofType:forSaveOperation:originalContentsURL:error: instead.
|
[self.textView breakUndoCoalescing];
|
||||||
NSException *exception = [NSException exceptionWithName:@"UnimplementedMethod" reason:[NSString stringWithFormat:@"%@ is unimplemented", NSStringFromSelector(_cmd)] userInfo:nil];
|
|
||||||
@throw exception;
|
if (!data && outError) {
|
||||||
return nil;
|
*outError = [NSError errorWithDomain:NSCocoaErrorDomain code:NSFileWriteUnknownError userInfo:nil];
|
||||||
|
}
|
||||||
|
|
||||||
|
return data;
|
||||||
}
|
}
|
||||||
|
|
||||||
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError
|
- (BOOL)readFromData:(NSData *)data ofType:(NSString *)typeName error:(NSError **)outError
|
||||||
{
|
{
|
||||||
// Insert code here to read your document from the given data of the specified type. If outError != NULL, ensure that you create and set an appropriate error when returning NO.
|
self.stringModel = [[NSAttributedString alloc] initWithString:[NSString stringWithUTF8String:[data bytes]]];
|
||||||
// You can also choose to override -readFromFileWrapper:ofType:error: or -readFromURL:ofType:error: instead.
|
return !!self.stringModel;
|
||||||
// If you override either of these, you should also override -isEntireFileLoaded to return NO if the contents are lazily loaded.
|
|
||||||
NSException *exception = [NSException exceptionWithName:@"UnimplementedMethod" reason:[NSString stringWithFormat:@"%@ is unimplemented", NSStringFromSelector(_cmd)] userInfo:nil];
|
|
||||||
@throw exception;
|
|
||||||
return YES;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@end
|
@end
|
||||||
|
|
BIN
TextEd/Icon.icns
Normal file
BIN
TextEd/Icon.icns
Normal file
Binary file not shown.
|
@ -28,9 +28,9 @@
|
||||||
<key>CFBundleExecutable</key>
|
<key>CFBundleExecutable</key>
|
||||||
<string>${EXECUTABLE_NAME}</string>
|
<string>${EXECUTABLE_NAME}</string>
|
||||||
<key>CFBundleIconFile</key>
|
<key>CFBundleIconFile</key>
|
||||||
<string></string>
|
<string>Icon.icns</string>
|
||||||
<key>CFBundleIdentifier</key>
|
<key>CFBundleIdentifier</key>
|
||||||
<string>net.jeena.${PRODUCT_NAME:rfc1034identifier}</string>
|
<string>nu.jabs.${PRODUCT_NAME:rfc1034identifier}</string>
|
||||||
<key>CFBundleInfoDictionaryVersion</key>
|
<key>CFBundleInfoDictionaryVersion</key>
|
||||||
<string>6.0</string>
|
<string>6.0</string>
|
||||||
<key>CFBundleName</key>
|
<key>CFBundleName</key>
|
||||||
|
@ -43,6 +43,8 @@
|
||||||
<string>????</string>
|
<string>????</string>
|
||||||
<key>CFBundleVersion</key>
|
<key>CFBundleVersion</key>
|
||||||
<string>1</string>
|
<string>1</string>
|
||||||
|
<key>LSApplicationCategoryType</key>
|
||||||
|
<string>public.app-category.productivity</string>
|
||||||
<key>LSMinimumSystemVersion</key>
|
<key>LSMinimumSystemVersion</key>
|
||||||
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
<string>${MACOSX_DEPLOYMENT_TARGET}</string>
|
||||||
<key>NSHumanReadableCopyright</key>
|
<key>NSHumanReadableCopyright</key>
|
||||||
|
|
|
@ -1,29 +1,16 @@
|
||||||
{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
|
{\rtf1\ansi\ansicpg1252\cocoartf1265
|
||||||
|
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
|
||||||
{\colortbl;\red255\green255\blue255;}
|
{\colortbl;\red255\green255\blue255;}
|
||||||
\paperw9840\paperh8400
|
\paperw11900\paperh16840\vieww9600\viewh8400\viewkind0
|
||||||
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
|
\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural
|
||||||
|
|
||||||
\f0\b\fs24 \cf0 Engineering:
|
\f0\b\fs24 \cf0 TextEd.app
|
||||||
\b0 \
|
\b0 is here to replace Apples TextEdit.app since it doesn't start right away anymore and can not be used as a notepad anymore, the startup time is just too slow.\
|
||||||
Some people\
|
|
||||||
\
|
\
|
||||||
|
It doesn't work with RDF, only with plain text. Therefor a monospace font is used.\
|
||||||
\b Human Interface Design:
|
|
||||||
\b0 \
|
|
||||||
Some other people\
|
|
||||||
\
|
\
|
||||||
|
Jabs Nu <http://jabs.nu>\
|
||||||
\b Testing:
|
|
||||||
\b0 \
|
|
||||||
Hopefully not nobody\
|
|
||||||
\
|
\
|
||||||
|
Thanks to
|
||||||
\b Documentation:
|
\i Yellow Icon Design
|
||||||
\b0 \
|
\i0 for the icon <http://www.yellowicon.com/>}
|
||||||
Whoever\
|
|
||||||
\
|
|
||||||
|
|
||||||
\b With special thanks to:
|
|
||||||
\b0 \
|
|
||||||
Mom\
|
|
||||||
}
|
|
Reference in a new issue