Revision: 6418
          http://skim-app.svn.sourceforge.net/skim-app/?rev=6418&view=rev
Author:   hofman
Date:     2010-04-05 09:44:26 +0000 (Mon, 05 Apr 2010)

Log Message:
-----------
use declared properties

Modified Paths:
--------------
    trunk/SKColorSwatch.h
    trunk/SKColorSwatch.m
    trunk/SKFontWell.h
    trunk/SKFontWell.m
    trunk/SKLineWell.h
    trunk/SKLineWell.m
    trunk/SKSecondaryPDFView.h
    trunk/SKSecondaryPDFView.m
    trunk/SKSnapshotPDFView.h
    trunk/SKSnapshotPDFView.m
    trunk/SKStatusBar.h
    trunk/SKStatusBar.m

Modified: trunk/SKColorSwatch.h
===================================================================
--- trunk/SKColorSwatch.h       2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKColorSwatch.h       2010-04-05 09:44:26 UTC (rev 6418)
@@ -54,15 +54,13 @@
     BOOL autoResizes;
 }
 
-- (NSArray *)colors;
-- (void)setColors:(NSArray *)newColors;
+...@property (nonatomic) SEL action;
+...@property (nonatomic, assign) id target;
+...@property (nonatomic, copy) NSArray *colors;
+...@property (nonatomic, readonly) NSInteger clickedColorIndex;
+...@property (nonatomic, readonly) NSColor *color;
+...@property (nonatomic) BOOL autoResizes;
 
-- (NSInteger)clickedColorIndex;
-- (NSColor *)color;
-
-- (BOOL)autoResizes;
-- (void)setAutoResizes:(BOOL)flag;
-
 - (NSInteger)colorIndexAtPoint:(NSPoint)point;
 
 @end

Modified: trunk/SKColorSwatch.m
===================================================================
--- trunk/SKColorSwatch.m       2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKColorSwatch.m       2010-04-05 09:44:26 UTC (rev 6418)
@@ -56,6 +56,10 @@
 
 @implementation SKColorSwatch
 
+...@synthesize action, target, colors, autoResizes;
+...@synthesize clickedColorIndex=clickedIndex;
+...@dynamic color;
+
 + (void)initialize {
     SKINITIALIZE;
     
@@ -333,43 +337,11 @@
         [self sizeToFit];
 }
 
-- (BOOL)autoResizes {
-    return autoResizes;
-}
-
-- (void)setAutoResizes:(BOOL)flag {
-    autoResizes = flag;
-}
-
-- (NSInteger)clickedColorIndex {
-    return clickedIndex;
-}
-
 - (NSColor *)color {
     NSInteger i = clickedIndex;
     return i == -1 ? nil : [colors objectAtIndex:i];
 }
 
-- (SEL)action {
-    return action;
-}
-
-- (void)setAction:(SEL)selector {
-    if (selector != action) {
-        action = selector;
-    }
-}
-
-- (id)target {
-    return target;
-}
-
-- (void)setTarget:(id)newTarget {
-    if (target != newTarget) {
-        target = newTarget;
-    }
-}
-
 #pragma mark NSDraggingSource protocol 
 
 - (NSDragOperation)draggingSourceOperationMaskForLocal:(BOOL)isLocal {

Modified: trunk/SKFontWell.h
===================================================================
--- trunk/SKFontWell.h  2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKFontWell.h  2010-04-05 09:44:26 UTC (rev 6418)
@@ -45,23 +45,17 @@
     NSMutableDictionary *bindingInfo;
 }
 
+...@property (nonatomic) SEL action;
+...@property (nonatomic, assign) id target;
+...@property (nonatomic) BOOL isActive;
+...@property (nonatomic, copy) NSString *fontName;
+...@property (nonatomic) CGFloat fontSize;
+...@property (nonatomic, copy) NSColor *textColor;
+...@property (nonatomic) BOOL hasTextColor;
+
 - (void)activate;
 - (void)deactivate;
 
-- (BOOL)isActive;
-
-- (NSString *)fontName;
-- (void)setFontName:(NSString *)fontName;
-
-- (CGFloat)fontSize;
-- (void)setFontSize:(CGFloat)pointSize;
-
-- (NSColor *)textColor;
-- (void)setTextColor:(NSColor *)newTextColor;
-
-- (BOOL)hasTextColor;
-- (void)setHasTextColor:(BOOL)newHasTextColor;
-
 - (void)changeFontFromFontManager:(id)sender;
 - (void)changeAttributesFromFontManager:(id)sender;
 
@@ -73,10 +67,7 @@
     BOOL hasTextColor;
 }
 
-- (NSColor *)textColor;
-- (void)setTextColor:(NSColor *)newTextColor;
+...@property (nonatomic, copy) NSColor *textColor;
+...@property (nonatomic) BOOL hasTextColor;
 
-- (BOOL)hasTextColor;
-- (void)setHasTextColor:(BOOL)newHasTextColor;
-
 @end

Modified: trunk/SKFontWell.m
===================================================================
--- trunk/SKFontWell.m  2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKFontWell.m  2010-04-05 09:44:26 UTC (rev 6418)
@@ -65,6 +65,9 @@
 
 @implementation SKFontWell
 
+...@synthesize action, target;
+...@dynamic isActive, fontName, fontSize, textColor, hasTextColor;
+
 + (void)initialize {
     [self exposeBinding:FONTNAME_KEY];
     [self exposeBinding:FONTSIZE_KEY];
@@ -243,26 +246,6 @@
 
 #pragma mark Accessors
 
-- (SEL)action {
-    return action;
-}
-
-- (void)setAction:(SEL)selector {
-    if (selector != action) {
-        action = selector;
-    }
-}
-
-- (id)target {
-    return target;
-}
-
-- (void)setTarget:(id)newTarget {
-    if (target != newTarget) {
-        target = newTarget;
-    }
-}
-
 - (BOOL)isActive {
     return [self state] == NSOnState;
 }
@@ -445,6 +428,8 @@
 
 @implementation SKFontWellCell
 
+...@synthesize textColor, hasTextColor;
+
 - (void)commonInit {
     if (textColor == nil)
         [self setTextColor:[NSColor blackColor]];
@@ -523,25 +508,4 @@
     }
 }
 
-- (NSColor *)textColor {
-    return textColor;
-}
-
-- (void)setTextColor:(NSColor *)newTextColor {
-    if (textColor != newTextColor) {
-        [textColor release];
-        textColor = [newTextColor copy];
-    }
-}
-
-- (BOOL)hasTextColor {
-    return hasTextColor;
-}
-
-- (void)setHasTextColor:(BOOL)newHasTextColor {
-    if (hasTextColor != newHasTextColor) {
-        hasTextColor = newHasTextColor;
-    }
-}
-
 @end

Modified: trunk/SKLineWell.h
===================================================================
--- trunk/SKLineWell.h  2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKLineWell.h  2010-04-05 09:44:26 UTC (rev 6418)
@@ -76,32 +76,20 @@
     id titleUIElement;
 }
 
+...@property (nonatomic) SEL action;
+...@property (nonatomic, assign) id target;
+...@property (nonatomic, readonly) BOOL isActive;
+...@property (nonatomic) BOOL canActivate;
+...@property (nonatomic, getter=isHighlighted) BOOL highlighted;
+...@property (nonatomic) SKLineWellDisplayStyle displayStyle;
+...@property (nonatomic) CGFloat lineWidth;
+...@property (nonatomic) PDFBorderStyle style;
+...@property (nonatomic, copy) NSArray *dashPattern;
+...@property (nonatomic) PDFLineStyle startLineStyle, endLineStyle;
+
 - (void)activate:(BOOL)exclusive;
 - (void)deactivate;
 
-- (BOOL)isActive;
-
-- (BOOL)canActivate;
-- (void)setCanActivate:(BOOL)flag;
-
-- (BOOL)isHighlighted;
-- (void)setHighlighted:(BOOL)flag;
-
-- (SKLineWellDisplayStyle)displayStyle;
-- (void)setDisplayStyle:(SKLineWellDisplayStyle)newStyle;
-
-- (CGFloat)lineWidth;
-- (void)setLineWidth:(CGFloat)width;
-- (PDFBorderStyle)style;
-- (void)setStyle:(PDFBorderStyle)newStyle;
-- (NSArray *)dashPattern;
-- (void)setDashPattern:(NSArray *)pattern;
-
-- (PDFLineStyle)startLineStyle;
-- (void)setStartLineStyle:(PDFLineStyle)newStyle;
-- (PDFLineStyle)endLineStyle;
-- (void)setEndLineStyle:(PDFLineStyle)newStyle;
-
 - (void)lineInspectorLineAttributeChanged:(NSNotification *)notification;
 
 @end

Modified: trunk/SKLineWell.m
===================================================================
--- trunk/SKLineWell.m  2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKLineWell.m  2010-04-05 09:44:26 UTC (rev 6418)
@@ -57,6 +57,9 @@
 
 @implementation SKLineWell
 
+...@synthesize action, target, lineWidth, style, dashPattern, startLineStyle, 
endLineStyle;
+...@dynamic isActive, canActivate, highlighted, displayStyle;
+
 + (void)initialize {
     SKINITIALIZE;
     
@@ -457,26 +460,6 @@
 
 #pragma mark Accessors
 
-- (SEL)action {
-    return action;
-}
-
-- (void)setAction:(SEL)selector {
-    if (selector != action) {
-        action = selector;
-    }
-}
-
-- (id)target {
-    return target;
-}
-
-- (void)setTarget:(id)newTarget {
-    if (target != newTarget) {
-        target = newTarget;
-    }
-}
-
 - (BOOL)isActive {
     return lwFlags.active;
 }
@@ -514,10 +497,6 @@
     }
 }
 
-- (CGFloat)lineWidth {
-    return lineWidth;
-}
-
 - (void)setLineWidth:(CGFloat)width {
     if (fabs(lineWidth - width) > 0.00001) {
         lineWidth = width;
@@ -525,10 +504,6 @@
     }
 }
 
-- (PDFBorderStyle)style {
-    return style;
-}
-
 - (void)setStyle:(PDFBorderStyle)newStyle {
     if (newStyle != style) {
         style = newStyle;
@@ -536,10 +511,6 @@
     }
 }
 
-- (NSArray *)dashPattern {
-    return dashPattern;
-}
-
 - (void)setDashPattern:(NSArray *)pattern {
     if (NSIsControllerMarker(pattern)) pattern = nil;
     if ([pattern isEqualToArray:dashPattern] == NO && (pattern || 
dashPattern)) {
@@ -549,10 +520,6 @@
     }
 }
 
-- (PDFLineStyle)startLineStyle {
-    return startLineStyle;
-}
-
 - (void)setStartLineStyle:(PDFLineStyle)newStyle {
     if (newStyle != startLineStyle) {
         startLineStyle = newStyle;
@@ -560,10 +527,6 @@
     }
 }
 
-- (PDFLineStyle)endLineStyle {
-    return endLineStyle;
-}
-
 - (void)setEndLineStyle:(PDFLineStyle)newStyle {
     if (newStyle != endLineStyle) {
         endLineStyle = newStyle;

Modified: trunk/SKSecondaryPDFView.h
===================================================================
--- trunk/SKSecondaryPDFView.h  2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKSecondaryPDFView.h  2010-04-05 09:44:26 UTC (rev 6418)
@@ -49,18 +49,13 @@
     CGFloat pinchZoomFactor;
 }
 
-- (PDFView *)synchronizedPDFView;
-- (void)setSynchronizedPDFView:(PDFView *)newSynchronizedPDFView;
+...@property (nonatomic, retain) PDFView *synchronizedPDFView;
+...@property (nonatomic) BOOL synchronizeZoom;
+...@property (nonatomic, retain) NSScrollView *scrollView;
 
-- (BOOL)synchronizeZoom;
-- (void)setSynchronizeZoom:(BOOL)newSync;
-
 - (void)scalePopUpAction:(id)sender;
 - (void)pagePopUpAction:(id)sender;
 
-- (NSScrollView *)scrollView;
-- (void)setScrollerSize:(NSControlSize)controlSize;
-
 - (void)setNeedsDisplayInRect:(NSRect)aRect ofPage:(PDFPage *)page;
 - (void)setNeedsDisplayForAnnotation:(PDFAnnotation *)annotation 
onPage:(PDFPage *)page;
 

Modified: trunk/SKSecondaryPDFView.m
===================================================================
--- trunk/SKSecondaryPDFView.m  2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKSecondaryPDFView.m  2010-04-05 09:44:26 UTC (rev 6418)
@@ -80,6 +80,9 @@
 
 @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};
 
@@ -294,10 +297,6 @@
     [self goToPage:[[self document] pageAtIndex:[sender indexOfSelectedItem]]];
 }
 
-- (PDFView *)synchronizedPDFView {
-    return synchronizedPDFView;
-}
-
 - (void)setSynchronizedPDFView:(PDFView *)newSynchronizedPDFView {
     if (synchronizedPDFView != newSynchronizedPDFView) {
         if ([self synchronizeZoom])
@@ -309,10 +308,6 @@
     }
 }
 
-- (BOOL)synchronizeZoom {
-    return synchronizeZoom;
-}
-
 - (void)setSynchronizeZoom:(BOOL)newSync {
     [self setSynchronizeZoom:newSync adjustPopup:YES];
 }

Modified: trunk/SKSnapshotPDFView.h
===================================================================
--- trunk/SKSnapshotPDFView.h   2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKSnapshotPDFView.h   2010-04-05 09:44:26 UTC (rev 6418)
@@ -48,16 +48,15 @@
     CGFloat pinchZoomFactor;
 }
 
-- (BOOL)autoFits;
-- (void)setAutoFits:(BOOL)newAuto;
+...@property (nonatomic) BOOL autoFits;
 - (void)setAutoFits:(BOOL)newAuto adjustPopup:(BOOL)flag;
 - (void)setScaleFactor:(CGFloat)factor adjustPopup:(BOOL)flag;
 - (void)scalePopUpAction:(id)sender;
-- (NSScrollView *)scrollView;
+...@property (nonatomic, readonly) NSScrollView *scrollView;
 - (void)setScrollerSize:(NSControlSize)controlSize;
 - (void)handlePDFViewFrameChangedNotification:(NSNotification *)notification;
 - (void)resetAutoFitRectIfNeeded;
 - (void)makeScalePopUpButton;
-- (NSPopUpButton *)scalePopUpButton;
+...@property (nonatomic, readonly) NSPopUpButton *scalePopUpButton;
 
 @end

Modified: trunk/SKSnapshotPDFView.m
===================================================================
--- trunk/SKSnapshotPDFView.m   2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKSnapshotPDFView.m   2010-04-05 09:44:26 UTC (rev 6418)
@@ -50,6 +50,9 @@
 
 @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};
 
@@ -165,10 +168,6 @@
     }
 }
 
-- (NSPopUpButton *)scalePopUpButton {
-    return scalePopUpButton;
-}
-
 - (void)handlePDFViewFrameChangedNotification:(NSNotification *)notification {
     if ([self autoFits]) {
         NSView *clipView = [[[self documentView] enclosingScrollView] 
contentView];
@@ -198,10 +197,6 @@
         [self setAutoFits:YES adjustPopup:NO];
 }
 
-- (BOOL)autoFits {
-    return autoFits;
-}
-
 - (void)setAutoFits:(BOOL)newAuto {
     [self setAutoFits:newAuto adjustPopup:YES];
 }

Modified: trunk/SKStatusBar.h
===================================================================
--- trunk/SKStatusBar.h 2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKStatusBar.h 2010-04-05 09:44:26 UTC (rev 6418)
@@ -56,55 +56,22 @@
     BOOL animating;
 }
 
+...@property (nonatomic, readonly) BOOL isVisible;
+...@property (nonatomic, readonly, getter=isAnimating) BOOL animating;
+...@property (nonatomic, copy) NSString *leftStringValue;
+...@property (nonatomic, copy) NSAttributedString *leftAttributedStringValue;
+...@property (nonatomic, copy) NSString *rightStringValue;
+...@property (nonatomic, copy) NSAttributedString *rightAttributedStringValue;
+...@property (nonatomic) SEL leftAction, rightAction;
+...@property (nonatomic, assign) id leftTarget, rightTarget;
+...@property (nonatomic) NSInteger leftState, rightState, state;
+...@property (nonatomic, retain) NSFont *font; 
+...@property (nonatomic, retain) id iconCell; 
+...@property (nonatomic, readonly) NSProgressIndicator *progressIndicator;
+...@property (nonatomic) SKProgressIndicatorStyle progressIndicatorStyle;
+
 - (void)toggleBelowView:(NSView *)view animate:(BOOL)animate;
 
-- (BOOL)isVisible;
-- (BOOL)isAnimating;
-
-- (NSString *)leftStringValue;
-- (void)setLeftStringValue:(NSString *)aString;
-
-- (NSAttributedString *)leftAttributedStringValue;
-- (void)setLeftAttributedStringValue:(NSAttributedString *)object;
-
-- (NSString *)rightStringValue;
-- (void)setRightStringValue:(NSString *)aString;
-
-- (NSAttributedString *)rightAttributedStringValue;
-- (void)setRightAttributedStringValue:(NSAttributedString *)object;
-
-- (SEL)leftAction;
-- (void)setLeftAction:(SEL)selector;
-
-- (id)leftTarget;
-- (void)setLeftTarget:(id)newTarget;
-
-- (SEL)rightAction;
-- (void)setRightAction:(SEL)selector;
-
-- (id)rightTarget;
-- (void)setRightTarget:(id)newTarget;
-
-- (NSInteger)leftState;
-- (void)setLeftState:(NSInteger)newState;
-
-- (NSInteger)rightState;
-- (void)setRightState:(NSInteger)newState;
-
-- (NSInteger)state;
-- (void)setState:(NSInteger)newState;
-
-- (NSFont *)font;
-- (void)setFont:(NSFont *)fontObject;
-
-- (id)iconCell;
-- (void)setIconCell:(id)newIconCell;
-
-- (NSProgressIndicator *)progressIndicator;
-
-- (SKProgressIndicatorStyle)progressIndicatorStyle;
-- (void)setProgressIndicatorStyle:(SKProgressIndicatorStyle)style;
-
 - (void)startAnimation:(id)sender;
 - (void)stopAnimation:(id)sender;
 

Modified: trunk/SKStatusBar.m
===================================================================
--- trunk/SKStatusBar.m 2010-04-05 08:56:26 UTC (rev 6417)
+++ trunk/SKStatusBar.m 2010-04-05 09:44:26 UTC (rev 6418)
@@ -58,6 +58,9 @@
 
 @implementation SKStatusBar
 
+...@synthesize animating, iconCell;
+...@dynamic isVisible, leftStringValue, leftAttributedStringValue, 
rightStringValue, rightAttributedStringValue, leftAction, leftTarget, 
rightAction, rightTarget, leftState, rightState, state, font, 
progressIndicator, progressIndicatorStyle;
+
 - (id)initWithFrame:(NSRect)frame {
     self = [super initWithFrame:frame];
     if (self) {
@@ -143,10 +146,6 @@
        return [self superview] && [self isHidden] == NO;
 }
 
-- (BOOL)isAnimating {
-    return animating;
-}
-
 - (void)endAnimation:(NSNumber *)visible {
     if ([visible boolValue] == NO) {
         [[self window] setContentBorderThickness:0.0 forEdge:NSMinYEdge];
@@ -360,10 +359,6 @@
     [self setRightState:newState];
 }
 
-- (id)iconCell {
-    return iconCell;
-}
-
 - (void)setIconCell:(id)newIconCell {
     if (iconCell != newIconCell) {
         [iconCell release];


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

------------------------------------------------------------------------------
Download Intel® 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