Source

CocoaPDF / MyPDFWinController.h

Full commit
//
//  MyPDFWinController.h
//  cocoapdf
//
//  Created by Quincy Liu on 7/7/10.
//  Copyright 2010 __MyCompanyName__. All rights reserved.
//

#import <Cocoa/Cocoa.h>
//#import <Quartz/Quartz.h>
#import "MyPDFDoc.h"

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

@interface MyPDFWinController : NSWindowController {
    IBOutlet TronScrollView * _pdfScrollView;
    IBOutlet TronPDFView * _tronPDFView;
    
    // go to page panel
    IBOutlet NSPanel * _goToPagePanel;
    IBOutlet NSTextFieldCell * _goTopagePanelRangeLabel;
    IBOutlet NSTextFieldCell * _goToPagePanelPageLabel;
    
    // save progress
    IBOutlet NSProgressIndicator * _saveProgressBar;
    IBOutlet NSPanel *_saveProgressPanel;
    
    // toolbar
    IBOutlet NSSegmentedControl * _previousNextPageSegCtrl;
    IBOutlet NSSegmentedControl * _zoomSegCtrl;
    IBOutlet NSTextFieldCell * _pagesTextField;
@private
    MyPDFDoc * _myPdfDoc;
}

@property (readonly) MyPDFDoc * myPdfDoc;

- (void)setupDocumentNotifications;

#pragma mark    actions
- (IBAction)doGoToNextPage:(id)sender;
- (IBAction)doGoToPreviousPage:(id)sender;
//go to page panel actions
- (IBAction)doGoToPagePanel:(id)sender;
- (IBAction)doGoToPageNumberEntered:(id)sender;
- (IBAction)doGoToPagePanelCancel:(id)sender;
- (void) goToPagePanelDidEnd: (NSWindow *) sheet returnCode: (int) returnCode contextInfo: (void *) contextInfo;
//toolbar actions
- (IBAction)goToSpecifiedPage:(id)sender;
- (IBAction)goPreviousNextPage:(id)sender;
- (IBAction)doZoom:(id)sender;
- (void)handlePageChange:(NSNotification*) notification;

//delete a page
- (IBAction)removeCurrentPage:(id)sender;

#pragma mark    utilities
- (int) getIndexFromLabel:(NSString *)label pdfDoc: (PDFDocument *) doc;

@end