Permalink
Browse files

Merge commit '3ca5a42c3f25b557d8faaaa6e59c1d3e51265e81' as 'vendor/DM…

…TabBar'
  • Loading branch information...
2 parents ad47b00 + 3ca5a42 commit c41c2fa9253a5a2b03381c89a478303d5f90758c @andreyvit andreyvit committed Jul 29, 2012
Showing with 4,728 additions and 0 deletions.
  1. +344 −0 vendor/DMTabBar/DMTabBar/DMTabBar.xcodeproj/project.pbxproj
  2. +7 −0 vendor/DMTabBar/DMTabBar/DMTabBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata
  3. BIN ...TabBar.xcodeproj/project.xcworkspace/xcuserdata/malcom.xcuserdatad/UserInterfaceState.xcuserstate
  4. +10 −0 ...DMTabBar.xcodeproj/project.xcworkspace/xcuserdata/malcom.xcuserdatad/WorkspaceSettings.xcsettings
  5. +5 −0 ...abBar/DMTabBar/DMTabBar.xcodeproj/xcuserdata/malcom.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
  6. +85 −0 ...or/DMTabBar/DMTabBar/DMTabBar.xcodeproj/xcuserdata/malcom.xcuserdatad/xcschemes/DMTabBar.xcscheme
  7. +22 −0 ...bBar/DMTabBar/DMTabBar.xcodeproj/xcuserdata/malcom.xcuserdatad/xcschemes/xcschememanagement.plist
  8. +15 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMAppDelegate.h
  9. +57 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMAppDelegate.m
  10. +34 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar-Info.plist
  11. +7 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar-Prefix.pch
  12. +40 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar.h
  13. +158 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar.m
  14. +31 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBarItem.h
  15. +172 −0 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBarItem.m
  16. +29 −0 vendor/DMTabBar/DMTabBar/DMTabBar/en.lproj/Credits.rtf
  17. +2 −0 vendor/DMTabBar/DMTabBar/DMTabBar/en.lproj/InfoPlist.strings
  18. +3,642 −0 vendor/DMTabBar/DMTabBar/DMTabBar/en.lproj/MainMenu.xib
  19. +14 −0 vendor/DMTabBar/DMTabBar/DMTabBar/main.m
  20. BIN vendor/DMTabBar/DMTabBar/DMTabBar/tabBarItem1.png
  21. BIN vendor/DMTabBar/DMTabBar/DMTabBar/tabBarItem2.png
  22. BIN vendor/DMTabBar/DMTabBar/DMTabBar/tabBarItem3.png
  23. +54 −0 vendor/DMTabBar/README.md
View
344 vendor/DMTabBar/DMTabBar/DMTabBar.xcodeproj/project.pbxproj
@@ -0,0 +1,344 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ D9C42DB0158F85B700919C4A /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D9C42DAF158F85B700919C4A /* Cocoa.framework */; };
+ D9C42DBA158F85B700919C4A /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = D9C42DB8158F85B700919C4A /* InfoPlist.strings */; };
+ D9C42DBC158F85B700919C4A /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = D9C42DBB158F85B700919C4A /* main.m */; };
+ D9C42DC0158F85B700919C4A /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = D9C42DBE158F85B700919C4A /* Credits.rtf */; };
+ D9C42DC3158F85B700919C4A /* DMAppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = D9C42DC2158F85B700919C4A /* DMAppDelegate.m */; };
+ D9C42DC6158F85B700919C4A /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = D9C42DC4158F85B700919C4A /* MainMenu.xib */; };
+ D9C42DCE158F85C200919C4A /* DMTabBar.m in Sources */ = {isa = PBXBuildFile; fileRef = D9C42DCD158F85C200919C4A /* DMTabBar.m */; };
+ D9C42DD1158F88DA00919C4A /* DMTabBarItem.m in Sources */ = {isa = PBXBuildFile; fileRef = D9C42DD0158F88DA00919C4A /* DMTabBarItem.m */; };
+ D9C42DD4158FDB0500919C4A /* tabBarItem1.png in Resources */ = {isa = PBXBuildFile; fileRef = D9C42DD2158FDB0500919C4A /* tabBarItem1.png */; };
+ D9C42DDC158FE25D00919C4A /* tabBarItem2.png in Resources */ = {isa = PBXBuildFile; fileRef = D9C42DDB158FE25D00919C4A /* tabBarItem2.png */; };
+ D9C42DDE158FE27C00919C4A /* tabBarItem3.png in Resources */ = {isa = PBXBuildFile; fileRef = D9C42DDD158FE27C00919C4A /* tabBarItem3.png */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ D9C42DAB158F85B700919C4A /* DMTabBar.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = DMTabBar.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ D9C42DAF158F85B700919C4A /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ D9C42DB2158F85B700919C4A /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ D9C42DB3158F85B700919C4A /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+ D9C42DB4158F85B700919C4A /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ D9C42DB7158F85B700919C4A /* DMTabBar-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "DMTabBar-Info.plist"; sourceTree = "<group>"; };
+ D9C42DB9158F85B700919C4A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ D9C42DBB158F85B700919C4A /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ D9C42DBD158F85B700919C4A /* DMTabBar-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "DMTabBar-Prefix.pch"; sourceTree = "<group>"; };
+ D9C42DBF158F85B700919C4A /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
+ D9C42DC1158F85B700919C4A /* DMAppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DMAppDelegate.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+ D9C42DC2158F85B700919C4A /* DMAppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; lineEnding = 0; path = DMAppDelegate.m; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objc; };
+ D9C42DC5158F85B700919C4A /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ D9C42DCC158F85C200919C4A /* DMTabBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; lineEnding = 0; path = DMTabBar.h; sourceTree = "<group>"; xcLanguageSpecificationIdentifier = xcode.lang.objcpp; };
+ D9C42DCD158F85C200919C4A /* DMTabBar.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DMTabBar.m; sourceTree = "<group>"; };
+ D9C42DCF158F88DA00919C4A /* DMTabBarItem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = DMTabBarItem.h; sourceTree = "<group>"; };
+ D9C42DD0158F88DA00919C4A /* DMTabBarItem.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = DMTabBarItem.m; sourceTree = "<group>"; };
+ D9C42DD2158FDB0500919C4A /* tabBarItem1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabBarItem1.png; sourceTree = "<group>"; };
+ D9C42DDB158FE25D00919C4A /* tabBarItem2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabBarItem2.png; sourceTree = "<group>"; };
+ D9C42DDD158FE27C00919C4A /* tabBarItem3.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = tabBarItem3.png; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ D9C42DA8158F85B700919C4A /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D9C42DB0158F85B700919C4A /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ D9C42DA0158F85B700919C4A = {
+ isa = PBXGroup;
+ children = (
+ D9C42DB5158F85B700919C4A /* DMTabBar */,
+ D9C42DAE158F85B700919C4A /* Frameworks */,
+ D9C42DAC158F85B700919C4A /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ D9C42DAC158F85B700919C4A /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DAB158F85B700919C4A /* DMTabBar.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ D9C42DAE158F85B700919C4A /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DAF158F85B700919C4A /* Cocoa.framework */,
+ D9C42DB1158F85B700919C4A /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ D9C42DB1158F85B700919C4A /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DB2158F85B700919C4A /* AppKit.framework */,
+ D9C42DB3158F85B700919C4A /* CoreData.framework */,
+ D9C42DB4158F85B700919C4A /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ D9C42DB5158F85B700919C4A /* DMTabBar */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DDA158FDDEC00919C4A /* DMTabBar Core Class */,
+ D9C42DE0158FE47100919C4A /* Main View Controller */,
+ D9C42DDF158FE46900919C4A /* Tab Bar Icons */,
+ D9C42DB6158F85B700919C4A /* Supporting Files */,
+ );
+ path = DMTabBar;
+ sourceTree = "<group>";
+ };
+ D9C42DB6158F85B700919C4A /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DB7158F85B700919C4A /* DMTabBar-Info.plist */,
+ D9C42DB8158F85B700919C4A /* InfoPlist.strings */,
+ D9C42DBB158F85B700919C4A /* main.m */,
+ D9C42DBD158F85B700919C4A /* DMTabBar-Prefix.pch */,
+ D9C42DBE158F85B700919C4A /* Credits.rtf */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+ D9C42DDA158FDDEC00919C4A /* DMTabBar Core Class */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DCC158F85C200919C4A /* DMTabBar.h */,
+ D9C42DCD158F85C200919C4A /* DMTabBar.m */,
+ D9C42DCF158F88DA00919C4A /* DMTabBarItem.h */,
+ D9C42DD0158F88DA00919C4A /* DMTabBarItem.m */,
+ );
+ name = "DMTabBar Core Class";
+ sourceTree = "<group>";
+ };
+ D9C42DDF158FE46900919C4A /* Tab Bar Icons */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DDB158FE25D00919C4A /* tabBarItem2.png */,
+ D9C42DD2158FDB0500919C4A /* tabBarItem1.png */,
+ D9C42DDD158FE27C00919C4A /* tabBarItem3.png */,
+ );
+ name = "Tab Bar Icons";
+ sourceTree = "<group>";
+ };
+ D9C42DE0158FE47100919C4A /* Main View Controller */ = {
+ isa = PBXGroup;
+ children = (
+ D9C42DC1158F85B700919C4A /* DMAppDelegate.h */,
+ D9C42DC2158F85B700919C4A /* DMAppDelegate.m */,
+ D9C42DC4158F85B700919C4A /* MainMenu.xib */,
+ );
+ name = "Main View Controller";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ D9C42DAA158F85B700919C4A /* DMTabBar */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = D9C42DC9158F85B700919C4A /* Build configuration list for PBXNativeTarget "DMTabBar" */;
+ buildPhases = (
+ D9C42DA7158F85B700919C4A /* Sources */,
+ D9C42DA8158F85B700919C4A /* Frameworks */,
+ D9C42DA9158F85B700919C4A /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = DMTabBar;
+ productName = DMTabBar;
+ productReference = D9C42DAB158F85B700919C4A /* DMTabBar.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ D9C42DA2158F85B700919C4A /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ CLASSPREFIX = DM;
+ LastUpgradeCheck = 0430;
+ };
+ buildConfigurationList = D9C42DA5158F85B700919C4A /* Build configuration list for PBXProject "DMTabBar" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = D9C42DA0158F85B700919C4A;
+ productRefGroup = D9C42DAC158F85B700919C4A /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ D9C42DAA158F85B700919C4A /* DMTabBar */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ D9C42DA9158F85B700919C4A /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D9C42DBA158F85B700919C4A /* InfoPlist.strings in Resources */,
+ D9C42DC0158F85B700919C4A /* Credits.rtf in Resources */,
+ D9C42DC6158F85B700919C4A /* MainMenu.xib in Resources */,
+ D9C42DD4158FDB0500919C4A /* tabBarItem1.png in Resources */,
+ D9C42DDC158FE25D00919C4A /* tabBarItem2.png in Resources */,
+ D9C42DDE158FE27C00919C4A /* tabBarItem3.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ D9C42DA7158F85B700919C4A /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ D9C42DBC158F85B700919C4A /* main.m in Sources */,
+ D9C42DC3158F85B700919C4A /* DMAppDelegate.m in Sources */,
+ D9C42DCE158F85C200919C4A /* DMTabBar.m in Sources */,
+ D9C42DD1158F88DA00919C4A /* DMTabBarItem.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ D9C42DB8158F85B700919C4A /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ D9C42DB9158F85B700919C4A /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ D9C42DBE158F85B700919C4A /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ D9C42DBF158F85B700919C4A /* en */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+ D9C42DC4158F85B700919C4A /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ D9C42DC5158F85B700919C4A /* en */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ D9C42DC7158F85B700919C4A /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ COPY_PHASE_STRIP = NO;
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ "DEBUG=1",
+ "$(inherited)",
+ );
+ GCC_SYMBOLS_PRIVATE_EXTERN = NO;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ D9C42DC8158F85B700919C4A /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ CLANG_ENABLE_OBJC_ARC = YES;
+ COPY_PHASE_STRIP = YES;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ GCC_C_LANGUAGE_STANDARD = gnu99;
+ GCC_ENABLE_OBJC_EXCEPTIONS = YES;
+ GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
+ GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNINITIALIZED_AUTOS = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ D9C42DCA158F85B700919C4A /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "DMTabBar/DMTabBar-Prefix.pch";
+ INFOPLIST_FILE = "DMTabBar/DMTabBar-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ D9C42DCB158F85B700919C4A /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "DMTabBar/DMTabBar-Prefix.pch";
+ INFOPLIST_FILE = "DMTabBar/DMTabBar-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ D9C42DA5158F85B700919C4A /* Build configuration list for PBXProject "DMTabBar" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D9C42DC7158F85B700919C4A /* Debug */,
+ D9C42DC8158F85B700919C4A /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ D9C42DC9158F85B700919C4A /* Build configuration list for PBXNativeTarget "DMTabBar" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ D9C42DCA158F85B700919C4A /* Debug */,
+ D9C42DCB158F85B700919C4A /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = D9C42DA2158F85B700919C4A /* Project object */;
+}
View
7 vendor/DMTabBar/DMTabBar/DMTabBar.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:DMTabBar.xcodeproj">
+ </FileRef>
+</Workspace>
View
BIN ...codeproj/project.xcworkspace/xcuserdata/malcom.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown.
View
10 ....xcodeproj/project.xcworkspace/xcuserdata/malcom.xcuserdatad/WorkspaceSettings.xcsettings
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>HasAskedToTakeAutomaticSnapshotBeforeSignificantChanges</key>
+ <true/>
+ <key>SnapshotAutomaticallyBeforeSignificantChanges</key>
+ <false/>
+</dict>
+</plist>
View
5 ...TabBar/DMTabBar.xcodeproj/xcuserdata/malcom.xcuserdatad/xcdebugger/Breakpoints.xcbkptlist
@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Bucket
+ type = "1"
+ version = "1.0">
+</Bucket>
View
85 ...Bar/DMTabBar/DMTabBar.xcodeproj/xcuserdata/malcom.xcuserdatad/xcschemes/DMTabBar.xcscheme
@@ -0,0 +1,85 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Scheme
+ version = "1.3">
+ <BuildAction
+ parallelizeBuildables = "YES"
+ buildImplicitDependencies = "YES">
+ <BuildActionEntries>
+ <BuildActionEntry
+ buildForTesting = "YES"
+ buildForRunning = "YES"
+ buildForProfiling = "YES"
+ buildForArchiving = "YES"
+ buildForAnalyzing = "YES">
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D9C42DAA158F85B700919C4A"
+ BuildableName = "DMTabBar.app"
+ BlueprintName = "DMTabBar"
+ ReferencedContainer = "container:DMTabBar.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D9C42DAA158F85B700919C4A"
+ BuildableName = "DMTabBar.app"
+ BlueprintName = "DMTabBar"
+ ReferencedContainer = "container:DMTabBar.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.LLDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.LLDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ ignoresPersistentStateOnLaunch = "NO"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D9C42DAA158F85B700919C4A"
+ BuildableName = "DMTabBar.app"
+ BlueprintName = "DMTabBar"
+ ReferencedContainer = "container:DMTabBar.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "D9C42DAA158F85B700919C4A"
+ BuildableName = "DMTabBar.app"
+ BlueprintName = "DMTabBar"
+ ReferencedContainer = "container:DMTabBar.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
View
22 ...abBar/DMTabBar.xcodeproj/xcuserdata/malcom.xcuserdatad/xcschemes/xcschememanagement.plist
@@ -0,0 +1,22 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>SchemeUserState</key>
+ <dict>
+ <key>DMTabBar.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>D9C42DAA158F85B700919C4A</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
View
15 vendor/DMTabBar/DMTabBar/DMTabBar/DMAppDelegate.h
@@ -0,0 +1,15 @@
+//
+// DMAppDelegate.h
+// DMTabBar
+//
+// Created by Daniele Margutti on 6/18/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface DMAppDelegate : NSObject <NSApplicationDelegate>
+
+@property (assign) IBOutlet NSWindow *window;
+
+@end
View
57 vendor/DMTabBar/DMTabBar/DMTabBar/DMAppDelegate.m
@@ -0,0 +1,57 @@
+//
+// DMAppDelegate.m
+// DMTabBar
+//
+// Created by Daniele Margutti on 6/18/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import "DMAppDelegate.h"
+#import "DMTabBar.h"
+
+#define kTabBarElements [NSArray arrayWithObjects: \
+ [NSDictionary dictionaryWithObjectsAndKeys: [NSImage imageNamed:@"tabBarItem1"],@"image",@"Tab #1",@"title",nil], \
+ [NSDictionary dictionaryWithObjectsAndKeys: [NSImage imageNamed:@"tabBarItem2"],@"image",@"Tab #2",@"title",nil], \
+ [NSDictionary dictionaryWithObjectsAndKeys: [NSImage imageNamed:@"tabBarItem3"],@"image",@"Tab #3",@"title",nil],nil]
+
+@interface DMAppDelegate() {
+ IBOutlet DMTabBar* tabBar;
+ IBOutlet NSTabView* tabView;
+}
+
+@end
+
+@implementation DMAppDelegate
+
+@synthesize window = _window;
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification {
+ NSMutableArray *items = [[NSMutableArray alloc] initWithCapacity:2];
+
+ // Create an array of DMTabBarItem objects
+ [kTabBarElements enumerateObjectsUsingBlock:^(NSDictionary* objDict, NSUInteger idx, BOOL *stop) {
+ NSImage *iconImage = [objDict objectForKey:@"image"];
+ [iconImage setTemplate:YES];
+
+ DMTabBarItem *item1 = [DMTabBarItem tabBarItemWithIcon:iconImage tag:idx];
+ item1.toolTip = [objDict objectForKey:@"title"];
+ item1.keyEquivalent = [NSString stringWithFormat:@"%d",idx];
+ item1.keyEquivalentModifierMask = NSCommandKeyMask;
+ [items addObject:item1];
+ }];
+
+ // Load them
+ tabBar.tabBarItems = items;
+
+ // Handle selection events
+ [tabBar handleTabBarItemSelection:^(DMTabBarItemSelectionType selectionType, DMTabBarItem *targetTabBarItem, NSUInteger targetTabBarItemIndex) {
+ if (selectionType == DMTabBarItemSelectionType_WillSelect) {
+ //NSLog(@"Will select %lu/%@",targetTabBarItemIndex,targetTabBarItem);
+ [tabView selectTabViewItem:[tabView.tabViewItems objectAtIndex:targetTabBarItemIndex]];
+ } else if (selectionType == DMTabBarItemSelectionType_DidSelect) {
+ //NSLog(@"Did select %lu/%@",targetTabBarItemIndex,targetTabBarItem);
+ }
+ }];
+}
+
+@end
View
34 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar-Info.plist
@@ -0,0 +1,34 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
+<plist version="1.0">
+<dict>
+ <key>CFBundleDevelopmentRegion</key>
+ <string>en</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.danielemargutti.${PRODUCT_NAME:rfc1034identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleShortVersionString</key>
+ <string>1.0</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1</string>
+ <key>LSMinimumSystemVersion</key>
+ <string>${MACOSX_DEPLOYMENT_TARGET}</string>
+ <key>NSHumanReadableCopyright</key>
+ <string>Copyright © 2012 __MyCompanyName__. All rights reserved.</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
View
7 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'DMTabBar' target in the 'DMTabBar' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
View
40 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar.h
@@ -0,0 +1,40 @@
+//
+// DMTabBar.h
+// DMTabBar - XCode like Segmented Control
+//
+// Created by Daniele Margutti on 6/18/12.
+// Copyright (c) 2012 Daniele Margutti (http://www.danielemargutti.com - daniele.margutti@gmail.com). All rights reserved.
+// Licensed under MIT License
+//
+
+#import <Cocoa/Cocoa.h>
+#import "DMTabBarItem.h"
+
+enum {
+ DMTabBarItemSelectionType_WillSelect = 0, // Selection of the item will happend
+ DMTabBarItemSelectionType_DidSelect = 1 // Selection is changed
+}; typedef NSUInteger DMTabBarItemSelectionType;
+
+// This is the event called by DMTabBar when an events occur. DMTabBar will post two kinds of events,
+// when a selection will change and when a change has occurred
+typedef void (^DMTabBarEventsHandler)(DMTabBarItemSelectionType selectionType, DMTabBarItem *targetTabBarItem, NSUInteger targetTabBarItemIndex);
+
+
+@interface DMTabBar : NSView {
+
+}
+
+// set an NSArray of DMTabBarItem elements to populate the DMTabBar
+@property (nonatomic,strong) NSArray* tabBarItems;
+
+// change selected item by passing a DMTabBarItem object (ignored if selectedTabBarItem is not contained inside tabBarItems)
+@property (nonatomic,assign) DMTabBarItem* selectedTabBarItem;
+
+// change selected item by passing a new index { 0 < index < tabBarItems.count }
+@property (nonatomic,assign) NSUInteger selectedIndex;
+
+
+// Handle selection change events using blocks
+- (void) handleTabBarItemSelection:(DMTabBarEventsHandler) selectionHandler;
+
+@end
View
158 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBar.m
@@ -0,0 +1,158 @@
+//
+// DMTabBar.m
+// DMTabBar - XCode like Segmented Control
+//
+// Created by Daniele Margutti on 6/18/12.
+// Copyright (c) 2012 Daniele Margutti (http://www.danielemargutti.com - daniele.margutti@gmail.com). All rights reserved.
+// Licensed under MIT License
+//
+
+#import "DMTabBar.h"
+
+// Gradient applied to the background of the tabBar
+// (Colors and gradient from Stephan Michels Softwareentwicklung und Beratung - SMTabBar)
+#define kDMTabBarGradientColor_Start [NSColor colorWithCalibratedRed:0.851f green:0.851f blue:0.851f alpha:1.0f]
+#define kDMTabBarGradientColor_End [NSColor colorWithCalibratedRed:0.700f green:0.700f blue:0.700f alpha:1.0f]
+#define KDMTabBarGradient [[NSGradient alloc] initWithStartingColor: kDMTabBarGradientColor_Start \
+ endingColor: kDMTabBarGradientColor_End]
+
+// Border color of the bar
+#define kDMTabBarBorderColor [NSColor colorWithDeviceWhite:0.2 alpha:1.0f]
+
+// Default tabBar item width
+#define kDMTabBarItemWidth 32.0f
+
+@interface DMTabBar() {
+ NSArray* tabBarItems;
+ DMTabBarItem* selectedTabBarItem_;
+ DMTabBarEventsHandler selectionHandler;
+}
+
+// Relayout button items
+- (void) layoutSubviews;
+// Remove all loaded button items
+- (void) removeAllTabBarItems;
+// Handle click on a single item (change selection, post event to the handler)
+- (void) selectTabBarItem:(id)sender;
+
+@end
+
+@implementation DMTabBar
+
+@synthesize selectedIndex,selectedTabBarItem;
+@synthesize tabBarItems;
+
+- (void)drawRect:(NSRect)dirtyRect {
+ // Draw bar gradient
+ [KDMTabBarGradient drawInRect:self.bounds angle:90.0];
+
+ // Draw drak gray bottom border
+ [kDMTabBarBorderColor setStroke];
+ [NSBezierPath setDefaultLineWidth:0.0f];
+ [NSBezierPath strokeLineFromPoint:NSMakePoint(NSMinX(self.bounds), NSMaxY(self.bounds))
+ toPoint:NSMakePoint(NSMaxX(self.bounds), NSMaxY(self.bounds))];
+}
+
+- (BOOL) isFlipped {
+ return YES;
+}
+
+- (void)dealloc {
+ [self removeAllTabBarItems];
+}
+
+- (void) removeAllTabBarItems {
+ [self.tabBarItems enumerateObjectsUsingBlock:^(DMTabBarItem* tabBarItem, NSUInteger idx, BOOL *stop) {
+ [tabBarItem.tabBarItemButton removeFromSuperview];
+ }];
+ tabBarItems = nil;
+}
+
+- (void) handleTabBarItemSelection:(DMTabBarEventsHandler) newSelectionHandler {
+ selectionHandler = newSelectionHandler;
+}
+
+- (void)selectTabBarItem:(id)sender {
+ __block NSUInteger itemIndex = NSNotFound;
+ [self.tabBarItems enumerateObjectsUsingBlock:^(DMTabBarItem* tabBarItem, NSUInteger idx, BOOL *stop) {
+ if (sender == tabBarItem.tabBarItemButton) {
+ itemIndex = idx;
+ *stop = YES;
+ }
+ }];
+ if (itemIndex == NSNotFound) return;
+ DMTabBarItem *tabBarItem = [self.tabBarItems objectAtIndex:itemIndex];
+ selectionHandler(DMTabBarItemSelectionType_WillSelect,tabBarItem,itemIndex);
+
+ self.selectedTabBarItem = tabBarItem;
+ selectionHandler(DMTabBarItemSelectionType_DidSelect,tabBarItem,itemIndex);
+}
+
+#pragma mark - Layout Subviews
+
+- (void) resizeSubviewsWithOldSize:(NSSize)oldSize {
+ [super resizeSubviewsWithOldSize:oldSize];
+ [self layoutSubviews];
+}
+
+- (void) layoutSubviews {
+ NSUInteger buttonsNumber = [self.tabBarItems count];
+ CGFloat totalWidth = (buttonsNumber*kDMTabBarItemWidth);
+ __block CGFloat offset_x = floorf((NSWidth(self.bounds)-totalWidth)/2.0f);
+ [self.tabBarItems enumerateObjectsUsingBlock:^(DMTabBarItem* tabBarItem, NSUInteger idx, BOOL *stop) {
+ tabBarItem.tabBarItemButton.frame = NSMakeRect(offset_x, NSMinY(self.bounds), kDMTabBarItemWidth, NSHeight(self.bounds));
+ offset_x += kDMTabBarItemWidth;
+ }];
+}
+
+- (void) setTabBarItems:(NSArray *)newTabBarItems {
+ if (newTabBarItems != tabBarItems) {
+ [self removeAllTabBarItems];
+ tabBarItems = newTabBarItems;
+
+ NSUInteger selectedItemIndex = [self.tabBarItems indexOfObject:self.selectedTabBarItem];
+ NSUInteger itemIndex = 0;
+ [self.tabBarItems enumerateObjectsUsingBlock:^(DMTabBarItem * tabBarItem, NSUInteger idx, BOOL *stop) {
+ NSButton *itemButton = tabBarItem.tabBarItemButton;
+ itemButton.frame = NSMakeRect(0.0f, 0.0f, kDMTabBarItemWidth, NSHeight(self.bounds));
+ itemButton.state = (itemIndex == selectedItemIndex ? NSOnState : NSOffState);
+ itemButton.action = @selector(selectTabBarItem:);
+ itemButton.target = self;
+ [self addSubview:itemButton];
+ }];
+
+ [self layoutSubviews];
+
+ if (![self.tabBarItems containsObject:self.selectedTabBarItem])
+ self.selectedTabBarItem = ([self.tabBarItems count] > 0 ? [self.tabBarItems objectAtIndex:0] : nil);
+ }
+}
+
+- (DMTabBarItem *) selectedTabBarItem {
+ return selectedTabBarItem_;
+}
+
+- (void) setSelectedTabBarItem:(DMTabBarItem *)newSelectedTabBarItem {
+ if ([self.tabBarItems containsObject:newSelectedTabBarItem] == NO) return;
+ NSUInteger selectedItemIndex = [self.tabBarItems indexOfObject:newSelectedTabBarItem];
+ selectedTabBarItem_ = newSelectedTabBarItem;
+
+ __block NSUInteger buttonIndex = 0;
+ [self.tabBarItems enumerateObjectsUsingBlock:^(DMTabBarItem* tabBarItem, NSUInteger idx, BOOL *stop) {
+ tabBarItem.state = (buttonIndex == selectedItemIndex ? NSOnState : NSOffState);
+ ++buttonIndex;
+ }];
+}
+
+- (NSUInteger) selectedIndex {
+ return [self.tabBarItems indexOfObject:self.selectedTabBarItem];
+}
+
+- (void) setSelectedIndex:(NSUInteger)newSelectedIndex {
+ if (newSelectedIndex != self.selectedIndex && newSelectedIndex < [self.tabBarItems count]) {
+ self.selectedTabBarItem = [self.tabBarItems objectAtIndex:newSelectedIndex];
+ }
+}
+
+
+@end
View
31 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBarItem.h
@@ -0,0 +1,31 @@
+//
+// DMTabBarItem.h
+// DMTabBar - XCode like Segmented Control
+//
+// Created by Daniele Margutti on 6/18/12.
+// Copyright (c) 2012 Daniele Margutti (http://www.danielemargutti.com - daniele.margutti@gmail.com). All rights reserved.
+// Licensed under MIT License
+//
+
+#import <Foundation/Foundation.h>
+
+@interface DMTabBarItem : NSButtonCell { }
+
+@property (nonatomic,assign) BOOL enabled; // YES or NO to enable or disable the item
+@property (nonatomic,strong) NSImage* icon; // That's the image of the item
+@property (nonatomic,strong) NSString* toolTip; // Tool tip message
+@property (nonatomic,strong) NSString* keyEquivalent; // Shortcut key equivalent
+@property (nonatomic,assign) NSUInteger keyEquivalentModifierMask; // Shortcut modifier key (keyEquivalentModifierMask+keyEquivalent = event)
+@property (nonatomic,assign) NSUInteger tag; // Tag of the item
+@property (nonatomic,assign) NSInteger state; // Current state (NSOnState = selected)
+
+// Internal use
+// We'll use a customized NSButton (+NSButtonCell) and apply it inside the bar for each item.
+// You should never access to this element, but only with the DMTabBarItem istance itself.
+@property (nonatomic,readonly) NSButton* tabBarItemButton;
+
+// Init methods
++ (DMTabBarItem *) tabBarItemWithIcon:(NSImage *) iconImage tag:(NSUInteger) itemTag;
+- (id)initWithIcon:(NSImage *) iconImage tag:(NSUInteger) itemTag;
+
+@end
View
172 vendor/DMTabBar/DMTabBar/DMTabBar/DMTabBarItem.m
@@ -0,0 +1,172 @@
+//
+// DMTabBarItem.m
+// DMTabBar - XCode like Segmented Control
+//
+// Created by Daniele Margutti on 6/18/12.
+// Copyright (c) 2012 Daniele Margutti (http://www.danielemargutti.com - daniele.margutti@gmail.com). All rights reserved.
+// Licensed under MIT License
+//
+
+#import "DMTabBarItem.h"
+
+static CGFloat kDMTabBarItemGradientColor_Locations[] = {0.0f, 0.5f, 1.0f};
+
+#define kDMTabBarItemGradientColor1 [NSColor colorWithCalibratedWhite:0.7f alpha:0.0f]
+#define kDMTabBarItemGradientColor2 [NSColor colorWithCalibratedWhite:0.7f alpha:1.0f]
+#define kDMTabBarItemGradient [[NSGradient alloc] initWithColors: [NSArray arrayWithObjects: \
+ kDMTabBarItemGradientColor1, \
+ kDMTabBarItemGradientColor2, \
+ kDMTabBarItemGradientColor1, nil] \
+ atLocations: kDMTabBarItemGradientColor_Locations \
+ colorSpace: [NSColorSpace genericGrayColorSpace]]
+
+@interface DMTabBarButtonCell : NSButtonCell { }
+@end
+
+@interface DMTabBarItem() {
+ NSButton* tabBarItemButton;
+}
+@end
+
+@implementation DMTabBarItem
+
+@synthesize enabled,icon,toolTip;
+@synthesize keyEquivalent,keyEquivalentModifierMask;
+@synthesize tag;
+@synthesize tabBarItemButton;
+@synthesize state;
+
++ (DMTabBarItem *) tabBarItemWithIcon:(NSImage *) iconImage tag:(NSUInteger) itemTag {
+ return [[DMTabBarItem alloc] initWithIcon:iconImage tag:itemTag];
+}
+
+- (id)initWithIcon:(NSImage *) iconImage tag:(NSUInteger) itemTag {
+ self = [super init];
+ if (self) {
+ // Create associated NSButton to place inside the bar (it's customized by DMTabBarButtonCell with a special gradient for selected state)
+ tabBarItemButton = [[NSButton alloc] initWithFrame:NSZeroRect];
+ tabBarItemButton.cell = [[DMTabBarButtonCell alloc] init];
+ tabBarItemButton.image = iconImage;
+ [tabBarItemButton setEnabled:YES];
+ tabBarItemButton.tag = itemTag;
+ [tabBarItemButton sendActionOn:NSLeftMouseDownMask];
+ }
+ return self;
+}
+
+- (NSString *)description {
+ return [NSString stringWithFormat:@"[DMTabBarItem] tag=%i - title=%@", self.tag,self.title];
+}
+
+#pragma mark - Properties redirects
+
+// We simply redirects properties to the the NSButton class
+
+- (void) setIcon:(NSImage *)newIcon {
+ tabBarItemButton.image = newIcon;
+}
+
+- (NSImage *) icon {
+ return tabBarItemButton.image;
+}
+
+- (void) setTag:(NSUInteger)newTag {
+ tabBarItemButton.tag = newTag;
+}
+
+- (NSUInteger) tag {
+ return tabBarItemButton.tag;
+}
+
+- (void) setToolTip:(NSString *)newToolTip {
+ tabBarItemButton.toolTip = newToolTip;
+}
+
+- (NSString *) toolTip {
+ return tabBarItemButton.toolTip;
+}
+
+- (void) setKeyEquivalentModifierMask:(NSUInteger)newKeyEquivalentModifierMask {
+ tabBarItemButton.keyEquivalentModifierMask = newKeyEquivalentModifierMask;
+}
+
+- (NSUInteger) keyEquivalentModifierMask {
+ return tabBarItemButton.keyEquivalentModifierMask;
+}
+
+- (void) setKeyEquivalent:(NSString *)newKeyEquivalent {
+ tabBarItemButton.keyEquivalent = newKeyEquivalent;
+}
+
+- (NSString *) keyEquivalent {
+ return tabBarItemButton.keyEquivalent;
+}
+
+- (void) setState:(NSInteger)value {
+ tabBarItemButton.state = value;
+}
+
+- (NSInteger) state {
+ return tabBarItemButton.state;
+}
+
+@end
+
+
+#pragma mark - DMTabBarButtonCell
+
+@implementation DMTabBarButtonCell
+
+- (id)init {
+ self = [super init];
+ if (self) {
+ self.bezelStyle = NSTexturedRoundedBezelStyle;
+ }
+ return self;
+}
+
+- (NSInteger) nextState {
+ return self.state;
+}
+
+- (void) drawBezelWithFrame:(NSRect)frame inView:(NSView *)controlView {
+ if (self.state == NSOnState) {
+ // If selected we need to draw the border new background for selection (otherwise we will use default back color)
+ // Save current context
+ [[NSGraphicsContext currentContext] saveGraphicsState];
+
+ // Draw light vertical gradient
+ [kDMTabBarItemGradient drawInRect:frame angle:-90.0f];
+
+ // Draw shadow on the left border of the item
+ NSShadow *shadow = [[NSShadow alloc] init];
+ shadow.shadowOffset = NSMakeSize(1.0f, 0.0f);
+ shadow.shadowBlurRadius = 2.0f;
+ shadow.shadowColor = [NSColor darkGrayColor];
+ [shadow set];
+
+ [[NSColor blackColor] set];
+ CGFloat radius = 50.0;
+ NSPoint center = NSMakePoint(NSMinX(frame) - radius, NSMidY(frame));
+ NSBezierPath *path = [NSBezierPath bezierPath];
+ [path moveToPoint:center];
+ [path appendBezierPathWithArcWithCenter:center radius:radius startAngle:-90.0f endAngle:90.0f];
+ [path closePath];
+ [path fill];
+
+ // shadow of the right border
+ shadow.shadowOffset = NSMakeSize(-1.0f, 0.0f);
+ [shadow set];
+
+ center = NSMakePoint(NSMaxX(frame) + radius, NSMidY(frame));
+ path = [NSBezierPath bezierPath];
+ [path moveToPoint:center];
+ [path appendBezierPathWithArcWithCenter:center radius:radius startAngle:90.0f endAngle:270.0f];
+ [path closePath];
+ [path fill];
+
+ // Restore context
+ [[NSGraphicsContext currentContext] restoreGraphicsState];
+ }
+}
+@end
View
29 vendor/DMTabBar/DMTabBar/DMTabBar/en.lproj/Credits.rtf
@@ -0,0 +1,29 @@
+{\rtf0\ansi{\fonttbl\f0\fswiss Helvetica;}
+{\colortbl;\red255\green255\blue255;}
+\paperw9840\paperh8400
+\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\ql\qnatural
+
+\f0\b\fs24 \cf0 Engineering:
+\b0 \
+ Some people\
+\
+
+\b Human Interface Design:
+\b0 \
+ Some other people\
+\
+
+\b Testing:
+\b0 \
+ Hopefully not nobody\
+\
+
+\b Documentation:
+\b0 \
+ Whoever\
+\
+
+\b With special thanks to:
+\b0 \
+ Mom\
+}
View
2 vendor/DMTabBar/DMTabBar/DMTabBar/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
View
3,642 vendor/DMTabBar/DMTabBar/DMTabBar/en.lproj/MainMenu.xib
3,642 additions, 0 deletions not shown because the diff is too large. Please use a local Git client to view these changes.
View
14 vendor/DMTabBar/DMTabBar/DMTabBar/main.m
@@ -0,0 +1,14 @@
+//
+// main.m
+// DMTabBar
+//
+// Created by Daniele Margutti on 6/18/12.
+// Copyright (c) 2012 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **)argv);
+}
View
BIN vendor/DMTabBar/DMTabBar/DMTabBar/tabBarItem1.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN vendor/DMTabBar/DMTabBar/DMTabBar/tabBarItem2.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
BIN vendor/DMTabBar/DMTabBar/DMTabBar/tabBarItem3.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
54 vendor/DMTabBar/README.md
@@ -0,0 +1,54 @@
+# DMTabBar
+
+DMTabBar is a XCode 4.x like segmented control. It's emulate the behavior of the segmented control used inside XCode's Inspector Window.
+
+Daniele Margutti, <http://www.danielem.org>
+
+![DMTabBar Example Project](http://danielemargutti.com/wp-content/uploads/2012/06/DMTabBar.png)
+
+## How to get started
+
+It's very simple to use:
+* make your DMTabBar class via code (it's an NSView subclass) or via IB
+* create an NSArray of DMTabBarItems elements and assign it to DMTabBar tabBarItems property. Each item is a button and can have several attributes (you can simply set the NSImage's icon property)
+* handle selection changes using - (void) handleTabBarItemSelection:(DMTabBarEventsHandler) selectionHandler; method.
+
+It uses ARC and blocks so you it should be compatible with MacOS X 10.6 or later.
+
+## Change log
+
+### June 19, 2012
+
+* First version
+
+## Donations
+
+If you found this project useful, please donate.
+There’s no expected amount and I don’t require you to.
+
+<a href='https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=GS3DBQ69ZBKWJ">CLICK THIS LINK TO DONATE USING PAYPAL</a>
+
+## License (MIT)
+
+Copyright (c) 2012 Daniele Margutti
+
+Permission is hereby granted, free of charge, to any person
+obtaining a copy of this software and associated documentation
+files (the "Software"), to deal in the Software without
+restriction, including without limitation the rights to use,
+copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the
+Software is furnished to do so, subject to the following
+conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+OTHER DEALINGS IN THE SOFTWARE.

0 comments on commit c41c2fa

Please sign in to comment.