You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
(23) |
Apr
(254) |
May
(252) |
Jun
(209) |
Jul
(198) |
Aug
(192) |
Sep
(207) |
Oct
(120) |
Nov
(179) |
Dec
(52) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(48) |
Feb
(69) |
Mar
(129) |
Apr
(250) |
May
(113) |
Jun
(177) |
Jul
(228) |
Aug
(155) |
Sep
(218) |
Oct
(185) |
Nov
(109) |
Dec
(88) |
| 2009 |
Jan
(83) |
Feb
(39) |
Mar
(70) |
Apr
(47) |
May
(48) |
Jun
(67) |
Jul
(61) |
Aug
(97) |
Sep
(221) |
Oct
(141) |
Nov
(70) |
Dec
(61) |
| 2010 |
Jan
(45) |
Feb
(76) |
Mar
(178) |
Apr
(106) |
May
(57) |
Jun
(32) |
Jul
(64) |
Aug
(98) |
Sep
(96) |
Oct
(19) |
Nov
(34) |
Dec
(117) |
| 2011 |
Jan
(55) |
Feb
(48) |
Mar
(64) |
Apr
(21) |
May
(39) |
Jun
(53) |
Jul
(99) |
Aug
(56) |
Sep
(39) |
Oct
(26) |
Nov
(19) |
Dec
(69) |
| 2012 |
Jan
(17) |
Feb
(40) |
Mar
(17) |
Apr
|
May
(2) |
Jun
(8) |
Jul
(2) |
Aug
(10) |
Sep
(10) |
Oct
(38) |
Nov
(48) |
Dec
(70) |
| 2013 |
Jan
(43) |
Feb
(47) |
Mar
(39) |
Apr
(37) |
May
(25) |
Jun
(6) |
Jul
(20) |
Aug
(49) |
Sep
(33) |
Oct
(34) |
Nov
(75) |
Dec
(6) |
| 2014 |
Jan
(32) |
Feb
(10) |
Mar
(17) |
Apr
|
May
|
Jun
(26) |
Jul
(5) |
Aug
|
Sep
(4) |
Oct
(23) |
Nov
(80) |
Dec
(48) |
| 2015 |
Jan
(80) |
Feb
(50) |
Mar
(58) |
Apr
(20) |
May
(11) |
Jun
(16) |
Jul
(24) |
Aug
(27) |
Sep
(56) |
Oct
(30) |
Nov
(16) |
Dec
(6) |
| 2016 |
Jan
(31) |
Feb
(14) |
Mar
(23) |
Apr
(17) |
May
(40) |
Jun
(12) |
Jul
(17) |
Aug
(9) |
Sep
(32) |
Oct
(36) |
Nov
(23) |
Dec
(9) |
| 2017 |
Jan
(37) |
Feb
(23) |
Mar
(65) |
Apr
(22) |
May
(6) |
Jun
(3) |
Jul
|
Aug
|
Sep
(3) |
Oct
(22) |
Nov
(63) |
Dec
(71) |
| 2018 |
Jan
(83) |
Feb
(21) |
Mar
(35) |
Apr
(44) |
May
(14) |
Jun
(12) |
Jul
(8) |
Aug
(18) |
Sep
(10) |
Oct
(145) |
Nov
(144) |
Dec
(76) |
| 2019 |
Jan
(18) |
Feb
(28) |
Mar
(5) |
Apr
(208) |
May
(291) |
Jun
(158) |
Jul
(27) |
Aug
(8) |
Sep
(10) |
Oct
(83) |
Nov
(41) |
Dec
(31) |
| 2020 |
Jan
(16) |
Feb
(46) |
Mar
(100) |
Apr
(78) |
May
(69) |
Jun
(71) |
Jul
(28) |
Aug
(131) |
Sep
(176) |
Oct
(89) |
Nov
(147) |
Dec
(19) |
| 2021 |
Jan
(19) |
Feb
(25) |
Mar
(91) |
Apr
(98) |
May
(14) |
Jun
(44) |
Jul
(8) |
Aug
(3) |
Sep
(38) |
Oct
(57) |
Nov
(97) |
Dec
(74) |
| 2022 |
Jan
(89) |
Feb
(47) |
Mar
(15) |
Apr
(50) |
May
(54) |
Jun
(56) |
Jul
(80) |
Aug
(12) |
Sep
(11) |
Oct
(60) |
Nov
(48) |
Dec
(4) |
| 2023 |
Jan
(75) |
Feb
(49) |
Mar
(84) |
Apr
(24) |
May
(13) |
Jun
(74) |
Jul
(32) |
Aug
(66) |
Sep
(50) |
Oct
(38) |
Nov
(105) |
Dec
(181) |
| 2024 |
Jan
(21) |
Feb
(49) |
Mar
(77) |
Apr
(84) |
May
(20) |
Jun
(71) |
Jul
(53) |
Aug
(33) |
Sep
(54) |
Oct
(124) |
Nov
(151) |
Dec
(73) |
| 2025 |
Jan
(61) |
Feb
(17) |
Mar
(136) |
Apr
(72) |
May
(200) |
Jun
(238) |
Jul
(91) |
Aug
(8) |
Sep
|
Oct
(63) |
Nov
(48) |
Dec
|
|
From: <ho...@us...> - 2025-07-11 09:16:32
|
Revision: 15636
http://sourceforge.net/p/skim-app/code/15636
Author: hofman
Date: 2025-07-11 09:16:30 +0000 (Fri, 11 Jul 2025)
Log Message:
-----------
update tooltip rects and text notet editor layout from layoutDocumentView, will catch a lot of display setting changes, but not e.g. pinch zoom
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-10 16:35:33 UTC (rev 15635)
+++ trunk/SKPDFView.m 2025-07-11 09:16:30 UTC (rev 15636)
@@ -408,6 +408,14 @@
}
}
+#pragma mark Layout
+
+- (void)layoutDocumentView {
+ [super layoutDocumentView];
+ [self resetPDFToolTipRects];
+ [editor layoutWithEvent:nil];
+}
+
#pragma mark Drawing
- (BOOL)drawsActiveSelections {
@@ -698,8 +706,6 @@
[super setDisplayMode:mode];
if (page && [page isEqual:[self currentPage]] == NO)
[self goToCurrentPage:page];
- [self resetPDFToolTipRects];
- [editor layoutWithEvent:nil];
}
}
@@ -737,8 +743,6 @@
[self _setDisplaysHorizontally:horizontal];
if (page && [page isEqual:[self currentPage]] == NO)
[self goToCurrentPage:page];
- [self resetPDFToolTipRects];
- [editor layoutWithEvent:nil];
}
}
@@ -760,8 +764,6 @@
[self _setDisplaysHorizontally:flag];
if (page && [page isEqual:[self currentPage]] == NO)
[self goToCurrentPage:page];
- [self resetPDFToolTipRects];
- [editor layoutWithEvent:nil];
}
}
@@ -780,8 +782,6 @@
[self layoutDocumentView];
if (page && [page isEqual:[self currentPage]] == NO)
[self goToCurrentPage:page];
- [self resetPDFToolTipRects];
- [editor layoutWithEvent:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewDisplaysRTLChangedNotification object:self];
}
}
@@ -800,8 +800,6 @@
[super setDisplayBox:box];
if (page && [page isEqual:[self currentPage]] == NO)
[self goToCurrentPage:page];
- [self resetPDFToolTipRects];
- [editor layoutWithEvent:nil];
}
}
@@ -819,8 +817,6 @@
[super setDisplaysAsBook:asBook];
if (page && [page isEqual:[self currentPage]] == NO)
[self goToCurrentPage:page];
- [self resetPDFToolTipRects];
- [editor layoutWithEvent:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewDisplaysAsBookChangedNotification object:self];
}
}
@@ -836,8 +832,6 @@
- (void)setDisplaysPageBreaks:(BOOL)pageBreaks {
if (pageBreaks != [self displaysPageBreaks]) {
[super setDisplaysPageBreaks:pageBreaks];
- [self resetPDFToolTipRects];
- [editor layoutWithEvent:nil];
[[NSNotificationCenter defaultCenter] postNotificationName:SKPDFViewDisplaysPageBreaksChangedNotification object:self];
}
}
@@ -3183,8 +3177,6 @@
- (void)handlePageChangedNotification:(NSNotification *)notification {
if ([self displayMode] == kPDFDisplaySinglePage || [self displayMode] == kPDFDisplayTwoUp) {
- [editor layoutWithEvent:nil];
- [self resetPDFToolTipRects];
if (toolMode == SKToolModeMagnify)
[loupeController updateContents];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-10 16:35:35
|
Revision: 15635
http://sourceforge.net/p/skim-app/code/15635
Author: hofman
Date: 2025-07-10 16:35:33 +0000 (Thu, 10 Jul 2025)
Log Message:
-----------
fix comment
Modified Paths:
--------------
trunk/SKTextNoteEditor.m
Modified: trunk/SKTextNoteEditor.m
===================================================================
--- trunk/SKTextNoteEditor.m 2025-07-10 16:16:43 UTC (rev 15634)
+++ trunk/SKTextNoteEditor.m 2025-07-10 16:35:33 UTC (rev 15635)
@@ -164,7 +164,7 @@
annotation = nil;
- // avoid getting textDidEndDelegate: messages
+ // avoid getting textDidEndEditing: messages
[textView setDelegate:nil];
if ([self superview]) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-10 16:16:46
|
Revision: 15634
http://sourceforge.net/p/skim-app/code/15634
Author: hofman
Date: 2025-07-10 16:16:43 +0000 (Thu, 10 Jul 2025)
Log Message:
-----------
relayout text note editor after scale change from pdfvieww
Modified Paths:
--------------
trunk/SKPDFView.m
trunk/SKTextNoteEditor.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-10 15:52:14 UTC (rev 15633)
+++ trunk/SKPDFView.m 2025-07-10 16:16:43 UTC (rev 15634)
@@ -3193,6 +3193,7 @@
- (void)handleScaleChangedNotification:(NSNotification *)notification {
[self resetPDFToolTipRects];
[self updatePacer];
+ [editor layoutWithEvent:nil];
}
- (void)handleUpdateTrackingAreasNotification:(NSNotification *)notification {
Modified: trunk/SKTextNoteEditor.m
===================================================================
--- trunk/SKTextNoteEditor.m 2025-07-10 15:52:14 UTC (rev 15633)
+++ trunk/SKTextNoteEditor.m 2025-07-10 16:16:43 UTC (rev 15634)
@@ -147,7 +147,6 @@
[self updateParagraphStyle];
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateFrame:) name:PDFViewScaleChangedNotification object:pdfView];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(updateFrame:) name:SKPDFPageBoundsDidChangeNotification object:[pdfView document]];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-10 15:52:17
|
Revision: 15633
http://sourceforge.net/p/skim-app/code/15633
Author: hofman
Date: 2025-07-10 15:52:14 +0000 (Thu, 10 Jul 2025)
Log Message:
-----------
avoid converting rect back and forth from page
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-10 14:47:03 UTC (rev 15632)
+++ trunk/SKPDFView.m 2025-07-10 15:52:14 UTC (rev 15633)
@@ -4765,7 +4765,7 @@
NSRect rect = [self convertRect:selRect fromView:[self documentView]];
NSRect bounds;
NSInteger factor = 1;
- BOOL autoFits = NO;
+ BOOL autoFits = YES;
if (dragged) {
@@ -4790,14 +4790,11 @@
if (NSMaxX(rect) > NSMaxY(bounds))
rect.origin.y = NSMaxY(bounds) - NSHeight(rect);
}
+ rect = [self convertRect:rect toPage:page];
- autoFits = YES;
-
} else if (toolMode == SKToolModeSelect && NSIsEmptyRect(selectionRect) == NO) {
rect = NSIntersectionRect(selectionRect, [page boundsForBox:kPDFDisplayBoxCropBox]);
- rect = [self convertRect:rect fromPage:page];
- autoFits = YES;
} else {
@@ -4815,11 +4812,14 @@
rect = [self convertRect:[page boundsForBox:kPDFDisplayBoxCropBox] fromPage:page];
rect.origin.y = point.y - 0.5 * DEFAULT_SNAPSHOT_HEIGHT;
rect.size.height = DEFAULT_SNAPSHOT_HEIGHT;
+ rect = [self convertRect:rect toPage:page];
+ autoFits = NO;
+
}
if ([[self delegate] respondsToSelector:@selector(PDFView:showSnapshotAtPageNumber:forRect:scaleFactor:autoFits:)])
- [[self delegate] PDFView:self showSnapshotAtPageNumber:[page pageIndex] forRect:[self convertRect:rect toPage:page] scaleFactor:[self scaleFactor] * factor autoFits:autoFits];
+ [[self delegate] PDFView:self showSnapshotAtPageNumber:[page pageIndex] forRect:rect scaleFactor:[self scaleFactor] * factor autoFits:autoFits];
}
- (void)removeLoupeWindow {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-10 14:47:05
|
Revision: 15632
http://sourceforge.net/p/skim-app/code/15632
Author: hofman
Date: 2025-07-10 14:47:03 +0000 (Thu, 10 Jul 2025)
Log Message:
-----------
remove unused import
Modified Paths:
--------------
trunk/NSScanner_SKExtensions.m
Modified: trunk/NSScanner_SKExtensions.m
===================================================================
--- trunk/NSScanner_SKExtensions.m 2025-07-09 14:45:56 UTC (rev 15631)
+++ trunk/NSScanner_SKExtensions.m 2025-07-10 14:47:03 UTC (rev 15632)
@@ -37,7 +37,6 @@
*/
#import "NSScanner_SKExtensions.h"
-#import "NSCharacterSet_SKExtensions.h"
@implementation NSScanner (SKExtensions)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-09 14:45:59
|
Revision: 15631
http://sourceforge.net/p/skim-app/code/15631
Author: hofman
Date: 2025-07-09 14:45:56 +0000 (Wed, 09 Jul 2025)
Log Message:
-----------
remove magnifyWithEvent: overrides, as they will never be called, and have not bbeen implemented in PDFView for a long time. Also [SKDisablePinchZoom](#pinch-zoom) | boolean | false
Modified Paths:
--------------
trunk/SKSecondaryPDFView.m
trunk/SKSnapshotPDFView.m
trunk/SKStringConstants.h
trunk/SKStringConstants.m
Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m 2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKSecondaryPDFView.m 2025-07-09 14:45:56 UTC (rev 15631)
@@ -102,9 +102,8 @@
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePageChangedNotification:)
name:PDFViewPageChangedNotification object:self];
- if ([PDFView instancesRespondToSelector:@selector(magnifyWithEvent:)] == NO || [PDFView instanceMethodForSelector:@selector(magnifyWithEvent:)] == [NSView instanceMethodForSelector:@selector(magnifyWithEvent:)])
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewScaleChangedNotification:)
- name:PDFViewScaleChangedNotification object:self];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewScaleChangedNotification:)
+ name:PDFViewScaleChangedNotification object:self];
}
- (instancetype)initWithFrame:(NSRect)frameRect {
@@ -671,17 +670,6 @@
[super endGestureWithEvent:theEvent];
}
-- (void)magnifyWithEvent:(NSEvent *)theEvent {
- if ([[NSUserDefaults standardUserDefaults] boolForKey:SKDisablePinchZoomKey] == NO) {
- if ([theEvent phase] == NSEventPhaseBegan)
- startScale = [self scaleFactor];
- CGFloat magnifyFactor = (1.0 + fmax(-0.5, fmin(1.0 , [theEvent magnification])));
- [super setScaleFactor:magnifyFactor * [self scaleFactor]];
- if (([theEvent phase] == NSEventPhaseEnded || [theEvent phase] == NSEventPhaseCancelled) && fabs(startScale - [self scaleFactor]) > 0.001)
- [self setScaleFactor:fmax([self scaleFactor], SKMinDefaultScaleMenuFactor) adjustPopup:YES];
- }
-}
-
#pragma mark Dragging
- (void)mouseDown:(NSEvent *)theEvent{
Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m 2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKSnapshotPDFView.m 2025-07-09 14:45:56 UTC (rev 15631)
@@ -104,9 +104,8 @@
name:NSViewBoundsDidChangeNotification object:[[self scrollView] contentView]];
[[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFContentViewFrameChangedDelayedNotification:)
name:SKPDFContentViewChangedNotification object:self];
- if ([PDFView instancesRespondToSelector:@selector(magnifyWithEvent:)] == NO || [PDFView instanceMethodForSelector:@selector(magnifyWithEvent:)] == [NSView instanceMethodForSelector:@selector(magnifyWithEvent:)])
- [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewScaleChangedNotification:)
- name:PDFViewScaleChangedNotification object:self];
+ [[NSNotificationCenter defaultCenter] addObserver:self selector:@selector(handlePDFViewScaleChangedNotification:)
+ name:PDFViewScaleChangedNotification object:self];
}
- (instancetype)initWithFrame:(NSRect)frameRect {
@@ -593,17 +592,6 @@
[super endGestureWithEvent:theEvent];
}
-- (void)magnifyWithEvent:(NSEvent *)theEvent {
- if ([[NSUserDefaults standardUserDefaults] boolForKey:SKDisablePinchZoomKey] == NO) {
- if ([theEvent phase] == NSEventPhaseBegan)
- startScale = [self scaleFactor];
- CGFloat magnifyFactor = (1.0 + fmax(-0.5, fmin(1.0 , [theEvent magnification])));
- [super setScaleFactor:magnifyFactor * [self scaleFactor]];
- if (([theEvent phase] == NSEventPhaseEnded || [theEvent phase] == NSEventPhaseCancelled) && fabs(startScale - [self scaleFactor]) > 0.001)
- [self setScaleFactor:fmax([self scaleFactor], SKMinDefaultScaleMenuFactor) adjustPopup:YES];
- }
-}
-
#pragma mark Dragging
- (void)mouseDown:(NSEvent *)theEvent{
Modified: trunk/SKStringConstants.h
===================================================================
--- trunk/SKStringConstants.h 2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKStringConstants.h 2025-07-09 14:45:56 UTC (rev 15631)
@@ -126,7 +126,6 @@
extern NSString *SKSequentialPageNumberingKey;
extern NSString *SKUseUserNameKey;
extern NSString *SKUserNameKey;
-extern NSString *SKDisablePinchZoomKey;
extern NSString *SKDisableModificationDateKey;
extern NSString *SKDisableAnimationsKey;
extern NSString *SKDisableUpdateContentsFromEnclosedTextKey;
Modified: trunk/SKStringConstants.m
===================================================================
--- trunk/SKStringConstants.m 2025-07-09 14:02:28 UTC (rev 15630)
+++ trunk/SKStringConstants.m 2025-07-09 14:45:56 UTC (rev 15631)
@@ -126,7 +126,6 @@
NSString *SKSequentialPageNumberingKey = @"SKSequentialPageNumbering";
NSString *SKUseUserNameKey = @"SKUseUserName";
NSString *SKUserNameKey = @"SKUserName";
-NSString *SKDisablePinchZoomKey = @"SKDisablePinchZoom";
NSString *SKDisableModificationDateKey = @"SKDisableModificationDate";
NSString *SKDisableAnimationsKey = @"SKDisableAnimations";
NSString *SKDisableUpdateContentsFromEnclosedTextKey = @"SKDisableUpdateContentsFromEnclosedText";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-09 14:02:30
|
Revision: 15630
http://sourceforge.net/p/skim-app/code/15630
Author: hofman
Date: 2025-07-09 14:02:28 +0000 (Wed, 09 Jul 2025)
Log Message:
-----------
there is no need to check for presentation mode
Modified Paths:
--------------
trunk/SKMainWindowController_UI.m
Modified: trunk/SKMainWindowController_UI.m
===================================================================
--- trunk/SKMainWindowController_UI.m 2025-07-09 09:38:33 UTC (rev 15629)
+++ trunk/SKMainWindowController_UI.m 2025-07-09 14:02:28 UTC (rev 15630)
@@ -1545,7 +1545,7 @@
}
- (BOOL)PDFView:(PDFView *)aPDFView performAction:(PDFAction *)action {
- if ([self interactionMode] != SKPresentationMode && [action isKindOfClass:[PDFActionGoTo class]] && ([NSEvent modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagShift) {
+ if ([action isKindOfClass:[PDFActionGoTo class]] && ([NSEvent modifierFlags] & NSEventModifierFlagDeviceIndependentFlagsMask) == NSEventModifierFlagShift) {
if ([secondaryPdfView window] == nil)
[self toggleSplitPDF:nil];
if ([pdfSplitView isAnimating]) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-09 09:38:35
|
Revision: 15629
http://sourceforge.net/p/skim-app/code/15629
Author: hofman
Date: 2025-07-09 09:38:33 +0000 (Wed, 09 Jul 2025)
Log Message:
-----------
don't override magnifyWithEvent: as it is not implemented in PDFView since 10.12
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-09 09:17:08 UTC (rev 15628)
+++ trunk/SKPDFView.m 2025-07-09 09:38:33 UTC (rev 15629)
@@ -2181,12 +2181,6 @@
}
}
-- (void)magnifyWithEvent:(NSEvent *)theEvent {
- if ([[NSUserDefaults standardUserDefaults] boolForKey:SKDisablePinchZoomKey] == NO)
- [super magnifyWithEvent:theEvent];
-}
-
-
- (void)performAction:(PDFAction *)action {
if ([[self delegate] respondsToSelector:@selector(PDFView:performAction:)] == NO || [[self delegate] PDFView:self performAction:action] == NO)
[super performAction:action];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-09 09:17:11
|
Revision: 15628
http://sourceforge.net/p/skim-app/code/15628
Author: hofman
Date: 2025-07-09 09:17:08 +0000 (Wed, 09 Jul 2025)
Log Message:
-----------
no need for private method
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-09 09:11:53 UTC (rev 15627)
+++ trunk/SKPDFView.m 2025-07-09 09:17:08 UTC (rev 15628)
@@ -185,7 +185,6 @@
@interface PDFView (SKPrivateDeclarations)
- (BOOL)writeSelectionToPasteboard:(NSPasteboard *)pboard types:(NSArray *)types;
-- (BOOL)hasEnabledSwipeGestures;
- (void)enableSwipeGestures:(BOOL)flag;
@end
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-09 09:11:54
|
Revision: 15627
http://sourceforge.net/p/skim-app/code/15627
Author: hofman
Date: 2025-07-09 09:11:53 +0000 (Wed, 09 Jul 2025)
Log Message:
-----------
remove unused imports
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 21:46:20 UTC (rev 15626)
+++ trunk/SKPDFView.m 2025-07-09 09:11:53 UTC (rev 15627)
@@ -42,6 +42,7 @@
#import "PDFAnnotation_SKExtensions.h"
#import "PDFAnnotationMarkup_SKExtensions.h"
#import "PDFAnnotationInk_SKExtensions.h"
+#import "PDFAnnotationLine_SKExtensions.h"
#import "SKNPDFAnnotationNote_SKExtensions.h"
#import "PDFPage_SKExtensions.h"
#import "NSString_SKExtensions.h"
@@ -55,7 +56,6 @@
#import "SKLineInspector.h"
#import "SKLineWell.h"
#import "SKTypeSelectHelper.h"
-#import <CoreServices/CoreServices.h>
#import "NSDocument_SKExtensions.h"
#import "PDFSelection_SKExtensions.h"
#import "NSBezierPath_SKExtensions.h"
@@ -66,18 +66,13 @@
#import "PDFView_SKExtensions.h"
#import "NSMenu_SKExtensions.h"
#import "NSGraphics_SKExtensions.h"
-#import "NSArray_SKExtensions.h"
-#import "NSColor_SKExtensions.h"
#import "NSView_SKExtensions.h"
#import "NSPointerArray_SKExtensions.h"
-#import "NSShadow_SKExtensions.h"
-#import "PDFAnnotationLine_SKExtensions.h"
#import "NSScroller_SKExtensions.h"
#import "SKColorMenuView.h"
#import "NSObject_SKExtensions.h"
#import "SKLoupeController.h"
#import "PDFDestination_SKExtensions.h"
-#import "NSSegmentedControl_SKExtensions.h"
#define ANNOTATION_MODE_COUNT 9
#define TOOL_MODE_COUNT 5
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 21:46:21
|
Revision: 15626
http://sourceforge.net/p/skim-app/code/15626
Author: hofman
Date: 2025-07-08 21:46:20 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
remove unused macro
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 21:44:42 UTC (rev 15625)
+++ trunk/SKPDFView.m 2025-07-08 21:46:20 UTC (rev 15626)
@@ -90,7 +90,6 @@
#define TEMP_TOOL_MODE_FROM_NOTE_TYPE(noteType) (SKTemporaryToolMode)(noteType + SKToolModeFreeText)
#define READINGBAR_RESIZE_EDGE_HEIGHT 3.0
-#define NAVIGATION_BOTTOM_EDGE_HEIGHT 5.0
#define TEXT_SELECT_MARGIN_SIZE ((NSSize){80.0, 100.0})
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 21:44:44
|
Revision: 15625
http://sourceforge.net/p/skim-app/code/15625
Author: hofman
Date: 2025-07-08 21:44:42 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
remove unused #import
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 16:12:55 UTC (rev 15624)
+++ trunk/SKPDFView.m 2025-07-08 21:44:42 UTC (rev 15625)
@@ -74,7 +74,6 @@
#import "PDFAnnotationLine_SKExtensions.h"
#import "NSScroller_SKExtensions.h"
#import "SKColorMenuView.h"
-#import "SKMainWindowController_Actions.h"
#import "NSObject_SKExtensions.h"
#import "SKLoupeController.h"
#import "PDFDestination_SKExtensions.h"
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 16:12:58
|
Revision: 15624
http://sourceforge.net/p/skim-app/code/15624
Author: hofman
Date: 2025-07-08 16:12:55 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
include isSkimNotes check in hitTest: check
Modified Paths:
--------------
trunk/PDFAnnotationLine_SKExtensions.m
trunk/PDFAnnotation_SKExtensions.m
trunk/SKPDFView.m
trunk/SKPresentationView.m
Modified: trunk/PDFAnnotationLine_SKExtensions.m
===================================================================
--- trunk/PDFAnnotationLine_SKExtensions.m 2025-07-08 16:03:29 UTC (rev 15623)
+++ trunk/PDFAnnotationLine_SKExtensions.m 2025-07-08 16:12:55 UTC (rev 15624)
@@ -135,8 +135,10 @@
- (BOOL)isConvertibleAnnotation { return YES; }
- (BOOL)hitTest:(NSPoint)point {
+ if ([self shouldDisplay] == NO || [self isSkimNote] == NO)
+ return NO;
CGFloat delta = fmax(4.0, 0.5 * [self lineWidth]);
- return [self shouldDisplay] && SKPointNearLineFromPointToPoint(SKSubstractPoints(point, [self bounds].origin), [self startPoint], [self endPoint], delta);
+ return SKPointNearLineFromPointToPoint(SKSubstractPoints(point, [self bounds].origin), [self startPoint], [self endPoint], delta);
}
- (CGFloat)boundsOrder {
Modified: trunk/PDFAnnotation_SKExtensions.m
===================================================================
--- trunk/PDFAnnotation_SKExtensions.m 2025-07-08 16:03:29 UTC (rev 15623)
+++ trunk/PDFAnnotation_SKExtensions.m 2025-07-08 16:12:55 UTC (rev 15624)
@@ -461,7 +461,7 @@
}
- (BOOL)hitTest:(NSPoint)point {
- return [self shouldDisplay] ? NSPointInRect(point, [self bounds]) : NO;
+ return [self shouldDisplay] && [self isSkimNote] && NSPointInRect(point, [self bounds]);
}
- (CGFloat)boundsOrder {
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 16:03:29 UTC (rev 15623)
+++ trunk/SKPDFView.m 2025-07-08 16:12:55 UTC (rev 15624)
@@ -2220,13 +2220,9 @@
NSPoint location = [self convertPoint:[sender draggingLocation] fromView:nil];
PDFPage *page = [self pageForPoint:location nearest:NO];
if (page) {
- NSArray *annotations = [page annotations];
- PDFAnnotation *annotation = nil;
- NSInteger i = [annotations count];
location = [self convertPoint:location toPage:page];
- while (i-- > 0) {
- annotation = [annotations objectAtIndex:i];
- if ([annotation isSkimNote] && [annotation hitTest:location] &&
+ for (PDFAnnotation *annotation in [[page annotations] reverseObjectEnumerator]) {
+ if ([annotation hitTest:location] &&
([pboard canReadItemWithDataConformingToTypes:@[NSPasteboardTypeColor]] || [annotation hasBorder])) {
[self setHighlightAnnotation:annotation];
dragOp = NSDragOperationGeneric;
@@ -4194,7 +4190,7 @@
for (PDFAnnotation *annotation in annotations) {
if ([annotation shouldDisplay] == NO) {
continue;
- } else if ([annotation isSkimNote] && [annotation hitTest:point]) {
+ } else if ([annotation hitTest:point]) {
newCurrentAnnotation = annotation;
break;
} else if (NSPointInRect(point, [annotation bounds]) && (toolMode == SKToolModeText || IS_MARKUP(annotationMode)) && linkAnnotation == nil) {
@@ -4386,7 +4382,7 @@
id annotations = [[page annotations] reverseObjectEnumerator];
for (PDFAnnotation *annotation in annotations) {
- if ([annotation isSkimNote] && [annotation hitTest:point]) {
+ if ([annotation hitTest:point]) {
[self removeAnnotation:annotation];
break;
}
Modified: trunk/SKPresentationView.m
===================================================================
--- trunk/SKPresentationView.m 2025-07-08 16:03:29 UTC (rev 15623)
+++ trunk/SKPresentationView.m 2025-07-08 16:12:55 UTC (rev 15624)
@@ -1097,7 +1097,7 @@
NSPoint point = [self convertPointToPage:theEvent ? [theEvent locationInView:self] : [self convertPointFromScreen:[NSEvent mouseLocation]]];
for (PDFAnnotation *annotation in [[page annotations] reverseObjectEnumerator]) {
- if ([annotation isLink] && [annotation hitTest:point])
+ if ([annotation isLink] && NSPointInRect(point, [annotation bounds]))
return annotation;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 16:03:32
|
Revision: 15623
http://sourceforge.net/p/skim-app/code/15623
Author: hofman
Date: 2025-07-08 16:03:29 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
no need to test for editing as this will be hidden
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 16:01:41 UTC (rev 15622)
+++ trunk/SKPDFView.m 2025-07-08 16:03:29 UTC (rev 15623)
@@ -4386,7 +4386,7 @@
id annotations = [[page annotations] reverseObjectEnumerator];
for (PDFAnnotation *annotation in annotations) {
- if ([annotation isSkimNote] && [annotation hitTest:point] && [self isEditingAnnotation:annotation] == NO) {
+ if ([annotation isSkimNote] && [annotation hitTest:point]) {
[self removeAnnotation:annotation];
break;
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 16:01:43
|
Revision: 15622
http://sourceforge.net/p/skim-app/code/15622
Author: hofman
Date: 2025-07-08 16:01:41 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
ignore annotations that don't display immediately, no need to test for editing as this will be hidden
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 15:24:11 UTC (rev 15621)
+++ trunk/SKPDFView.m 2025-07-08 16:01:41 UTC (rev 15622)
@@ -4192,10 +4192,12 @@
// Hit test for annotation.
for (PDFAnnotation *annotation in annotations) {
- if ([annotation isSkimNote] && [annotation hitTest:point] && [self isEditingAnnotation:annotation] == NO) {
+ if ([annotation shouldDisplay] == NO) {
+ continue;
+ } else if ([annotation isSkimNote] && [annotation hitTest:point]) {
newCurrentAnnotation = annotation;
break;
- } else if ([annotation shouldDisplay] && NSPointInRect(point, [annotation bounds]) && (toolMode == SKToolModeText || IS_MARKUP(annotationMode)) && linkAnnotation == nil) {
+ } else if (NSPointInRect(point, [annotation bounds]) && (toolMode == SKToolModeText || IS_MARKUP(annotationMode)) && linkAnnotation == nil) {
if ([annotation isLink])
linkAnnotation = annotation;
else
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 15:24:13
|
Revision: 15621
http://sourceforge.net/p/skim-app/code/15621
Author: hofman
Date: 2025-07-08 15:24:11 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
ignore periodic events before dragging as there will be nothing to scroll
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 15:03:04 UTC (rev 15620)
+++ trunk/SKPDFView.m 2025-07-08 15:24:11 UTC (rev 15621)
@@ -4104,7 +4104,7 @@
[[[self scrollView] contentView] autoscroll:lastMouseEvent];
}
} else if ([theEvent type] == NSEventTypePeriodic) {
- if (currentAnnotation == nil || [[[self scrollView] contentView] autoscroll:lastMouseEvent] == NO)
+ if (draggedAnnotation == NO || [[[self scrollView] contentView] autoscroll:lastMouseEvent] == NO)
continue;
}
BOOL shiftDown = ([theEvent modifierFlags] & NSEventModifierFlagShift) != 0;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 15:03:06
|
Revision: 15620
http://sourceforge.net/p/skim-app/code/15620
Author: hofman
Date: 2025-07-08 15:03:04 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
get bounds first for any type
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-08 14:34:19 UTC (rev 15619)
+++ trunk/SKPDFView.m 2025-07-08 15:03:04 UTC (rev 15620)
@@ -4052,18 +4052,17 @@
if (shouldAddAnnotation) {
if (temporaryToolMode >= SKToolModeFreeText)
noteType = NOTE_TYPE_FROM_TEMP_TOOL_MODE(temporaryToolMode);
+ originalBounds = SKRectFromCenterAndSquareSize(SKIntegralPoint(initialPoint), 0.0);
if (noteType == SKNoteTypeAnchored) {
- [self addAnnotationWithType:SKNoteTypeAnchored selection:nil page:page bounds:SKRectFromCenterAndSquareSize(SKIntegralPoint(initialPoint), 0.0)];
+ [self addAnnotationWithType:SKNoteTypeAnchored selection:nil page:page bounds:originalBounds];
+ resizeHandle = 0;
originalBounds = [[self currentAnnotation] bounds];
+ } else if (noteType == SKNoteTypeLine) {
+ isLine = YES;
+ resizeHandle = SKMaxXEdgeMask;
+ originalStartPoint = originalEndPoint = originalBounds.origin;
} else {
- originalBounds = SKRectFromCenterAndSquareSize(SKIntegralPoint(initialPoint), 0.0);
- if (noteType == SKNoteTypeLine) {
- isLine = YES;
- resizeHandle = SKMaxXEdgeMask;
- originalStartPoint = originalEndPoint = originalBounds.origin;
- } else {
- resizeHandle = SKMaxXEdgeMask | SKMinYEdgeMask;
- }
+ resizeHandle = SKMaxXEdgeMask | SKMinYEdgeMask;
}
} else if (isLine) {
originalStartPoint = SKIntegralPoint(SKAddPoints([currentAnnotation startPoint], originalBounds.origin));
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-08 14:34:20
|
Revision: 15619
http://sourceforge.net/p/skim-app/code/15619
Author: hofman
Date: 2025-07-08 14:34:19 +0000 (Tue, 08 Jul 2025)
Log Message:
-----------
get mouse location when getting drag event
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-07 22:10:55 UTC (rev 15618)
+++ trunk/SKPDFView.m 2025-07-08 14:34:19 UTC (rev 15619)
@@ -4033,8 +4033,9 @@
// Old (current) annotation location and click point relative to it
NSRect originalBounds = [currentAnnotation bounds];
BOOL isLine = [currentAnnotation isLine];
- NSPoint initialPoint = NSZeroPoint;
- PDFPage *page = [self pageAndPoint:&initialPoint forEvent:theEvent nearest:YES];
+ NSPoint mousePoint = [theEvent locationInView:self];
+ PDFPage *page = [self pageForPoint:mousePoint nearest:YES];
+ NSPoint initialPoint = [self convertPoint:mousePoint toPage:page];
SKNoteType noteType = annotationMode;
BOOL shouldAddAnnotation = currentAnnotation == nil;
NSPoint originalStartPoint = NSZeroPoint;
@@ -4098,31 +4099,32 @@
[self beginNewUndoGroupIfNeeded];
draggedAnnotation = YES;
}
- lastMouseEvent = theEvent;
- if (resizeHandle == 0)
- [[[self scrollView] contentView] autoscroll:theEvent];
+ mousePoint = [theEvent locationInView:self];
+ if (resizeHandle == 0) {
+ lastMouseEvent = theEvent;
+ [[[self scrollView] contentView] autoscroll:lastMouseEvent];
+ }
} else if ([theEvent type] == NSEventTypePeriodic) {
if (currentAnnotation == nil || [[[self scrollView] contentView] autoscroll:lastMouseEvent] == NO)
continue;
}
BOOL shiftDown = ([theEvent modifierFlags] & NSEventModifierFlagShift) != 0;
- NSPoint point = [lastMouseEvent locationInView:self];
if (resizeHandle == 0)
- page = [self pageForPoint:point nearest:YES];
- point = SKSubstractPoints([self convertPoint:point toPage:page], initialPoint);
+ page = [self pageForPoint:mousePoint nearest:YES];
+ NSPoint draggedPoint = SKSubstractPoints([self convertPoint:mousePoint toPage:page], initialPoint);
if (resizeHandle == 0) {
- [self moveAnnotationToPoint:point onPage:page];
+ [self moveAnnotationToPoint:draggedPoint onPage:page];
} else if (isLine) {
- [self dragLineAnnotationStartPoint:(resizeHandle & SKMinXEdgeMask) != 0 by:point originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint shiftDown:shiftDown];
+ [self dragLineAnnotationStartPoint:(resizeHandle & SKMinXEdgeMask) != 0 by:draggedPoint originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint shiftDown:shiftDown];
} else {
if (shouldAddAnnotation) {
- SKRectEdges currentResizeHandle = (point.x < 0.0 ? SKMinXEdgeMask : SKMaxXEdgeMask) | (point.y <= 0.0 ? SKMinYEdgeMask : SKMaxYEdgeMask);
+ SKRectEdges currentResizeHandle = (draggedPoint.x < 0.0 ? SKMinXEdgeMask : SKMaxXEdgeMask) | (draggedPoint.y <= 0.0 ? SKMinYEdgeMask : SKMaxYEdgeMask);
if (currentResizeHandle != resizeHandle) {
resizeHandle = currentResizeHandle;
[self setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
}
}
- [self dragAnnotationResizeHandle:resizeHandle by:point originalBounds:originalBounds originalPaths:originalPaths margin:margin shiftDown:shiftDown];
+ [self dragAnnotationResizeHandle:resizeHandle by:draggedPoint originalBounds:originalBounds originalPaths:originalPaths margin:margin shiftDown:shiftDown];
}
[[highlightLayerController layer] setNeedsDisplay];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-07 22:10:56
|
Revision: 15618
http://sourceforge.net/p/skim-app/code/15618
Author: hofman
Date: 2025-07-07 22:10:55 +0000 (Mon, 07 Jul 2025)
Log Message:
-----------
remove somme braces
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-07 21:38:34 UTC (rev 15617)
+++ trunk/SKPDFView.m 2025-07-07 22:10:55 UTC (rev 15618)
@@ -3901,9 +3901,8 @@
newBounds.size.width += relPoint.x;
if (NSMaxX(newBounds) > NSMaxX(pageBounds))
newBounds.size.width = NSMaxX(pageBounds) - NSMinX(newBounds);
- if (NSWidth(newBounds) < minSize) {
+ if (NSWidth(newBounds) < minSize)
newBounds.size.width = minSize;
- }
} else if ((resizeHandle & SKMinXEdgeMask)) {
newBounds.origin.x += relPoint.x;
newBounds.size.width -= relPoint.x;
@@ -3918,12 +3917,10 @@
}
if ((resizeHandle & SKMaxYEdgeMask)) {
newBounds.size.height += relPoint.y;
- if (NSMaxY(newBounds) > NSMaxY(pageBounds)) {
+ if (NSMaxY(newBounds) > NSMaxY(pageBounds))
newBounds.size.height = NSMaxY(pageBounds) - NSMinY(newBounds);
- }
- if (NSHeight(newBounds) < minSize) {
+ if (NSHeight(newBounds) < minSize)
newBounds.size.height = minSize;
- }
} else if ((resizeHandle & SKMinYEdgeMask)) {
newBounds.origin.y += relPoint.y;
newBounds.size.height -= relPoint.y;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-07 21:38:36
|
Revision: 15617
http://sourceforge.net/p/skim-app/code/15617
Author: hofman
Date: 2025-07-07 21:38:34 +0000 (Mon, 07 Jul 2025)
Log Message:
-----------
rename methods
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-07 16:26:06 UTC (rev 15616)
+++ trunk/SKPDFView.m 2025-07-07 21:38:34 UTC (rev 15617)
@@ -3825,7 +3825,7 @@
}
}
-- (void)doMoveAnnotationToPoint:(NSPoint)point onPage:(PDFPage *)page {
+- (void)moveAnnotationToPoint:(NSPoint)point onPage:(PDFPage *)page {
// Move annotation.
if (page) { // page should never be nil, but just to be sure
if (page != [currentAnnotation page])
@@ -3842,7 +3842,7 @@
}
}
-- (void)doResizeLineAnnotationDraggingStartPoint:(BOOL)dragStartPoint byRelativePoint:(NSPoint)relPoint originalStartPoint:(NSPoint)originalStartPoint originalEndPoint:(NSPoint)originalEndPoint shiftDown:(BOOL)shiftDown {
+- (void)dragLineAnnotationStartPoint:(BOOL)dragStartPoint by:(NSPoint)relPoint originalStartPoint:(NSPoint)originalStartPoint originalEndPoint:(NSPoint)originalEndPoint shiftDown:(BOOL)shiftDown {
PDFPage *page = [currentAnnotation page];
NSRect pageBounds = [page boundsForBox:[self displayBox]];
NSPoint endPoint = originalEndPoint;
@@ -3888,7 +3888,7 @@
}
}
-- (void)doResizeAnnotationDraggingHandle:(SKRectEdges)resizeHandle byRelativePoint:(NSPoint)relPoint originalBounds:(NSRect)originalBounds originalPaths:(NSArray *)originalPaths margin:(CGFloat)margin shiftDown:(BOOL)shiftDown {
+- (void)dragAnnotationResizeHandle:(SKRectEdges)resizeHandle by:(NSPoint)relPoint originalBounds:(NSRect)originalBounds originalPaths:(NSArray *)originalPaths margin:(CGFloat)margin shiftDown:(BOOL)shiftDown {
PDFPage *page = [currentAnnotation page];
NSRect newBounds = originalBounds;
NSRect pageBounds = [page boundsForBox:[self displayBox]];
@@ -4114,9 +4114,9 @@
page = [self pageForPoint:point nearest:YES];
point = SKSubstractPoints([self convertPoint:point toPage:page], initialPoint);
if (resizeHandle == 0) {
- [self doMoveAnnotationToPoint:point onPage:page];
+ [self moveAnnotationToPoint:point onPage:page];
} else if (isLine) {
- [self doResizeLineAnnotationDraggingStartPoint:(resizeHandle & SKMinXEdgeMask) != 0 byRelativePoint:point originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint shiftDown:shiftDown];
+ [self dragLineAnnotationStartPoint:(resizeHandle & SKMinXEdgeMask) != 0 by:point originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint shiftDown:shiftDown];
} else {
if (shouldAddAnnotation) {
SKRectEdges currentResizeHandle = (point.x < 0.0 ? SKMinXEdgeMask : SKMaxXEdgeMask) | (point.y <= 0.0 ? SKMinYEdgeMask : SKMaxYEdgeMask);
@@ -4125,7 +4125,7 @@
[self setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
}
}
- [self doResizeAnnotationDraggingHandle:resizeHandle byRelativePoint:point originalBounds:originalBounds originalPaths:originalPaths margin:margin shiftDown:shiftDown];
+ [self dragAnnotationResizeHandle:resizeHandle by:point originalBounds:originalBounds originalPaths:originalPaths margin:margin shiftDown:shiftDown];
}
[[highlightLayerController layer] setNeedsDisplay];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-07 16:26:09
|
Revision: 15616
http://sourceforge.net/p/skim-app/code/15616
Author: hofman
Date: 2025-07-07 16:26:06 +0000 (Mon, 07 Jul 2025)
Log Message:
-----------
rename methods
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-07 16:02:37 UTC (rev 15615)
+++ trunk/SKPDFView.m 2025-07-07 16:26:06 UTC (rev 15616)
@@ -3842,7 +3842,7 @@
}
}
-- (void)doResizeLineAnnotationWithRelativePoint:(NSPoint)relPoint originalStartPoint:(NSPoint)originalStartPoint originalEndPoint:(NSPoint)originalEndPoint dragStartPoint:(BOOL)dragStartPoint shiftDown:(BOOL)shiftDown {
+- (void)doResizeLineAnnotationDraggingStartPoint:(BOOL)dragStartPoint byRelativePoint:(NSPoint)relPoint originalStartPoint:(NSPoint)originalStartPoint originalEndPoint:(NSPoint)originalEndPoint shiftDown:(BOOL)shiftDown {
PDFPage *page = [currentAnnotation page];
NSRect pageBounds = [page boundsForBox:[self displayBox]];
NSPoint endPoint = originalEndPoint;
@@ -3888,7 +3888,7 @@
}
}
-- (void)doResizeAnnotationWithRelativePoint:(NSPoint)relPoint originalBounds:(NSRect)originalBounds originalPaths:(NSArray *)originalPaths margin:(CGFloat)margin resizeHandle:(SKRectEdges)resizeHandle shiftDown:(BOOL)shiftDown {
+- (void)doResizeAnnotationDraggingHandle:(SKRectEdges)resizeHandle byRelativePoint:(NSPoint)relPoint originalBounds:(NSRect)originalBounds originalPaths:(NSArray *)originalPaths margin:(CGFloat)margin shiftDown:(BOOL)shiftDown {
PDFPage *page = [currentAnnotation page];
NSRect newBounds = originalBounds;
NSRect pageBounds = [page boundsForBox:[self displayBox]];
@@ -4116,7 +4116,7 @@
if (resizeHandle == 0) {
[self doMoveAnnotationToPoint:point onPage:page];
} else if (isLine) {
- [self doResizeLineAnnotationWithRelativePoint:point originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint dragStartPoint:(resizeHandle & SKMinXEdgeMask) != 0 shiftDown:shiftDown];
+ [self doResizeLineAnnotationDraggingStartPoint:(resizeHandle & SKMinXEdgeMask) != 0 byRelativePoint:point originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint shiftDown:shiftDown];
} else {
if (shouldAddAnnotation) {
SKRectEdges currentResizeHandle = (point.x < 0.0 ? SKMinXEdgeMask : SKMaxXEdgeMask) | (point.y <= 0.0 ? SKMinYEdgeMask : SKMaxYEdgeMask);
@@ -4125,7 +4125,7 @@
[self setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
}
}
- [self doResizeAnnotationWithRelativePoint:point originalBounds:originalBounds originalPaths:originalPaths margin:margin resizeHandle:resizeHandle shiftDown:shiftDown];
+ [self doResizeAnnotationDraggingHandle:resizeHandle byRelativePoint:point originalBounds:originalBounds originalPaths:originalPaths margin:margin shiftDown:shiftDown];
}
[[highlightLayerController layer] setNeedsDisplay];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-07 16:02:44
|
Revision: 15615
http://sourceforge.net/p/skim-app/code/15615
Author: hofman
Date: 2025-07-07 16:02:37 +0000 (Mon, 07 Jul 2025)
Log Message:
-----------
calculate point and page if needed in main dragging handler
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-07 09:31:34 UTC (rev 15614)
+++ trunk/SKPDFView.m 2025-07-07 16:02:37 UTC (rev 15615)
@@ -3825,20 +3825,17 @@
}
}
-- (void)doMoveAnnotationWithEvent:(NSEvent *)theEvent offset:(NSPoint)offset {
+- (void)doMoveAnnotationToPoint:(NSPoint)point onPage:(PDFPage *)page {
// Move annotation.
- NSPoint point = NSZeroPoint;
- PDFPage *newActivePage = [self pageAndPoint:&point forEvent:theEvent nearest:YES];
-
- if (newActivePage) { // newActivePage should never be nil, but just to be sure
- if (newActivePage != [currentAnnotation page])
+ if (page) { // page should never be nil, but just to be sure
+ if (page != [currentAnnotation page])
// move the annotation to the new page
- [[self document] moveAnnotation:currentAnnotation toPage:newActivePage];
+ [[self document] moveAnnotation:currentAnnotation toPage:page];
NSRect newBounds = [currentAnnotation bounds];
- newBounds.origin = SKIntegralPoint(SKSubstractPoints(point, offset));
+ newBounds.origin = SKIntegralPoint(point);
// constrain bounds inside page bounds
- newBounds = SKConstrainRect(newBounds, [newActivePage boundsForBox:[self displayBox]]);
+ newBounds = SKConstrainRect(newBounds, [page boundsForBox:[self displayBox]]);
// Change annotation's location.
[currentAnnotation setBounds:newBounds];
@@ -3845,21 +3842,19 @@
}
}
-- (void)doResizeLineAnnotationWithEvent:(NSEvent *)theEvent fromPoint:(NSPoint)originalPagePoint originalStartPoint:(NSPoint)originalStartPoint originalEndPoint:(NSPoint)originalEndPoint resizeHandle:(SKRectEdges)resizeHandle {
+- (void)doResizeLineAnnotationWithRelativePoint:(NSPoint)relPoint originalStartPoint:(NSPoint)originalStartPoint originalEndPoint:(NSPoint)originalEndPoint dragStartPoint:(BOOL)dragStartPoint shiftDown:(BOOL)shiftDown {
PDFPage *page = [currentAnnotation page];
NSRect pageBounds = [page boundsForBox:[self displayBox]];
- NSPoint currentPagePoint = [self convertPoint:[theEvent locationInView:self] toPage:page];
- NSPoint relPoint = SKSubstractPoints(currentPagePoint, originalPagePoint);
NSPoint endPoint = originalEndPoint;
NSPoint startPoint = originalStartPoint;
- NSPoint *draggedPoint = (resizeHandle & SKMinXEdgeMask) ? &startPoint : &endPoint;
+ NSPoint *draggedPoint = dragStartPoint ? &startPoint : &endPoint;
*draggedPoint = SKConstrainPointInRect(SKAddPoints(*draggedPoint, relPoint), pageBounds);
draggedPoint->x = floor(draggedPoint->x);
draggedPoint->y = floor(draggedPoint->y);
- if (([theEvent modifierFlags] & NSEventModifierFlagShift)) {
- NSPoint *fixedPoint = (resizeHandle & SKMinXEdgeMask) ? &endPoint : &startPoint;
+ if (shiftDown) {
+ NSPoint *fixedPoint = dragStartPoint ? &endPoint : &startPoint;
NSPoint diffPoint = SKSubstractPoints(*draggedPoint, *fixedPoint);
CGFloat dx = fabs(diffPoint.x), dy = fabs(diffPoint.y);
@@ -3893,25 +3888,14 @@
}
}
-- (void)doResizeAnnotationWithEvent:(NSEvent *)theEvent fromPoint:(NSPoint)originalPagePoint originalBounds:(NSRect)originalBounds originalPaths:(NSArray *)originalPaths margin:(CGFloat)margin resizeHandle:(SKRectEdges *)resizeHandlePtr {
+- (void)doResizeAnnotationWithRelativePoint:(NSPoint)relPoint originalBounds:(NSRect)originalBounds originalPaths:(NSArray *)originalPaths margin:(CGFloat)margin resizeHandle:(SKRectEdges)resizeHandle shiftDown:(BOOL)shiftDown {
PDFPage *page = [currentAnnotation page];
NSRect newBounds = originalBounds;
NSRect pageBounds = [page boundsForBox:[self displayBox]];
- NSPoint currentPagePoint = [self convertPoint:[theEvent locationInView:self] toPage:page];
- NSPoint relPoint = SKSubstractPoints(currentPagePoint, originalPagePoint);
- SKRectEdges resizeHandle = *resizeHandlePtr;
CGFloat minSize = fmax(MIN_NOTE_SIZE, 2.0 * margin + 2.0);
BOOL isInk = [currentAnnotation isInk];
- if (NSEqualSizes(originalBounds.size, NSZeroSize)) {
- SKRectEdges currentResizeHandle = (relPoint.x < 0.0 ? SKMinXEdgeMask : SKMaxXEdgeMask) | (relPoint.y <= 0.0 ? SKMinYEdgeMask : SKMaxYEdgeMask);
- if (currentResizeHandle != resizeHandle) {
- *resizeHandlePtr = resizeHandle = currentResizeHandle;
- [self setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
- }
- }
-
- if (([theEvent modifierFlags] & NSEventModifierFlagShift) == 0) {
+ if (shiftDown == NO) {
if ((resizeHandle & SKMaxXEdgeMask)) {
newBounds.size.width += relPoint.x;
@@ -4031,7 +4015,7 @@
CGFloat sy = fmax(1.0, NSHeight(newBounds) - 2.0 * margin) / fmax(1.0, NSHeight(originalBounds) - 2.0 * margin);
[transform translateXBy:margin yBy:margin];
- if (([theEvent modifierFlags] & NSEventModifierFlagShift))
+ if (shiftDown)
[transform scaleBy:fmin(sx, sy)];
else
[transform scaleXBy:sx yBy:sy];
@@ -4052,8 +4036,8 @@
// Old (current) annotation location and click point relative to it
NSRect originalBounds = [currentAnnotation bounds];
BOOL isLine = [currentAnnotation isLine];
- NSPoint pagePoint = NSZeroPoint;
- PDFPage *page = [self pageAndPoint:&pagePoint forEvent:theEvent nearest:YES];
+ NSPoint initialPoint = NSZeroPoint;
+ PDFPage *page = [self pageAndPoint:&initialPoint forEvent:theEvent nearest:YES];
SKNoteType noteType = annotationMode;
BOOL shouldAddAnnotation = currentAnnotation == nil;
NSPoint originalStartPoint = NSZeroPoint;
@@ -4060,23 +4044,21 @@
NSPoint originalEndPoint = NSZeroPoint;
NSArray *originalPaths = nil;
CGFloat margin = 0.0;
-
// Hit-test for resize box.
- SKRectEdges resizeHandle = [currentAnnotation resizeHandleForPoint:pagePoint scaleFactor:[self scaleFactor]];
+ SKRectEdges resizeHandle = [currentAnnotation resizeHandleForPoint:initialPoint scaleFactor:[self scaleFactor]];
- if (shouldAddAnnotation && temporaryToolMode >= SKToolModeFreeText)
- noteType = NOTE_TYPE_FROM_TEMP_TOOL_MODE(temporaryToolMode);
-
atomic_store(&highlightLayerState, SKLayerAdd);
- if (currentAnnotation)
+ if (shouldAddAnnotation == NO)
[self updatedAnnotation:currentAnnotation];
if (shouldAddAnnotation) {
+ if (temporaryToolMode >= SKToolModeFreeText)
+ noteType = NOTE_TYPE_FROM_TEMP_TOOL_MODE(temporaryToolMode);
if (noteType == SKNoteTypeAnchored) {
- [self addAnnotationWithType:SKNoteTypeAnchored selection:nil page:page bounds:SKRectFromCenterAndSquareSize(SKIntegralPoint(pagePoint), 0.0)];
+ [self addAnnotationWithType:SKNoteTypeAnchored selection:nil page:page bounds:SKRectFromCenterAndSquareSize(SKIntegralPoint(initialPoint), 0.0)];
originalBounds = [[self currentAnnotation] bounds];
} else {
- originalBounds = SKRectFromCenterAndSquareSize(SKIntegralPoint(pagePoint), 0.0);
+ originalBounds = SKRectFromCenterAndSquareSize(SKIntegralPoint(initialPoint), 0.0);
if (noteType == SKNoteTypeLine) {
isLine = YES;
resizeHandle = SKMaxXEdgeMask;
@@ -4096,7 +4078,6 @@
// we move or resize the annotation in an event loop, which ensures it's enclosed in a single undo group
BOOL draggedAnnotation = NO;
NSEvent *lastMouseEvent = theEvent;
- NSPoint offset = SKSubstractPoints(pagePoint, originalBounds.origin);
NSUInteger eventMask = NSEventMaskLeftMouseUp | NSEventMaskLeftMouseDragged;
[self setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
@@ -4104,6 +4085,8 @@
[[NSCursor closedHandCursor] push];
[NSEvent startPeriodicEventsAfterDelay:0.1 withPeriod:0.1];
eventMask |= NSEventMaskPeriodic;
+
+ initialPoint = SKSubstractPoints(initialPoint, originalBounds.origin);
}
while (YES) {
@@ -4125,12 +4108,25 @@
if (currentAnnotation == nil || [[[self scrollView] contentView] autoscroll:lastMouseEvent] == NO)
continue;
}
+ BOOL shiftDown = ([theEvent modifierFlags] & NSEventModifierFlagShift) != 0;
+ NSPoint point = [lastMouseEvent locationInView:self];
if (resizeHandle == 0)
- [self doMoveAnnotationWithEvent:lastMouseEvent offset:offset];
- else if (isLine)
- [self doResizeLineAnnotationWithEvent:lastMouseEvent fromPoint:pagePoint originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint resizeHandle:resizeHandle];
- else
- [self doResizeAnnotationWithEvent:lastMouseEvent fromPoint:pagePoint originalBounds:originalBounds originalPaths:originalPaths margin:margin resizeHandle:&resizeHandle];
+ page = [self pageForPoint:point nearest:YES];
+ point = SKSubstractPoints([self convertPoint:point toPage:page], initialPoint);
+ if (resizeHandle == 0) {
+ [self doMoveAnnotationToPoint:point onPage:page];
+ } else if (isLine) {
+ [self doResizeLineAnnotationWithRelativePoint:point originalStartPoint:originalStartPoint originalEndPoint:originalEndPoint dragStartPoint:(resizeHandle & SKMinXEdgeMask) != 0 shiftDown:shiftDown];
+ } else {
+ if (shouldAddAnnotation) {
+ SKRectEdges currentResizeHandle = (point.x < 0.0 ? SKMinXEdgeMask : SKMaxXEdgeMask) | (point.y <= 0.0 ? SKMinYEdgeMask : SKMaxYEdgeMask);
+ if (currentResizeHandle != resizeHandle) {
+ resizeHandle = currentResizeHandle;
+ [self setCursorForAreaOfInterest:SKAreaOfInterestForResizeHandle(resizeHandle, page)];
+ }
+ }
+ [self doResizeAnnotationWithRelativePoint:point originalBounds:originalBounds originalPaths:originalPaths margin:margin resizeHandle:resizeHandle shiftDown:shiftDown];
+ }
[[highlightLayerController layer] setNeedsDisplay];
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-07 09:31:36
|
Revision: 15614
http://sourceforge.net/p/skim-app/code/15614
Author: hofman
Date: 2025-07-07 09:31:34 +0000 (Mon, 07 Jul 2025)
Log Message:
-----------
declare as properties
Modified Paths:
--------------
trunk/PDFAnnotation_SKExtensions.h
Modified: trunk/PDFAnnotation_SKExtensions.h
===================================================================
--- trunk/PDFAnnotation_SKExtensions.h 2025-07-07 09:22:53 UTC (rev 15613)
+++ trunk/PDFAnnotation_SKExtensions.h 2025-07-07 09:31:34 UTC (rev 15614)
@@ -99,21 +99,11 @@
@property (nonatomic, nullable, readonly) NSString *textString;
-- (BOOL)isMarkup;
-- (BOOL)isNote;
-- (BOOL)isText;
-- (BOOL)isLine;
-- (BOOL)isInk;
-- (BOOL)isLink;
-- (BOOL)isWidget;
-- (BOOL)isResizable;
-- (BOOL)isMovable;
-- (BOOL)isEditable;
-- (BOOL)hasBorder;
-- (BOOL)hasInteriorColor;
+@property (nonatomic, readonly) BOOL isMarkup, isNote, isText, isLine, isInk, isLink, isWidget;
+@property (nonatomic, readonly) BOOL isResizable, isMovable, isEditable;
+@property (nonatomic, readonly) BOOL hasBorder, hasInteriorColor;
+@property (nonatomic, readonly) BOOL isConvertibleAnnotation;
-- (BOOL)isConvertibleAnnotation;
-
- (BOOL)hitTest:(NSPoint)point;
@property (nonatomic, readonly) CGFloat boundsOrder;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-07 09:22:56
|
Revision: 15613
http://sourceforge.net/p/skim-app/code/15613
Author: hofman
Date: 2025-07-07 09:22:53 +0000 (Mon, 07 Jul 2025)
Log Message:
-----------
no need to check for skim note, is implicit
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-07 09:22:05 UTC (rev 15612)
+++ trunk/SKPDFView.m 2025-07-07 09:22:53 UTC (rev 15613)
@@ -3302,9 +3302,7 @@
return ([[self currentSelection] hasCharacters] || [currentAnnotation isSkimNote] ||
(toolMode == SKToolModeSelect && NSIsEmptyRect(selectionRect) == NO && selectionPageIndex != NSNotFound && [[self document] isLocked] == NO));
} else if (action == @selector(cut:)) {
- if ([currentAnnotation isSkimNote] && [currentAnnotation isMovable])
- return YES;
- return NO;
+ return [currentAnnotation isMovable];
} else if (action == @selector(paste:)) {
return [self canSelectNote] && [[NSPasteboard generalPasteboard] canReadObjectForClasses:@[[PDFAnnotation class], [NSString class], [NSImage class]] options:@{}];
} else if (action == @selector(alternatePaste:)) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ho...@us...> - 2025-07-07 09:22:08
|
Revision: 15612
http://sourceforge.net/p/skim-app/code/15612
Author: hofman
Date: 2025-07-07 09:22:05 +0000 (Mon, 07 Jul 2025)
Log Message:
-----------
no need to check for skim note, is implicit
Modified Paths:
--------------
trunk/SKPDFView.m
Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m 2025-07-06 16:57:32 UTC (rev 15611)
+++ trunk/SKPDFView.m 2025-07-07 09:22:05 UTC (rev 15612)
@@ -2102,11 +2102,10 @@
[item setAlternate:YES];
}
- if (([currentAnnotation isSkimNote] && [currentAnnotation isMovable]) || [[self currentSelection] hasCharacters]) {
- if ([currentAnnotation isSkimNote] && [currentAnnotation isMovable])
- [menu insertItemWithTitle:NSLocalizedString(@"Cut", @"Menu item title") action:@selector(cut:) keyEquivalent:@"" atIndex:0];
+ if ([currentAnnotation isMovable])
+ [menu insertItemWithTitle:NSLocalizedString(@"Cut", @"Menu item title") action:@selector(cut:) keyEquivalent:@"" atIndex:0];
+ if (([currentAnnotation isMovable]) || [[self currentSelection] hasCharacters])
[menu insertItemWithTitle:NSLocalizedString(@"Copy", @"Menu item title") action:@selector(copy:) keyEquivalent:@"" atIndex:0];
- }
if ([[menu itemAtIndex:0] isSeparatorItem])
[menu removeItemAtIndex:0];
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|