Revision: 7317
http://skim-app.svn.sourceforge.net/skim-app/?rev=7317&view=rev
Author: hofman
Date: 2011-07-03 11:05:28 +0000 (Sun, 03 Jul 2011)
Log Message:
-----------
Move some common convenience methods to PDFView category
Modified Paths:
--------------
trunk/PDFView_SKExtensions.h
trunk/PDFView_SKExtensions.m
trunk/SKSecondaryPDFView.h
trunk/SKSecondaryPDFView.m
trunk/SKSnapshotPDFView.h
trunk/SKSnapshotPDFView.m
Modified: trunk/PDFView_SKExtensions.h
===================================================================
--- trunk/PDFView_SKExtensions.h 2011-07-03 11:01:57 UTC (rev 7316)
+++ trunk/PDFView_SKExtensions.h 2011-07-03 11:05:28 UTC (rev 7317)
@@ -42,6 +42,7 @@
@interface PDFView (SKExtensions)
@property (nonatomic) CGFloat physicalScaleFactor;
+@property (nonatomic, readonly) NSScrollView *scrollView;
- (void)setNeedsDisplayInRect:(NSRect)rect ofPage:(PDFPage *)page;
- (void)setNeedsDisplayForAnnotation:(PDFAnnotation *)annotation
onPage:(PDFPage *)page;
Modified: trunk/PDFView_SKExtensions.m
===================================================================
--- trunk/PDFView_SKExtensions.m 2011-07-03 11:01:57 UTC (rev 7316)
+++ trunk/PDFView_SKExtensions.m 2011-07-03 11:05:28 UTC (rev 7317)
@@ -42,7 +42,7 @@
@implementation PDFView (SKExtensions)
-@dynamic physicalScaleFactor;
+@dynamic physicalScaleFactor, scrollView;
- (CGFloat)physicalScaleFactor {
CGFloat scale = [self scaleFactor];
@@ -67,6 +67,10 @@
[self setScaleFactor:scale];
}
+- (NSScrollView *)scrollView {
+ return [[self documentView] enclosingScrollView];
+}
+
- (void)setNeedsDisplayInRect:(NSRect)rect ofPage:(PDFPage *)page {
NSRect aRect = [self convertRect:rect fromPage:page];
CGFloat scale = [self scaleFactor];
Modified: trunk/SKSecondaryPDFView.h
===================================================================
--- trunk/SKSecondaryPDFView.h 2011-07-03 11:01:57 UTC (rev 7316)
+++ trunk/SKSecondaryPDFView.h 2011-07-03 11:05:28 UTC (rev 7317)
@@ -51,7 +51,6 @@
@property (nonatomic, retain) PDFView *synchronizedPDFView;
@property (nonatomic) BOOL synchronizeZoom;
-@property (nonatomic, retain) NSScrollView *scrollView;
- (void)scalePopUpAction:(id)sender;
- (void)pagePopUpAction:(id)sender;
Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m 2011-07-03 11:01:57 UTC (rev 7316)
+++ trunk/SKSecondaryPDFView.m 2011-07-03 11:05:28 UTC (rev 7317)
@@ -83,7 +83,6 @@
@implementation SKSecondaryPDFView
@synthesize synchronizedPDFView, synchronizeZoom;
-@dynamic scrollView;
static NSString *SKDefaultScaleMenuLabels[] = {@"=", @"Auto", @"10%", @"20%",
@"25%", @"35%", @"50%", @"60%", @"71%", @"85%", @"100%", @"120%", @"141%",
@"170%", @"200%", @"300%", @"400%", @"600%", @"800%"};
static CGFloat SKDefaultScaleMenuFactors[] = {0.0, 0.0, 0.1, 0.2, 0.25, 0.35,
0.5, 0.6, 0.71, 0.85, 1.0, 1.2, 1.41, 1.7, 2.0, 3.0, 4.0, 6.0, 8.0};
@@ -504,11 +503,6 @@
#pragma mark Scrollview
-- (NSScrollView *)scrollView;
-{
- return [[self documentView] enclosingScrollView];
-}
-
- (void)setScrollerSize:(NSControlSize)controlSize;
{
NSScrollView *scrollView = [[self documentView] enclosingScrollView];
Modified: trunk/SKSnapshotPDFView.h
===================================================================
--- trunk/SKSnapshotPDFView.h 2011-07-03 11:01:57 UTC (rev 7316)
+++ trunk/SKSnapshotPDFView.h 2011-07-03 11:05:28 UTC (rev 7317)
@@ -52,7 +52,6 @@
- (void)setAutoFits:(BOOL)newAuto adjustPopup:(BOOL)flag;
- (void)setScaleFactor:(CGFloat)factor adjustPopup:(BOOL)flag;
- (void)scalePopUpAction:(id)sender;
-@property (nonatomic, readonly) NSScrollView *scrollView;
- (void)setScrollerSize:(NSControlSize)controlSize;
- (void)handlePDFViewFrameChangedNotification:(NSNotification *)notification;
- (void)resetAutoFitRectIfNeeded;
Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m 2011-07-03 11:01:57 UTC (rev 7316)
+++ trunk/SKSnapshotPDFView.m 2011-07-03 11:05:28 UTC (rev 7317)
@@ -52,7 +52,6 @@
@implementation SKSnapshotPDFView
@synthesize autoFits, scalePopUpButton;
-@dynamic scrollView;
static NSString *SKDefaultScaleMenuLabels[] = {@"Auto", @"10%", @"20%",
@"25%", @"35%", @"50%", @"60%", @"71%", @"85%", @"100%", @"120%", @"141%",
@"170%", @"200%", @"300%", @"400%", @"600%", @"800%"};
static CGFloat SKDefaultScaleMenuFactors[] = {0.0, 0.1, 0.2, 0.25, 0.35, 0.5,
0.6, 0.71, 0.85, 1.0, 1.2, 1.41, 1.7, 2.0, 3.0, 4.0, 6.0, 8.0};
@@ -376,11 +375,6 @@
#pragma mark Scrollview
-- (NSScrollView *)scrollView;
-{
- return [[self documentView] enclosingScrollView];
-}
-
- (void)setScrollerSize:(NSControlSize)controlSize;
{
NSScrollView *scrollView = [[self documentView] enclosingScrollView];
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2d-c2
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit