git-svn-id: svn://qnap.local/TwoTerm/trunk@1652 5590a31f-7b70-45f8-8c82-aa3a8e5f4507

This commit is contained in:
Kelvin Sherlock 2010-07-09 02:40:04 +00:00
parent 473f8bd045
commit 2e08a6f99d
6 changed files with 258 additions and 41 deletions

View File

@ -206,6 +206,14 @@
B6697A0211E6BED3002ED475 /* PBXBookmark */ = B6697A0211E6BED3002ED475 /* PBXBookmark */;
B6697A0511E6BEDA002ED475 /* PBXBookmark */ = B6697A0511E6BEDA002ED475 /* PBXBookmark */;
B6697A0911E6BEFD002ED475 /* PBXBookmark */ = B6697A0911E6BEFD002ED475 /* PBXBookmark */;
B6697A1A11E6C28A002ED475 /* PBXBookmark */ = B6697A1A11E6C28A002ED475 /* PBXBookmark */;
B6697A1B11E6C28A002ED475 /* PBXTextBookmark */ = B6697A1B11E6C28A002ED475 /* PBXTextBookmark */;
B6697A1C11E6C28A002ED475 /* PBXTextBookmark */ = B6697A1C11E6C28A002ED475 /* PBXTextBookmark */;
B6697A1D11E6C28A002ED475 /* PBXTextBookmark */ = B6697A1D11E6C28A002ED475 /* PBXTextBookmark */;
B6697A2211E6C2ED002ED475 /* PBXTextBookmark */ = B6697A2211E6C2ED002ED475 /* PBXTextBookmark */;
B6697A2811E6C394002ED475 /* PBXTextBookmark */ = B6697A2811E6C394002ED475 /* PBXTextBookmark */;
B6697A2E11E6C426002ED475 /* PBXTextBookmark */ = B6697A2E11E6C426002ED475 /* PBXTextBookmark */;
B6697A3211E6C439002ED475 /* PBXTextBookmark */ = B6697A3211E6C439002ED475 /* PBXTextBookmark */;
B676058811DAE21100D6B66C = B676058811DAE21100D6B66C /* PBXTextBookmark */;
B676058911DAE21100D6B66C = B676058911DAE21100D6B66C /* PBXTextBookmark */;
B676058B11DAE21100D6B66C = B676058B11DAE21100D6B66C /* PlistBookmark */;
@ -270,7 +278,7 @@
ignoreCount = 0;
lineNumber = 460;
location = 2Term;
modificationTime = 300334844.715422;
modificationTime = 300336184.692893;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -288,7 +296,7 @@
ignoreCount = 0;
lineNumber = 107;
location = 2Term;
modificationTime = 300334844.715555;
modificationTime = 300336184.693003;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -306,7 +314,7 @@
ignoreCount = 0;
lineNumber = 598;
location = 2Term;
modificationTime = 300334844.715661;
modificationTime = 300336184.693103;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -324,7 +332,7 @@
ignoreCount = 0;
lineNumber = 607;
location = 2Term;
modificationTime = 300334844.715782;
modificationTime = 300336184.69322;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -342,7 +350,7 @@
ignoreCount = 0;
lineNumber = 170;
location = 2Term;
modificationTime = 300334844.715892;
modificationTime = 300336184.69333;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -360,7 +368,7 @@
ignoreCount = 0;
lineNumber = 113;
location = 2Term;
modificationTime = 300334844.716018;
modificationTime = 300336184.693467;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -388,7 +396,7 @@
ignoreCount = 0;
lineNumber = 66;
location = 2Term;
modificationTime = 300334844.715145;
modificationTime = 300336184.692614;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -825,7 +833,7 @@
ignoreCount = 0;
lineNumber = 184;
location = 2Term;
modificationTime = 300334844.716124;
modificationTime = 300336184.693575;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -843,7 +851,7 @@
ignoreCount = 0;
lineNumber = 183;
location = 2Term;
modificationTime = 300334844.716232;
modificationTime = 300336184.707938;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -901,7 +909,7 @@
ignoreCount = 0;
lineNumber = 278;
location = 2Term;
modificationTime = 300334844.716379;
modificationTime = 300336184.708157;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -929,7 +937,7 @@
ignoreCount = 0;
lineNumber = 272;
location = 2Term;
modificationTime = 300334844.716527;
modificationTime = 300336184.708302;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -957,7 +965,7 @@
ignoreCount = 0;
lineNumber = 240;
location = 2Term;
modificationTime = 300334844.716646;
modificationTime = 300336184.708412;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -1132,7 +1140,7 @@
ignoreCount = 0;
lineNumber = 30;
location = 2Term;
modificationTime = 300334844.716761;
modificationTime = 300336184.708524;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -1237,6 +1245,94 @@
isa = PBXBookmark;
fRef = B66979CF11E6BCAE002ED475 /* sl25.png */;
};
B6697A0D11E6BF95002ED475 /* CurveView.h */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {1249, 955}}";
sepNavSelRange = "{267, 0}";
sepNavVisRange = "{0, 274}";
};
};
B6697A0E11E6BF95002ED475 /* CurveView.m */ = {
uiCtxt = {
sepNavIntBoundsRect = "{{0, 0}, {653, 1313}}";
sepNavSelRange = "{0, 0}";
sepNavVisRange = "{0, 553}";
};
};
B6697A1A11E6C28A002ED475 /* PBXBookmark */ = {
isa = PBXBookmark;
fRef = B66979CF11E6BCAE002ED475 /* sl25.png */;
};
B6697A1B11E6C28A002ED475 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B6697A0D11E6BF95002ED475 /* CurveView.h */;
name = "CurveView.h: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 206;
vrLoc = 0;
};
B6697A1C11E6C28A002ED475 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B6697A0E11E6BF95002ED475 /* CurveView.m */;
name = "CurveView.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 416;
vrLoc = 0;
};
B6697A1D11E6C28A002ED475 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B6697A0E11E6BF95002ED475 /* CurveView.m */;
name = "CurveView.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 572;
vrLoc = 0;
};
B6697A2211E6C2ED002ED475 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B6697A0E11E6BF95002ED475 /* CurveView.m */;
name = "CurveView.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 572;
vrLoc = 0;
};
B6697A2811E6C394002ED475 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B6697A0E11E6BF95002ED475 /* CurveView.m */;
name = "CurveView.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 553;
vrLoc = 0;
};
B6697A2E11E6C426002ED475 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B6697A0E11E6BF95002ED475 /* CurveView.m */;
name = "CurveView.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 553;
vrLoc = 0;
};
B6697A3211E6C439002ED475 /* PBXTextBookmark */ = {
isa = PBXTextBookmark;
fRef = B6697A0E11E6BF95002ED475 /* CurveView.m */;
name = "CurveView.m: 1";
rLen = 0;
rLoc = 0;
rType = 0;
vrLen = 553;
vrLoc = 0;
};
B676053511DADB8100D6B66C /* 2Term */ = {
isa = PBXExecutable;
activeArgIndices = (
@ -1396,7 +1492,7 @@
ignoreCount = 0;
lineNumber = 34;
location = 2Term;
modificationTime = 300334844.712226;
modificationTime = 300336184.691373;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -1414,7 +1510,7 @@
ignoreCount = 0;
lineNumber = 31;
location = 2Term;
modificationTime = 300334844.71468;
modificationTime = 300336184.692088;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -1432,7 +1528,7 @@
ignoreCount = 0;
lineNumber = 97;
location = 2Term;
modificationTime = 300334844.714833;
modificationTime = 300336184.692205;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -1450,7 +1546,7 @@
ignoreCount = 0;
lineNumber = 97;
location = 2Term;
modificationTime = 300334844.714936;
modificationTime = 300336184.692303;
originalNumberOfMultipleMatches = 1;
state = 2;
};
@ -1525,7 +1621,7 @@
ignoreCount = 0;
lineNumber = 97;
location = 2Term;
modificationTime = 300334844.715037;
modificationTime = 300336184.692435;
originalNumberOfMultipleMatches = 1;
state = 0;
};

View File

@ -282,15 +282,9 @@
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
<array>
<array>
<integer>37</integer>
<integer>36</integer>
<integer>27</integer>
<integer>26</integer>
<integer>25</integer>
<integer>0</integer>
</array>
<array>
<integer>28</integer>
<integer>26</integer>
<integer>25</integer>
<integer>0</integer>
</array>
</array>
@ -328,7 +322,7 @@
<key>PBXProjectModuleGUID</key>
<string>B676054211DADB9000D6B66C</string>
<key>PBXProjectModuleLabel</key>
<string>sl25.png</string>
<string>CurveView.m</string>
<key>PBXSplitModuleInNavigatorKey</key>
<dict>
<key>Split0</key>
@ -336,11 +330,11 @@
<key>PBXProjectModuleGUID</key>
<string>B676054311DADB9000D6B66C</string>
<key>PBXProjectModuleLabel</key>
<string>sl25.png</string>
<string>CurveView.m</string>
<key>_historyCapacity</key>
<integer>0</integer>
<key>bookmark</key>
<string>B6697A0911E6BEFD002ED475</string>
<string>B6697A3211E6C439002ED475</string>
<key>history</key>
<array>
<string>B676058811DAE21100D6B66C</string>
@ -368,7 +362,9 @@
<string>B66979BD11E6ACB9002ED475</string>
<string>B66979D811E6BD4B002ED475</string>
<string>B66979FE11E6BEC3002ED475</string>
<string>B66979FF11E6BEC3002ED475</string>
<string>B6697A1A11E6C28A002ED475</string>
<string>B6697A1B11E6C28A002ED475</string>
<string>B6697A1C11E6C28A002ED475</string>
</array>
</dict>
<key>SplitCount</key>
@ -706,11 +702,12 @@
<integer>5</integer>
<key>WindowOrderList</key>
<array>
<string>B6697A0A11E6BEFD002ED475</string>
<string>B6697A3311E6C439002ED475</string>
<string>B669796711E6A606002ED475</string>
<string>B669796811E6A606002ED475</string>
<string>/Users/kelvin/Projects/2Term/2Term.xcodeproj</string>
<string>B66979DC11E6BD4B002ED475</string>
<string>/Users/kelvin/Projects/2Term/2Term.xcodeproj</string>
<string>B6697A1F11E6C28A002ED475</string>
</array>
<key>WindowString</key>
<string>203 218 1060 902 0 0 1920 1178 </string>

View File

@ -16,6 +16,7 @@
B66979D111E6BCAE002ED475 /* sl25.png in Resources */ = {isa = PBXBuildFile; fileRef = B66979CF11E6BCAE002ED475 /* sl25.png */; };
B66979FA11E6BEB5002ED475 /* sl75.png in Resources */ = {isa = PBXBuildFile; fileRef = B66979F811E6BEB5002ED475 /* sl75.png */; };
B66979FB11E6BEB5002ED475 /* sl50.png in Resources */ = {isa = PBXBuildFile; fileRef = B66979F911E6BEB5002ED475 /* sl50.png */; };
B6697A0F11E6BF95002ED475 /* CurveView.m in Sources */ = {isa = PBXBuildFile; fileRef = B6697A0E11E6BF95002ED475 /* CurveView.m */; };
B676063B11DEAD3500D6B66C /* TermWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B676063A11DEAD3500D6B66C /* TermWindowController.m */; };
B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */ = {isa = PBXBuildFile; fileRef = B676065011DEBAE900D6B66C /* TermWindow.xib */; };
B67606DA11DF6DAB00D6B66C /* EmulatorView.mm in Sources */ = {isa = PBXBuildFile; fileRef = B67606D911DF6DAB00D6B66C /* EmulatorView.mm */; };
@ -44,6 +45,8 @@
B66979CF11E6BCAE002ED475 /* sl25.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sl25.png; sourceTree = "<group>"; };
B66979F811E6BEB5002ED475 /* sl75.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sl75.png; sourceTree = "<group>"; };
B66979F911E6BEB5002ED475 /* sl50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = sl50.png; sourceTree = "<group>"; };
B6697A0D11E6BF95002ED475 /* CurveView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = CurveView.h; sourceTree = "<group>"; };
B6697A0E11E6BF95002ED475 /* CurveView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = CurveView.m; sourceTree = "<group>"; };
B676063911DEAD3500D6B66C /* TermWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TermWindowController.h; sourceTree = "<group>"; };
B676063A11DEAD3500D6B66C /* TermWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = TermWindowController.m; sourceTree = "<group>"; };
B676064D11DEBAE300D6B66C /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/TermWindow.xib; sourceTree = "<group>"; };
@ -98,6 +101,8 @@
B699A03211E528DE00F54CC8 /* iGeometry.h */,
B699A05B11E54D4500F54CC8 /* OutputChannel.h */,
B699A05C11E54D4500F54CC8 /* OutputChannel.cpp */,
B6697A0D11E6BF95002ED475 /* CurveView.h */,
B6697A0E11E6BF95002ED475 /* CurveView.m */,
);
name = Classes;
sourceTree = "<group>";
@ -249,6 +254,7 @@
B699A05D11E54D4500F54CC8 /* OutputChannel.cpp in Sources */,
B699A09111E572A300F54CC8 /* VT52.mm in Sources */,
B669798511E6A786002ED475 /* Lock.cpp in Sources */,
B6697A0F11E6BF95002ED475 /* CurveView.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};

19
CurveView.h Normal file
View File

@ -0,0 +1,19 @@
//
// CurveView.h
// 2Term
//
// Created by Kelvin Sherlock on 7/8/2010.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import <Cocoa/Cocoa.h>
@interface CurveView : NSView {
NSColor *_color;
}
@property (nonatomic, retain) NSColor *color;
@end

70
CurveView.m Normal file
View File

@ -0,0 +1,70 @@
//
// CurveView.m
// 2Term
//
// Created by Kelvin Sherlock on 7/8/2010.
// Copyright 2010 __MyCompanyName__. All rights reserved.
//
#import "CurveView.h"
@implementation CurveView
@synthesize color = _color;
- (id)initWithFrame:(NSRect)frame {
self = [super initWithFrame:frame];
if (self) {
// Initialization code here.
}
return self;
}
#define curveSize 4
- (void)drawRect:(NSRect)dirtyRect {
NSGraphicsContext *nsgc = [NSGraphicsContext currentContext];
CGContextRef ctx = [nsgc graphicsPort];
NSRect bounds = [self bounds];
[_color setFill];
CGContextMoveToPoint(ctx, 0, curveSize);
CGContextAddLineToPoint(ctx, 0, bounds.size.height - curveSize);
CGContextAddQuadCurveToPoint(ctx, 0, bounds.size.height, curveSize, bounds.size.height);
CGContextAddLineToPoint(ctx, bounds.size.width - curveSize, bounds.size.height);
CGContextAddQuadCurveToPoint(ctx, bounds.size.width, bounds.size.height, bounds.size.width, bounds.size.height - curveSize);
CGContextAddLineToPoint(ctx, bounds.size.width, curveSize);
CGContextAddQuadCurveToPoint(ctx, bounds.size.width, 0, bounds.size.width - curveSize, 0);
CGContextAddLineToPoint(ctx, curveSize, 0);
CGContextAddQuadCurveToPoint(ctx, 0, 0, 0, curveSize);
CGContextFillPath(ctx);
}
-(void)setColor:(NSColor *)color
{
if (_color == color) return;
[_color release];
_color = [color retain];
[self setNeedsDisplay: YES];
}
-(void)dealloc
{
[_color release];
}
@end

View File

@ -12,7 +12,7 @@
</object>
<object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<bool key="EncodedWithXMLCoder">YES</bool>
<integer value="2"/>
<integer value="1"/>
</object>
<object class="NSArray" key="IBDocument.PluginDependencies">
<bool key="EncodedWithXMLCoder">YES</bool>
@ -52,12 +52,22 @@
<int key="NSvFlags">256</int>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="59249513">
<object class="NSCustomView" id="1067446494">
<reference key="NSNextResponder" ref="1006"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{30, 30}, {560, 384}}</string>
<object class="NSMutableArray" key="NSSubviews">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="NSCustomView" id="59249513">
<reference key="NSNextResponder" ref="1067446494"/>
<int key="NSvFlags">268</int>
<string key="NSFrame">{{10, 10}, {560, 384}}</string>
<reference key="NSSuperview" ref="1067446494"/>
<string key="NSClassName">EmulatorView</string>
</object>
</object>
<string key="NSFrame">{{20, 20}, {580, 404}}</string>
<reference key="NSSuperview" ref="1006"/>
<string key="NSClassName">EmulatorView</string>
<string key="NSClassName">CurveView</string>
</object>
</object>
<string key="NSFrameSize">{620, 444}</string>
@ -136,14 +146,23 @@
<reference key="object" ref="1006"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="59249513"/>
<reference ref="1067446494"/>
</object>
<reference key="parent" ref="1005"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">9</int>
<reference key="object" ref="1067446494"/>
<object class="NSMutableArray" key="children">
<bool key="EncodedWithXMLCoder">YES</bool>
<reference ref="59249513"/>
</object>
<reference key="parent" ref="1006"/>
</object>
<object class="IBObjectRecord">
<int key="objectID">5</int>
<reference key="object" ref="59249513"/>
<reference key="parent" ref="1006"/>
<reference key="parent" ref="1067446494"/>
<string key="objectName">Emulator View</string>
</object>
</object>
@ -160,17 +179,19 @@
<string>1.editorWindowContentRectSynchronizationRect</string>
<string>2.IBPluginDependency</string>
<string>5.IBPluginDependency</string>
<string>9.IBPluginDependency</string>
</object>
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>{{367, 306}, {620, 444}}</string>
<string>{{527, 376}, {620, 444}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>{{367, 306}, {620, 444}}</string>
<string>{{527, 376}, {620, 444}}</string>
<integer value="1"/>
<string>{196, 240}</string>
<string>{{202, 428}, {480, 270}}</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
<string>com.apple.InterfaceBuilder.CocoaPlugin</string>
</object>
</object>
<object class="NSMutableDictionary" key="unlocalizedProperties">
@ -189,11 +210,19 @@
</object>
</object>
<nil key="sourceID"/>
<int key="maxID">8</int>
<int key="maxID">9</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<object class="NSMutableArray" key="referencedPartialClassDescriptions">
<bool key="EncodedWithXMLCoder">YES</bool>
<object class="IBPartialClassDescription">
<string key="className">CurveView</string>
<string key="superclassName">NSView</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
<string key="minorKey">CurveView.h</string>
</object>
</object>
<object class="IBPartialClassDescription">
<string key="className">EmulatorView</string>
<string key="superclassName">NSView</string>