trunk/src/osd/modules/debugger/osx/debugosxdebugview.m
| r243537 | r243538 | |
| 110 | 110 | inTextContainer:textContainer |
| 111 | 111 | fractionOfDistanceThroughGlyph:&fraction]; |
| 112 | 112 | position.x = [layoutManager characterIndexForGlyphAtIndex:glyph]; // FIXME: assumes 1:1 character mapping |
| 113 | [text deleteCharactersInRange:NSMakeRange(0, length)]; |
| 113 | 114 | } |
| 114 | 115 | if (position.x < 0) |
| 115 | 116 | position.x = 0; |
| r243537 | r243538 | |
| 397 | 398 | |
| 398 | 399 | |
| 399 | 400 | - (void)mouseDown:(NSEvent *)event { |
| 400 | | NSPoint location = [self convertPoint:[event locationInWindow] fromView:nil]; |
| 401 | | if (view->cursor_supported()) { |
| 402 | | view->set_cursor_position([self convertLocation:location]); |
| 403 | | view->set_cursor_visible(true); |
| 404 | | [self setNeedsDisplay:YES]; |
| 405 | | } |
| 401 | NSPoint const location = [self convertPoint:[event locationInWindow] fromView:nil]; |
| 402 | view->process_click(DCK_LEFT_CLICK, [self convertLocation:location]); |
| 406 | 403 | } |
| 407 | 404 | |
| 408 | 405 | |
| 409 | | - (void)mouseDragged:(NSEvent *)event { |
| 410 | | NSPoint location = [self convertPoint:[event locationInWindow] fromView:nil]; |
| 411 | | if (view->cursor_supported()) { |
| 412 | | [self autoscroll:event]; |
| 413 | | view->set_cursor_position([self convertLocation:location]); |
| 414 | | [self setNeedsDisplay:YES]; |
| 415 | | } |
| 416 | | } |
| 417 | | |
| 418 | | |
| 419 | 406 | - (void)rightMouseDown:(NSEvent *)event { |
| 420 | | NSPoint location = [self convertPoint:[event locationInWindow] fromView:nil]; |
| 421 | | if (view->cursor_supported()) { |
| 422 | | view->set_cursor_position([self convertLocation:location]); |
| 423 | | view->set_cursor_visible(true); |
| 424 | | [self setNeedsDisplay:YES]; |
| 425 | | } |
| 407 | NSPoint const location = [self convertPoint:[event locationInWindow] fromView:nil]; |
| 408 | view->process_click(DCK_RIGHT_CLICK, [self convertLocation:location]); |
| 426 | 409 | [super rightMouseDown:event]; |
| 427 | 410 | } |
| 428 | 411 | |