mirror of
https://github.com/ksherlock/TwoTerm.git
synced 2025-04-09 14:38:08 +00:00
git-svn-id: svn://qnap.local/TwoTerm/trunk@1656 5590a31f-7b70-45f8-8c82-aa3a8e5f4507
This commit is contained in:
parent
412b1d58e0
commit
0594410e4f
File diff suppressed because it is too large
Load Diff
@ -3,7 +3,7 @@
|
||||
<plist version="1.0">
|
||||
<dict>
|
||||
<key>ActivePerspectiveName</key>
|
||||
<string>Debug</string>
|
||||
<string>Project</string>
|
||||
<key>AllowedModules</key>
|
||||
<array>
|
||||
<dict>
|
||||
@ -278,23 +278,16 @@
|
||||
<string>1058C7A2FEA54F0111CA2CBB</string>
|
||||
<string>19C28FACFE9D520D11CA2CBB</string>
|
||||
<string>1C37FBAC04509CD000000102</string>
|
||||
<string>B60EBE2E11E918E700C1974F</string>
|
||||
<string>B60EBE2F11E918E700C1974F</string>
|
||||
<string>1DDD58140DA1D0A300B32029</string>
|
||||
<string>B676065011DEBAE900D6B66C</string>
|
||||
<string>B60EBE3011E918E700C1974F</string>
|
||||
<string>1C77FABC04509CD000000102</string>
|
||||
</array>
|
||||
<key>PBXSmartGroupTreeModuleOutlineStateSelectionKey</key>
|
||||
<array>
|
||||
<array>
|
||||
<integer>44</integer>
|
||||
<integer>43</integer>
|
||||
<integer>42</integer>
|
||||
</array>
|
||||
</array>
|
||||
<key>PBXSmartGroupTreeModuleOutlineStateVisibleRectKey</key>
|
||||
<string>{{0, 131}, {324, 843}}</string>
|
||||
<string>{{0, 0}, {324, 843}}</string>
|
||||
</dict>
|
||||
<key>PBXTopSmartGroupGIDs</key>
|
||||
<array/>
|
||||
@ -310,6 +303,8 @@
|
||||
<string>MainColumn</string>
|
||||
<real>324</real>
|
||||
</array>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>534 89 1060 902 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXSmartGroupTreeModule</string>
|
||||
@ -325,7 +320,7 @@
|
||||
<key>PBXProjectModuleGUID</key>
|
||||
<string>B676054211DADB9000D6B66C</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ScanLineFilter.m</string>
|
||||
<string>EmulatorView.mm</string>
|
||||
<key>PBXSplitModuleInNavigatorKey</key>
|
||||
<dict>
|
||||
<key>Split0</key>
|
||||
@ -333,11 +328,11 @@
|
||||
<key>PBXProjectModuleGUID</key>
|
||||
<string>B676054311DADB9000D6B66C</string>
|
||||
<key>PBXProjectModuleLabel</key>
|
||||
<string>ScanLineFilter.m</string>
|
||||
<string>EmulatorView.mm</string>
|
||||
<key>_historyCapacity</key>
|
||||
<integer>0</integer>
|
||||
<key>bookmark</key>
|
||||
<string>B60EBE5911E91A8800C1974F</string>
|
||||
<string>B641C82511EA1B1600B6359F</string>
|
||||
<key>history</key>
|
||||
<array>
|
||||
<string>B676058811DAE21100D6B66C</string>
|
||||
@ -356,7 +351,6 @@
|
||||
<string>B669796311E6A606002ED475</string>
|
||||
<string>B669797711E6A6CE002ED475</string>
|
||||
<string>B66979BD11E6ACB9002ED475</string>
|
||||
<string>B6697A1A11E6C28A002ED475</string>
|
||||
<string>B6697A1B11E6C28A002ED475</string>
|
||||
<string>B6697A5211E7E072002ED475</string>
|
||||
<string>B6697A5311E7E072002ED475</string>
|
||||
@ -371,9 +365,10 @@
|
||||
<string>B60EBDFA11E916AE00C1974F</string>
|
||||
<string>B60EBDFB11E916AE00C1974F</string>
|
||||
<string>B60EBDFC11E916AE00C1974F</string>
|
||||
<string>B60EBE1311E9170000C1974F</string>
|
||||
<string>B60EBE3311E918EC00C1974F</string>
|
||||
<string>B60EBE3411E918EC00C1974F</string>
|
||||
<string>B60EBE6211E91C5900C1974F</string>
|
||||
<string>B641C82311EA1B1600B6359F</string>
|
||||
<string>B641C82411EA1B1600B6359F</string>
|
||||
</array>
|
||||
</dict>
|
||||
<key>SplitCount</key>
|
||||
@ -387,16 +382,18 @@
|
||||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {714, 444}}</string>
|
||||
<string>{{0, 0}, {714, 424}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>534 89 1060 902 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXNavigatorGroup</string>
|
||||
<key>Proportion</key>
|
||||
<string>444pt</string>
|
||||
<string>424pt</string>
|
||||
</dict>
|
||||
<dict>
|
||||
<key>Proportion</key>
|
||||
<string>412pt</string>
|
||||
<string>432pt</string>
|
||||
<key>Tabs</key>
|
||||
<array>
|
||||
<dict>
|
||||
@ -410,7 +407,7 @@
|
||||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {714, 385}}</string>
|
||||
<string>{{10, 27}, {714, 405}}</string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>XCDetailModule</string>
|
||||
@ -485,7 +482,9 @@
|
||||
<key>GeometryConfiguration</key>
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{10, 27}, {714, 385}}</string>
|
||||
<string>{{10, 27}, {714, 405}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>534 89 1060 902 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXBuildResultsModule</string>
|
||||
@ -513,11 +512,11 @@
|
||||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>B60EBCF111E7F6BE00C1974F</string>
|
||||
<string>B641C82611EA1B1600B6359F</string>
|
||||
<string>1CA23ED40692098700951B8B</string>
|
||||
<string>B60EBCF211E7F6BE00C1974F</string>
|
||||
<string>B641C82711EA1B1600B6359F</string>
|
||||
<string>B676054211DADB9000D6B66C</string>
|
||||
<string>B60EBCF311E7F6BE00C1974F</string>
|
||||
<string>B641C82811EA1B1600B6359F</string>
|
||||
<string>1CA23EDF0692099D00951B8B</string>
|
||||
<string>1CA23EE00692099D00951B8B</string>
|
||||
<string>1CA23EE10692099D00951B8B</string>
|
||||
@ -558,8 +557,6 @@
|
||||
<key>Layout</key>
|
||||
<array>
|
||||
<dict>
|
||||
<key>BecomeActive</key>
|
||||
<true/>
|
||||
<key>ContentConfiguration</key>
|
||||
<dict>
|
||||
<key>PBXProjectModuleGUID</key>
|
||||
@ -571,8 +568,6 @@
|
||||
<dict>
|
||||
<key>Frame</key>
|
||||
<string>{{0, 0}, {1060, 279}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>363 -152 1060 902 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXDebugCLIModule</string>
|
||||
@ -647,11 +642,7 @@
|
||||
</array>
|
||||
<key>Frame</key>
|
||||
<string>{{517, 0}, {543, 281}}</string>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>363 -152 1060 902 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
<key>RubberWindowFrame</key>
|
||||
<string>363 -152 1060 902 0 0 1920 1178 </string>
|
||||
</dict>
|
||||
<key>Module</key>
|
||||
<string>PBXDebugSessionModule</string>
|
||||
@ -674,14 +665,14 @@
|
||||
</array>
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>B60EBCF411E7F6BE00C1974F</string>
|
||||
<string>B641C82911EA1B1600B6359F</string>
|
||||
<string>1CCC7628064C1048000F2A68</string>
|
||||
<string>1CCC7629064C1048000F2A68</string>
|
||||
<string>B60EBCF511E7F6BE00C1974F</string>
|
||||
<string>B60EBCF611E7F6BE00C1974F</string>
|
||||
<string>B60EBCF711E7F6BE00C1974F</string>
|
||||
<string>B60EBCF811E7F6BE00C1974F</string>
|
||||
<string>B60EBCF911E7F6BE00C1974F</string>
|
||||
<string>B641C82A11EA1B1600B6359F</string>
|
||||
<string>B641C82B11EA1B1600B6359F</string>
|
||||
<string>B641C82C11EA1B1600B6359F</string>
|
||||
<string>B641C82D11EA1B1600B6359F</string>
|
||||
<string>B641C82E11EA1B1600B6359F</string>
|
||||
</array>
|
||||
<key>ToolbarConfigUserDefaultsMinorVersion</key>
|
||||
<string>2</string>
|
||||
@ -715,15 +706,14 @@
|
||||
<integer>5</integer>
|
||||
<key>WindowOrderList</key>
|
||||
<array>
|
||||
<string>B60EBE5A11E91A8800C1974F</string>
|
||||
<string>B60EBD0811E8DEB000C1974F</string>
|
||||
<string>B60EBD0911E8DEB000C1974F</string>
|
||||
<string>B60EBCFC11E7F6BE00C1974F</string>
|
||||
<string>B641C82F11EA1B1600B6359F</string>
|
||||
<string>B641C83011EA1B1600B6359F</string>
|
||||
<string>B641C83111EA1B1600B6359F</string>
|
||||
<string>B641C83211EA1B1600B6359F</string>
|
||||
<string>/Users/kelvin/Projects/2Term/2Term.xcodeproj</string>
|
||||
<string>B60EBCFA11E7F6BE00C1974F</string>
|
||||
</array>
|
||||
<key>WindowString</key>
|
||||
<string>363 -152 1060 902 0 0 1920 1178 </string>
|
||||
<string>534 89 1060 902 0 0 1920 1178 </string>
|
||||
<key>WindowToolsV3</key>
|
||||
<array>
|
||||
<dict>
|
||||
@ -1096,7 +1086,7 @@
|
||||
<key>TableOfContents</key>
|
||||
<array>
|
||||
<string>1C530D5B069F1CE1000CFCEE</string>
|
||||
<string>B649E1EA11E2DC510061921F</string>
|
||||
<string>B60EBE6811E91E1E00C1974F</string>
|
||||
<string>1C78EAAC065D492600B07095</string>
|
||||
</array>
|
||||
<key>ToolbarConfiguration</key>
|
||||
|
@ -12,14 +12,12 @@
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
|
||||
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
|
||||
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
|
||||
B602376211E94D9800C0B73E /* iGeometry.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B602376111E94D9800C0B73E /* iGeometry.cpp */; };
|
||||
B60EBD1211E8DEEF00C1974F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = B60EBD1111E8DEEF00C1974F /* QuartzCore.framework */; };
|
||||
B60EBDE311E90FC300C1974F /* ScanLineFilter.m in Sources */ = {isa = PBXBuildFile; fileRef = B60EBDE211E90FC300C1974F /* ScanLineFilter.m */; };
|
||||
B60EBDE811E9143F00C1974F /* ScanLineFilter.cikernel in Sources */ = {isa = PBXBuildFile; fileRef = B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */; };
|
||||
B60EBE2B11E918D500C1974F /* ScanLineFilter.cikernel in Resources */ = {isa = PBXBuildFile; fileRef = B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */; };
|
||||
B669798511E6A786002ED475 /* Lock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = B669798411E6A786002ED475 /* Lock.cpp */; };
|
||||
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 */; };
|
||||
B6697A3D11E7CCA0002ED475 /* PTSE.mm in Sources */ = {isa = PBXBuildFile; fileRef = B6697A3C11E7CCA0002ED475 /* PTSE.mm */; };
|
||||
B676063B11DEAD3500D6B66C /* TermWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = B676063A11DEAD3500D6B66C /* TermWindowController.m */; };
|
||||
@ -56,15 +54,13 @@
|
||||
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
|
||||
8D1107310486CEB800E47090 /* TwoTerm-Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = "TwoTerm-Info.plist"; sourceTree = "<group>"; };
|
||||
8D1107320486CEB800E47090 /* 2Term.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = 2Term.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
B602376111E94D9800C0B73E /* iGeometry.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = iGeometry.cpp; sourceTree = "<group>"; };
|
||||
B60EBD1111E8DEEF00C1974F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = /System/Library/Frameworks/QuartzCore.framework; sourceTree = "<absolute>"; };
|
||||
B60EBDE111E90FC300C1974F /* ScanLineFilter.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScanLineFilter.h; sourceTree = "<group>"; };
|
||||
B60EBDE211E90FC300C1974F /* ScanLineFilter.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ScanLineFilter.m; sourceTree = "<group>"; };
|
||||
B60EBDE711E9143F00C1974F /* ScanLineFilter.cikernel */ = {isa = PBXFileReference; explicitFileType = sourcecode.glsl; fileEncoding = 4; path = ScanLineFilter.cikernel; sourceTree = "<group>"; };
|
||||
B669798311E6A786002ED475 /* Lock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Lock.h; sourceTree = "<group>"; };
|
||||
B669798411E6A786002ED475 /* Lock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Lock.cpp; sourceTree = "<group>"; };
|
||||
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>"; };
|
||||
B6697A3B11E7CCA0002ED475 /* PTSE.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PTSE.h; sourceTree = "<group>"; };
|
||||
@ -113,6 +109,7 @@
|
||||
B6EBE2B311E0EA9100EA0458 /* CharacterGenerator.h */,
|
||||
B6EBE2B411E0EA9100EA0458 /* CharacterGenerator.m */,
|
||||
B699A03211E528DE00F54CC8 /* iGeometry.h */,
|
||||
B602376111E94D9800C0B73E /* iGeometry.cpp */,
|
||||
B6697A0D11E6BF95002ED475 /* CurveView.h */,
|
||||
B6697A0E11E6BF95002ED475 /* CurveView.m */,
|
||||
B60EBDE111E90FC300C1974F /* ScanLineFilter.h */,
|
||||
@ -196,9 +193,6 @@
|
||||
B66979CE11E6BCAE002ED475 /* images */ = {
|
||||
isa = PBXGroup;
|
||||
children = (
|
||||
B66979F811E6BEB5002ED475 /* sl75.png */,
|
||||
B66979F911E6BEB5002ED475 /* sl50.png */,
|
||||
B66979CF11E6BCAE002ED475 /* sl25.png */,
|
||||
);
|
||||
path = images;
|
||||
sourceTree = "<group>";
|
||||
@ -278,9 +272,6 @@
|
||||
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
|
||||
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
|
||||
B676065111DEBAE900D6B66C /* TermWindow.xib in Resources */,
|
||||
B66979D111E6BCAE002ED475 /* sl25.png in Resources */,
|
||||
B66979FA11E6BEB5002ED475 /* sl75.png in Resources */,
|
||||
B66979FB11E6BEB5002ED475 /* sl50.png in Resources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
@ -305,6 +296,7 @@
|
||||
B6697A3D11E7CCA0002ED475 /* PTSE.mm in Sources */,
|
||||
B60EBDE311E90FC300C1974F /* ScanLineFilter.m in Sources */,
|
||||
B60EBDE811E9143F00C1974F /* ScanLineFilter.cikernel in Sources */,
|
||||
B602376211E94D9800C0B73E /* iGeometry.cpp in Sources */,
|
||||
);
|
||||
runOnlyForDeploymentPostprocessing = 0;
|
||||
};
|
||||
|
@ -44,9 +44,7 @@
|
||||
CGFloat _paddingLeft;
|
||||
CGFloat _paddingRight;
|
||||
|
||||
|
||||
NSColor *_scanLine;
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
|
||||
Screen _screen;
|
||||
@ -56,6 +54,7 @@
|
||||
|
||||
-(void)startBackgroundReader;
|
||||
-(void)dataAvailable;
|
||||
-(void)invalidateIRect: (iRect)rect;
|
||||
|
||||
@property (nonatomic, assign) int fd;
|
||||
//@property (nonatomic, assign) iPoint cursor;
|
||||
|
@ -25,7 +25,6 @@
|
||||
|
||||
-(void)awakeFromNib
|
||||
{
|
||||
NSImage *image;
|
||||
CIFilter *filter;
|
||||
NSMutableArray *filters;
|
||||
|
||||
@ -33,9 +32,6 @@
|
||||
_charHeight = 16;
|
||||
|
||||
|
||||
image = [NSImage imageNamed: @"sl25.png"];
|
||||
|
||||
_scanLine = [[NSColor colorWithPatternImage: image] retain];
|
||||
|
||||
_foregroundColor = [[NSColor greenColor] retain];
|
||||
_backgroundColor = [[NSColor blackColor] retain];
|
||||
@ -210,7 +206,6 @@
|
||||
{
|
||||
close(_fd);
|
||||
|
||||
[_scanLine release];
|
||||
[_foregroundColor release];
|
||||
[_backgroundColor release];
|
||||
|
||||
@ -224,8 +219,16 @@
|
||||
-(void)keyDown:(NSEvent *)theEvent
|
||||
{
|
||||
OutputChannel channel(_fd);
|
||||
iRect updateRect; // should be nil but whatever...
|
||||
|
||||
|
||||
_screen.beginUpdate();
|
||||
|
||||
[_emulator keyDown: theEvent screen: &_screen output: &channel];
|
||||
|
||||
updateRect = _screen.endUpdate();
|
||||
|
||||
[self invalidateIRect: updateRect];
|
||||
}
|
||||
|
||||
-(void)startBackgroundReader
|
||||
@ -283,7 +286,6 @@
|
||||
{
|
||||
NSAutoreleasePool *pool;
|
||||
iRect updateRect;
|
||||
CGRect rect;
|
||||
uint8_t buffer[512];
|
||||
ssize_t size;
|
||||
|
||||
@ -310,24 +312,35 @@
|
||||
|
||||
updateRect = _screen.endUpdate();
|
||||
|
||||
rect.origin.x = updateRect.origin.x;
|
||||
rect.origin.y = updateRect.origin.y;
|
||||
rect.size.width = updateRect.size.width;
|
||||
rect.size.height = updateRect.size.height;
|
||||
|
||||
rect.origin.x *= _charWidth;
|
||||
rect.origin.y *= _charHeight;
|
||||
rect.size.width *= _charWidth;
|
||||
rect.size.height *= _charHeight;
|
||||
|
||||
rect.origin.x += _paddingLeft;
|
||||
rect.origin.y += _paddingTop;
|
||||
|
||||
[self setNeedsDisplayInRect: rect];
|
||||
[self invalidateIRect: updateRect];
|
||||
|
||||
[pool release];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
-(void)invalidateIRect: (iRect)updateRect
|
||||
{
|
||||
NSRect rect;
|
||||
|
||||
if (updateRect.size.width <= 0 || updateRect.size.height <= 0) return;
|
||||
|
||||
rect.origin.x = updateRect.origin.x;
|
||||
rect.origin.y = updateRect.origin.y;
|
||||
rect.size.width = updateRect.size.width;
|
||||
rect.size.height = updateRect.size.height;
|
||||
|
||||
rect.origin.x *= _charWidth;
|
||||
rect.origin.y *= _charHeight;
|
||||
rect.size.width *= _charWidth;
|
||||
rect.size.height *= _charHeight;
|
||||
|
||||
rect.origin.x += _paddingLeft;
|
||||
rect.origin.y += _paddingTop;
|
||||
|
||||
[self setNeedsDisplayInRect: rect];
|
||||
|
||||
}
|
||||
|
||||
|
||||
@end
|
||||
|
35
PTSE.mm
35
PTSE.mm
@ -235,4 +235,39 @@ enum {
|
||||
}
|
||||
|
||||
|
||||
-(void)keyDown:(NSEvent *)event screen:(Screen *)screen output:(OutputChannel *)output
|
||||
{
|
||||
unsigned flags = [event modifierFlags];
|
||||
NSString *chars = [event charactersIgnoringModifiers];
|
||||
|
||||
unsigned length = [chars length];
|
||||
|
||||
for (unsigned i = 0; i < length; ++i)
|
||||
{
|
||||
unichar uc = [chars characterAtIndex: i];
|
||||
|
||||
switch (uc)
|
||||
{
|
||||
case NSLeftArrowFunctionKey:
|
||||
case NSRightArrowFunctionKey:
|
||||
case NSUpArrowFunctionKey:
|
||||
case NSDownArrowFunctionKey:
|
||||
|
||||
default:
|
||||
if (uc <= 0x7f)
|
||||
{
|
||||
char c = uc;
|
||||
if (flags & NSControlKeyMask)
|
||||
c = CTRL(c);
|
||||
|
||||
output->write(c);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@end
|
||||
|
28
iGeometry.cpp
Normal file
28
iGeometry.cpp
Normal file
@ -0,0 +1,28 @@
|
||||
/*
|
||||
* iGeometry.cpp
|
||||
* 2Term
|
||||
*
|
||||
* Created by Kelvin Sherlock on 7/10/2010.
|
||||
* Copyright 2010 __MyCompanyName__. All rights reserved.
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
#include "iGeometry.h"
|
||||
|
||||
|
||||
bool iRect::contains(iPoint aPoint) const
|
||||
{
|
||||
return aPoint.x >= origin.x
|
||||
&& aPoint.y >= origin.y
|
||||
&& aPoint.x <= origin.x + size.width
|
||||
&& aPoint.y <= origin.y + size.height;
|
||||
}
|
||||
|
||||
bool iRect::contains(iRect aRect) const
|
||||
{
|
||||
return aRect.origin.x >= origin.x
|
||||
&& aRect.origin.y >= origin.y
|
||||
&& aRect.origin.x + aRect.size.width <= origin.x + size.width
|
||||
&& aRect.origin.y + aRect.size.height <= origin.y + size.height;
|
||||
}
|
@ -47,6 +47,11 @@ typedef struct iRect {
|
||||
iRect() {}
|
||||
iRect(const iRect &aRect) : origin(aRect.origin), size(aRect.size) {}
|
||||
iRect(const iPoint &aPoint, const iSize &aSize) : origin(aPoint), size(aSize) {}
|
||||
|
||||
bool contains(iPoint aPoint) const;
|
||||
bool contains(iRect aRect) const;
|
||||
|
||||
bool intersects(iRect aRect) const;
|
||||
#endif
|
||||
|
||||
} iRect;
|
||||
|
BIN
images/sl25.png
BIN
images/sl25.png
Binary file not shown.
Before Width: | Height: | Size: 77 B |
BIN
images/sl50.png
BIN
images/sl50.png
Binary file not shown.
Before Width: | Height: | Size: 77 B |
BIN
images/sl75.png
BIN
images/sl75.png
Binary file not shown.
Before Width: | Height: | Size: 77 B |
Loading…
x
Reference in New Issue
Block a user