Revision: 6450
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6450&view=rev
Author:   hofman
Date:     2010-04-08 23:45:10 +0000 (Thu, 08 Apr 2010)

Log Message:
-----------
typedef for rect edge masks

Modified Paths:
--------------
    trunk/NSGeometry_SKExtensions.h
    trunk/SKGradientView.h
    trunk/SKGradientView.m
    trunk/SKPDFView.h
    trunk/SKPDFView.m

Modified: trunk/NSGeometry_SKExtensions.h
===================================================================
--- trunk/NSGeometry_SKExtensions.h     2010-04-08 23:35:27 UTC (rev 6449)
+++ trunk/NSGeometry_SKExtensions.h     2010-04-08 23:45:10 UTC (rev 6450)
@@ -46,6 +46,7 @@
        SKMaxYEdgeMask = 1 << NSMaxYEdge,
        SKEveryEdgeMask = SKMinXEdgeMask | SKMinYEdgeMask | SKMaxXEdgeMask | 
SKMaxYEdgeMask,
 };
+typedef NSUInteger SKRectEdges;
 
 static inline NSPoint SKIntegralPoint(NSPoint point) {
     return NSMakePoint(round(point.x), round(point.y));

Modified: trunk/SKGradientView.h
===================================================================
--- trunk/SKGradientView.h      2010-04-08 23:35:27 UTC (rev 6449)
+++ trunk/SKGradientView.h      2010-04-08 23:45:10 UTC (rev 6450)
@@ -37,18 +37,19 @@
  */
 
 #import <Cocoa/Cocoa.h>
+#import "NSGeometry_SKExtensions.h"
 
 @interface SKGradientView : NSView {
        id contentView;
     NSSize minSize;
-       NSInteger edges;
+       SKRectEdges edges;
     BOOL autoEdges;
 }
 
 @property (nonatomic, retain) id contentView;
 @property (nonatomic, readonly) NSRect contentRect;
 @property (nonatomic) NSSize minSize;
-...@property (nonatomic) NSInteger edges;
+...@property (nonatomic) SKRectEdges edges;
 @property (nonatomic) BOOL autoEdges;
 
 @end

Modified: trunk/SKGradientView.m
===================================================================
--- trunk/SKGradientView.m      2010-04-08 23:35:27 UTC (rev 6449)
+++ trunk/SKGradientView.m      2010-04-08 23:45:10 UTC (rev 6450)
@@ -173,7 +173,7 @@
        }
 }
 
-- (void)setEdges:(NSInteger)mask {
+- (void)setEdges:(SKRectEdges)mask {
        if (mask != edges) {
                edges = mask;
                [contentView setFrame:[self contentRect]];
@@ -190,8 +190,8 @@
 - (NSRect)contentRect {
        NSRect rect = [self bounds];
        NSRect edgeRect;
-       NSInteger edge = 4;
-       while (--edge >= 0) {
+       NSRectEdge edge = 4;
+       while (edge-- > 0) {
                if (edges & (1 << edge))
                        NSDivideRect(rect, &edgeRect, &rect, BORDER_SIZE, edge);
        }

Modified: trunk/SKPDFView.h
===================================================================
--- trunk/SKPDFView.h   2010-04-08 23:35:27 UTC (rev 6449)
+++ trunk/SKPDFView.h   2010-04-08 23:45:10 UTC (rev 6450)
@@ -40,6 +40,7 @@
 #import <Quartz/Quartz.h>
 #import "SKMainWindowController.h"
 #import "SKTransitionController.h"
+#import "NSGeometry_SKExtensions.h"
 
 extern NSString *SKPDFViewToolModeChangedNotification;
 extern NSString *SKPDFViewAnnotationModeChangedNotification;
@@ -117,7 +118,7 @@
     CGFloat magnification;
     BOOL didSelect;
     BOOL mouseDownInAnnotation;
-    NSInteger dragMask;
+    SKRectEdges dragMask;
     NSArray *bezierPaths;
     NSUInteger pathPageIndex;
     NSColor *pathColor;

Modified: trunk/SKPDFView.m
===================================================================
--- trunk/SKPDFView.m   2010-04-08 23:35:27 UTC (rev 6449)
+++ trunk/SKPDFView.m   2010-04-08 23:45:10 UTC (rev 6450)
@@ -60,7 +60,6 @@
 #import "NSBezierPath_SKExtensions.h"
 #import "SKLineWell.h"
 #import <CoreServices/CoreServices.h>
-#import "NSGeometry_SKExtensions.h"
 #import "SKTypeSelectHelper.h"
 #import "NSAffineTransform_SKExtensions.h"
 #import "PDFDocument_SKExtensions.h"


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

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
Skim-app-commit mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/skim-app-commit

Reply via email to