Revision: 3657
          http://skim-app.svn.sourceforge.net/skim-app/?rev=3657&view=rev
Author:   hofman
Date:     2008-04-06 11:24:22 -0700 (Sun, 06 Apr 2008)

Log Message:
-----------
Trial to implement page rotation through mouse gestures.

Modified Paths:
--------------
    trunk/SKPDFView.m

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2008-04-06 17:29:32 UTC (rev 3656)
+++ trunk/SKPDFView.m   2008-04-06 18:24:22 UTC (rev 3657)
@@ -1350,6 +1350,22 @@
     [self setScaleFactor:[self scaleFactor] + 0.5 * dy];
 }
 
+- (void)rotateWithEvent:(NSEvent *)theEvent {
+       float rotation = [theEvent rotation];
+    SKMainWindowController *controller = (SKMainWindowController *)[[self 
window] windowController];
+    if (rotation > 0) {
+        if ([theEvent modifierFlags] & NSAlternateKeyMask)
+            [controller rotateLeft:self];
+        else
+            [controller rotateAllLeft:self];
+    } else if (rotation < 0) {
+        if ([theEvent modifierFlags] & NSAlternateKeyMask)
+            [controller rotateRight:self];
+        else
+            [controller rotateAllRight:self];
+    }
+}
+
 - (void)mouseEntered:(NSEvent *)theEvent {
     NSTrackingRectTag trackingNumber = [theEvent trackingNumber];
     [super mouseEntered:theEvent];


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

-------------------------------------------------------------------------
This SF.net email is sponsored by the 2008 JavaOne(SM) Conference 
Register now and save $200. Hurry, offer ends at 11:59 p.m., 
Monday, April 7! Use priority code J8TLD2. 
http://ad.doubleclick.net/clk;198757673;13503038;p?http://java.sun.com/javaone
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to