Source

CocoaPDF / TronScrollView.mm

Full commit
//
//  TronScrollView.m
//
//  Created by Quincy on 10-08-07.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import "TronScrollView.h"
#import "TronPDFView.h"

@implementation TronScrollView

-(void)scrollWheel:(NSEvent *)theEvent {
    NSLog(@"scrollWheel");
    [super scrollWheel:theEvent];
    TronPDFView * pdfView = [self documentView];
    
    CGFloat deltaX = [theEvent deltaX];
    CGFloat deltaY = [theEvent deltaY];
    CGFloat deltaZ = [theEvent deltaZ];
    
    NSLog(@"deltaX: %0.4f, deltaY: %0.4f, deltaZ: %0.4f", deltaX, deltaY, deltaZ);
    
    float vPos = [[self verticalScroller] floatValue];
    float hPos = [[self horizontalScroller] floatValue];
    [pdfView SetScroll:hPos vPos:vPos];
}

@end