Changeset 279
- Timestamp:
- 01/01/08 18:31:04 (1 year ago)
- Files:
-
- trunk/cocoa/JRShellView/JRShellView.m (modified) (8 diffs)
- trunk/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj/wolf.mode1v3 (modified) (12 diffs)
- trunk/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj/wolf.pbxuser (modified) (2 diffs)
- trunk/cocoa/JRShellView/JRShellViewDemo/NSText Arrow Keys to Selectors.numbers (added)
- trunk/cocoa/JRShellView/JRShellViewDemo/NSText Arrow Keys to Selectors.numbers/Contents (added)
- trunk/cocoa/JRShellView/JRShellViewDemo/NSText Arrow Keys to Selectors.numbers/Contents/PkgInfo (added)
- trunk/cocoa/JRShellView/JRShellViewDemo/NSText Arrow Keys to Selectors.numbers/QuickLook (added)
- trunk/cocoa/JRShellView/JRShellViewDemo/NSText Arrow Keys to Selectors.numbers/QuickLook/Thumbnail.jpg (added)
- trunk/cocoa/JRShellView/JRShellViewDemo/NSText Arrow Keys to Selectors.numbers/document-thumbnail.tiff (added)
- trunk/cocoa/JRShellView/JRShellViewDemo/NSText Arrow Keys to Selectors.numbers/index.xml.gz (added)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/cocoa/JRShellView/JRShellView.m
r278 r279 5 5 6 6 ***************************************************************************/ 7 8 // Note the CommandsWeJustLetPassThrough section is mostly just to document I've 9 // considered these methods and decided their default behavior is acceptable. 7 10 8 11 #import "JRShellView.h" … … 19 22 - (IBAction)pageUpAndModifySelection:(id)sender; 20 23 - (IBAction)pageDownAndModifySelection:(id)sender; 24 - (IBAction)moveToBeginningOfParagraphAndModifySelection:(id)sender; 21 25 @end 22 26 … … 162 166 #ifdef CommandsWeJustLetPassThrough 163 167 - (void)scrollPageUp:(id)sender_ { // ctl-up, ctl-shift-up, pageUp 164 NSLog(@"TODO scrollPageUp:");165 168 [super scrollPageUp:sender_]; 166 169 } … … 170 173 [super moveLeft:sender_]; // Implement in terms of moveLeft. 171 174 } 172 - (void)moveToBeginningOfParagraph:(id)sender_ { // opt-up (moveBackward: + moveToBeginningOfParagraph:) 173 NSLog(@"TODO moveBackward: + moveToBeginningOfParagraph:"); 174 [super moveToBeginningOfParagraph:sender_]; 175 - (void)moveToBeginningOfParagraph:(id)sender_ { // ctl-a; opt-up (moveBackward: + moveToBeginningOfParagraph:) 176 if ([self selectionIsInImmutableSection]) { 177 [super moveToBeginningOfParagraph:sender_]; 178 } else { 179 [self setSelectedRange:NSMakeRange(commandStart, 0)]; // We're line-oriented, so treat it like cmd-left. 180 } 181 } 182 - (void)moveToBeginningOfParagraphAndModifySelection:(id)sender_ { // ctl-shift-a; opt-shift-up (deleteBackward: + moveToBeginningOfParagraphAndModifySelection:) 183 if ([self selectionIsInImmutableSection]) { 184 [super moveToBeginningOfParagraphAndModifySelection:sender_]; 185 } else { 186 // We're line-oriented, so treat it like cmd-shift-left. 187 unsigned oldSelectionLocation = [self selectedRange].location; 188 [self setSelectedRange:NSMakeRange(commandStart, (oldSelectionLocation - commandStart))]; 189 } 175 190 } 176 191 - (void)moveUpAndModifySelection:(id)sender_ { // shift-up 177 NSLog(@"TODO moveUpAndModifySelection:"); 178 [super moveUpAndModifySelection:sender_]; 192 if ([self selectionIsInImmutableSection]) { 193 [super moveUpAndModifySelection:sender_]; 194 } else { 195 [self moveUp:sender_]; // Treat like a normal up. 196 } 179 197 } 180 198 - (void)moveParagraphBackwardAndModifySelection:(id)sender_ { // opt-shift-up 181 NSLog(@"TODO moveParagraphBackwardAndModifySelection:"); 182 [super moveParagraphBackwardAndModifySelection:sender_]; 199 if ([self selectionIsInImmutableSection]) { 200 [super moveParagraphBackwardAndModifySelection:sender_]; 201 } else { 202 [self moveUp:sender_]; // Treat like a normal up. 203 } 183 204 } 184 205 - (void)moveToBeginningOfDocument:(id)sender_ { // cmd-up 185 NSLog(@"TODO moveToBeginningOfDocument:"); 186 [super moveToBeginningOfDocument:sender_]; 206 if ([self selectionIsInImmutableSection]) { 207 [super moveToBeginningOfDocument:sender_]; 208 } else { 209 [self moveUp:sender_]; // Treat like a normal up. 210 } 187 211 } 188 212 - (void)moveToBeginningOfDocumentAndModifySelection:(id)sender_ { // cmd-shift-up 189 NSLog(@"TODO moveToBeginningOfDocumentAndModifySelection:"); 190 [super moveToBeginningOfDocumentAndModifySelection:sender_]; 213 if ([self selectionIsInImmutableSection]) { 214 [super moveToBeginningOfDocumentAndModifySelection:sender_]; 215 } else { 216 [self moveUp:sender_]; // Treat like a normal up. 217 } 191 218 } 192 219 … … 220 247 } 221 248 } 249 250 #ifdef CommandsWeJustLetPassThrough 222 251 - (void)scrollPageDown:(id)sender_ { // ctl-down, ctl-shift-down, pageDown 223 NSLog(@"TODO scrollPageDown:");224 252 [super scrollPageDown:sender_]; 225 253 } … … 227 255 [super moveRight:sender_]; // Implement in terms of moveRight. 228 256 } 229 - (void)moveToEndOfParagraph:(id)sender_ { // opt-down (moveForward: + moveToEndOfParagraph:) 230 NSLog(@"TODO moveForward: + moveToEndOfParagraph:"); 257 - (void)moveToEndOfParagraph:(id)sender_ { // ctl-e; opt-down (moveForward: + moveToEndOfParagraph:) 231 258 [super moveToEndOfParagraph:sender_]; 232 259 } 233 260 - (void)moveDownAndModifySelection:(id)sender_ { // shift-down 234 NSLog(@"TODO moveDownAndModifySelection:");235 261 [super moveDownAndModifySelection:sender_]; 236 262 } 237 263 - (void)moveParagraphForwardAndModifySelection:(id)sender_ { // opt-shift-down 238 NSLog(@"TODO moveParagraphForwardAndModifySelection:");239 264 [super moveParagraphForwardAndModifySelection:sender_]; 240 265 } 241 242 #ifdef CommandsWeJustLetPassThrough243 266 - (void)moveToEndOfDocument:(id)sender_ { // cmd-down 244 NSLog(@"TODO moveToEndOfDocument:");245 267 [super moveToEndOfDocument:sender_]; 246 268 } 247 #endif248 249 269 - (void)moveToEndOfDocumentAndModifySelection:(id)sender_ { // cmd-shift-down 250 NSLog(@"TODO moveToEndOfDocumentAndModifySelection:");251 270 [super moveToEndOfDocumentAndModifySelection:sender_]; 252 271 } 272 #endif 253 273 254 274 #pragma mark Left … … 306 326 307 327 #ifdef CommandsWeJustLetPassThrough 308 309 328 - (void)moveRight:(id)sender_ { // right 310 NSLog(@"TODO moveRight:");311 329 [super moveRight:sender_]; 312 330 } 313 331 - (void)moveToEndOfLine:(id)sender_ { // ctl-right, cmd-right 314 NSLog(@"TODO moveToEndOfLine:"); 332 // TODO implement moveSubWordForeward: on ctl-right. 315 333 [super moveToEndOfLine:sender_]; 316 334 } 317 335 - (void)moveWordRight:(id)sender_ { // opt-right 318 NSLog(@"TODO moveWordRight:");319 336 [super moveWordRight:sender_]; 320 337 } 321 338 - (void)moveRightAndModifySelection:(id)sender_ { // shift-right 322 NSLog(@"TODO moveRightAndModifySelection:");323 339 [super moveRightAndModifySelection:sender_]; 324 340 } 325 341 - (void)moveToEndOfLineAndModifySelection:(id)sender_ { // ctl-shift-right, cmd-shift-right 326 NSLog(@"TODO moveToEndOfLineAndModifySelection:");327 342 [super moveToEndOfLineAndModifySelection:sender_]; 328 343 } 329 344 - (void)moveWordRightAndModifySelection:(id)sender_ { // opt-shift-right 330 NSLog(@"TODO moveWordRightAndModifySelection:");331 345 [super moveWordRightAndModifySelection:sender_]; 332 346 } 333 334 347 #endif 335 348 … … 342 355 } 343 356 357 #pragma mark pageUp 358 344 359 #ifdef CommandsWeJustLetPassThrough 345 346 #pragma mark pageUp347 348 360 - (void)pageUp:(id)sender_ { // opt-pageUp, opt-shift-pageUp 349 NSLog(@"TODO pageUp:"); 350 [super pageUp:sender_]; 351 } 361 [super pageUp:sender_]; 362 } 363 #endif 364 352 365 - (void)pageUpAndModifySelection:(id)sender_ { // shift-pageUp 353 NSLog(@"TODO pageUpAndModifySelection:"); 354 [super pageUpAndModifySelection:sender_]; 366 if ([self selectionIsInImmutableSection]) { 367 [super pageUpAndModifySelection:sender_]; 368 } else { 369 // Treat like like cmd-shift-left. 370 unsigned oldSelectionLocation = [self selectedRange].location; 371 [self setSelectedRange:NSMakeRange(commandStart, (oldSelectionLocation - commandStart))]; 372 } 355 373 } 356 374 357 375 #pragma mark pageDown 358 376 377 #ifdef CommandsWeJustLetPassThrough 359 378 - (void)pageDown:(id)sender_ { // opt-pageDown, opt-shift-pageDown 360 NSLog(@"TODO pageDown:");361 379 [super pageDown:sender_]; 362 380 } 363 381 - (void)pageDownAndModifySelection:(id)sender_ { // shift-pageDown 364 NSLog(@"TODO pageDownAndModifySelection:");365 382 [super pageDownAndModifySelection:sender_]; 366 383 } 367 368 384 #endif 369 385 trunk/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj/wolf.mode1v3
r277 r279 198 198 <array/> 199 199 <key>OpenEditors</key> 200 <array/> 200 <array> 201 <dict> 202 <key>Content</key> 203 <dict> 204 <key>PBXProjectModuleGUID</key> 205 <string>794BBC430D2B6590008D059A</string> 206 <key>PBXProjectModuleLabel</key> 207 <string>JRShellView.m</string> 208 <key>PBXSplitModuleInNavigatorKey</key> 209 <dict> 210 <key>Split0</key> 211 <dict> 212 <key>PBXProjectModuleGUID</key> 213 <string>794BBC440D2B6590008D059A</string> 214 <key>PBXProjectModuleLabel</key> 215 <string>JRShellView.m</string> 216 <key>_historyCapacity</key> 217 <integer>0</integer> 218 <key>bookmark</key> 219 <string>794BBC460D2B6590008D059A</string> 220 <key>history</key> 221 <array> 222 <string>794BBC450D2B6590008D059A</string> 223 </array> 224 </dict> 225 <key>SplitCount</key> 226 <string>1</string> 227 </dict> 228 <key>StatusBarVisibility</key> 229 <true/> 230 </dict> 231 <key>Geometry</key> 232 <dict> 233 <key>Frame</key> 234 <string>{{0, 20}, {1056, 1277}}</string> 235 <key>PBXModuleWindowStatusBarHidden2</key> 236 <false/> 237 <key>RubberWindowFrame</key> 238 <string>838 217 1056 1318 0 0 2560 1578 </string> 239 </dict> 240 </dict> 241 </array> 201 242 <key>PerspectiveWidths</key> 202 243 <array> … … 383 424 <key>TableOfContents</key> 384 425 <array> 385 <string>79 A4908A0D2B0460008FEBAE</string>426 <string>794BBC300D2B3355008D059A</string> 386 427 <string>1CE0B1FE06471DED0097A5F4</string> 387 <string>79 A4908B0D2B0460008FEBAE</string>428 <string>794BBC310D2B3355008D059A</string> 388 429 <string>1CE0B20306471E060097A5F4</string> 389 430 <string>1CE0B20506471E060097A5F4</string> … … 519 560 <key>WindowOrderList</key> 520 561 <array> 521 <string>1C78EAAD065D492600B07095</string>522 562 <string>1CD10A99069EF8BA00B06720</string> 523 563 <string>79AEA9B00D29CC0E00A2C50F</string> 524 <string> 79A4909A0D2B0BD3008FEBAE</string>525 <string>79 A4909B0D2B0BD3008FEBAE</string>564 <string>1C78EAAD065D492600B07095</string> 565 <string>794BBC430D2B6590008D059A</string> 526 566 <string>/Users/wolf/code/trac/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj</string> 527 567 </array> … … 604 644 <array> 605 645 <string>79AEA9B00D29CC0E00A2C50F</string> 606 <string>79 A490920D2B0BD3008FEBAE</string>646 <string>794BBC320D2B3355008D059A</string> 607 647 <string>1CD0528F0623707200166675</string> 608 648 <string>XCMainBuildResultsModuleGUID</string> … … 646 686 <key>sizes</key> 647 687 <array> 648 <string>{{0, 0}, {316, 20 1}}</string>649 <string>{{316, 0}, {378, 20 1}}</string>688 <string>{{0, 0}, {316, 202}}</string> 689 <string>{{316, 0}, {378, 202}}</string> 650 690 </array> 651 691 </dict> … … 662 702 <key>sizes</key> 663 703 <array> 664 <string>{{0, 0}, {694, 20 1}}</string>665 <string>{{0, 20 1}, {694, 180}}</string>704 <string>{{0, 0}, {694, 202}}</string> 705 <string>{{0, 202}, {694, 179}}</string> 666 706 </array> 667 707 </dict> … … 696 736 </array> 697 737 <key>Frame</key> 698 <string>{{316, 0}, {378, 20 1}}</string>738 <string>{{316, 0}, {378, 202}}</string> 699 739 <key>RubberWindowFrame</key> 700 740 <string>1319 1019 694 422 0 0 2560 1578 </string> … … 724 764 <array> 725 765 <string>1CD10A99069EF8BA00B06720</string> 726 <string>79 A490930D2B0BD3008FEBAE</string>766 <string>794BBC330D2B3355008D059A</string> 727 767 <string>1C162984064C10D400B95A72</string> 728 <string>79 A490940D2B0BD3008FEBAE</string>729 <string>79 A490950D2B0BD3008FEBAE</string>730 <string>79 A490960D2B0BD3008FEBAE</string>731 <string>79 A490970D2B0BD3008FEBAE</string>732 <string>79 A490980D2B0BD3008FEBAE</string>768 <string>794BBC340D2B3355008D059A</string> 769 <string>794BBC350D2B3355008D059A</string> 770 <string>794BBC360D2B3355008D059A</string> 771 <string>794BBC370D2B3355008D059A</string> 772 <string>794BBC380D2B3355008D059A</string> 733 773 </array> 734 774 <key>ToolbarConfiguration</key> … … 857 897 <array> 858 898 <dict> 899 <key>BecomeActive</key> 900 <true/> 859 901 <key>ContentConfiguration</key> 860 902 <dict> … … 869 911 <string>{{0, 0}, {650, 209}}</string> 870 912 <key>RubberWindowFrame</key> 871 <string>1 744 1042650 250 0 0 2560 1578 </string>913 <string>1895 1110 650 250 0 0 2560 1578 </string> 872 914 </dict> 873 915 <key>Module</key> … … 892 934 <array> 893 935 <string>1C78EAAD065D492600B07095</string> 894 <string>79 A490990D2B0BD3008FEBAE</string>936 <string>794BBC390D2B3355008D059A</string> 895 937 <string>1C78EAAC065D492600B07095</string> 896 938 </array> … … 898 940 <string>xcode.toolbar.config.consoleV3</string> 899 941 <key>WindowString</key> 900 <string>1 744 1042650 250 0 0 2560 1578 </string>942 <string>1895 1110 650 250 0 0 2560 1578 </string> 901 943 <key>WindowToolGUID</key> 902 944 <string>1C78EAAD065D492600B07095</string> 903 945 <key>WindowToolIsVisible</key> 904 < false/>946 <true/> 905 947 </dict> 906 948 <dict> trunk/cocoa/JRShellView/JRShellViewDemo/JRShellViewDemo.xcodeproj/wolf.pbxuser
r277 r279 38 38 ); 39 39 }; 40 PBXPerProjectTemplateStateSaveDate = 220922966; 41 PBXWorkspaceStateSaveDate = 220922966; 40 PBXPerProjectTemplateStateSaveDate = 220934981; 41 PBXWorkspaceStateSaveDate = 220934981; 42 }; 43 perUserProjectItems = { 44 794BBC450D2B6590008D059A /* PBXTextBookmark */ = 794BBC450D2B6590008D059A /* PBXTextBookmark */; 45 794BBC460D2B6590008D059A /* PBXTextBookmark */ = 794BBC460D2B6590008D059A /* PBXTextBookmark */; 42 46 }; 43 47 sourceControlManager = 79AEA9A40D29CB0A00A2C50F /* Source Control */; 44 48 userBuildSettings = { 45 49 }; 50 }; 51 794BBC450D2B6590008D059A /* PBXTextBookmark */ = { 52 isa = PBXTextBookmark; 53 fRef = 79AEA9A60D29CB1100A2C50F /* JRShellView.m */; 54 name = "JRShellView.m: 192"; 55 rLen = 39; 56 rLoc = 7308; 57 rType = 0; 58 vrLen = 1106; 59 vrLoc = 12964; 60 }; 61 794BBC460D2B6590008D059A /* PBXTextBookmark */ = { 62 isa = PBXTextBookmark; 63 fRef = 79AEA9A60D29CB1100A2C50F /* JRShellView.m */; 64 name = "JRShellView.m: 1"; 65 rLen = 0; 66 rLoc = 0; 67 rType = 0; 68 vrLen = 2865; 69 vrLoc = 0; 46 70 }; 47 71 795A7F90099D0E3600450061 /* AppController.h */ = { … … 102 126 79AEA9A60D29CB1100A2C50F /* JRShellView.m */ = { 103 127 uiCtxt = { 104 sepNavIntBoundsRect = "{{0, 0}, {997, 66 22}}";105 sepNavSelRange = "{ 3378, 0}";106 sepNavVisRange = "{ 1847, 3619}";128 sepNavIntBoundsRect = "{{0, 0}, {997, 6650}}"; 129 sepNavSelRange = "{0, 0}"; 130 sepNavVisRange = "{0, 2865}"; 107 131 sepNavWindowFrame = "{{838, 185}, {1056, 1350}}"; 108 132 };
