├── Playground
├── Playground
│ ├── en.lproj
│ │ ├── InfoPlist.strings
│ │ └── Credits.rtf
│ ├── Playground-Prefix.pch
│ ├── main.m
│ ├── Playground.xcdatamodeld
│ │ ├── .xccurrentversion
│ │ └── Playground.xcdatamodel
│ │ │ └── contents
│ ├── DJAppDelegate.h
│ ├── DJMainWindowController.h
│ ├── Images.xcassets
│ │ └── AppIcon.appiconset
│ │ │ └── Contents.json
│ ├── Playground-Info.plist
│ ├── DJMainWindowController.m
│ ├── DJAppDelegate.m
│ └── Base.lproj
│ │ └── MainMenu.xib
└── Playground.xcodeproj
│ ├── xcuserdata
│ └── danielmj.xcuserdatad
│ │ ├── xcdebugger
│ │ └── Breakpoints_v2.xcbkptlist
│ │ └── xcschemes
│ │ ├── xcschememanagement.plist
│ │ └── Playground.xcscheme
│ ├── project.xcworkspace
│ ├── contents.xcworkspacedata
│ ├── xcuserdata
│ │ └── danielmj.xcuserdatad
│ │ │ └── UserInterfaceState.xcuserstate
│ └── xcshareddata
│ │ └── Playground.xccheckout
│ └── project.pbxproj
├── .gitignore
├── DJProgressHUD
├── DJBezierPath.h
├── DJActivityIndicator.h
├── DJProgressIndicator.h
├── DJProgressHUD.h
├── DJBezierPath.m
├── DJActivityIndicator.m
├── DJProgressIndicator.m
└── DJProgressHUD.m
├── README.md
└── LICENSE.txt
/Playground/Playground/en.lproj/InfoPlist.strings:
--------------------------------------------------------------------------------
1 | /* Localized versions of Info.plist keys */
2 |
3 |
--------------------------------------------------------------------------------
/Playground/Playground.xcodeproj/xcuserdata/danielmj.xcuserdatad/xcdebugger/Breakpoints_v2.xcbkptlist:
--------------------------------------------------------------------------------
1 |
2 |
5 |
6 |
--------------------------------------------------------------------------------
/Playground/Playground.xcodeproj/project.xcworkspace/contents.xcworkspacedata:
--------------------------------------------------------------------------------
1 |
2 |
4 |
6 |
7 |
8 |
--------------------------------------------------------------------------------
/Playground/Playground/Playground-Prefix.pch:
--------------------------------------------------------------------------------
1 | //
2 | // Prefix header
3 | //
4 | // The contents of this file are implicitly included at the beginning of every source file.
5 | //
6 |
7 | #ifdef __OBJC__
8 | #import
9 | #endif
10 |
--------------------------------------------------------------------------------
/Playground/Playground.xcodeproj/project.xcworkspace/xcuserdata/danielmj.xcuserdatad/UserInterfaceState.xcuserstate:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/v2-labs-frameworks/DJProgressHUD_OSX/HEAD/Playground/Playground.xcodeproj/project.xcworkspace/xcuserdata/danielmj.xcuserdatad/UserInterfaceState.xcuserstate
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # CocoaPods
2 | #
3 | # We recommend against adding the Pods directory to your .gitignore. However
4 | # you should judge for yourself, the pros and cons are mentioned at:
5 | # http://guides.cocoapods.org/using/using-cocoapods.html#should-i-ignore-the-pods-directory-in-source-control?
6 | #
7 | # Pods/
8 |
9 |
--------------------------------------------------------------------------------
/Playground/Playground/main.m:
--------------------------------------------------------------------------------
1 | //
2 | // main.m
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | int main(int argc, const char * argv[])
12 | {
13 | return NSApplicationMain(argc, argv);
14 | }
15 |
--------------------------------------------------------------------------------
/DJProgressHUD/DJBezierPath.h:
--------------------------------------------------------------------------------
1 | //
2 | // CPBezierPath.h
3 | // Cloud Play OSX
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DJBezierPath : NSBezierPath
12 |
13 | - (CGPathRef)quartzPath;
14 |
15 | @end
16 |
--------------------------------------------------------------------------------
/Playground/Playground/Playground.xcdatamodeld/.xccurrentversion:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | _XCCurrentVersionName
6 | Playground.xcdatamodel
7 |
8 |
9 |
--------------------------------------------------------------------------------
/Playground/Playground/Playground.xcdatamodeld/Playground.xcdatamodel/contents:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
--------------------------------------------------------------------------------
/DJProgressHUD/DJActivityIndicator.h:
--------------------------------------------------------------------------------
1 | //
2 | // DJProgressIndicator.h
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DJActivityIndicator : NSView
12 |
13 | @property BOOL isAnimating;
14 |
15 | - (void)setColor:(NSColor *)value;
16 | - (void)setBackgroundColor:(NSColor *)value;
17 |
18 | - (void)stopAnimation:(id)sender;
19 | - (void)startAnimation:(id)sender;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Playground/Playground/en.lproj/Credits.rtf:
--------------------------------------------------------------------------------
1 | {\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
2 | {\colortbl;\red255\green255\blue255;}
3 | \paperw9840\paperh8400
4 | \pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
5 |
6 | \f0\b\fs24 \cf0 Engineering:
7 | \b0 \
8 | Some people\
9 | \
10 |
11 | \b Human Interface Design:
12 | \b0 \
13 | Some other people\
14 | \
15 |
16 | \b Testing:
17 | \b0 \
18 | Hopefully not nobody\
19 | \
20 |
21 | \b Documentation:
22 | \b0 \
23 | Whoever\
24 | \
25 |
26 | \b With special thanks to:
27 | \b0 \
28 | Mom\
29 | }
30 |
--------------------------------------------------------------------------------
/Playground/Playground/DJAppDelegate.h:
--------------------------------------------------------------------------------
1 | //
2 | // DJAppDelegate.h
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @interface DJAppDelegate : NSObject
12 |
13 | @property (assign) IBOutlet NSWindow *window;
14 |
15 | @property (readonly, strong, nonatomic) NSPersistentStoreCoordinator *persistentStoreCoordinator;
16 | @property (readonly, strong, nonatomic) NSManagedObjectModel *managedObjectModel;
17 | @property (readonly, strong, nonatomic) NSManagedObjectContext *managedObjectContext;
18 |
19 | - (IBAction)saveAction:(id)sender;
20 |
21 | @end
22 |
--------------------------------------------------------------------------------
/Playground/Playground.xcodeproj/xcuserdata/danielmj.xcuserdatad/xcschemes/xcschememanagement.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | SchemeUserState
6 |
7 | Playground.xcscheme
8 |
9 | orderHint
10 | 0
11 |
12 |
13 | SuppressBuildableAutocreation
14 |
15 | 2E8EEBD11920477B00B57C2B
16 |
17 | primary
18 |
19 |
20 | 2E8EEBF51920477B00B57C2B
21 |
22 | primary
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/DJProgressHUD/DJProgressIndicator.h:
--------------------------------------------------------------------------------
1 | //
2 | // DJProgressIndicator.h
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | @interface DJProgressIndicator : NSView
13 |
14 | @property (nonatomic,readonly) CGFloat currentProgress;
15 |
16 | - (void)setBackgroundColor:(NSColor *)value;
17 | - (void)setRingColor:(NSColor *)value backgroundRingColor:(NSColor*)value2;
18 | - (void)setRingThickness:(CGFloat)thick;
19 | - (void)setRingRadius:(CGFloat)radius;
20 |
21 | - (void)showProgress:(float)progress;
22 |
23 | -(void)sizeToFit;
24 |
25 | -(void)clear;
26 |
27 | @property (nonatomic, readonly) CGFloat ringRadius;
28 | @property (nonatomic, readonly) CGFloat ringThickness;
29 |
30 | @end
31 |
--------------------------------------------------------------------------------
/Playground/Playground/DJMainWindowController.h:
--------------------------------------------------------------------------------
1 | //
2 | // DJMainWindowController.h
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import
10 |
11 | @class DJActivityIndicator, DJProgressIndicator;
12 |
13 | @interface DJMainWindowController : NSObject
14 | {
15 | IBOutlet DJActivityIndicator* activity;
16 | IBOutlet DJProgressIndicator* progress;
17 | }
18 |
19 | @property (nonatomic) IBOutlet NSView* view;
20 | @property (nonatomic) IBOutlet NSWindow* window;
21 |
22 | #pragma mark Activity Actions
23 |
24 | - (IBAction)toggleActivityColors:(id)sender;
25 |
26 | - (IBAction)start:(id)sender;
27 | - (IBAction)stop:(id)sender;
28 | - (IBAction)progress:(id)sender;
29 |
30 | - (IBAction)activityPopup:(id)sender;
31 |
32 | #pragma mark Progress Actions
33 |
34 | - (IBAction)toggleRingColors:(id)sender;
35 |
36 | - (IBAction)growRing:(id)sender;
37 | - (IBAction)shrinkRing:(id)sender;
38 |
39 | - (IBAction)growRadius:(id)sender;
40 | - (IBAction)shrinkRadius:(id)sender;
41 |
42 | - (IBAction)progressPopup:(id)sender;
43 |
44 |
45 | @end
46 |
--------------------------------------------------------------------------------
/Playground/Playground/Images.xcassets/AppIcon.appiconset/Contents.json:
--------------------------------------------------------------------------------
1 | {
2 | "images" : [
3 | {
4 | "idiom" : "mac",
5 | "size" : "16x16",
6 | "scale" : "1x"
7 | },
8 | {
9 | "idiom" : "mac",
10 | "size" : "16x16",
11 | "scale" : "2x"
12 | },
13 | {
14 | "idiom" : "mac",
15 | "size" : "32x32",
16 | "scale" : "1x"
17 | },
18 | {
19 | "idiom" : "mac",
20 | "size" : "32x32",
21 | "scale" : "2x"
22 | },
23 | {
24 | "idiom" : "mac",
25 | "size" : "128x128",
26 | "scale" : "1x"
27 | },
28 | {
29 | "idiom" : "mac",
30 | "size" : "128x128",
31 | "scale" : "2x"
32 | },
33 | {
34 | "idiom" : "mac",
35 | "size" : "256x256",
36 | "scale" : "1x"
37 | },
38 | {
39 | "idiom" : "mac",
40 | "size" : "256x256",
41 | "scale" : "2x"
42 | },
43 | {
44 | "idiom" : "mac",
45 | "size" : "512x512",
46 | "scale" : "1x"
47 | },
48 | {
49 | "idiom" : "mac",
50 | "size" : "512x512",
51 | "scale" : "2x"
52 | }
53 | ],
54 | "info" : {
55 | "version" : 1,
56 | "author" : "xcode"
57 | }
58 | }
--------------------------------------------------------------------------------
/Playground/Playground/Playground-Info.plist:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | CFBundleDevelopmentRegion
6 | en
7 | CFBundleExecutable
8 | ${EXECUTABLE_NAME}
9 | CFBundleIconFile
10 |
11 | CFBundleIdentifier
12 | com.DanielJackson.playground.${PRODUCT_NAME:rfc1034identifier}
13 | CFBundleInfoDictionaryVersion
14 | 6.0
15 | CFBundleName
16 | ${PRODUCT_NAME}
17 | CFBundlePackageType
18 | APPL
19 | CFBundleShortVersionString
20 | 1.0
21 | CFBundleSignature
22 | ????
23 | CFBundleVersion
24 | 1
25 | LSMinimumSystemVersion
26 | ${MACOSX_DEPLOYMENT_TARGET}
27 | NSHumanReadableCopyright
28 | Copyright © 2014 Daniel Jackson. All rights reserved.
29 | NSMainNibFile
30 | MainMenu
31 | NSPrincipalClass
32 | NSApplication
33 |
34 |
35 |
--------------------------------------------------------------------------------
/Playground/Playground.xcodeproj/project.xcworkspace/xcshareddata/Playground.xccheckout:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | IDESourceControlProjectFavoriteDictionaryKey
6 |
7 | IDESourceControlProjectIdentifier
8 | 1EC42D2D-2365-4689-8791-79DBC8A90388
9 | IDESourceControlProjectName
10 | Playground
11 | IDESourceControlProjectOriginsDictionary
12 |
13 | F07925B3-40D3-4B4A-9AB5-FD6BD28584EA
14 | https://github.com/danielmj/DJProgressHUD_OSX.git
15 |
16 | IDESourceControlProjectPath
17 | Playground/Playground.xcodeproj/project.xcworkspace
18 | IDESourceControlProjectRelativeInstallPathDictionary
19 |
20 | F07925B3-40D3-4B4A-9AB5-FD6BD28584EA
21 | ../../..
22 |
23 | IDESourceControlProjectURL
24 | https://github.com/danielmj/DJProgressHUD_OSX.git
25 | IDESourceControlProjectVersion
26 | 110
27 | IDESourceControlProjectWCCIdentifier
28 | F07925B3-40D3-4B4A-9AB5-FD6BD28584EA
29 | IDESourceControlProjectWCConfigurations
30 |
31 |
32 | IDESourceControlRepositoryExtensionIdentifierKey
33 | public.vcs.git
34 | IDESourceControlWCCIdentifierKey
35 | F07925B3-40D3-4B4A-9AB5-FD6BD28584EA
36 | IDESourceControlWCCName
37 | DJProgressHUD_osx
38 |
39 |
40 |
41 |
42 |
--------------------------------------------------------------------------------
/DJProgressHUD/DJProgressHUD.h:
--------------------------------------------------------------------------------
1 | //
2 | // CPProgressView.h
3 | // Cloud Play OSX
4 | //
5 | // Created by Daniel Jackson on 4/22/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import
10 | #import
11 |
12 | /*#define popupWidth 120
13 | #define popupHeight 120
14 |
15 | #define popupAlpha 0.9
16 |
17 | #define xOffset 0
18 | #define yOffset 0
19 |
20 | #define indicatorSize 40*/
21 |
22 | @class DJProgressIndicator;
23 | @class DJActivityIndicator;
24 |
25 | @interface DJProgressHUD : NSView
26 |
27 | + (void)setBackgroundAlpha:(CGFloat)bgAlph disableActions:(BOOL)disActions;
28 |
29 | + (void)showStatus:(NSString*)status FromView:(NSView*)view;
30 | + (void)showProgress:(CGFloat)progress withStatus:(NSString*)status FromView:(NSView*)view;
31 |
32 | + (void)dismiss;
33 |
34 | //+ (void)popActivity;
35 | @property (nonatomic) BOOL keepActivityCount;
36 |
37 | @property (nonatomic, readonly) BOOL animatingDismiss;
38 | @property (nonatomic, readonly) BOOL animatingShow;
39 | @property (nonatomic, readonly) BOOL displaying;
40 | @property (nonatomic, readonly) NSUInteger activityCount;
41 |
42 | /*
43 | -----Customization----
44 |
45 | Make all changes to [CPProgressView instance]
46 | Prior to showing popup, call -(void)orientPopup
47 | */
48 |
49 | #define pMaxWidth1 250
50 | #define pMaxHeight1 200
51 |
52 |
53 |
54 | //General Popup Values
55 | @property (nonatomic) CGVector pOffset;
56 | @property (nonatomic) CGFloat pAlpha;
57 |
58 | //Padding
59 | @property (nonatomic) CGFloat pPadding;
60 |
61 | @property (nonatomic) CGSize indicatorSize;
62 | @property (nonatomic) CGVector indicatorOffset;
63 | @property (nonatomic) CGSize labelSize;
64 | @property (nonatomic) CGVector labelOffset;
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/DJProgressHUD/DJBezierPath.m:
--------------------------------------------------------------------------------
1 | //
2 | // CPBezierPath.m
3 | // Cloud Play OSX
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import "DJBezierPath.h"
10 |
11 | @implementation DJBezierPath
12 |
13 | - (CGPathRef)quartzPath
14 | {
15 | int i, numElements;
16 |
17 | // Need to begin a path here.
18 | CGPathRef immutablePath = NULL;
19 |
20 | // Then draw the path elements.
21 | numElements = (int)[self elementCount];
22 | if (numElements > 0)
23 | {
24 | CGMutablePathRef path = CGPathCreateMutable();
25 | NSPoint points[3];
26 | BOOL didClosePath = YES;
27 |
28 | for (i = 0; i < numElements; i++)
29 | {
30 | switch ([self elementAtIndex:i associatedPoints:points])
31 | {
32 | case NSMoveToBezierPathElement:
33 | CGPathMoveToPoint(path, NULL, points[0].x, points[0].y);
34 | break;
35 |
36 | case NSLineToBezierPathElement:
37 | CGPathAddLineToPoint(path, NULL, points[0].x, points[0].y);
38 | didClosePath = NO;
39 | break;
40 |
41 | case NSCurveToBezierPathElement:
42 | CGPathAddCurveToPoint(path, NULL, points[0].x, points[0].y,
43 | points[1].x, points[1].y,
44 | points[2].x, points[2].y);
45 | didClosePath = NO;
46 | break;
47 |
48 | case NSClosePathBezierPathElement:
49 | CGPathCloseSubpath(path);
50 | didClosePath = YES;
51 | break;
52 | }
53 | }
54 |
55 | // Be sure the path is closed or Quartz may not do valid hit detection.
56 | if (!didClosePath)
57 | CGPathCloseSubpath(path);
58 |
59 | immutablePath = CGPathCreateCopy(path);
60 | CGPathRelease(path);
61 | }
62 |
63 | return immutablePath;
64 | }
65 |
66 | @end
67 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | DJProgressHUD
2 | =================
3 |
4 | Progress and Activity HUD for OSX.
5 |
6 | I am really excited to introduce this ProgressHUD for osx. When I started my first osx app, I noticed that there was not good alternative to SVProgressHUD for the mac. Because this is a such a great tool for displaying a process, I decided to write it for the mac.
7 |
8 | Please let me know if you find this helpfull!
9 |
10 | 
11 |
12 | ##Setup
13 | 1. Add DJProgressHUD to your application directory
14 | 2. Ensure ARC is enabled on the project
15 | 3. Import the control you want to use
16 | 4. Refer to the samples below for possible display options
17 |
18 | ##Whats included:
19 | - DJProgressHUD: A class to show a popup view to the user displaying the current progress or an activity indicator.
20 | - DJActivityIndicator: A customizable activity indicator. The mac's version, NSProgressIndicator, just doesn't cut it.
21 | - DJProgressIndicator: A customizable circular progress view. Change the thickness, radius, size and color. I couldnt find one for the mac. So again, I made one.
22 |
23 | ##Code Sample
24 |
25 | Simple Progress - uses progress indicator
26 |
27 | CGFloat currentProgress = 0.33;
28 | [DJProgressHUD showProgress:currentProgress withStatus:@"The Progress!" FromView:self.view];
29 | ...
30 | [DJProgressHUD dismiss];
31 |
32 | Simple Status - uses activity indicator
33 |
34 | [DJProgressHUD showStatus:@"INDICATOR" FromView:self.view];
35 | ...
36 | [DJProgressHUD dismiss];
37 |
38 | Progress Indicator - Customizing
39 |
40 | DJProgressIndicator* progress = [[DJProgressIndicator alloc] initWithFrame: ... ];
41 | [progress setRingThickness:8];
42 | [progress setRingRadius:15];
43 | [progress setBackgroundColor:[NSColor clearColor]];
44 | [progress setRingColor:[NSColor whiteColor] backgroundRingColor:[NSColor darkGrayColor]];
45 | [self.view addSubview:progress];
46 | [progress showProgress: 0.33 ];
47 |
--------------------------------------------------------------------------------
/Playground/Playground/DJMainWindowController.m:
--------------------------------------------------------------------------------
1 | //
2 | // DJMainWindowController.m
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import "DJMainWindowController.h"
10 | #import "DJActivityIndicator.h"
11 | #import "DJProgressIndicator.h"
12 | #import "DJProgressHUD.h"
13 |
14 | @interface DJMainWindowController ()
15 |
16 | @end
17 |
18 | @implementation DJMainWindowController
19 |
20 | - (void)awakeFromNib
21 | {
22 | [super awakeFromNib];
23 | }
24 |
25 | -(void)dealloc
26 | {
27 | NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
28 | [center removeObserver:self];
29 |
30 | //[super dealloc];
31 | }
32 |
33 | - (IBAction)start:(id)sender
34 | {
35 | [activity startAnimation:nil];
36 | }
37 |
38 | - (IBAction)stop:(id)sender
39 | {
40 | [activity stopAnimation:nil];
41 | }
42 |
43 | - (IBAction)progress:(id)sender
44 | {
45 | static CGFloat newProgress = 0;
46 | newProgress = (progress.currentProgress+0.25) > 1 ? 0 : progress.currentProgress+0.25;
47 |
48 | [progress showProgress:newProgress];
49 | }
50 |
51 | - (IBAction)growRing:(id)sender
52 | {
53 | [progress setRingThickness:progress.ringThickness+5];
54 | }
55 |
56 | - (IBAction)shrinkRing:(id)sender
57 | {
58 | [progress setRingThickness:progress.ringThickness-5];
59 |
60 | }
61 |
62 | - (IBAction)growRadius:(id)sender
63 | {
64 | [progress setRingRadius:progress.ringRadius+5];
65 | }
66 |
67 | - (IBAction)shrinkRadius:(id)sender
68 | {
69 | [progress setRingRadius:progress.ringRadius-5];
70 | }
71 |
72 | -(IBAction)toggleRingColors:(id)sender
73 | {
74 | static bool toggle = true;
75 |
76 | if(toggle) {
77 | [progress setBackgroundColor:[NSColor lightGrayColor]];
78 | [progress setRingColor:[NSColor orangeColor] backgroundRingColor:[NSColor blueColor]];
79 | }
80 | else {
81 | [progress setBackgroundColor:[NSColor clearColor]];
82 | [progress setRingColor:[NSColor whiteColor] backgroundRingColor:[NSColor darkGrayColor]];
83 | }
84 |
85 | toggle = !toggle;
86 | }
87 |
88 | - (IBAction)toggleActivityColors:(id)sender
89 | {
90 | static bool toggle = true;
91 |
92 | if(toggle) {
93 | [activity setBackgroundColor:[NSColor lightGrayColor]];
94 | [activity setColor:[NSColor blueColor]];
95 | }
96 | else {
97 | [activity setBackgroundColor:[NSColor clearColor]];
98 | [activity setColor:[NSColor blackColor]];
99 | }
100 |
101 | toggle = !toggle;
102 | }
103 |
104 | NSTimer* timer;
105 |
106 | - (IBAction)activityPopup:(id)sender
107 | {
108 | [DJProgressHUD showStatus:@"INDICATOR" FromView:self.view];
109 |
110 | [timer invalidate];
111 | timer = nil;
112 |
113 | [NSTimer scheduledTimerWithTimeInterval:5 target:self selector:@selector(dismissProgressView) userInfo:nil repeats:NO];
114 | }
115 |
116 | - (void)dismissProgressView
117 | {
118 | [DJProgressHUD dismiss];
119 |
120 | [timer invalidate];
121 | timer = nil;
122 | }
123 |
124 | - (IBAction)progressPopup:(id)sender
125 | {
126 | [DJProgressHUD showProgress:0 withStatus:@"The Progress!" FromView:self.view];
127 |
128 | [timer invalidate];
129 | timer = nil;
130 |
131 | timer = [NSTimer scheduledTimerWithTimeInterval:1 target:self selector:@selector(continueProgress) userInfo:nil repeats:YES];
132 | }
133 |
134 | - (void)continueProgress
135 | {
136 | static float prog = 0;
137 |
138 |
139 | prog += 0.334;
140 |
141 | if(prog > 1.1) {
142 | [DJProgressHUD dismiss];
143 | prog = 0;
144 | [timer invalidate];
145 | timer = nil;
146 | }
147 | else {
148 | [DJProgressHUD showProgress:prog withStatus:@"The Progress!" FromView:self.view];
149 | }
150 |
151 | }
152 |
153 | @end
154 |
--------------------------------------------------------------------------------
/Playground/Playground.xcodeproj/xcuserdata/danielmj.xcuserdatad/xcschemes/Playground.xcscheme:
--------------------------------------------------------------------------------
1 |
2 |
5 |
8 |
9 |
15 |
21 |
22 |
23 |
24 |
25 |
30 |
31 |
33 |
39 |
40 |
41 |
42 |
43 |
49 |
50 |
51 |
52 |
61 |
62 |
68 |
69 |
70 |
71 |
72 |
73 |
79 |
80 |
86 |
87 |
88 |
89 |
91 |
92 |
95 |
96 |
97 |
--------------------------------------------------------------------------------
/DJProgressHUD/DJActivityIndicator.m:
--------------------------------------------------------------------------------
1 | //
2 | // DJProgressIndicator.m
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import "DJActivityIndicator.h"
10 |
11 | #define kAlphaWhenStopped 0.15
12 | #define kFadeMultiplier 0.85
13 |
14 | @interface DJActivityIndicator ()
15 | {
16 | int position;
17 | NSMutableArray* finColors;
18 |
19 | BOOL isFadingOut;
20 | NSTimer* animationTimer;
21 |
22 | NSColor* foreColor;
23 | NSColor* backColor;
24 | }
25 | @end
26 |
27 | @implementation DJActivityIndicator
28 |
29 | - (id)initWithFrame:(NSRect)frame
30 | {
31 | self = [super initWithFrame:frame];
32 | if (self) {
33 | position = 0;
34 | int numFins = 12;
35 |
36 | finColors = [[NSMutableArray alloc] initWithCapacity:numFins];
37 |
38 | _isAnimating = NO;
39 | isFadingOut = NO;
40 |
41 | foreColor = [NSColor blackColor];
42 | backColor = [NSColor clearColor];
43 |
44 | for(int i=0; i= size.height)
59 | theMaxSize = size.height;
60 | else
61 | theMaxSize = size.width;
62 |
63 | [backColor set];
64 | [NSBezierPath fillRect:[self bounds]];
65 |
66 | CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
67 | [NSGraphicsContext saveGraphicsState];
68 |
69 | CGContextTranslateCTM(currentContext,[self bounds].size.width/2,[self bounds].size.height/2);
70 |
71 | NSBezierPath *path = [[NSBezierPath alloc] init];
72 | CGFloat lineWidth = 0.0859375 * theMaxSize;
73 | CGFloat lineStart = 0.234375 * theMaxSize;
74 | CGFloat lineEnd = 0.421875 * theMaxSize;
75 | [path setLineWidth:lineWidth];
76 | [path setLineCapStyle:NSRoundLineCapStyle];
77 | [path moveToPoint:NSMakePoint(0,lineStart)];
78 | [path lineToPoint:NSMakePoint(0,lineEnd)];
79 |
80 | for (int i=0; i 0) {
136 | position--;
137 | }
138 | else {
139 | position = (int)finColors.count - 1;
140 | }
141 |
142 | CGFloat minAlpha = kAlphaWhenStopped;
143 | for (int i=0; i 0.01) {
155 | done = NO;
156 | break;
157 | }
158 | }
159 | if (done) {
160 | [self actuallyStopAnimation];
161 | }
162 | }
163 | else {
164 | finColors[position] = foreColor;
165 | }
166 |
167 | [self setNeedsDisplay:YES];
168 |
169 |
170 | }
171 |
172 | - (void)actuallyStartAnimation
173 | {
174 | [self actuallyStopAnimation];
175 |
176 | _isAnimating = YES;
177 | isFadingOut = NO;
178 |
179 | position = 1;
180 |
181 | animationTimer = [NSTimer timerWithTimeInterval:(NSTimeInterval)0.05
182 | target:self
183 | selector:@selector(updateFrame:)
184 | userInfo:nil
185 | repeats:YES];
186 |
187 | [[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSRunLoopCommonModes];
188 | [[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSDefaultRunLoopMode];
189 | [[NSRunLoop currentRunLoop] addTimer:animationTimer forMode:NSEventTrackingRunLoopMode];
190 | }
191 |
192 | - (void)actuallyStopAnimation
193 | {
194 | _isAnimating = NO;
195 | isFadingOut = NO;
196 |
197 | if (animationTimer) {
198 | // we were using timer-based animation
199 | [animationTimer invalidate];
200 | animationTimer = nil;
201 | }
202 | //[self setNeedsDisplay:YES];
203 | }
204 |
205 |
206 |
207 |
208 | @end
209 |
--------------------------------------------------------------------------------
/DJProgressHUD/DJProgressIndicator.m:
--------------------------------------------------------------------------------
1 | //
2 | // DJProgressIndicator.m
3 | // Playground
4 | //
5 | // Created by Daniel Jackson on 5/11/14.
6 | // Copyright (c) 2014 Daniel Jackson. All rights reserved.
7 | //
8 |
9 | #import "DJProgressIndicator.h"
10 | #import "DJBezierPath.h"
11 |
12 | @interface DJProgressIndicator ()
13 | {
14 | NSColor* backRingColor;
15 | NSColor* ringColor;
16 | NSColor* backColor;
17 | }
18 |
19 | @property (nonatomic, strong) CAShapeLayer *backgroundRingLayer;
20 | @property (nonatomic, strong) CAShapeLayer *ringLayer;
21 |
22 | @end
23 |
24 | @implementation DJProgressIndicator
25 |
26 | - (id)initWithFrame:(NSRect)frame
27 | {
28 | self = [super initWithFrame:frame];
29 | if (self) {
30 | _currentProgress = 0;
31 |
32 | _ringThickness = 6;
33 | _ringRadius = self.frame.size.width/2 - (_ringThickness);
34 |
35 | backRingColor = [NSColor darkGrayColor];
36 | ringColor = [NSColor whiteColor];
37 | backColor = [NSColor clearColor];
38 |
39 | [self setAutoresizesSubviews:YES];
40 |
41 | }
42 | return self;
43 | }
44 |
45 | - (void)drawRect:(NSRect)dirtyRect
46 | {
47 | [super drawRect:dirtyRect];
48 |
49 | //NSLog(@"Drawing");
50 |
51 | [self setBackground];
52 |
53 | [self resetRings];
54 | }
55 |
56 | - (void)setBackground
57 | {
58 | if(![self wantsLayer])
59 | {
60 | CALayer* bgLayer = [CALayer layer];
61 | [bgLayer setBackgroundColor:backColor.CGColor];
62 | [self setWantsLayer:TRUE];
63 | [self setLayer:bgLayer];
64 | }
65 | else {
66 | [self.layer setBackgroundColor:backColor.CGColor];
67 | }
68 | }
69 |
70 | - (void)resetRings
71 | {
72 | [_ringLayer removeFromSuperlayer];
73 | _ringLayer = nil;
74 | [_backgroundRingLayer removeFromSuperlayer];
75 | _backgroundRingLayer = nil;
76 |
77 | [self updateLayout];
78 | self.ringLayer.strokeEnd = _currentProgress;
79 | }
80 |
81 | -(void)updateLayout
82 | {
83 | self.backgroundRingLayer.position = self.ringLayer.position = CGPointMake((CGRectGetWidth(self.bounds)/2), CGRectGetHeight(self.bounds)/2);
84 | }
85 |
86 | - (void)showProgress:(float)progress {
87 |
88 | NSLog(@"-----%f",progress);
89 |
90 | _currentProgress = progress;
91 |
92 | [self updateLayout];
93 |
94 | if(progress >= 0) {
95 | self.ringLayer.strokeEnd = progress;
96 | }
97 | else {
98 | [self cancelRingLayerAnimation];
99 | }
100 |
101 | //[self setNeedsDisplay:TRUE];
102 | }
103 |
104 | - (CAShapeLayer *)ringLayer {
105 | if(!_ringLayer) {
106 | CGPoint center = CGPointMake(CGRectGetWidth(self.frame)/2, CGRectGetHeight(self.frame)/2);
107 | _ringLayer = [self createRingLayerWithCenter:center radius:_ringRadius lineWidth:_ringThickness color:ringColor];
108 | [self.layer addSublayer:_ringLayer];
109 | }
110 | return _ringLayer;
111 | }
112 |
113 | - (CAShapeLayer *)backgroundRingLayer {
114 | if(!_backgroundRingLayer) {
115 | CGPoint center = CGPointMake(CGRectGetWidth(self.frame)/2, CGRectGetHeight(self.frame)/2);
116 | _backgroundRingLayer = [self createRingLayerWithCenter:center radius:_ringRadius lineWidth:_ringThickness color:backRingColor];
117 | _backgroundRingLayer.strokeEnd = 1;
118 | [self.layer addSublayer:_backgroundRingLayer];
119 | }
120 | return _backgroundRingLayer;
121 | }
122 |
123 | - (void)cancelRingLayerAnimation {
124 | [CATransaction begin];
125 | [CATransaction setDisableActions:YES];
126 | [self.layer removeAllAnimations];
127 |
128 | _ringLayer.strokeEnd = 0.0f;
129 | if (_ringLayer.superlayer) {
130 | [_ringLayer removeFromSuperlayer];
131 | }
132 | _ringLayer = nil;
133 |
134 | if (_backgroundRingLayer.superlayer) {
135 | [_backgroundRingLayer removeFromSuperlayer];
136 | }
137 | _backgroundRingLayer = nil;
138 |
139 | [CATransaction commit];
140 | }
141 |
142 | -(void)clear
143 | {
144 | [self cancelRingLayerAnimation];
145 | }
146 |
147 | - (CGPoint)pointOnCircleWithCenter:(CGPoint)center radius:(double)radius angleInDegrees:(double)angleInDegrees {
148 | float x = (float)(radius * cos(angleInDegrees * M_PI / 180)) + radius;
149 | float y = (float)(radius * sin(angleInDegrees * M_PI / 180)) + radius;
150 | return CGPointMake(x, y);
151 | }
152 |
153 |
154 | - (DJBezierPath *)createCirclePathWithCenter:(CGPoint)center radius:(CGFloat)radius sampleCount:(NSInteger)sampleCount {
155 |
156 | DJBezierPath *smoothedPath = [[DJBezierPath alloc] init];
157 | CGPoint startPoint = [self pointOnCircleWithCenter:center radius:radius angleInDegrees:90];
158 |
159 | [smoothedPath moveToPoint:startPoint];
160 |
161 | CGFloat delta = 360.0f/sampleCount;
162 | CGFloat angleInDegrees = 90;
163 | for (NSInteger i=1; i minContentSize.width) ? stringWidth : minContentSize.width;
272 | if(stringWidth > maxContentSize.width)
273 | stringWidth = maxContentSize.width;
274 |
275 | CGFloat maxStringHeight = maxContentSize.height-_indicatorSize.height-(_pPadding+(_pPadding/2));
276 | stringHeight = (stringHeight > maxStringHeight) ? maxStringHeight : stringHeight;
277 |
278 | CGFloat popupWidth = stringWidth+(_pPadding*2);
279 |
280 | CGFloat lW = stringWidth;
281 | CGFloat lH = stringHeight;
282 | CGFloat lX = _pPadding;
283 | CGFloat lY = (stringHeight == 0) ? 0 : _pPadding;
284 | [label setFrame:NSMakeRect(lX, lY, lW, lH)];
285 |
286 | CGFloat spaceBetween = (stringHeight != 0) ? _pPadding/3 : _pPadding;
287 |
288 | CGFloat iW = _indicatorSize.width;
289 | CGFloat iH = _indicatorSize.height;
290 | CGFloat iX = ((lW+(_pPadding*2))/2)-(iW/2); //center it
291 | CGFloat iY = lY+lH+(spaceBetween);
292 | NSRect indicatorRect = NSMakeRect(iX, iY, iW, iH);
293 | activityIndicator.frame = progressIndicator.frame = indicatorRect;
294 |
295 | CGFloat spaceOnTop = (stringHeight != 0) ? _pPadding/3 : 0;
296 |
297 | [progressIndicator setRingThickness:6];
298 | [progressIndicator sizeToFit];
299 | [activityIndicator setColor:[NSColor whiteColor]];
300 |
301 | pSize.width = popupWidth;
302 | pSize.height = iY+iH+_pPadding+spaceOnTop;//+(_pPadding/2);
303 |
304 | [self setAutoresizesSubviews:YES];
305 | [MainHUD setAutoresizesSubviews:YES];
306 |
307 | [self setNeedsDisplay:TRUE];
308 | [MainHUD setNeedsDisplay:TRUE];
309 | }
310 |
311 | - (void)setBackground
312 | {
313 | CGColorRef bgcolor = CGColorCreateGenericRGB(0.05, 0.05, 0.05, _pAlpha);
314 | if(![MainHUD wantsLayer])
315 | {
316 | CALayer* bgLayer = [CALayer layer];
317 | [bgLayer setBackgroundColor:bgcolor];
318 | [bgLayer setCornerRadius:15.0];
319 | [MainHUD setWantsLayer:TRUE];
320 | [MainHUD setLayer:bgLayer];
321 | }
322 | else {
323 | [MainHUD.layer setBackgroundColor:bgcolor];
324 | [MainHUD.layer setCornerRadius:15.0];
325 | }
326 |
327 | if(![self layer]) {
328 | CALayer* bgLayer = [CALayer layer];
329 | [self setLayer:bgLayer];
330 | [self setWantsLayer:TRUE];
331 | }
332 |
333 | [self.layer setBackgroundColor:CGColorCreateGenericRGB(0, 0, 0, _backgroundAlpha)];
334 |
335 | [self setNeedsDisplay:TRUE];
336 | }
337 |
338 | #pragma mark -
339 | #pragma mark Other
340 |
341 | -(CGFloat) heightForString:(NSString *)myString font:(NSFont*) myFont width:(CGFloat)myWidth
342 | {
343 | NSTextStorage *textStorage = [[NSTextStorage alloc] initWithString:myString];
344 | NSTextContainer *textContainer = [[NSTextContainer alloc] initWithContainerSize:NSMakeSize(myWidth, FLT_MAX)];
345 | ;
346 | NSLayoutManager *layoutManager = [[NSLayoutManager alloc] init];
347 | [layoutManager addTextContainer:textContainer];
348 | [textStorage addLayoutManager:layoutManager];
349 | [textStorage addAttribute:NSFontAttributeName value:myFont
350 | range:NSMakeRange(0, [textStorage length])];
351 | [textContainer setLineFragmentPadding:0.0];
352 |
353 | (void) [layoutManager glyphRangeForTextContainer:textContainer];
354 | return [layoutManager
355 | usedRectForTextContainer:textContainer].size.height;
356 | }
357 |
358 | - (NSRect)getCenterWithinRect:(NSRect)parentFrame scale:(CGFloat)scale
359 | {
360 | NSRect result;
361 | CGFloat newWidth = pSize.width*scale;
362 | CGFloat newHeight = pSize.height*scale;
363 | result.origin.x = parentFrame.size.width/2 - newWidth/2 + _pOffset.dx;
364 | result.origin.y = parentFrame.size.height/2 - newHeight/2 + _pOffset.dy;
365 | result.size.width = newWidth;
366 | result.size.height = newHeight;
367 |
368 | return result;
369 | }
370 |
371 | #pragma mark -
372 |
373 | - (void)initializePopup
374 | {
375 | self.autoresizingMask = NSViewMaxXMargin | NSViewMaxYMargin | NSViewMinXMargin | NSViewMinYMargin;
376 | MainHUD.autoresizingMask = NSViewMaxXMargin | NSViewMaxYMargin | NSViewMinXMargin | NSViewMinYMargin;
377 |
378 | MainHUD = [[NSView alloc] init];
379 | activityIndicator = [[DJActivityIndicator alloc] init];
380 | progressIndicator = [[DJProgressIndicator alloc] init];
381 | backgroundMask = [[NSButton alloc] init];
382 | label = [[NSTextField alloc] init];
383 |
384 | [self addSubview:MainHUD];
385 | [MainHUD addSubview:label];
386 | [MainHUD addSubview:activityIndicator];
387 | [MainHUD addSubview:progressIndicator];
388 |
389 | //----DEFAULT VALUES----
390 |
391 | _backgroundAlpha = 0.4;
392 | _actionsEnabled = FALSE;
393 |
394 | _pOffset = CGVectorMake(0, 0);
395 | _pAlpha = 0.9;
396 | _pPadding = 10;
397 |
398 | _indicatorSize = CGSizeMake(40, 40);
399 | _indicatorOffset = CGVectorMake(0, 0);
400 |
401 | _indicatorSize = CGSizeMake(40, 40);
402 | _indicatorOffset = CGVectorMake(0, 0);
403 |
404 | [label setBezeled:NO];
405 | [label setDrawsBackground:NO];
406 | [label setEditable:NO];
407 | [label setSelectable:NO];
408 |
409 | label.font = [NSFont boldSystemFontOfSize:12.0];
410 | [label setTextColor:[NSColor colorWithCalibratedWhite:1.0 alpha:0.85]];
411 | }
412 |
413 | + (DJProgressHUD *) instance
414 | {
415 | static dispatch_once_t once;
416 | static DJProgressHUD *sharedView;
417 | dispatch_once(&once, ^ {
418 | sharedView = [[self alloc] init];
419 | [sharedView initializePopup];
420 | });
421 |
422 | return sharedView;
423 | }
424 |
425 | @end
426 |
--------------------------------------------------------------------------------
/LICENSE.txt:
--------------------------------------------------------------------------------
1 | GNU GENERAL PUBLIC LICENSE
2 | Version 2, June 1991
3 |
4 | Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
5 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
6 | Everyone is permitted to copy and distribute verbatim copies
7 | of this license document, but changing it is not allowed.
8 |
9 | Preamble
10 |
11 | The licenses for most software are designed to take away your
12 | freedom to share and change it. By contrast, the GNU General Public
13 | License is intended to guarantee your freedom to share and change free
14 | software--to make sure the software is free for all its users. This
15 | General Public License applies to most of the Free Software
16 | Foundation's software and to any other program whose authors commit to
17 | using it. (Some other Free Software Foundation software is covered by
18 | the GNU Lesser General Public License instead.) You can apply it to
19 | your programs, too.
20 |
21 | When we speak of free software, we are referring to freedom, not
22 | price. Our General Public Licenses are designed to make sure that you
23 | have the freedom to distribute copies of free software (and charge for
24 | this service if you wish), that you receive source code or can get it
25 | if you want it, that you can change the software or use pieces of it
26 | in new free programs; and that you know you can do these things.
27 |
28 | To protect your rights, we need to make restrictions that forbid
29 | anyone to deny you these rights or to ask you to surrender the rights.
30 | These restrictions translate to certain responsibilities for you if you
31 | distribute copies of the software, or if you modify it.
32 |
33 | For example, if you distribute copies of such a program, whether
34 | gratis or for a fee, you must give the recipients all the rights that
35 | you have. You must make sure that they, too, receive or can get the
36 | source code. And you must show them these terms so they know their
37 | rights.
38 |
39 | We protect your rights with two steps: (1) copyright the software, and
40 | (2) offer you this license which gives you legal permission to copy,
41 | distribute and/or modify the software.
42 |
43 | Also, for each author's protection and ours, we want to make certain
44 | that everyone understands that there is no warranty for this free
45 | software. If the software is modified by someone else and passed on, we
46 | want its recipients to know that what they have is not the original, so
47 | that any problems introduced by others will not reflect on the original
48 | authors' reputations.
49 |
50 | Finally, any free program is threatened constantly by software
51 | patents. We wish to avoid the danger that redistributors of a free
52 | program will individually obtain patent licenses, in effect making the
53 | program proprietary. To prevent this, we have made it clear that any
54 | patent must be licensed for everyone's free use or not licensed at all.
55 |
56 | The precise terms and conditions for copying, distribution and
57 | modification follow.
58 |
59 | GNU GENERAL PUBLIC LICENSE
60 | TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
61 |
62 | 0. This License applies to any program or other work which contains
63 | a notice placed by the copyright holder saying it may be distributed
64 | under the terms of this General Public License. The "Program", below,
65 | refers to any such program or work, and a "work based on the Program"
66 | means either the Program or any derivative work under copyright law:
67 | that is to say, a work containing the Program or a portion of it,
68 | either verbatim or with modifications and/or translated into another
69 | language. (Hereinafter, translation is included without limitation in
70 | the term "modification".) Each licensee is addressed as "you".
71 |
72 | Activities other than copying, distribution and modification are not
73 | covered by this License; they are outside its scope. The act of
74 | running the Program is not restricted, and the output from the Program
75 | is covered only if its contents constitute a work based on the
76 | Program (independent of having been made by running the Program).
77 | Whether that is true depends on what the Program does.
78 |
79 | 1. You may copy and distribute verbatim copies of the Program's
80 | source code as you receive it, in any medium, provided that you
81 | conspicuously and appropriately publish on each copy an appropriate
82 | copyright notice and disclaimer of warranty; keep intact all the
83 | notices that refer to this License and to the absence of any warranty;
84 | and give any other recipients of the Program a copy of this License
85 | along with the Program.
86 |
87 | You may charge a fee for the physical act of transferring a copy, and
88 | you may at your option offer warranty protection in exchange for a fee.
89 |
90 | 2. You may modify your copy or copies of the Program or any portion
91 | of it, thus forming a work based on the Program, and copy and
92 | distribute such modifications or work under the terms of Section 1
93 | above, provided that you also meet all of these conditions:
94 |
95 | a) You must cause the modified files to carry prominent notices
96 | stating that you changed the files and the date of any change.
97 |
98 | b) You must cause any work that you distribute or publish, that in
99 | whole or in part contains or is derived from the Program or any
100 | part thereof, to be licensed as a whole at no charge to all third
101 | parties under the terms of this License.
102 |
103 | c) If the modified program normally reads commands interactively
104 | when run, you must cause it, when started running for such
105 | interactive use in the most ordinary way, to print or display an
106 | announcement including an appropriate copyright notice and a
107 | notice that there is no warranty (or else, saying that you provide
108 | a warranty) and that users may redistribute the program under
109 | these conditions, and telling the user how to view a copy of this
110 | License. (Exception: if the Program itself is interactive but
111 | does not normally print such an announcement, your work based on
112 | the Program is not required to print an announcement.)
113 |
114 | These requirements apply to the modified work as a whole. If
115 | identifiable sections of that work are not derived from the Program,
116 | and can be reasonably considered independent and separate works in
117 | themselves, then this License, and its terms, do not apply to those
118 | sections when you distribute them as separate works. But when you
119 | distribute the same sections as part of a whole which is a work based
120 | on the Program, the distribution of the whole must be on the terms of
121 | this License, whose permissions for other licensees extend to the
122 | entire whole, and thus to each and every part regardless of who wrote it.
123 |
124 | Thus, it is not the intent of this section to claim rights or contest
125 | your rights to work written entirely by you; rather, the intent is to
126 | exercise the right to control the distribution of derivative or
127 | collective works based on the Program.
128 |
129 | In addition, mere aggregation of another work not based on the Program
130 | with the Program (or with a work based on the Program) on a volume of
131 | a storage or distribution medium does not bring the other work under
132 | the scope of this License.
133 |
134 | 3. You may copy and distribute the Program (or a work based on it,
135 | under Section 2) in object code or executable form under the terms of
136 | Sections 1 and 2 above provided that you also do one of the following:
137 |
138 | a) Accompany it with the complete corresponding machine-readable
139 | source code, which must be distributed under the terms of Sections
140 | 1 and 2 above on a medium customarily used for software interchange; or,
141 |
142 | b) Accompany it with a written offer, valid for at least three
143 | years, to give any third party, for a charge no more than your
144 | cost of physically performing source distribution, a complete
145 | machine-readable copy of the corresponding source code, to be
146 | distributed under the terms of Sections 1 and 2 above on a medium
147 | customarily used for software interchange; or,
148 |
149 | c) Accompany it with the information you received as to the offer
150 | to distribute corresponding source code. (This alternative is
151 | allowed only for noncommercial distribution and only if you
152 | received the program in object code or executable form with such
153 | an offer, in accord with Subsection b above.)
154 |
155 | The source code for a work means the preferred form of the work for
156 | making modifications to it. For an executable work, complete source
157 | code means all the source code for all modules it contains, plus any
158 | associated interface definition files, plus the scripts used to
159 | control compilation and installation of the executable. However, as a
160 | special exception, the source code distributed need not include
161 | anything that is normally distributed (in either source or binary
162 | form) with the major components (compiler, kernel, and so on) of the
163 | operating system on which the executable runs, unless that component
164 | itself accompanies the executable.
165 |
166 | If distribution of executable or object code is made by offering
167 | access to copy from a designated place, then offering equivalent
168 | access to copy the source code from the same place counts as
169 | distribution of the source code, even though third parties are not
170 | compelled to copy the source along with the object code.
171 |
172 | 4. You may not copy, modify, sublicense, or distribute the Program
173 | except as expressly provided under this License. Any attempt
174 | otherwise to copy, modify, sublicense or distribute the Program is
175 | void, and will automatically terminate your rights under this License.
176 | However, parties who have received copies, or rights, from you under
177 | this License will not have their licenses terminated so long as such
178 | parties remain in full compliance.
179 |
180 | 5. You are not required to accept this License, since you have not
181 | signed it. However, nothing else grants you permission to modify or
182 | distribute the Program or its derivative works. These actions are
183 | prohibited by law if you do not accept this License. Therefore, by
184 | modifying or distributing the Program (or any work based on the
185 | Program), you indicate your acceptance of this License to do so, and
186 | all its terms and conditions for copying, distributing or modifying
187 | the Program or works based on it.
188 |
189 | 6. Each time you redistribute the Program (or any work based on the
190 | Program), the recipient automatically receives a license from the
191 | original licensor to copy, distribute or modify the Program subject to
192 | these terms and conditions. You may not impose any further
193 | restrictions on the recipients' exercise of the rights granted herein.
194 | You are not responsible for enforcing compliance by third parties to
195 | this License.
196 |
197 | 7. If, as a consequence of a court judgment or allegation of patent
198 | infringement or for any other reason (not limited to patent issues),
199 | conditions are imposed on you (whether by court order, agreement or
200 | otherwise) that contradict the conditions of this License, they do not
201 | excuse you from the conditions of this License. If you cannot
202 | distribute so as to satisfy simultaneously your obligations under this
203 | License and any other pertinent obligations, then as a consequence you
204 | may not distribute the Program at all. For example, if a patent
205 | license would not permit royalty-free redistribution of the Program by
206 | all those who receive copies directly or indirectly through you, then
207 | the only way you could satisfy both it and this License would be to
208 | refrain entirely from distribution of the Program.
209 |
210 | If any portion of this section is held invalid or unenforceable under
211 | any particular circumstance, the balance of the section is intended to
212 | apply and the section as a whole is intended to apply in other
213 | circumstances.
214 |
215 | It is not the purpose of this section to induce you to infringe any
216 | patents or other property right claims or to contest validity of any
217 | such claims; this section has the sole purpose of protecting the
218 | integrity of the free software distribution system, which is
219 | implemented by public license practices. Many people have made
220 | generous contributions to the wide range of software distributed
221 | through that system in reliance on consistent application of that
222 | system; it is up to the author/donor to decide if he or she is willing
223 | to distribute software through any other system and a licensee cannot
224 | impose that choice.
225 |
226 | This section is intended to make thoroughly clear what is believed to
227 | be a consequence of the rest of this License.
228 |
229 | 8. If the distribution and/or use of the Program is restricted in
230 | certain countries either by patents or by copyrighted interfaces, the
231 | original copyright holder who places the Program under this License
232 | may add an explicit geographical distribution limitation excluding
233 | those countries, so that distribution is permitted only in or among
234 | countries not thus excluded. In such case, this License incorporates
235 | the limitation as if written in the body of this License.
236 |
237 | 9. The Free Software Foundation may publish revised and/or new versions
238 | of the General Public License from time to time. Such new versions will
239 | be similar in spirit to the present version, but may differ in detail to
240 | address new problems or concerns.
241 |
242 | Each version is given a distinguishing version number. If the Program
243 | specifies a version number of this License which applies to it and "any
244 | later version", you have the option of following the terms and conditions
245 | either of that version or of any later version published by the Free
246 | Software Foundation. If the Program does not specify a version number of
247 | this License, you may choose any version ever published by the Free Software
248 | Foundation.
249 |
250 | 10. If you wish to incorporate parts of the Program into other free
251 | programs whose distribution conditions are different, write to the author
252 | to ask for permission. For software which is copyrighted by the Free
253 | Software Foundation, write to the Free Software Foundation; we sometimes
254 | make exceptions for this. Our decision will be guided by the two goals
255 | of preserving the free status of all derivatives of our free software and
256 | of promoting the sharing and reuse of software generally.
257 |
258 | NO WARRANTY
259 |
260 | 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
261 | FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
262 | OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
263 | PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
264 | OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
265 | MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
266 | TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
267 | PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
268 | REPAIR OR CORRECTION.
269 |
270 | 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
271 | WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
272 | REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
273 | INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
274 | OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
275 | TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
276 | YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
277 | PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
278 | POSSIBILITY OF SUCH DAMAGES.
279 |
280 | END OF TERMS AND CONDITIONS
281 |
282 | How to Apply These Terms to Your New Programs
283 |
284 | If you develop a new program, and you want it to be of the greatest
285 | possible use to the public, the best way to achieve this is to make it
286 | free software which everyone can redistribute and change under these terms.
287 |
288 | To do so, attach the following notices to the program. It is safest
289 | to attach them to the start of each source file to most effectively
290 | convey the exclusion of warranty; and each file should have at least
291 | the "copyright" line and a pointer to where the full notice is found.
292 |
293 | DJProgressHUD_OSX
294 | Copyright (C) 2014 Daniel Jackson
295 | This program is free software; you can redistribute it and/or modify
296 | it under the terms of the GNU General Public License as published by
297 | the Free Software Foundation; either version 2 of the License, or
298 | (at your option) any later version.
299 |
300 | This program is distributed in the hope that it will be useful,
301 | but WITHOUT ANY WARRANTY; without even the implied warranty of
302 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
303 | GNU General Public License for more details.
304 |
305 | You should have received a copy of the GNU General Public License along
306 | with this program; if not, write to the Free Software Foundation, Inc.,
307 | 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
308 |
309 | Also add information on how to contact you by electronic and paper mail.
310 |
311 | If the program is interactive, make it output a short notice like this
312 | when it starts in an interactive mode:
313 |
314 | Gnomovision version 69, Copyright (C) year name of author
315 | Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
316 | This is free software, and you are welcome to redistribute it
317 | under certain conditions; type `show c' for details.
318 |
319 | The hypothetical commands `show w' and `show c' should show the appropriate
320 | parts of the General Public License. Of course, the commands you use may
321 | be called something other than `show w' and `show c'; they could even be
322 | mouse-clicks or menu items--whatever suits your program.
323 |
324 | You should also get your employer (if you work as a programmer) or your
325 | school, if any, to sign a "copyright disclaimer" for the program, if
326 | necessary. Here is a sample; alter the names:
327 |
328 | Yoyodyne, Inc., hereby disclaims all copyright interest in the program
329 | `Gnomovision' (which makes passes at compilers) written by James Hacker.
330 |
331 | {signature of Ty Coon}, 1 April 1989
332 | Ty Coon, President of Vice
333 |
334 | This General Public License does not permit incorporating your program into
335 | proprietary programs. If your program is a subroutine library, you may
336 | consider it more useful to permit linking proprietary applications with the
337 | library. If this is what you want to do, use the GNU Lesser General
338 | Public License instead of this License.
339 |
--------------------------------------------------------------------------------
/Playground/Playground.xcodeproj/project.pbxproj:
--------------------------------------------------------------------------------
1 | // !$*UTF8*$!
2 | {
3 | archiveVersion = 1;
4 | classes = {
5 | };
6 | objectVersion = 46;
7 | objects = {
8 |
9 | /* Begin PBXBuildFile section */
10 | 2E8EEBD61920477B00B57C2B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E8EEBD51920477B00B57C2B /* Cocoa.framework */; };
11 | 2E8EEBE01920477B00B57C2B /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 2E8EEBDE1920477B00B57C2B /* InfoPlist.strings */; };
12 | 2E8EEBE21920477B00B57C2B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEBE11920477B00B57C2B /* main.m */; };
13 | 2E8EEBE61920477B00B57C2B /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = 2E8EEBE41920477B00B57C2B /* Credits.rtf */; };
14 | 2E8EEBE91920477B00B57C2B /* DJAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEBE81920477B00B57C2B /* DJAppDelegate.m */; };
15 | 2E8EEBEC1920477B00B57C2B /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 2E8EEBEA1920477B00B57C2B /* MainMenu.xib */; };
16 | 2E8EEBEF1920477B00B57C2B /* Playground.xcdatamodeld in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEBED1920477B00B57C2B /* Playground.xcdatamodeld */; };
17 | 2E8EEBF11920477B00B57C2B /* Images.xcassets in Resources */ = {isa = PBXBuildFile; fileRef = 2E8EEBF01920477B00B57C2B /* Images.xcassets */; };
18 | 2E8EEBF81920477B00B57C2B /* XCTest.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E8EEBF71920477B00B57C2B /* XCTest.framework */; };
19 | 2E8EEBF91920477B00B57C2B /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E8EEBD51920477B00B57C2B /* Cocoa.framework */; };
20 | 2E8EEC0E192048D000B57C2B /* DJMainWindowController.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEC0D192048D000B57C2B /* DJMainWindowController.m */; };
21 | 2E8EEC1719209C0C00B57C2B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2E8EEC1619209C0C00B57C2B /* QuartzCore.framework */; };
22 | 2E8EEC4019221DE000B57C2B /* DJActivityIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEC3919221DE000B57C2B /* DJActivityIndicator.m */; };
23 | 2E8EEC4119221DE000B57C2B /* DJBezierPath.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEC3B19221DE000B57C2B /* DJBezierPath.m */; };
24 | 2E8EEC4219221DE000B57C2B /* DJProgressHUD.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEC3D19221DE000B57C2B /* DJProgressHUD.m */; };
25 | 2E8EEC4319221DE000B57C2B /* DJProgressIndicator.m in Sources */ = {isa = PBXBuildFile; fileRef = 2E8EEC3F19221DE000B57C2B /* DJProgressIndicator.m */; };
26 | /* End PBXBuildFile section */
27 |
28 | /* Begin PBXContainerItemProxy section */
29 | 2E8EEBFA1920477B00B57C2B /* PBXContainerItemProxy */ = {
30 | isa = PBXContainerItemProxy;
31 | containerPortal = 2E8EEBCA1920477B00B57C2B /* Project object */;
32 | proxyType = 1;
33 | remoteGlobalIDString = 2E8EEBD11920477B00B57C2B;
34 | remoteInfo = Playground;
35 | };
36 | /* End PBXContainerItemProxy section */
37 |
38 | /* Begin PBXFileReference section */
39 | 2E8EEBD21920477B00B57C2B /* Playground.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Playground.app; sourceTree = BUILT_PRODUCTS_DIR; };
40 | 2E8EEBD51920477B00B57C2B /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
41 | 2E8EEBD81920477B00B57C2B /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
42 | 2E8EEBD91920477B00B57C2B /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
43 | 2E8EEBDA1920477B00B57C2B /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
44 | 2E8EEBDD1920477B00B57C2B /* Playground-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Playground-Info.plist"; sourceTree = ""; };
45 | 2E8EEBDF1920477B00B57C2B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = ""; };
46 | 2E8EEBE11920477B00B57C2B /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; };
47 | 2E8EEBE31920477B00B57C2B /* Playground-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "Playground-Prefix.pch"; sourceTree = ""; };
48 | 2E8EEBE51920477B00B57C2B /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = ""; };
49 | 2E8EEBE71920477B00B57C2B /* DJAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = DJAppDelegate.h; sourceTree = ""; };
50 | 2E8EEBE81920477B00B57C2B /* DJAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = DJAppDelegate.m; sourceTree = ""; };
51 | 2E8EEBEB1920477B00B57C2B /* Base */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = Base; path = Base.lproj/MainMenu.xib; sourceTree = ""; };
52 | 2E8EEBEE1920477B00B57C2B /* Playground.xcdatamodel */ = {isa = PBXFileReference; lastKnownFileType = wrapper.xcdatamodel; path = Playground.xcdatamodel; sourceTree = ""; };
53 | 2E8EEBF01920477B00B57C2B /* Images.xcassets */ = {isa = PBXFileReference; lastKnownFileType = folder.assetcatalog; path = Images.xcassets; sourceTree = ""; };
54 | 2E8EEBF61920477B00B57C2B /* PlaygroundTests.xctest */ = {isa = PBXFileReference; explicitFileType = wrapper.cfbundle; includeInIndex = 0; path = PlaygroundTests.xctest; sourceTree = BUILT_PRODUCTS_DIR; };
55 | 2E8EEBF71920477B00B57C2B /* XCTest.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = XCTest.framework; path = Library/Frameworks/XCTest.framework; sourceTree = DEVELOPER_DIR; };
56 | 2E8EEC0C192048D000B57C2B /* DJMainWindowController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJMainWindowController.h; sourceTree = ""; };
57 | 2E8EEC0D192048D000B57C2B /* DJMainWindowController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJMainWindowController.m; sourceTree = ""; };
58 | 2E8EEC1619209C0C00B57C2B /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
59 | 2E8EEC3819221DE000B57C2B /* DJActivityIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJActivityIndicator.h; sourceTree = ""; };
60 | 2E8EEC3919221DE000B57C2B /* DJActivityIndicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJActivityIndicator.m; sourceTree = ""; };
61 | 2E8EEC3A19221DE000B57C2B /* DJBezierPath.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJBezierPath.h; sourceTree = ""; };
62 | 2E8EEC3B19221DE000B57C2B /* DJBezierPath.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJBezierPath.m; sourceTree = ""; };
63 | 2E8EEC3C19221DE000B57C2B /* DJProgressHUD.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJProgressHUD.h; sourceTree = ""; };
64 | 2E8EEC3D19221DE000B57C2B /* DJProgressHUD.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJProgressHUD.m; sourceTree = ""; };
65 | 2E8EEC3E19221DE000B57C2B /* DJProgressIndicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DJProgressIndicator.h; sourceTree = ""; };
66 | 2E8EEC3F19221DE000B57C2B /* DJProgressIndicator.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DJProgressIndicator.m; sourceTree = ""; };
67 | /* End PBXFileReference section */
68 |
69 | /* Begin PBXFrameworksBuildPhase section */
70 | 2E8EEBCF1920477B00B57C2B /* Frameworks */ = {
71 | isa = PBXFrameworksBuildPhase;
72 | buildActionMask = 2147483647;
73 | files = (
74 | 2E8EEC1719209C0C00B57C2B /* QuartzCore.framework in Frameworks */,
75 | 2E8EEBD61920477B00B57C2B /* Cocoa.framework in Frameworks */,
76 | );
77 | runOnlyForDeploymentPostprocessing = 0;
78 | };
79 | 2E8EEBF31920477B00B57C2B /* Frameworks */ = {
80 | isa = PBXFrameworksBuildPhase;
81 | buildActionMask = 2147483647;
82 | files = (
83 | 2E8EEBF91920477B00B57C2B /* Cocoa.framework in Frameworks */,
84 | 2E8EEBF81920477B00B57C2B /* XCTest.framework in Frameworks */,
85 | );
86 | runOnlyForDeploymentPostprocessing = 0;
87 | };
88 | /* End PBXFrameworksBuildPhase section */
89 |
90 | /* Begin PBXGroup section */
91 | 2E8EEBC91920477B00B57C2B = {
92 | isa = PBXGroup;
93 | children = (
94 | 2E8EEBDB1920477B00B57C2B /* Playground */,
95 | 2E8EEBD41920477B00B57C2B /* Frameworks */,
96 | 2E8EEBD31920477B00B57C2B /* Products */,
97 | );
98 | sourceTree = "";
99 | };
100 | 2E8EEBD31920477B00B57C2B /* Products */ = {
101 | isa = PBXGroup;
102 | children = (
103 | 2E8EEBD21920477B00B57C2B /* Playground.app */,
104 | 2E8EEBF61920477B00B57C2B /* PlaygroundTests.xctest */,
105 | );
106 | name = Products;
107 | sourceTree = "";
108 | };
109 | 2E8EEBD41920477B00B57C2B /* Frameworks */ = {
110 | isa = PBXGroup;
111 | children = (
112 | 2E8EEC1619209C0C00B57C2B /* QuartzCore.framework */,
113 | 2E8EEBD51920477B00B57C2B /* Cocoa.framework */,
114 | 2E8EEBF71920477B00B57C2B /* XCTest.framework */,
115 | 2E8EEBD71920477B00B57C2B /* Other Frameworks */,
116 | );
117 | name = Frameworks;
118 | sourceTree = "";
119 | };
120 | 2E8EEBD71920477B00B57C2B /* Other Frameworks */ = {
121 | isa = PBXGroup;
122 | children = (
123 | 2E8EEBD81920477B00B57C2B /* AppKit.framework */,
124 | 2E8EEBD91920477B00B57C2B /* CoreData.framework */,
125 | 2E8EEBDA1920477B00B57C2B /* Foundation.framework */,
126 | );
127 | name = "Other Frameworks";
128 | sourceTree = "";
129 | };
130 | 2E8EEBDB1920477B00B57C2B /* Playground */ = {
131 | isa = PBXGroup;
132 | children = (
133 | 2E8EEBE71920477B00B57C2B /* DJAppDelegate.h */,
134 | 2E8EEBE81920477B00B57C2B /* DJAppDelegate.m */,
135 | 2E8EEBF01920477B00B57C2B /* Images.xcassets */,
136 | 2E8EEBED1920477B00B57C2B /* Playground.xcdatamodeld */,
137 | 2E8EEC0F192048DA00B57C2B /* Sources */,
138 | 2E8EEBDC1920477B00B57C2B /* Supporting Files */,
139 | );
140 | path = Playground;
141 | sourceTree = "";
142 | };
143 | 2E8EEBDC1920477B00B57C2B /* Supporting Files */ = {
144 | isa = PBXGroup;
145 | children = (
146 | 2E8EEBDD1920477B00B57C2B /* Playground-Info.plist */,
147 | 2E8EEBDE1920477B00B57C2B /* InfoPlist.strings */,
148 | 2E8EEBE11920477B00B57C2B /* main.m */,
149 | 2E8EEBE31920477B00B57C2B /* Playground-Prefix.pch */,
150 | 2E8EEBE41920477B00B57C2B /* Credits.rtf */,
151 | );
152 | name = "Supporting Files";
153 | sourceTree = "";
154 | };
155 | 2E8EEC0F192048DA00B57C2B /* Sources */ = {
156 | isa = PBXGroup;
157 | children = (
158 | 2E8EEBEA1920477B00B57C2B /* MainMenu.xib */,
159 | 2E8EEC0C192048D000B57C2B /* DJMainWindowController.h */,
160 | 2E8EEC0D192048D000B57C2B /* DJMainWindowController.m */,
161 | 2E8EEC3719221DE000B57C2B /* DJProgressHUD */,
162 | );
163 | name = Sources;
164 | sourceTree = "";
165 | };
166 | 2E8EEC3719221DE000B57C2B /* DJProgressHUD */ = {
167 | isa = PBXGroup;
168 | children = (
169 | 2E8EEC3819221DE000B57C2B /* DJActivityIndicator.h */,
170 | 2E8EEC3919221DE000B57C2B /* DJActivityIndicator.m */,
171 | 2E8EEC3A19221DE000B57C2B /* DJBezierPath.h */,
172 | 2E8EEC3B19221DE000B57C2B /* DJBezierPath.m */,
173 | 2E8EEC3C19221DE000B57C2B /* DJProgressHUD.h */,
174 | 2E8EEC3D19221DE000B57C2B /* DJProgressHUD.m */,
175 | 2E8EEC3E19221DE000B57C2B /* DJProgressIndicator.h */,
176 | 2E8EEC3F19221DE000B57C2B /* DJProgressIndicator.m */,
177 | );
178 | name = DJProgressHUD;
179 | path = ../../DJProgressHUD;
180 | sourceTree = "";
181 | };
182 | /* End PBXGroup section */
183 |
184 | /* Begin PBXNativeTarget section */
185 | 2E8EEBD11920477B00B57C2B /* Playground */ = {
186 | isa = PBXNativeTarget;
187 | buildConfigurationList = 2E8EEC061920477B00B57C2B /* Build configuration list for PBXNativeTarget "Playground" */;
188 | buildPhases = (
189 | 2E8EEBCE1920477B00B57C2B /* Sources */,
190 | 2E8EEBCF1920477B00B57C2B /* Frameworks */,
191 | 2E8EEBD01920477B00B57C2B /* Resources */,
192 | );
193 | buildRules = (
194 | );
195 | dependencies = (
196 | );
197 | name = Playground;
198 | productName = Playground;
199 | productReference = 2E8EEBD21920477B00B57C2B /* Playground.app */;
200 | productType = "com.apple.product-type.application";
201 | };
202 | 2E8EEBF51920477B00B57C2B /* PlaygroundTests */ = {
203 | isa = PBXNativeTarget;
204 | buildConfigurationList = 2E8EEC091920477B00B57C2B /* Build configuration list for PBXNativeTarget "PlaygroundTests" */;
205 | buildPhases = (
206 | 2E8EEBF21920477B00B57C2B /* Sources */,
207 | 2E8EEBF31920477B00B57C2B /* Frameworks */,
208 | 2E8EEBF41920477B00B57C2B /* Resources */,
209 | );
210 | buildRules = (
211 | );
212 | dependencies = (
213 | 2E8EEBFB1920477B00B57C2B /* PBXTargetDependency */,
214 | );
215 | name = PlaygroundTests;
216 | productName = PlaygroundTests;
217 | productReference = 2E8EEBF61920477B00B57C2B /* PlaygroundTests.xctest */;
218 | productType = "com.apple.product-type.bundle.unit-test";
219 | };
220 | /* End PBXNativeTarget section */
221 |
222 | /* Begin PBXProject section */
223 | 2E8EEBCA1920477B00B57C2B /* Project object */ = {
224 | isa = PBXProject;
225 | attributes = {
226 | CLASSPREFIX = DJ;
227 | LastUpgradeCheck = 0510;
228 | ORGANIZATIONNAME = "Daniel Jackson";
229 | TargetAttributes = {
230 | 2E8EEBF51920477B00B57C2B = {
231 | TestTargetID = 2E8EEBD11920477B00B57C2B;
232 | };
233 | };
234 | };
235 | buildConfigurationList = 2E8EEBCD1920477B00B57C2B /* Build configuration list for PBXProject "Playground" */;
236 | compatibilityVersion = "Xcode 3.2";
237 | developmentRegion = English;
238 | hasScannedForEncodings = 0;
239 | knownRegions = (
240 | en,
241 | Base,
242 | );
243 | mainGroup = 2E8EEBC91920477B00B57C2B;
244 | productRefGroup = 2E8EEBD31920477B00B57C2B /* Products */;
245 | projectDirPath = "";
246 | projectRoot = "";
247 | targets = (
248 | 2E8EEBD11920477B00B57C2B /* Playground */,
249 | 2E8EEBF51920477B00B57C2B /* PlaygroundTests */,
250 | );
251 | };
252 | /* End PBXProject section */
253 |
254 | /* Begin PBXResourcesBuildPhase section */
255 | 2E8EEBD01920477B00B57C2B /* Resources */ = {
256 | isa = PBXResourcesBuildPhase;
257 | buildActionMask = 2147483647;
258 | files = (
259 | 2E8EEBE01920477B00B57C2B /* InfoPlist.strings in Resources */,
260 | 2E8EEBF11920477B00B57C2B /* Images.xcassets in Resources */,
261 | 2E8EEBE61920477B00B57C2B /* Credits.rtf in Resources */,
262 | 2E8EEBEC1920477B00B57C2B /* MainMenu.xib in Resources */,
263 | );
264 | runOnlyForDeploymentPostprocessing = 0;
265 | };
266 | 2E8EEBF41920477B00B57C2B /* Resources */ = {
267 | isa = PBXResourcesBuildPhase;
268 | buildActionMask = 2147483647;
269 | files = (
270 | );
271 | runOnlyForDeploymentPostprocessing = 0;
272 | };
273 | /* End PBXResourcesBuildPhase section */
274 |
275 | /* Begin PBXSourcesBuildPhase section */
276 | 2E8EEBCE1920477B00B57C2B /* Sources */ = {
277 | isa = PBXSourcesBuildPhase;
278 | buildActionMask = 2147483647;
279 | files = (
280 | 2E8EEC4319221DE000B57C2B /* DJProgressIndicator.m in Sources */,
281 | 2E8EEC4219221DE000B57C2B /* DJProgressHUD.m in Sources */,
282 | 2E8EEC4019221DE000B57C2B /* DJActivityIndicator.m in Sources */,
283 | 2E8EEC4119221DE000B57C2B /* DJBezierPath.m in Sources */,
284 | 2E8EEBE91920477B00B57C2B /* DJAppDelegate.m in Sources */,
285 | 2E8EEBE21920477B00B57C2B /* main.m in Sources */,
286 | 2E8EEC0E192048D000B57C2B /* DJMainWindowController.m in Sources */,
287 | 2E8EEBEF1920477B00B57C2B /* Playground.xcdatamodeld in Sources */,
288 | );
289 | runOnlyForDeploymentPostprocessing = 0;
290 | };
291 | 2E8EEBF21920477B00B57C2B /* Sources */ = {
292 | isa = PBXSourcesBuildPhase;
293 | buildActionMask = 2147483647;
294 | files = (
295 | );
296 | runOnlyForDeploymentPostprocessing = 0;
297 | };
298 | /* End PBXSourcesBuildPhase section */
299 |
300 | /* Begin PBXTargetDependency section */
301 | 2E8EEBFB1920477B00B57C2B /* PBXTargetDependency */ = {
302 | isa = PBXTargetDependency;
303 | target = 2E8EEBD11920477B00B57C2B /* Playground */;
304 | targetProxy = 2E8EEBFA1920477B00B57C2B /* PBXContainerItemProxy */;
305 | };
306 | /* End PBXTargetDependency section */
307 |
308 | /* Begin PBXVariantGroup section */
309 | 2E8EEBDE1920477B00B57C2B /* InfoPlist.strings */ = {
310 | isa = PBXVariantGroup;
311 | children = (
312 | 2E8EEBDF1920477B00B57C2B /* en */,
313 | );
314 | name = InfoPlist.strings;
315 | sourceTree = "";
316 | };
317 | 2E8EEBE41920477B00B57C2B /* Credits.rtf */ = {
318 | isa = PBXVariantGroup;
319 | children = (
320 | 2E8EEBE51920477B00B57C2B /* en */,
321 | );
322 | name = Credits.rtf;
323 | sourceTree = "";
324 | };
325 | 2E8EEBEA1920477B00B57C2B /* MainMenu.xib */ = {
326 | isa = PBXVariantGroup;
327 | children = (
328 | 2E8EEBEB1920477B00B57C2B /* Base */,
329 | );
330 | name = MainMenu.xib;
331 | sourceTree = "";
332 | };
333 | /* End PBXVariantGroup section */
334 |
335 | /* Begin XCBuildConfiguration section */
336 | 2E8EEC041920477B00B57C2B /* Debug */ = {
337 | isa = XCBuildConfiguration;
338 | buildSettings = {
339 | ALWAYS_SEARCH_USER_PATHS = NO;
340 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
341 | CLANG_CXX_LIBRARY = "libc++";
342 | CLANG_ENABLE_MODULES = YES;
343 | CLANG_ENABLE_OBJC_ARC = YES;
344 | CLANG_WARN_BOOL_CONVERSION = YES;
345 | CLANG_WARN_CONSTANT_CONVERSION = YES;
346 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
347 | CLANG_WARN_EMPTY_BODY = YES;
348 | CLANG_WARN_ENUM_CONVERSION = YES;
349 | CLANG_WARN_INT_CONVERSION = YES;
350 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
351 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
352 | COPY_PHASE_STRIP = NO;
353 | GCC_C_LANGUAGE_STANDARD = gnu99;
354 | GCC_DYNAMIC_NO_PIC = NO;
355 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
356 | GCC_OPTIMIZATION_LEVEL = 0;
357 | GCC_PREPROCESSOR_DEFINITIONS = (
358 | "DEBUG=1",
359 | "$(inherited)",
360 | );
361 | GCC_SYMBOLS_PRIVATE_EXTERN = NO;
362 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
363 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
364 | GCC_WARN_UNDECLARED_SELECTOR = YES;
365 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
366 | GCC_WARN_UNUSED_FUNCTION = YES;
367 | GCC_WARN_UNUSED_VARIABLE = YES;
368 | MACOSX_DEPLOYMENT_TARGET = 10.9;
369 | ONLY_ACTIVE_ARCH = YES;
370 | SDKROOT = macosx;
371 | };
372 | name = Debug;
373 | };
374 | 2E8EEC051920477B00B57C2B /* Release */ = {
375 | isa = XCBuildConfiguration;
376 | buildSettings = {
377 | ALWAYS_SEARCH_USER_PATHS = NO;
378 | CLANG_CXX_LANGUAGE_STANDARD = "gnu++0x";
379 | CLANG_CXX_LIBRARY = "libc++";
380 | CLANG_ENABLE_MODULES = YES;
381 | CLANG_ENABLE_OBJC_ARC = YES;
382 | CLANG_WARN_BOOL_CONVERSION = YES;
383 | CLANG_WARN_CONSTANT_CONVERSION = YES;
384 | CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
385 | CLANG_WARN_EMPTY_BODY = YES;
386 | CLANG_WARN_ENUM_CONVERSION = YES;
387 | CLANG_WARN_INT_CONVERSION = YES;
388 | CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
389 | CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
390 | COPY_PHASE_STRIP = YES;
391 | DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
392 | ENABLE_NS_ASSERTIONS = NO;
393 | GCC_C_LANGUAGE_STANDARD = gnu99;
394 | GCC_ENABLE_OBJC_EXCEPTIONS = YES;
395 | GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
396 | GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
397 | GCC_WARN_UNDECLARED_SELECTOR = YES;
398 | GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
399 | GCC_WARN_UNUSED_FUNCTION = YES;
400 | GCC_WARN_UNUSED_VARIABLE = YES;
401 | MACOSX_DEPLOYMENT_TARGET = 10.9;
402 | SDKROOT = macosx;
403 | };
404 | name = Release;
405 | };
406 | 2E8EEC071920477B00B57C2B /* Debug */ = {
407 | isa = XCBuildConfiguration;
408 | buildSettings = {
409 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
410 | CLANG_ENABLE_OBJC_ARC = YES;
411 | COMBINE_HIDPI_IMAGES = YES;
412 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
413 | GCC_PREFIX_HEADER = "Playground/Playground-Prefix.pch";
414 | INFOPLIST_FILE = "Playground/Playground-Info.plist";
415 | PRODUCT_NAME = "$(TARGET_NAME)";
416 | WRAPPER_EXTENSION = app;
417 | };
418 | name = Debug;
419 | };
420 | 2E8EEC081920477B00B57C2B /* Release */ = {
421 | isa = XCBuildConfiguration;
422 | buildSettings = {
423 | ASSETCATALOG_COMPILER_APPICON_NAME = AppIcon;
424 | CLANG_ENABLE_OBJC_ARC = YES;
425 | COMBINE_HIDPI_IMAGES = YES;
426 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
427 | GCC_PREFIX_HEADER = "Playground/Playground-Prefix.pch";
428 | INFOPLIST_FILE = "Playground/Playground-Info.plist";
429 | PRODUCT_NAME = "$(TARGET_NAME)";
430 | WRAPPER_EXTENSION = app;
431 | };
432 | name = Release;
433 | };
434 | 2E8EEC0A1920477B00B57C2B /* Debug */ = {
435 | isa = XCBuildConfiguration;
436 | buildSettings = {
437 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Playground.app/Contents/MacOS/Playground";
438 | COMBINE_HIDPI_IMAGES = YES;
439 | FRAMEWORK_SEARCH_PATHS = (
440 | "$(DEVELOPER_FRAMEWORKS_DIR)",
441 | "$(inherited)",
442 | );
443 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
444 | GCC_PREFIX_HEADER = "Playground/Playground-Prefix.pch";
445 | GCC_PREPROCESSOR_DEFINITIONS = (
446 | "DEBUG=1",
447 | "$(inherited)",
448 | );
449 | INFOPLIST_FILE = "PlaygroundTests/PlaygroundTests-Info.plist";
450 | PRODUCT_NAME = "$(TARGET_NAME)";
451 | TEST_HOST = "$(BUNDLE_LOADER)";
452 | WRAPPER_EXTENSION = xctest;
453 | };
454 | name = Debug;
455 | };
456 | 2E8EEC0B1920477B00B57C2B /* Release */ = {
457 | isa = XCBuildConfiguration;
458 | buildSettings = {
459 | BUNDLE_LOADER = "$(BUILT_PRODUCTS_DIR)/Playground.app/Contents/MacOS/Playground";
460 | COMBINE_HIDPI_IMAGES = YES;
461 | FRAMEWORK_SEARCH_PATHS = (
462 | "$(DEVELOPER_FRAMEWORKS_DIR)",
463 | "$(inherited)",
464 | );
465 | GCC_PRECOMPILE_PREFIX_HEADER = YES;
466 | GCC_PREFIX_HEADER = "Playground/Playground-Prefix.pch";
467 | INFOPLIST_FILE = "PlaygroundTests/PlaygroundTests-Info.plist";
468 | PRODUCT_NAME = "$(TARGET_NAME)";
469 | TEST_HOST = "$(BUNDLE_LOADER)";
470 | WRAPPER_EXTENSION = xctest;
471 | };
472 | name = Release;
473 | };
474 | /* End XCBuildConfiguration section */
475 |
476 | /* Begin XCConfigurationList section */
477 | 2E8EEBCD1920477B00B57C2B /* Build configuration list for PBXProject "Playground" */ = {
478 | isa = XCConfigurationList;
479 | buildConfigurations = (
480 | 2E8EEC041920477B00B57C2B /* Debug */,
481 | 2E8EEC051920477B00B57C2B /* Release */,
482 | );
483 | defaultConfigurationIsVisible = 0;
484 | defaultConfigurationName = Release;
485 | };
486 | 2E8EEC061920477B00B57C2B /* Build configuration list for PBXNativeTarget "Playground" */ = {
487 | isa = XCConfigurationList;
488 | buildConfigurations = (
489 | 2E8EEC071920477B00B57C2B /* Debug */,
490 | 2E8EEC081920477B00B57C2B /* Release */,
491 | );
492 | defaultConfigurationIsVisible = 0;
493 | defaultConfigurationName = Release;
494 | };
495 | 2E8EEC091920477B00B57C2B /* Build configuration list for PBXNativeTarget "PlaygroundTests" */ = {
496 | isa = XCConfigurationList;
497 | buildConfigurations = (
498 | 2E8EEC0A1920477B00B57C2B /* Debug */,
499 | 2E8EEC0B1920477B00B57C2B /* Release */,
500 | );
501 | defaultConfigurationIsVisible = 0;
502 | defaultConfigurationName = Release;
503 | };
504 | /* End XCConfigurationList section */
505 |
506 | /* Begin XCVersionGroup section */
507 | 2E8EEBED1920477B00B57C2B /* Playground.xcdatamodeld */ = {
508 | isa = XCVersionGroup;
509 | children = (
510 | 2E8EEBEE1920477B00B57C2B /* Playground.xcdatamodel */,
511 | );
512 | currentVersion = 2E8EEBEE1920477B00B57C2B /* Playground.xcdatamodel */;
513 | path = Playground.xcdatamodeld;
514 | sourceTree = "";
515 | versionGroupType = wrapper.xcdatamodel;
516 | };
517 | /* End XCVersionGroup section */
518 | };
519 | rootObject = 2E8EEBCA1920477B00B57C2B /* Project object */;
520 | }
521 |
--------------------------------------------------------------------------------
/Playground/Playground/Base.lproj/MainMenu.xib:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
677 |
678 |
679 |
680 |
681 |
682 |
683 |
684 |
685 |
686 |
687 |
688 |
699 |
710 |
721 |
732 |
743 |
754 |
765 |
766 |
767 |
768 |
769 |
770 |
771 |
772 |
773 |
774 |
775 |
776 |
777 |
778 |
779 |
780 |
781 |
782 |
783 |
784 |
785 |
786 |
787 |
788 |
789 |
790 |
791 |
792 |
793 |
794 |
795 |
796 |
797 |
798 |
799 |
800 |
801 |
812 |
823 |
834 |
845 |
846 |
847 |
848 |
849 |
850 |
851 |
852 |
853 |
854 |
855 |
856 |
857 |
858 |
--------------------------------------------------------------------------------