Skip to content

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
  • 11 commits
  • 165 files changed
  • 0 commit comments
  • 1 contributor
Showing with 9,413 additions and 5,653 deletions.
  1. +8 −0 .gitignore
  2. +20 −0 .gitmodules
  3. +6 −4 AZLayerGrid/AZLayerGrid.xcodeproj/project.pbxproj
  4. +4 −1 AZLayerGrid/AZLayerGrid/AZLayerGridDelegate.h
  5. +28 −3 AZLayerGrid/AZLayerGrid/AZLayerGridDelegate.m
  6. +113 −1,509 AZLayerGrid/AZLayerGrid/en.lproj/MainMenu.xib
  7. +9 −345 AZLayerGrid/AZView/en.lproj/MainMenu.xib
  8. +53 −22 AppledocSettings.plist
  9. +5 −2 AtoZ.xcworkspace/contents.xcworkspacedata
  10. +1 −1 AtoZ.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
  11. +7 −2 AtoZ/AZBoxView/AZBox.m
  12. +29 −29 AtoZ/AZGeometry/AZGrid.h
  13. +101 −101 AtoZ/AZGeometry/AZGrid.m
  14. +4 −10 AtoZ/AZGeometry/AZMatrix.h
  15. +19 −19 AtoZ/AZGeometry/AZMatrix.m
  16. +34 −45 AtoZ/AZGeometry/AZPoint.h
  17. +197 −197 AtoZ/AZGeometry/AZPoint.m
  18. +39 −53 AtoZ/AZGeometry/AZRect.h
  19. +219 −220 AtoZ/AZGeometry/AZRect.m
  20. +24 −24 AtoZ/AZGeometry/AZSegmentedRect.h
  21. +148 −148 AtoZ/AZGeometry/AZSegmentedRect.m
  22. +24 −37 AtoZ/AZGeometry/AZSize.h
  23. +142 −142 AtoZ/AZGeometry/AZSize.m
  24. +109 −109 AtoZ/AZGeometry/AtoZGeometry.h
  25. +880 −925 AtoZ/AZGeometry/AtoZGeometry.m
  26. +3 −3 AtoZ/AtoZ Encyclopedia/AZEncyclopediaDelegate.m
  27. +1,673 −71 AtoZ/AtoZ Encyclopedia/en.lproj/ControlPanel.xib
  28. +1 −1 AtoZ/AtoZ Entitlement/AZQuadCell.h
  29. +34 −37 AtoZ/AtoZ Entitlement/AZQuadCell.m
  30. +17 −8 AtoZ/AtoZ Entitlement/AZQuadObject.h
  31. +739 −768 AtoZ/AtoZ Entitlement/AZQuadObject.m
  32. +1,859 −116 AtoZ/AtoZ Entitlement/en.lproj/MainMenu.xib
  33. +2 −1 AtoZ/AtoZ-Framework.pch
  34. +27 −12 AtoZ/AtoZ.h
  35. +56 −16 AtoZ/AtoZ.m
  36. +438 −118 AtoZ/AtoZ.xcodeproj/project.pbxproj
  37. +8 −8 AtoZ/AtoZ.xcodeproj/xcuserdata/localadmin.xcuserdatad/xcschemes/xcschememanagement.plist
  38. +5 −0 AtoZ/AtoZFunctions.h
  39. +98 −9 AtoZ/AtoZFunctions.m
  40. +0 −28 AtoZ/AtoZTestBed/AZFacebookBrowserView.h
  41. +1 −1 AtoZ/AtoZTestBed/{AZColorViewController.h → ColorVC.h}
  42. +3 −3 AtoZ/AtoZTestBed/{AZColorViewController.m → ColorVC.m}
  43. +8 −9 AtoZ/AtoZTestBed/{AZColorViewController.xib → ColorVC.xib}
  44. +30 −0 AtoZ/AtoZTestBed/FBVC.h
  45. +2 −2 AtoZ/AtoZTestBed/{AZFacebookBrowserView.m → FBVC.m}
  46. +61 −13 AtoZ/AtoZTestBed/{AZFacebookBrowserView.xib → FBVC.xib}
  47. +2 −2 AtoZ/AtoZTestBed/{AZGeneralViewController.h → GeneralVC.h}
  48. +99 −97 AtoZ/AtoZTestBed/{AZGeneralViewController.m → GeneralVC.m}
  49. +4 −6 AtoZ/AtoZTestBed/{AZGeneralViewController.xib → GeneralVC.xib}
  50. +1 −1 AtoZ/AtoZTestBed/{AZGeometryViewController.h → GeometryVC.h}
  51. +3 −3 AtoZ/AtoZTestBed/{AZGeometryViewController.m → GeometryVC.m}
  52. +4 −5 AtoZ/AtoZTestBed/{AZGeometryViewController.xib → GeometryVC.xib}
  53. +639 −0 AtoZ/AtoZTestBed/TUIV.xib
  54. +20 −0 AtoZ/AtoZTestBed/TUIVVC.h
  55. +99 −0 AtoZ/AtoZTestBed/TUIVVC.m
  56. +36 −16 AtoZ/AtoZTestBed/TestBedDelegate.h
  57. +549 −127 AtoZ/AtoZTestBed/TestBedDelegate.m
  58. +9 −5 AtoZ/AtoZTestBed/{AZUIViewController.h → UIVC.h}
  59. +13 −20 AtoZ/AtoZTestBed/{AZUIViewController.m → UIVC.m}
  60. +647 −199 AtoZ/AtoZTestBed/{AZUIViewController.xib → UIVC.xib}
Sorry, we could not display the entire diff because it was too big.
View
8 .gitignore
@@ -10,6 +10,7 @@ Documentation
# AtoZ/Resources/Frameworks/*
AtoZ/AtoZiTunes.framework
Frameworks/Cocotron
+Frameworks/CocoatechStrings
# Xcode
# build/*
*.pbxuser
@@ -42,3 +43,10 @@ libatoz/
AtoZ/Views/README.md
AtoZ.graffle/
MailCore
+html
+AtoZ/html/*
+Frameworks/KVO-Test
+
+AtoZ/Classes/Nu.h
+
+AtoZ/Classes/Nu.m
View
20 .gitmodules
@@ -142,3 +142,23 @@
path = AtoZ/Models/StackAPI
url = https://github.com/mralexgray/StackInbox.git
ignore = dirty
+[submodule "Frameworks/NSOperationStack"]
+ path = Frameworks/NSOperationStack
+ url = https://github.com/mralexgray/NSOperationStack.git
+ ignore = dirty
+[submodule "Frameworks/CocoatechCore"]
+ path = Frameworks/CocoatechCore
+ url = https://github.com/mralexgray/CocoatechCore.git
+ ignore = dirty
+[submodule "Frameworks/TwUI"]
+ path = Frameworks/TwUI
+ url = https://github.com/mralexgray/twui.git
+ ignore = dirty
+[submodule "AtoZ/Views/TUIVs/AHLayout"]
+ path = AtoZ/Views/TUIVs/AHLayout
+ url = https://github.com/mralexgray/AHLayout.git
+ ignore = dirty
+[submodule "Frameworks/SNRHUDKit"]
+ path = Frameworks/SNRHUDKit
+ url = https://github.com/mralexgray/SNRHUDKit.git
+ ignore = dirty
View
10 AZLayerGrid/AZLayerGrid.xcodeproj/project.pbxproj
@@ -9,6 +9,8 @@
/* Begin PBXBuildFile section */
7B1C8F3115E4B07500C30618 /* WindyController.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B1C8F2F15E4B07500C30618 /* WindyController.m */; };
7B1C8F3215E4B07500C30618 /* WindyController.xib in Resources */ = {isa = PBXBuildFile; fileRef = 7B1C8F3015E4B07500C30618 /* WindyController.xib */; };
+ 7B4890EB16FC4C3B00882337 /* AtoZ.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B4890EA16FC4C3B00882337 /* AtoZ.framework */; };
+ 7B4890EC16FC4E5400882337 /* AZLayerGridDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = 7B85596915B9E8510005F558 /* AZLayerGridDelegate.m */; };
7B73D8EE15E4328900D2671A /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B85597515B9EA280005F558 /* QuartzCore.framework */; };
7B85595715B9E8510005F558 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 7B85595615B9E8510005F558 /* Cocoa.framework */; };
7B85596115B9E8510005F558 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 7B85595F15B9E8510005F558 /* InfoPlist.strings */; };
@@ -28,6 +30,7 @@
7B1C8F2E15E4B07500C30618 /* WindyController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WindyController.h; sourceTree = "<group>"; };
7B1C8F2F15E4B07500C30618 /* WindyController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = WindyController.m; sourceTree = "<group>"; };
7B1C8F3015E4B07500C30618 /* WindyController.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = WindyController.xib; sourceTree = "<group>"; };
+ 7B4890EA16FC4C3B00882337 /* AtoZ.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AtoZ.framework; path = "../../../../4X4/Derived/AtoZ-hfqteqfcvjfinlajqwkydsqyzpiz/Build/Products/Debug/AtoZ.framework"; sourceTree = "<group>"; };
7B85595215B9E8510005F558 /* AZLayerGrid.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = AZLayerGrid.app; sourceTree = BUILT_PRODUCTS_DIR; };
7B85595615B9E8510005F558 /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
7B85595915B9E8510005F558 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
@@ -59,6 +62,7 @@
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
+ 7B4890EB16FC4C3B00882337 /* AtoZ.framework in Frameworks */,
7B73D8EE15E4328900D2671A /* QuartzCore.framework in Frameworks */,
7B85595715B9E8510005F558 /* Cocoa.framework in Frameworks */,
);
@@ -79,6 +83,7 @@
7B85594715B9E8510005F558 = {
isa = PBXGroup;
children = (
+ 7B4890EA16FC4C3B00882337 /* AtoZ.framework */,
7B85595C15B9E8510005F558 /* AZLayerGrid */,
7BECAEED15BF0E7A00557357 /* AZView */,
7B85595315B9E8510005F558 /* Products */,
@@ -260,6 +265,7 @@
files = (
7B85596315B9E8510005F558 /* main.m in Sources */,
7B85597915B9ED0A0005F558 /* AZGridView.m in Sources */,
+ 7B4890EC16FC4E5400882337 /* AZLayerGridDelegate.m in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
@@ -374,9 +380,7 @@
ALWAYS_SEARCH_USER_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
- "\"$(SRCROOT)/../../../../../disenchanted 750/DerivedData/AtoZ-hfqteqfcvjfinlajqwkydsqyzpiz/Build/Products/Debug\"",
"\"${DSTROOT}\"",
- "\"/Users/localadmin/Library/Developer/Xcode/DerivedData/AtoZ-hfqteqfcvjfinlajqwkydsqyzpiz/Build/Products/Debug\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AZLayerGrid/AZLayerGrid-Prefix.pch";
@@ -397,9 +401,7 @@
ALWAYS_SEARCH_USER_PATHS = YES;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
- "\"$(SRCROOT)/../../../../../disenchanted 750/DerivedData/AtoZ-hfqteqfcvjfinlajqwkydsqyzpiz/Build/Products/Debug\"",
"\"${DSTROOT}\"",
- "\"/Users/localadmin/Library/Developer/Xcode/DerivedData/AtoZ-hfqteqfcvjfinlajqwkydsqyzpiz/Build/Products/Debug\"",
);
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = "AZLayerGrid/AZLayerGrid-Prefix.pch";
View
5 AZLayerGrid/AZLayerGrid/AZLayerGridDelegate.h
@@ -9,9 +9,12 @@
#import <Cocoa/Cocoa.h>
#import "AZGridView.h"
-@interface AZLayerGridDelegate : NSObject <NSApplicationDelegate>
+@interface AZLayerGridDelegate : NSObject <NSApplicationDelegate, AZBoxGridDataSource, AZBoxGridDelegate>
@property (assign) IBOutlet NSWindow *window;
@property (assign) IBOutlet AZGridView *gridView;
+@property (nonatomic, retain) NSMA *content;
+@property (NATOM,ASS) IBOutlet AZBoxGrid *boxes;
+
@end
View
31 AZLayerGrid/AZLayerGrid/AZLayerGridDelegate.m
@@ -15,14 +15,39 @@ @implementation AZLayerGridDelegate
- (void)awakeFromNib
{
[AtoZ sharedInstance];
+ _content = [NSIMG monoIcons].mutableCopy;
+ [_boxes setDelegate:self];
+ [_boxes setDataSource:self];
+ [_boxes reloadData];
+ [_boxes setCellSize:NSMakeSize(64.0, 64.0)];
+ [_boxes setAllowsMultipleSelection:YES];
+}
+
+- (NSUInteger)numberOfCellsInCollectionView:(AZBoxGrid *)collectionView
+{
+ return [_content count];
+}
+- (AZBox *)collectionView:(AZBoxGrid *)collectionView cellForIndex:(NSUInteger)index
+{
+ AZBox *cell = [_boxes dequeueReusableCellWithIdentifier:@"cell"];
+ if(!cell)
+ cell = [AZBox.alloc initWithFrame:AZRectFromDim(100) representing:_content[index] atIndex:index];
+ return cell;
+}
+- (void)collectionView:(AZBoxGrid *)collectionView didDeselectCellAtIndex:(NSUInteger)index
+{
+ NSLog(@"Selected cell at index: %u", (unsigned int)index);
+ NSLog(@"Position: %@", NSStringFromPoint([_boxes positionOfCellAtIndex:index]));
+}
+
// CALayer *root = [CALayer greyGradient];
// [root setValue:@(YES) forKey:@"locked"];
// root.frame = [_window.contentView bounds];
// root.autoresizingMask = kCALayerWidthSizable | kCALayerHeightSizable;
// self.gridView = AddLayer(root);
// _gridView.superview.wantsLayer = YES;
- // [root addSublayer:back];
-}
+// [root addSublayer:back];
+
//Metallic grey gradient background
@@ -37,7 +62,7 @@ - (void)awakeFromNib
// headerLayer.colors = colors;
// headerLayer.locations = locations;
// return headerLayer;
-//
+//
//}
View
1,622 AZLayerGrid/AZLayerGrid/en.lproj/MainMenu.xib
113 additions, 1,509 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
354 AZLayerGrid/AZView/en.lproj/MainMenu.xib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1080</int>
- <string key="IBDocument.SystemVersion">12A269</string>
- <string key="IBDocument.InterfaceBuilderVersion">2541</string>
- <string key="IBDocument.AppKitVersion">1187</string>
- <string key="IBDocument.HIToolboxVersion">624.00</string>
+ <string key="IBDocument.SystemVersion">12C60</string>
+ <string key="IBDocument.InterfaceBuilderVersion">3084</string>
+ <string key="IBDocument.AppKitVersion">1187.34</string>
+ <string key="IBDocument.HIToolboxVersion">625.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">2541</string>
+ <string key="NS.object.0">3084</string>
</object>
<array key="IBDocument.IntegratedClassDependencies">
<string>NSCustomObject</string>
@@ -1297,7 +1297,7 @@
<object class="NSWindowTemplate" id="972006081">
<int key="NSWindowStyleMask">15</int>
<int key="NSWindowBacking">2</int>
- <string key="NSWindowRect">{{335, 390}, {480, 360}}</string>
+ <string key="NSWindowRect">{{441, 215}, {480, 360}}</string>
<int key="NSWTFlags">1954021376</int>
<string key="NSWindowTitle">AZView</string>
<string key="NSWindowClass">NSWindow</string>
@@ -1320,14 +1320,12 @@
<int key="NSvFlags">274</int>
<string key="NSFrameSize">{480, 319}</string>
<reference key="NSSuperview" ref="756774641"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="463834983"/>
+ <reference key="NSNextKeyView" ref="22563994"/>
<string key="NSReuseIdentifierKey">_NS:13</string>
</object>
</array>
<string key="NSFrameSize">{480, 319}</string>
<reference key="NSSuperview" ref="786333509"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="182342580"/>
<string key="NSReuseIdentifierKey">_NS:11</string>
<reference key="NSDocView" ref="182342580"/>
@@ -1346,7 +1344,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {16, 360}}</string>
<reference key="NSSuperview" ref="786333509"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="382400196"/>
<string key="NSReuseIdentifierKey">_NS:15</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@@ -1360,7 +1357,6 @@
<int key="NSvFlags">-2147483392</int>
<string key="NSFrame">{{-100, -100}, {480, 16}}</string>
<reference key="NSSuperview" ref="786333509"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="756774641"/>
<string key="NSReuseIdentifierKey">_NS:26</string>
<bool key="NSAllowsLogicalLayoutDirection">NO</bool>
@@ -1372,8 +1368,7 @@
</array>
<string key="NSFrame">{{0, 41}, {480, 319}}</string>
<reference key="NSSuperview" ref="439893737"/>
- <reference key="NSWindow"/>
- <reference key="NSNextKeyView" ref="22563994"/>
+ <reference key="NSNextKeyView" ref="756774641"/>
<bool key="NSViewCanDrawConcurrently">YES</bool>
<string key="NSReuseIdentifierKey">_NS:9</string>
<int key="NSsFlags">153600</int>
@@ -1389,7 +1384,6 @@
<int key="NSvFlags">290</int>
<string key="NSFrame">{{18, 14}, {444, 21}}</string>
<reference key="NSSuperview" ref="439893737"/>
- <reference key="NSWindow"/>
<string key="NSReuseIdentifierKey">_NS:9</string>
<bool key="NSEnabled">YES</bool>
<object class="NSSliderCell" key="NSCell" id="917604876">
@@ -1412,7 +1406,6 @@
</array>
<string key="NSFrameSize">{480, 360}</string>
<reference key="NSSuperview"/>
- <reference key="NSWindow"/>
<reference key="NSNextKeyView" ref="786333509"/>
</object>
<string key="NSScreenRect">{{0, 0}, {1360, 746}}</string>
@@ -3348,336 +3341,7 @@
<nil key="sourceID"/>
<int key="maxID">550</int>
</object>
- <object class="IBClassDescriber" key="IBDocument.Classes">
- <array class="NSMutableArray" key="referencedPartialClassDescriptions">
- <object class="IBPartialClassDescription">
- <string key="className">AZFile</string>
- <string key="superclassName">BaseModel</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/AZFile.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">AppDelegate</string>
- <string key="superclassName">NSObject</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="URLFetchWithProgress:">id</string>
- <string key="clearCache:">id</string>
- <string key="dismissAuthSheet:">id</string>
- <string key="fetchThreeImages:">id</string>
- <string key="fetchTopSecretInformation:">id</string>
- <string key="fetchWebPage:">id</string>
- <string key="postWithProgress:">id</string>
- <string key="reloadTableData:">id</string>
- <string key="resumeURLFetchWithProgress:">id</string>
- <string key="search:">id</string>
- <string key="simpleURLFetch:">id</string>
- <string key="stopURLFetchWithProgress:">id</string>
- <string key="throttleBandwidth:">id</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="actionInfosByName">
- <object class="IBActionInfo" key="URLFetchWithProgress:">
- <string key="name">URLFetchWithProgress:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="clearCache:">
- <string key="name">clearCache:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="dismissAuthSheet:">
- <string key="name">dismissAuthSheet:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="fetchThreeImages:">
- <string key="name">fetchThreeImages:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="fetchTopSecretInformation:">
- <string key="name">fetchTopSecretInformation:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="fetchWebPage:">
- <string key="name">fetchWebPage:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="postWithProgress:">
- <string key="name">postWithProgress:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="reloadTableData:">
- <string key="name">reloadTableData:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="resumeURLFetchWithProgress:">
- <string key="name">resumeURLFetchWithProgress:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="search:">
- <string key="name">search:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="simpleURLFetch:">
- <string key="name">simpleURLFetch:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="stopURLFetchWithProgress:">
- <string key="name">stopURLFetchWithProgress:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="throttleBandwidth:">
- <string key="name">throttleBandwidth:</string>
- <string key="candidateClassName">id</string>
- </object>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="outlets">
- <string key="arrayController">NSArrayController</string>
- <string key="bandwidthUsed">NSTextField</string>
- <string key="column1">NSTableColumn</string>
- <string key="column2">NSTableColumn</string>
- <string key="dataURICheckbox">NSButton</string>
- <string key="fileLocation">NSTextField</string>
- <string key="host">NSTextField</string>
- <string key="htmlSource">NSTextView</string>
- <string key="iconView">NSImageView</string>
- <string key="imageProgress1">NSProgressIndicator</string>
- <string key="imageProgress2">NSProgressIndicator</string>
- <string key="imageProgress3">NSProgressIndicator</string>
- <string key="imageView1">NSImageView</string>
- <string key="imageView2">NSImageView</string>
- <string key="imageView3">NSImageView</string>
- <string key="keychainCheckbox">NSButton</string>
- <string key="loginWindow">NSWindow</string>
- <string key="password">NSTextField</string>
- <string key="postStatus">NSTextField</string>
- <string key="progressIndicator">NSProgressIndicator</string>
- <string key="realm">NSTextField</string>
- <string key="resumeButton">NSButton</string>
- <string key="showAccurateProgress">NSButton</string>
- <string key="startButton">NSButton</string>
- <string key="tableLoadStatus">NSTextField</string>
- <string key="tableView">NSTableView</string>
- <string key="theFile">AZFile</string>
- <string key="theFileController">NSArrayController</string>
- <string key="topSecretInfo">NSTextField</string>
- <string key="urlField">NSTextField</string>
- <string key="username">NSTextField</string>
- <string key="webPageSource">NSTextView</string>
- <string key="webView">WebView</string>
- <string key="window">NSWindow</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="toOneOutletInfosByName">
- <object class="IBToOneOutletInfo" key="arrayController">
- <string key="name">arrayController</string>
- <string key="candidateClassName">NSArrayController</string>
- </object>
- <object class="IBToOneOutletInfo" key="bandwidthUsed">
- <string key="name">bandwidthUsed</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="column1">
- <string key="name">column1</string>
- <string key="candidateClassName">NSTableColumn</string>
- </object>
- <object class="IBToOneOutletInfo" key="column2">
- <string key="name">column2</string>
- <string key="candidateClassName">NSTableColumn</string>
- </object>
- <object class="IBToOneOutletInfo" key="dataURICheckbox">
- <string key="name">dataURICheckbox</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="fileLocation">
- <string key="name">fileLocation</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="host">
- <string key="name">host</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="htmlSource">
- <string key="name">htmlSource</string>
- <string key="candidateClassName">NSTextView</string>
- </object>
- <object class="IBToOneOutletInfo" key="iconView">
- <string key="name">iconView</string>
- <string key="candidateClassName">NSImageView</string>
- </object>
- <object class="IBToOneOutletInfo" key="imageProgress1">
- <string key="name">imageProgress1</string>
- <string key="candidateClassName">NSProgressIndicator</string>
- </object>
- <object class="IBToOneOutletInfo" key="imageProgress2">
- <string key="name">imageProgress2</string>
- <string key="candidateClassName">NSProgressIndicator</string>
- </object>
- <object class="IBToOneOutletInfo" key="imageProgress3">
- <string key="name">imageProgress3</string>
- <string key="candidateClassName">NSProgressIndicator</string>
- </object>
- <object class="IBToOneOutletInfo" key="imageView1">
- <string key="name">imageView1</string>
- <string key="candidateClassName">NSImageView</string>
- </object>
- <object class="IBToOneOutletInfo" key="imageView2">
- <string key="name">imageView2</string>
- <string key="candidateClassName">NSImageView</string>
- </object>
- <object class="IBToOneOutletInfo" key="imageView3">
- <string key="name">imageView3</string>
- <string key="candidateClassName">NSImageView</string>
- </object>
- <object class="IBToOneOutletInfo" key="keychainCheckbox">
- <string key="name">keychainCheckbox</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="loginWindow">
- <string key="name">loginWindow</string>
- <string key="candidateClassName">NSWindow</string>
- </object>
- <object class="IBToOneOutletInfo" key="password">
- <string key="name">password</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="postStatus">
- <string key="name">postStatus</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="progressIndicator">
- <string key="name">progressIndicator</string>
- <string key="candidateClassName">NSProgressIndicator</string>
- </object>
- <object class="IBToOneOutletInfo" key="realm">
- <string key="name">realm</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="resumeButton">
- <string key="name">resumeButton</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="showAccurateProgress">
- <string key="name">showAccurateProgress</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="startButton">
- <string key="name">startButton</string>
- <string key="candidateClassName">NSButton</string>
- </object>
- <object class="IBToOneOutletInfo" key="tableLoadStatus">
- <string key="name">tableLoadStatus</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="tableView">
- <string key="name">tableView</string>
- <string key="candidateClassName">NSTableView</string>
- </object>
- <object class="IBToOneOutletInfo" key="theFile">
- <string key="name">theFile</string>
- <string key="candidateClassName">AZFile</string>
- </object>
- <object class="IBToOneOutletInfo" key="theFileController">
- <string key="name">theFileController</string>
- <string key="candidateClassName">NSArrayController</string>
- </object>
- <object class="IBToOneOutletInfo" key="topSecretInfo">
- <string key="name">topSecretInfo</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="urlField">
- <string key="name">urlField</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="username">
- <string key="name">username</string>
- <string key="candidateClassName">NSTextField</string>
- </object>
- <object class="IBToOneOutletInfo" key="webPageSource">
- <string key="name">webPageSource</string>
- <string key="candidateClassName">NSTextView</string>
- </object>
- <object class="IBToOneOutletInfo" key="webView">
- <string key="name">webView</string>
- <string key="candidateClassName">WebView</string>
- </object>
- <object class="IBToOneOutletInfo" key="window">
- <string key="name">window</string>
- <string key="candidateClassName">NSWindow</string>
- </object>
- </dictionary>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/AppDelegate.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">BaseModel</string>
- <string key="superclassName">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/BaseModel.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSDocument</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="printDocument:">id</string>
- <string key="revertDocumentToSaved:">id</string>
- <string key="runPageLayout:">id</string>
- <string key="saveDocument:">id</string>
- <string key="saveDocumentAs:">id</string>
- <string key="saveDocumentTo:">id</string>
- </dictionary>
- <dictionary class="NSMutableDictionary" key="actionInfosByName">
- <object class="IBActionInfo" key="printDocument:">
- <string key="name">printDocument:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="revertDocumentToSaved:">
- <string key="name">revertDocumentToSaved:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="runPageLayout:">
- <string key="name">runPageLayout:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="saveDocument:">
- <string key="name">saveDocument:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="saveDocumentAs:">
- <string key="name">saveDocumentAs:</string>
- <string key="candidateClassName">id</string>
- </object>
- <object class="IBActionInfo" key="saveDocumentTo:">
- <string key="name">saveDocumentTo:</string>
- <string key="candidateClassName">id</string>
- </object>
- </dictionary>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/NSDocument.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">WebView</string>
- <object class="NSMutableDictionary" key="actions">
- <string key="NS.key.0">reloadFromOrigin:</string>
- <string key="NS.object.0">id</string>
- </object>
- <object class="NSMutableDictionary" key="actionInfosByName">
- <string key="NS.key.0">reloadFromOrigin:</string>
- <object class="IBActionInfo" key="NS.object.0">
- <string key="name">reloadFromOrigin:</string>
- <string key="candidateClassName">id</string>
- </object>
- </object>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">./Classes/WebView.h</string>
- </object>
- </object>
- </array>
- </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes"/>
<int key="IBDocument.localizationMode">0</int>
<string key="IBDocument.TargetRuntimeIdentifier">IBCocoaFramework</string>
<bool key="IBDocument.PluginDeclaredDependenciesTrackSystemTargetVersion">YES</bool>
View
75 AppledocSettings.plist
@@ -2,28 +2,59 @@
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
- <key>--project-name</key>
- <string>AtoZ.Framework</string>
-
+ <key>--project-version</key>
+ <string>${BUILD_VERSION} </string>
+ <key>--docset-bundle-name</key>
+ <string>AtoZ</string>
+ <key>--docset-desc</key>
+ <string>Zhuzhiness in the form of a framework.</string>
+ <key>--exit-threshold</key>
+ <integer>2</integer>
<key>--input</key>
- <array>
- <string>./AtoZ</string>
- <string>./Frameworks</string>
- </array>
- <!-- <key>--ignore</key> -->
- <!-- <array> -->
- <!-- </array> -->
- <!-- <key>--output</key> -->
- <!-- <string>./Documentation</string> -->
- <!-- <key>--docset-feed-url</key> -->
- <!-- <string>http://mrgray.com/docs/%DOCSETATOMFILENAME</string> -->
- <!-- <key>--docset-package-url</key> -->
- <!-- <string>http://mrgray.com/docs/%DOCSETPACKAGEFILENAME</string> -->
- <!-- <key>--publish-docset</key> -->
- <!-- <true/> -->
- <!-- <key>--verbose</key> -->
- <!-- <integer>4</integer> -->
- <!-- <key>--logformat</key> -->
- <!-- <integer>1</integer> -->
+ <array>
+ <string>AtoZ/Categories</string>
+ <string>AtoZ/AZGeometry</string>
+ <string>AtoZ/Views</string>
+ <string>AtoZ/Core</string>
+ <string>AtoZ/Classes</string>
+ </array>
+ <key>--no-create-docset</key>
+ <false/>
+ <key>--merge-categories</key>
+ <true/>
+ <key>--keep-undocumented-members</key>
+ <true/>
+ <key>--search-undocumented-doc</key>
+ <true/>
+ <key>--keep-intermediate-files</key>
+ <true/>
+ <key>--keep-undocumented-objects</key>
+ <true/>
+ <key>--create-html</key>
+ <true/>
+ <key>--publish-docset</key>
+ <true/>
+ <key>--install-docset</key>
+ <true/>
+ <key>--create-docset</key>
+ <true/>
+ <key>--project-company</key>
+ <string>mrgray.com</string>
+ <key>--output</key>
+ <string>/mg/docs/atoz</string>
+ <key>--docset-feed-url</key>
+ <string>http://mrgray.com/docs/atoz/%DOCSETATOMFILENAME</string>
+ <key>--docset-package-url</key>
+ <string>http://mrgray.com/docs/atoz/%DOCSETPACKAGEFILENAME</string>
+ <key>--project-name</key>
+ <string>AtoZ.Framework</string>
+ <key>--ignore</key>
+ <array>
+ <string>Frameworks</string>
+ </array>
+ <key>--verbose</key>
+ <integer>5</integer>
+ <key>--logformat</key>
+ <integer>1</integer>
</dict>
</plist>
View
7 AtoZ.xcworkspace/contents.xcworkspacedata
@@ -2,10 +2,10 @@
<Workspace
version = "1.0">
<FileRef
- location = "group:libatoz/libatoz.xcodeproj">
+ location = "container:AtoZ/AtoZ.xcodeproj">
</FileRef>
<FileRef
- location = "container:AtoZ/AtoZ.xcodeproj">
+ location = "group:MailCore/Examples/OSX/MessageSender/MessageSender.xcodeproj">
</FileRef>
<FileRef
location = "group:MailCore/Examples/OSX/InboxLister/../../../MailCore.xcodeproj">
@@ -31,4 +31,7 @@
<FileRef
location = "group:AZLayerGrid/AZLayerGrid.xcodeproj">
</FileRef>
+ <FileRef
+ location = "group:libatoz/libatoz.xcodeproj">
+ </FileRef>
</Workspace>
View
2 AtoZ.xcworkspace/xcshareddata/WorkspaceSettings.xcsettings
@@ -3,6 +3,6 @@
<plist version="1.0">
<dict>
<key>IDEWorkspaceSharedSettings_AutocreateContextsIfNeeded</key>
- <false/>
+ <true/>
</dict>
</plist>
View
9 AtoZ/AZBoxView/AZBox.m
@@ -70,10 +70,15 @@ - (void)setRepresentedObject:(id)representedObject {
// gradient = [[NSGradient alloc] initWithStartingColor:c.color.brighter.brighter endingColor:c.color.darker.darker];
color = c.color;
image = [ c.image coloredWithColor:c.color.contrastingForegroundColor];
-
- // NSImage *ci = (selected_ ? [ c.image tintedWithColor:c.color] : c.image);
+// NSImage *ci = (selected_ ? [ c.image tintedWithColor:c.color] : c.image);
[image setScalesWhenResized: YES];
}
+ if ( [representedObject_ isKindOfClass:[NSIMG class]] ){
+ color = RANDOMCOLOR;
+ image = representedObject_;
+ [image setScalesWhenResized: YES];
+ }
+
// self.color = [representedObject_ valueForKey:@"color"];
// } else { NSColor *r = RANDOMCOLOR;
// while ( (![r isRedish]) || ([r isBoring]) ) r = RANDOMCOLOR;
View
58 AtoZ/AZGeometry/AZGrid.h
@@ -14,49 +14,49 @@
#import "AZMatrix.h"
enum {
- AZGridStyleCompact = 0,
- AZGridStyleHorizontal = 1,
- AZGridStyleVertical = 2
+ AZGridStyleCompact = 0,
+ AZGridStyleHorizontal = 1,
+ AZGridStyleVertical = 2
};
enum AZGridOrder {
- AZGridRowMajorOrder = 0,
- AZGridColumnMajorOrder = 1
+ AZGridRowMajorOrder = 0,
+ AZGridColumnMajorOrder = 1
};
@class AZPoint, AZSize, AZRect, AZMatrix;
@interface AZGrid : NSObject {
- NSMutableArray *array;
- NSUInteger parallels;
- NSUInteger style;
- NSUInteger order;
- BOOL rowMajorOrder;
+ NSMA *array;
+ NSUI parallels;
+ NSUI style;
+ NSUI order;
+ BOOL rowMajorOrder;
}
--(id)initWithCapacity:(NSUInteger)numItems;
+- (id) initWithCapacity:(NSUInteger)numItems;
-@property (RONLY) NSUInteger count;
-@property (unsafe_unretained, readonly) AZSize* size;
-@property (RONLY) CGFloat width;
-@property (RONLY) CGFloat height;
+@property (UNSFE,RONLY) AZSize* size;
+@property (RONLY) NSUI count;
+@property (RONLY) CGF width;
+@property (RONLY) CGF height;
-@property (RONLY) CGFloat min;
-@property (RONLY) CGFloat max;
+@property (RONLY) CGF min;
+@property (RONLY) CGF max;
-@property (assign) NSUInteger parallels;
-@property (assign) NSUInteger order;
-@property (assign) NSUInteger style;
+@property (ASS) NSUI parallels;
+@property (ASS) NSUI order;
+@property (ASS) NSUI style;
--(NSMutableArray *)elements;
--(NSNumber *)indexAtPoint:(NSPoint)point;
--(id)objectAtIndex:(NSUInteger)index;
--(id)objectAtPoint:(NSPoint)point;
--(AZPoint *)pointAtIndex:(NSUInteger)index;
+- (NSMA*) elements;
+- (NSNumber*) indexAtPoint:(NSP)point;
+- (id) objectAtIndex:(NSUInteger)index;
+- (id) objectAtPoint:(NSP)point;
+- (AZPoint*) pointAtIndex:(NSUInteger)index;
--(void)addObject:(id)anObject;
--(void)insertObject:(id)anObject atIndex:(NSUInteger)index;
--(void)removeObjectAtIndex:(NSUInteger)index;
--(void)removeAllObjects;
+- (void) addObject:(id) anObject;
+- (void) insertObject:(id) anObject atIndex:(NSUInteger)index;
+- (void) removeObjectAtIndex:(NSUInteger)index;
+- (void) removeAllObjects;
@end
View
202 AtoZ/AZGeometry/AZGrid.m
@@ -9,184 +9,184 @@
#import "AZGrid.h"
@interface AZGrid (Private)
--(void)_init;
+- (void) _init;
@end
@implementation AZGrid
--(void)_init {
- parallels = 1;
- style = AZGridStyleCompact;
- order = AZGridRowMajorOrder;
+- (void) _init {
+ parallels = 1;
+ style = AZGridStyleCompact;
+ order = AZGridRowMajorOrder;
}
--(id)init {
- if ((self = [super init])) {
+- (id) init {
+ if ((self = [super init])) {
[self _init];
array = NSMA.new;
- }
- return self;
+ }
+ return self;
}
--(id)initWithCapacity:(NSUInteger)numItems {
- if ((self = [super init])) {
+- (id) initWithCapacity:(NSUInteger)numItems {
+ if ((self = [super init])) {
[self _init];
array = [[NSMutableArray alloc] initWithCapacity:numItems];
- }
- return self;
+ }
+ return self;
}
--(NSUInteger)parallels {
- return parallels;
+- (NSUInteger)parallels {
+ return parallels;
}
--(void)setParallels:(NSUInteger)v {
- self->parallels = MAX(1, parallels);
+- (void) setParallels:(NSUInteger)v {
+ self->parallels = MAX(1, parallels);
}
--(NSUInteger)style {
- return style;
+- (NSUInteger)style {
+ return style;
}
--(void)setStyle:(NSUInteger)v {
- if (v > 2) {
+- (void) setStyle:(NSUInteger)v {
+ if (v > 2) {
self->style = 0;
- } else {
+ } else {
self->style = v;
- }
+ }
}
--(NSUInteger)order {
- return order;
+- (NSUInteger)order {
+ return order;
}
--(void)setOrder:(NSUInteger)o {
- if (o <= 1) {
+- (void) setOrder:(NSUInteger)o {
+ if (o <= 1) {
self->order = o;
- }
+ }
}
--(NSUInteger)count {
- return array.count;
+- (NSUInteger)count {
+ return array.count;
}
--(NSMutableArray *)elements {
- return array;
+- (NSMA*) elements {
+ return array;
}
--(void)addObject:(id)anObject {
- [array addObject:anObject];
+- (void) addObject:(id) anObject {
+ [array addObject:anObject];
}
--(void)insertObject:(id)anObject atIndex:(NSUInteger)index {
- [array insertObject:anObject atIndex:index];
+- (void) insertObject:(id) anObject atIndex:(NSUInteger)index {
+ [array insertObject:anObject atIndex:index];
}
--(void)removeAllObjects {
- [array removeAllObjects];
+- (void) removeAllObjects {
+ [array removeAllObjects];
}
--(void)removeObjectAtIndex:(NSUInteger)index {
- [array removeObjectAtIndex:index];
+- (void) removeObjectAtIndex:(NSUInteger)index {
+ [array removeObjectAtIndex:index];
}
--(id)objectAtIndex:(NSUInteger)index {
- return array[index];
+- (id) objectAtIndex:(NSUInteger)index {
+ return array[index];
}
--(AZSize *)size {
- NSSize s = NSMakeSize(0, 0);
-
- if (style == AZGridStyleHorizontal) {
+- (AZSize*) size {
+ NSSZ s = NSMakeSize(0, 0);
+
+ if (style == AZGridStyleHorizontal) {
s.width = ceil(self.count / parallels);
s.height = parallels;
- } else if (style == AZGridStyleVertical) {
+ } else if (style == AZGridStyleVertical) {
s.width = parallels;
s.height = ceil(self.count / parallels);
- } else /* AZGridStyleCompact */ {
+ } else /* AZGridStyleCompact */ {
float d = ceil(sqrt(self.count));
s.width = d;
s.height = d;
- }
-
- return [AZSize sizeWithSize:s];
+ }
+
+ return [AZSize sizeWithSize:s];
}
--(CGFloat)width {
- return self.size.width;
+- (CGF)width {
+ return self.size.width;
}
--(CGFloat)height {
- return self.size.height;
+- (CGF)height {
+ return self.size.height;
}
--(CGFloat)min {
- return self.size.min;
+- (CGF)min {
+ return self.size.min;
}
--(CGFloat)max {
- return self.size.max;
+- (CGF)max {
+ return self.size.max;
}
--(AZPoint *)pointAtIndex:(NSUInteger)index {
- if (self.count == 0) {
+- (AZPoint*) pointAtIndex:(NSUInteger)index {
+ if (self.count == 0) {
return nil;
- }
-
- AZSize *s = self.size;
- CGFloat x, y;
-
- if (order == AZGridColumnMajorOrder) {
+ }
+
+ AZSize *s = self.size;
+ CGF x, y;
+
+ if (order == AZGridColumnMajorOrder) {
// column major order
x = floor(index / s.height);
y = index % (int)s.height;
- } else {
+ } else {
// row major order
x = index % (int)s.width;
y = floor(index / s.width);
- }
-
- return [AZPoint pointWithPoint:NSMakePoint(x, y)];
+ }
+
+ return [AZPoint pointWithPoint:NSMakePoint(x, y)];
}
--(NSNumber *)indexAtPoint:(NSPoint)point {
- if (self.count == 0) {
+- (NSNumber*) indexAtPoint:(NSP)point {
+ if (self.count == 0) {
return nil;
- }
-
- AZSize *s = self.size;
- NSInteger x = floor(point.x);
- NSInteger y = floor(point.y);
+ }
+
+ AZSize *s = self.size;
+ NSI x = floor(point.x);
+ NSI y = floor(point.y);
- if (x < 0 || x >= s.width || y < 0 || y >= s.height) {
+ if (x < 0 || x >= s.width || y < 0 || y >= s.height) {
return nil;
- }
-
- if (order == AZGridRowMajorOrder) {
+ }
+
+ if (order == AZGridRowMajorOrder) {
// left to right -> top to bottom
return [NSNumber numberWithUnsignedInt:point.y * s.width + point.x];
- } else if (order == AZGridColumnMajorOrder) {
+ } else if (order == AZGridColumnMajorOrder) {
// top to bottom -> left to right
return [NSNumber numberWithUnsignedInt:point.x * s.height + point.y];
- }
-
- return nil;
+ }
+
+ return nil;
}
--(id)objectAtPoint:(NSPoint)point {
- NSNumber *index = [self indexAtPoint:point];
- if (index == nil) {
+- (id) objectAtPoint:(NSP)point {
+ NSNumber *index = [self indexAtPoint:point];
+ if (index == nil) {
return nil;
- }
-
- return [self objectAtIndex:index.unsignedIntValue];;
-}
-
--(NSString *)description {
- AZSize *s = self.size;
- return [NSString stringWithFormat:@"%@(%.f, %.f; %ld)",
- self.className,
- s.width,
- s.height,
- self.count];
+ }
+
+ return [self objectAtIndex:index.unsignedIntValue];;
+}
+
+- (NSString*) description {
+ AZSize *s = self.size;
+ return [NSString stringWithFormat:@"%@(%.f, %.f; %ld)",
+ self.className,
+ s.width,
+ s.height,
+ self.count];
}
@end
View
14 AtoZ/AZGeometry/AZMatrix.h
@@ -1,23 +1,17 @@
-//
// THMatrix.h
// Lumumba Framework
-//
// Created by Benjamin Schüttler on 28.09.09.
// Copyright 2011 Rogue Coding. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
// A THMatrix is always mutable
@interface AZMatrix : NSObject {
- NSUInteger width, height;
- NSMutableArray *data;
+ NSUI width, height;
+ NSMA *data;
}
-@property (nonatomic, assign) NSUInteger width;
-@property (nonatomic, assign) NSUInteger height;
+@property (NATOM,ASS) NSUI width, height;
--(id)objectAtX:(NSUInteger)x y:(NSUInteger)y;
+- (id) objectAtX:(NSUInteger)x y:(NSUInteger)y;
@end
View
38 AtoZ/AZGeometry/AZMatrix.m
@@ -9,40 +9,40 @@
#import "AZMatrix.h"
@implementation AZMatrix
--(id)init {
- if ((self = super.init)) {
+- (id) init {
+ if ((self = super.init)) {
data = NSMA.new;
height = 0;
width = 0;
- }
-
- return self;
+ }
+
+ return self;
}
@synthesize width, height;
--(void)setHeight:(NSUInteger)hv {
- // this is easy, just extend or crop the array
- if (hv == height) {
+- (void) setHeight:(NSUInteger)hv {
+ // this is easy, just extend or crop the array
+ if (hv == height) {
// NADA
return;
- }
- if (hv > height) {
+ }
+ if (hv > height) {
// FIXME hier weiterschreiben
- }
+ }
}
--(void)setWidth:(NSUInteger)wv {
-
+- (void) setWidth:(NSUInteger)wv {
+
}
--(id)objectAtX:(NSUInteger)x y:(NSUInteger)y {
- if (x > width || y > height) {
+- (id) objectAtX:(NSUInteger)x y:(NSUInteger)y {
+ if (x > width || y > height) {
[NSException raise:@"AZMatrixIndexOutOfBounds"
- format:@"Matrix index (%ld, %ld) out of bounds (%ld, %ld)",
- x,y,width,height];
+ format:@"Matrix index (%ld, %ld) out of bounds (%ld, %ld)",
+ x,y,width,height];
return nil;
- }
- return data[(y * width + x)];
+ }
+ return data[(y * width + x)];
}
@end
View
79 AtoZ/AZGeometry/AZPoint.h
@@ -1,66 +1,55 @@
-//
// THPoint.h
// Lumumba Framework
-//
// Created by Benjamin Schüttler on 28.09.09.
// Copyright 2011 Rogue Coding. All rights reserved.
-//
-
-#import <Cocoa/Cocoa.h>
@class AZSize, AZRect, AZGrid, AGMatrix;
+@interface AZPoint : NSObject { CGF x, y; }
++ (AZPoint*) point;
++ (AZPoint*) pointOf:(id)object;
++ (AZPoint*) pointWithX:(CGF)x y:(CGF)y;
++ (AZPoint*) pointWithPoint:(NSP)pt;
++ (AZPoint*) halfPoint;
-@interface AZPoint : NSObject {
- CGFloat x;
- CGFloat y;
-}
-+(AZPoint *)point;
-+(AZPoint *)pointOf:(id)object;
-+(AZPoint *)pointWithX:(CGFloat)x y:(CGFloat)y;
-+(AZPoint *)pointWithPoint:(NSPoint)pt;
-+(AZPoint *)halfPoint;
-
-+(BOOL)maybePoint:(id)object;
++ (BOOL)maybePoint:(id) object;
--(id)initWithPoint:(NSPoint)pt;
--(id)initWithX:(CGFloat)x y:(CGFloat)y;
+- (id) initWithPoint:(NSP)pt;
+- (id) initWithX: (CGF)x y:(CGF)y;
-@property (assign) NSPoint point;
-@property (RONLY) CGPoint cgpoint;
-@property (assign) CGFloat x;
-@property (assign) CGFloat y;
+@property (RONLY) CGP cgpoint;
+@property (ASS) NSP point;
+@property (ASS) CGF x, y;
-@property (RONLY) CGFloat min;
-@property (RONLY) CGFloat max;
+@property (RONLY) CGF min, max;
--(id)moveTo:(id)object;
+- (id) moveTo:(id) object;
--(id)moveTowards:(id)object withDistance:(CGFloat)relativeDistance;
--(id)moveTowardsPoint:(NSPoint)pt withDistance:(CGFloat)relativeDistance;
+- (id) moveTowards: (id)object withDistance:(CGF)relativeDistance;
+- (id) moveTowardsPoint:(NSP)pt withDistance:(CGF)relativeDistance;
--(id)moveBy:(id)object;
--(id)moveByPoint:(NSPoint)pt;
--(id)moveByX:(CGFloat)x andY:(CGFloat)y;
--(id)moveByNegative:(id)object;
+- (id) moveBy: (id) object;
+- (id) moveByPoint: (NSP)pt;
+- (id) moveByX: (CGF)x andY:(CGF)y;
+- (id) moveByNegative:(id) object;
--(id)multiplyBy:(id)object;
--(id)divideBy:(id)object;
+- (id) multiplyBy:(id) object;
+- (id) divideBy: (id) object;
--(id)swap;
--(id)negate;
--(id)invert;
+- (id) swap;
+- (id) negate;
+- (id) invert;
--(id)floor;
--(id)round;
--(id)ceil;
--(id)square;
--(id)root;
+- (id) floor;
+- (id) round;
+- (id) ceil;
+- (id) square;
+- (id) root;
--(id)ratio;
+- (id) ratio;
--(BOOL)equals:(id)object;
--(BOOL)equalsPoint:(NSPoint)point;
+- (BOOL)equals:(id) object;
+- (BOOL)equalsPoint:(NSP)point;
--(BOOL)isWithin:(id)object;
+- (BOOL)isWithin:(id) object;
@end
View
394 AtoZ/AZGeometry/AZPoint.m
@@ -14,300 +14,300 @@ @implementation AZPoint
#pragma mark statics
-+(AZPoint *)point {
- return [[AZPoint alloc] init];
-}
-
-+(AZPoint *)pointOf:(id)object {
- AZPoint *re = [[AZPoint alloc] init];
-
- if (object == nil) { return re; }
- if ([object isKindOfClass:[NSNumber class]]) {
- NSNumber *n = (NSNumber *)object; re.x = n.floatValue; re.y = n.floatValue;
- } else if ([object isKindOfClass:AZPoint.class]) {
- AZPoint *pt = (AZPoint *)object; re.x = pt.x; re.y = pt.y;
- } else if ([object isKindOfClass:[AZSize class]]) {
- AZSize *s = (AZSize *)object; re.x = s.width; re.y = s.height;
- } else if ([object isKindOfClass:[NSView class]]) {
- NSView *v = (NSView *)object; re.x = v.frame.origin.x; re.y = v.frame.origin.y;
- } else if ([object isKindOfClass:[CALayer class]]) {
- CALayer *l = (CALayer *)object; re.x = l.frame.origin.x; re.y = l.frame.origin.y;
- } else if ([object isKindOfClass:[NSEvent class]]) {
- NSEvent *event = (NSEvent *)object; re.x = event.locationInWindow.x; re.y = event.locationInWindow.y;
- }
- return re;
++ (AZPoint*) point {
+ return [[AZPoint alloc] init];
+}
+
++ (AZPoint*) pointOf:(id) object {
+ AZPoint *re = [[AZPoint alloc] init];
+
+ if (object == nil) { return re; }
+ if ([object isKindOfClass:[NSNumber class]]) {
+ NSNumber *n = (NSNumber*) object; re.x = n.floatValue; re.y = n.floatValue;
+ } else if ([object isKindOfClass:AZPoint.class]) {
+ AZPoint *pt = (AZPoint*) object; re.x = pt.x; re.y = pt.y;
+ } else if ([object isKindOfClass:[AZSize class]]) {
+ AZSize *s = (AZSize*) object; re.x = s.width; re.y = s.height;
+ } else if ([object isKindOfClass:[NSView class]]) {
+ NSView *v = (NSView*) object; re.x = v.frame.origin.x; re.y = v.frame.origin.y;
+ } else if ([object isKindOfClass:[CALayer class]]) {
+ CALayer *l = (CALayer*) object; re.x = l.frame.origin.x; re.y = l.frame.origin.y;
+ } else if ([object isKindOfClass:[NSEvent class]]) {
+ NSEvent *event = (NSEvent*) object; re.x = event.locationInWindow.x; re.y = event.locationInWindow.y;
+ }
+ return re;
}
-+(AZPoint *)pointWithX:(CGFloat)xv y:(CGFloat)yv {
- return [[AZPoint alloc] initWithX:xv y:yv];
++ (AZPoint*) pointWithX:(CGF)xv y:(CGF)yv {
+ return [[AZPoint alloc] initWithX:xv y:yv];
}
-+(AZPoint *)pointWithPoint:(NSPoint)pt {
- return [[AZPoint alloc] initWithPoint:pt];
++ (AZPoint*) pointWithPoint:(NSP)pt {
+ return [[AZPoint alloc] initWithPoint:pt];
}
-+(AZPoint *)halfPoint {
- return [AZPoint pointWithX:0.5 y:0.5];
++ (AZPoint*) halfPoint {
+ return [AZPoint pointWithX:0.5 y:0.5];
}
-+(BOOL)maybePoint:(id)object {
- if (object == nil) {
++ (BOOL)maybePoint:(id) object {
+ if (object == nil) {
return NO;
- }
-
- NSArray *allowedClasses =
- @[[NSNumber class], [AZPoint class], [AZSize class],
- [NSView class], [CALayer class], [NSEvent class]];
-
- for (id clazz in allowedClasses) {
+ }
+
+ NSArray *allowedClasses =
+ @[[NSNumber class], [AZPoint class], [AZSize class],
+ [NSView class], [CALayer class], [NSEvent class]];
+
+ for (id clazz in allowedClasses) {
if ([object isKindOfClass:clazz]) {
- return YES;
+ return YES;
+ }
}
- }
-
- return NO;
+
+ return NO;
}
#pragma mark initializer
--(id)init {
- if ((self = [super init])) {
+- (id) init {
+ if ((self = [super init])) {
x = 0;
y = 0;
- }
-
- return self;
+ }
+
+ return self;
}
--(id)initWithX:(CGFloat)xv y:(CGFloat)yv {
- if ((self = [self init])) {
+- (id) initWithX:(CGF)xv y:(CGF)yv {
+ if ((self = [self init])) {
x = xv;
y = yv;
- }
-
- return self;
+ }
+
+ return self;
}
--(id)initWithPoint:(NSPoint)pt {
- return [self initWithX:pt.x y:pt.y];
+- (id) initWithPoint:(NSP)pt {
+ return [self initWithX:pt.x y:pt.y];
}
--(id)copy {
- return [[AZPoint alloc] initWithX:x y:y];
+- (id) copy {
+ return [[AZPoint alloc] initWithX:x y:y];
}
--(id)copyWithZone:(NSZone *)zone {
- return [[AZPoint allocWithZone:zone] initWithX:x y:y];
+- (id) copyWithZone:(NSZone*) zone {
+ return [[AZPoint allocWithZone:zone] initWithX:x y:y];
}
#pragma mark properties
@synthesize x, y;
--(NSPoint)point {
- return NSMakePoint(self->x, self->y);
+- (NSP)point {
+ return NSMakePoint(self->x, self->y);
}
--(void)setPoint:(NSPoint)pt {
- self->x = pt.x;
- self->y = pt.y;
+- (void) setPoint:(NSP)pt {
+ self->x = pt.x;
+ self->y = pt.y;
}
--(CGPoint)cgpoint {
- return CGPointMake(self->x, self->y);
+- (CGPoint)cgpoint {
+ return CGPointMake(self->x, self->y);
}
--(CGFloat)min {
- return MIN(x,y);
+- (CGF)min {
+ return MIN(x,y);
}
--(CGFloat)max {
- return MAX(x,y);
+- (CGF)max {
+ return MAX(x,y);
}
#pragma mark methods
--(id)swap {
- CGFloat t = self->x;
- self->x = self->y;
- self->y = t;
-
- return self;
+- (id) swap {
+ CGF t = self->x;
+ self->x = self->y;
+ self->y = t;
+
+ return self;
}
--(id)negate {
- self->x = -self->x;
- self->y = -self->y;
-
- return self;
+- (id) negate {
+ self->x = -self->x;
+ self->y = -self->y;
+
+ return self;
}
--(id)invert {
- self->x = 1 / self->x;
- self->y = 1 / self->y;
-
- return self;
+- (id) invert {
+ self->x = 1 / self->x;
+ self->y = 1 / self->y;
+
+ return self;
}
--(id)floor {
- self->x = floor(self->x);
- self->y = floor(self->y);
-
- return self;
+- (id) floor {
+ self->x = floor(self->x);
+ self->y = floor(self->y);
+
+ return self;
}
--(id)round {
- self->x = round(self->x);
- self->y = round(self->y);
-
- return self;
+- (id) round {
+ self->x = round(self->x);
+ self->y = round(self->y);
+
+ return self;
}
--(id)ceil {
- self->x = ceil(self->x);
- self->y = ceil(self->y);
-
- return self;
+- (id) ceil {
+ self->x = ceil(self->x);
+ self->y = ceil(self->y);
+
+ return self;
}
--(id)square {
- self->x *= self->x;
- self->y *= self->y;
-
- return self;
+- (id) square {
+ self->x *= self->x;
+ self->y *= self->y;
+
+ return self;
}
--(id)root {
- self->x = sqrt(self->x);
- self->y = sqrt(self->y);
-
- return self;
+- (id) root {
+ self->x = sqrt(self->x);
+ self->y = sqrt(self->y);
+
+ return self;
}
--(id)ratio {
- CGFloat max = MAX(self->x, self->y);
- CGFloat min = MIN(self->x, self->y);
- if (min < 0 && -min > max) {
+- (id) ratio {
+ CGF max = MAX(self->x, self->y);
+ CGF min = MIN(self->x, self->y);
+ if (min < 0 && -min > max) {
max = -min;
- }
-
- if (max != 0) {
+ }
+
+ if (max != 0) {
self->x /= max;
self->y /= max;
- }
-
- return self;
+ }
+
+ return self;
}
--(id)moveTo:(id)object {
- self->x = 0;
- self->y = 0;
-
- return [self moveBy:object];
+- (id) moveTo:(id) object {
+ self->x = 0;
+ self->y = 0;
+
+ return [self moveBy:object];
}
--(id)moveTowards:(id)object withDistance:(CGFloat)relativeDistance {
- return [self moveTowardsPoint:[[AZPoint pointOf:object] point]
- withDistance:relativeDistance
- ];
+- (id) moveTowards:(id) object withDistance:(CGF)relativeDistance {
+ return [self moveTowardsPoint:[[AZPoint pointOf:object] point]
+ withDistance:relativeDistance
+ ];
}
--(id)moveTowardsPoint:(NSPoint)pt withDistance:(CGFloat)relativeDistance {
- NSPoint delta = NSMakePoint((self.x - pt.x) * relativeDistance,
- (self.y - pt.y) * relativeDistance);
+- (id) moveTowardsPoint:(NSP)pt withDistance:(CGF)relativeDistance {
+ NSP delta = NSMakePoint((self.x - pt.x) * relativeDistance,
+ (self.y - pt.y) * relativeDistance);
- return [self moveByPoint:delta];
+ return [self moveByPoint:delta];
}
--(id)moveBy:(id)object {
- if (object == nil) {
+- (id) moveBy:(id) object {
+ if (object == nil) {
+ return self;
+ }
+
+ AZPoint *p = [AZPoint pointOf:object];
+ self->x += p.x;
+ self->y += p.y;
+
return self;
- }
-
- AZPoint *p = [AZPoint pointOf:object];
- self->x += p.x;
- self->y += p.y;
-
- return self;
}
--(id)moveByNegative:(id)object {
- if (object == nil) {
+- (id) moveByNegative:(id) object {
+ if (object == nil) {
+ return self;
+ }
+
+ AZPoint *p = [AZPoint pointOf:object];
+ self->x -= p.x;
+ self->y -= p.y;
+
return self;
- }
-
- AZPoint *p = [AZPoint pointOf:object];
- self->x -= p.x;
- self->y -= p.y;
-
- return self;
}
--(id)moveByPoint:(NSPoint)pt {
- self->x += pt.x;
- self->y += pt.y;
-
- return self;
+- (id) moveByPoint:(NSP)pt {
+ self->x += pt.x;
+ self->y += pt.y;
+
+ return self;
}
--(id)moveByX:(CGFloat)xv andY:(CGFloat)yv {
- self->x += xv;
- self->y += yv;
-
- return self;
+- (id) moveByX:(CGF)xv andY:(CGF)yv {
+ self->x += xv;
+ self->y += yv;
+
+ return self;
}
--(id)multiplyBy:(id)object {
- if (object == nil) {
+- (id) multiplyBy:(id) object {
+ if (object == nil) {
+ return self;
+ }
+
+ AZPoint *p = [AZPoint pointOf:object];
+ self->x *= p.x;
+ self->y *= p.y;
+
return self;
- }
-
- AZPoint *p = [AZPoint pointOf:object];
- self->x *= p.x;
- self->y *= p.y;
-
- return self;
}
--(id)divideBy:(id)object {
- if (object == nil) {
+- (id) divideBy:(id) object {
+ if (object == nil) {
+ return self;
+ }
+
+ AZPoint *p = [AZPoint pointOf:object];
+ self->x /= p.x;
+ self->y /= p.y;
+
return self;
- }
-
- AZPoint *p = [AZPoint pointOf:object];
- self->x /= p.x;
- self->y /= p.y;
-
- return self;
}
--(BOOL)equals:(id)object {
- if (object == nil) {
+- (BOOL)equals:(id) object {
+ if (object == nil) {
return NO;
- }
-
- AZPoint *p = [AZPoint pointOf:object];
-
- return self->x == p->x && self->y == p->y;
+ }
+
+ AZPoint *p = [AZPoint pointOf:object];
+
+ return self->x == p->x && self->y == p->y;
}
--(BOOL)equalsPoint:(NSPoint)p {
- return self->x == p.x && self->y == p.y;
+- (BOOL)equalsPoint:(NSP)p {
+ return self->x == p.x && self->y == p.y;
}
--(BOOL)isWithin:(id)object {
- if (object == nil) {
+- (BOOL)isWithin:(id) object {
+ if (object == nil) {
return NO;
- }
-
- AZRect *rect = [AZRect rectOf:object];
-
- return [rect containsPoint:self.point];
+ }
+
+ AZRect *rect = [AZRect rectOf:object];
+
+ return [rect contaiNSP:self.point];
}
--(NSString *)description {
- return [NSString stringWithFormat:@"%@(%4.f,%4.f)",
- self.className, x, y];
+- (NSString*) description {
+ return [NSString stringWithFormat:@"%@(%4.f,%4.f)",
+ self.className, x, y];
}
@end
View
92 AtoZ/AZGeometry/AZRect.h
@@ -23,7 +23,7 @@ NSRect rect = ETCenteredRect(centeredRectSize, ETMakeRect(NSZeroPoint, inRect.si
The resulting rect is equal to { 25, 50, 50, 100 }.
The returned rect origin is valid whether or not your coordinate space is flipped. */
-static inline NSRect AZCenteredRect(NSSize aSize, NSRect inRect)
+static inline NSR AZCenteredRect(NSSize aSize, NSR inRect)
{
float xOffset = aSize.width * 0.5;
float x = NSMidX(inRect) - xOffset;
@@ -40,76 +40,62 @@ The returned rect is expressed relative the given rect parent coordinate space.<
To get a rect expressed relative the the given rect itself, see ETCenteredRect().
The returned rect origin is valid whether or not your coordinate space is flipped. */
-//extern NSRect AZScaledRect(NSSize aSize, NSRect inRect);
+//extern NSR AZScaledRect(NSSize aSize, NSR inRect);
/** Returns a rect with a width and height multiplied by the given factor and
by shifting the origin to retain the original rect center location. */
-static inline NSRect AZScaleRect(NSRect frame, CGFloat factor) {
+static inline NSR AZScaleRect(NSRect frame, CGF factor) {
NSSize prevSize = frame.size;
NSRect newFrame;
- newFrame.size = (NSSize) {frame.size.width *2, frame.size.height*2};
+ newFrame.size = (NSSZ) {frame.size.width *2, frame.size.height*2};
//AZMultiplySize( frame.size, factor);
-
// NOTE: frame.origin.x -= (frame.size.width - prevSize.width) / 2;
- // frame.origin.y -= (frame.size.height - prevSize.height) / 2;
- newFrame.origin.x += (prevSize.width - newFrame.size.width) / 2;
- newFrame.origin.y += (prevSize.height - newFrame.size.height) / 2;
-
+ // frame.origin.y -= (frame.size.height - prevSize.height) / 2;
+ newFrame.origin.x += (prevSize.width - newFrame.size.width ) / 2;
+ newFrame.origin.y += (prevSize.height - newFrame.size.height) / 2;
return frame;
}
@class AZPoint;
-@interface AZRect : AZPoint {
- CGFloat width;
- CGFloat height;
-}
+@interface AZRect : AZPoint { CGF width, height; }
-+(AZRect *)rect;
-+(AZRect *)rectOf:(id)object;
-+(AZRect *)rectWithRect:(NSRect)rect;
-+(AZRect *)rectWithOrigin:(NSPoint)origin
- andSize:(NSSize)size;
-+(AZRect *)rectWithX:(CGFloat)x
- andY:(CGFloat)y
- width:(CGFloat)width
- height:(CGFloat)height;
-
-+(BOOL)maybeRect:(id)object;
-
--(id)initWithRect:(NSRect)rect;
--(id)initWithSize:(NSSize)size;
--(id)initFromPoint:(NSPoint)ptOne
- toPoint:(NSPoint)ptTwo;
-- (id) initWithFrame:(NSR)frame inFrame:(NSR)superframe;
++ (AZRect*) rect;
++ (AZRect*) rectOf: (id)object;
++ (AZRect*) rectWithRect: (NSR)rect;
++ (AZRect*) rectWithOrigin:(NSP)origin andSize:(NSSZ)size;
++ (AZRect*) rectWithX: (CGF)x andY:(CGF)y width:(CGF)width height:(CGF)height;
-@property (assign) CGPoint anchor, position;
-@property (assign) AZWindowPosition orient;
++ (BOOL)maybeRect:(id) object;
-@property (assign) CGFloat width;
-@property (assign) CGFloat height;
-@property (RONLY) CGFloat area;
+- (id) initWithRect: (NSR)rect;
+- (id) initWithSize: (NSSZ)size;
+- (id) initFromPoint:(NSP)ptOne toPoint:(NSP)ptTwo;
+- (id) initWithFrame:(NSR)frame inFrame:(NSR)superframe;
-@property (assign) NSPoint origin;
-@property (assign) NSPoint center;
-@property (assign) NSSize size;
-@property (assign) NSRect rect;
+@property (ASS) CGP anchor, position;
+@property (ASS) CGF width, height;
+@property (ASS) NSP origin, center;
+@property (ASS) NSSZ size;
+@property (ASS) NSR rect;
+@property (ASS) AZPOS orient;
+@property (RONLY) CGF area;
--(id)shrinkBy:(id)object;
--(id)shrinkByPadding:(NSInteger)padding;
--(id)shrinkBySizePadding:(NSSize)padding;
+- (id) shrinkBy:(id) object;
+- (id) shrinkByPadding:(NSI)padding;
+- (id) shrinkBySizePadding:(NSSZ)padding;
--(id)growBy:(id)object;
--(id)growByPadding:(NSInteger)padding;
--(