diff --git a/Clock.xcodeproj/project.pbxproj b/Clock.xcodeproj/project.pbxproj new file mode 100644 index 0000000..93313dd --- /dev/null +++ b/Clock.xcodeproj/project.pbxproj @@ -0,0 +1,304 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 44; + objects = { + +/* Begin PBXBuildFile section */ + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */ = {isa = PBXBuildFile; fileRef = 29B97318FDCFA39411CA2CEA /* MainMenu.nib */; }; + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; }; + 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; }; + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; }; + BFABBA6E0FC3BFD400FE182A /* big_clock.icns in Resources */ = {isa = PBXBuildFile; fileRef = BFABBA6D0FC3BFD400FE182A /* big_clock.icns */; }; + DBF85FA00D65DB880032A05C /* ClockAppController.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF85F9F0D65DB880032A05C /* ClockAppController.m */; }; + DBF85FA30D65DBFC0032A05C /* ClockView.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF85FA20D65DBFC0032A05C /* ClockView.m */; }; + DBF860010D65E5610032A05C /* ClockWindow.m in Sources */ = {isa = PBXBuildFile; fileRef = DBF860000D65E5610032A05C /* ClockWindow.m */; }; +/* End PBXBuildFile section */ + +/* Begin PBXFileReference section */ + 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = ""; }; + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = ""; }; + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = ""; }; + 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = source/main.m; sourceTree = ""; }; + 29B97319FDCFA39411CA2CEA /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/MainMenu.nib; sourceTree = ""; }; + 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = ""; }; + 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = ""; }; + 32CA4F630368D1EE00C91783 /* clock_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = clock_Prefix.pch; path = source/clock_Prefix.pch; sourceTree = ""; }; + 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; + BFABBA6D0FC3BFD400FE182A /* big_clock.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = big_clock.icns; sourceTree = ""; }; + DB1F06CA0D6A0F7F007CCFB1 /* Clock.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = Clock.app; sourceTree = BUILT_PRODUCTS_DIR; }; + DBF85F9E0D65DB880032A05C /* ClockAppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClockAppController.h; sourceTree = ""; }; + DBF85F9F0D65DB880032A05C /* ClockAppController.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClockAppController.m; sourceTree = ""; }; + DBF85FA10D65DBFC0032A05C /* ClockView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClockView.h; sourceTree = ""; }; + DBF85FA20D65DBFC0032A05C /* ClockView.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClockView.m; sourceTree = ""; }; + DBF85FFF0D65E5610032A05C /* ClockWindow.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ClockWindow.h; sourceTree = ""; }; + DBF860000D65E5610032A05C /* ClockWindow.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = ClockWindow.m; sourceTree = ""; }; +/* End PBXFileReference section */ + +/* Begin PBXFrameworksBuildPhase section */ + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXFrameworksBuildPhase section */ + +/* Begin PBXGroup section */ + 080E96DDFE201D6D7F000001 /* source */ = { + isa = PBXGroup; + children = ( + DBF85F9E0D65DB880032A05C /* ClockAppController.h */, + DBF85F9F0D65DB880032A05C /* ClockAppController.m */, + DBF85FA10D65DBFC0032A05C /* ClockView.h */, + DBF85FA20D65DBFC0032A05C /* ClockView.m */, + DBF85FFF0D65E5610032A05C /* ClockWindow.h */, + DBF860000D65E5610032A05C /* ClockWindow.m */, + ); + path = source; + sourceTree = ""; + }; + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */, + ); + name = "Linked Frameworks"; + sourceTree = ""; + }; + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = { + isa = PBXGroup; + children = ( + 29B97324FDCFA39411CA2CEA /* AppKit.framework */, + 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */, + 29B97325FDCFA39411CA2CEA /* Foundation.framework */, + ); + name = "Other Frameworks"; + sourceTree = ""; + }; + 19C28FACFE9D520D11CA2CBB /* Products */ = { + isa = PBXGroup; + children = ( + DB1F06CA0D6A0F7F007CCFB1 /* Clock.app */, + ); + name = Products; + sourceTree = ""; + }; + 29B97314FDCFA39411CA2CEA /* quikclock */ = { + isa = PBXGroup; + children = ( + 080E96DDFE201D6D7F000001 /* source */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + ); + name = quikclock; + sourceTree = ""; + }; + 29B97315FDCFA39411CA2CEA /* Other Sources */ = { + isa = PBXGroup; + children = ( + 32CA4F630368D1EE00C91783 /* clock_Prefix.pch */, + 29B97316FDCFA39411CA2CEA /* main.m */, + ); + name = "Other Sources"; + sourceTree = ""; + }; + 29B97317FDCFA39411CA2CEA /* resources */ = { + isa = PBXGroup; + children = ( + BFABBA6D0FC3BFD400FE182A /* big_clock.icns */, + 8D1107310486CEB800E47090 /* Info.plist */, + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */, + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */, + ); + path = resources; + sourceTree = ""; + }; + 29B97323FDCFA39411CA2CEA /* Frameworks */ = { + isa = PBXGroup; + children = ( + 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */, + 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */, + ); + name = Frameworks; + sourceTree = ""; + }; +/* End PBXGroup section */ + +/* Begin PBXNativeTarget section */ + 8D1107260486CEB800E47090 /* Clock */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Clock" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Clock; + productInstallPath = "$(HOME)/Applications"; + productName = quikclock; + productReference = DB1F06CA0D6A0F7F007CCFB1 /* Clock.app */; + productType = "com.apple.product-type.application"; + }; +/* End PBXNativeTarget section */ + +/* Begin PBXProject section */ + 29B97313FDCFA39411CA2CEA /* Project object */ = { + isa = PBXProject; + buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Clock" */; + compatibilityVersion = "Xcode 3.0"; + hasScannedForEncodings = 1; + mainGroup = 29B97314FDCFA39411CA2CEA /* quikclock */; + projectDirPath = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* Clock */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072A0486CEB800E47090 /* MainMenu.nib in Resources */, + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + BFABBA6E0FC3BFD400FE182A /* big_clock.icns in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 8D11072C0486CEB800E47090 /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072D0486CEB800E47090 /* main.m in Sources */, + DBF85FA00D65DB880032A05C /* ClockAppController.m in Sources */, + DBF85FA30D65DBFC0032A05C /* ClockView.m in Sources */, + DBF860010D65E5610032A05C /* ClockWindow.m in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXSourcesBuildPhase section */ + +/* Begin PBXVariantGroup section */ + 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = { + isa = PBXVariantGroup; + children = ( + 089C165DFE840E0CC02AAC07 /* English */, + ); + name = InfoPlist.strings; + sourceTree = ""; + }; + 29B97318FDCFA39411CA2CEA /* MainMenu.nib */ = { + isa = PBXVariantGroup; + children = ( + 29B97319FDCFA39411CA2CEA /* English */, + ); + name = MainMenu.nib; + sourceTree = ""; + }; +/* End PBXVariantGroup section */ + +/* Begin XCBuildConfiguration section */ + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + COPY_PHASE_STRIP = NO; + GCC_DYNAMIC_NO_PIC = NO; + GCC_ENABLE_FIX_AND_CONTINUE = YES; + GCC_ENABLE_OBJC_GC = supported; + GCC_MODEL_TUNING = G5; + GCC_OPTIMIZATION_LEVEL = 0; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = source/clock_Prefix.pch; + INFOPLIST_FILE = resources/Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + ONLY_ACTIVE_ARCH = YES; + PRODUCT_NAME = Clock; + WRAPPER_EXTENSION = app; + ZERO_LINK = YES; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_ENABLE_OBJC_GC = supported; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = source/clock_Prefix.pch; + INFOPLIST_FILE = resources/Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + PRODUCT_NAME = Clock; + WRAPPER_EXTENSION = app; + }; + name = Release; + }; + C01FCF4F08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; + GCC_ENABLE_OBJC_GC = required; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; + }; + name = Debug; + }; + C01FCF5008A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ARCHS = "$(ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1)"; + ARCHS_STANDARD_32_64_BIT_PRE_XCODE_3_1 = "x86_64 i386 ppc"; + GCC_ENABLE_OBJC_GC = required; + GCC_WARN_ABOUT_RETURN_TYPE = YES; + GCC_WARN_UNUSED_VARIABLE = YES; + MACOSX_DEPLOYMENT_TARGET = 10.5; + PREBINDING = NO; + SDKROOT = "$(DEVELOPER_SDK_DIR)/MacOSX10.6.sdk"; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "Clock" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4B08A954540054247B /* Debug */, + C01FCF4C08A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + C01FCF4E08A954540054247B /* Build configuration list for PBXProject "Clock" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + C01FCF4F08A954540054247B /* Debug */, + C01FCF5008A954540054247B /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; +/* End XCConfigurationList section */ + }; + rootObject = 29B97313FDCFA39411CA2CEA /* Project object */; +} diff --git a/resources/English.lproj/InfoPlist.strings b/resources/English.lproj/InfoPlist.strings new file mode 100644 index 0000000..686f4da Binary files /dev/null and b/resources/English.lproj/InfoPlist.strings differ diff --git a/resources/English.lproj/MainMenu.nib/designable.nib b/resources/English.lproj/MainMenu.nib/designable.nib new file mode 100644 index 0000000..6a83683 --- /dev/null +++ b/resources/English.lproj/MainMenu.nib/designable.nib @@ -0,0 +1,1010 @@ + + + + 1050 + 10D573 + 762 + 1038.29 + 460.00 + + com.apple.InterfaceBuilder.CocoaPlugin + 762 + + + YES + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + + + YES + + YES + + + YES + + + + YES + + NSApplication + + + FirstResponder + + + NSApplication + + + AMainMenu + + YES + + + QuickClock + + 1048576 + 2147483647 + + NSImage + NSMenuCheckmark + + + NSImage + NSMenuMixedState + + submenuAction: + + QuickClock + + YES + + + About QuickClock + + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Preferences… + , + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Services + + 1048576 + 2147483647 + + + submenuAction: + + Services + + YES + + _NSServicesMenu + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Hide QuickClock + h + 1048576 + 2147483647 + + + + + + Hide Others + h + 1572864 + 2147483647 + + + + + + Show All + + 1048576 + 2147483647 + + + + + + YES + YES + + + 1048576 + 2147483647 + + + + + + Quit QuickClock + q + 1048576 + 2147483647 + + + + + _NSAppleMenu + + + + _NSMainMenu + + + 1 + 2 + {{168, 380}, {1119, 261}} + 1946162176 + Window + ClockWindow + + {1.79769e+308, 1.79769e+308} + + + 256 + + YES + + + 4370 + {1119, 261} + + ClockView + + + {1119, 261} + + {{0, 0}, {1440, 878}} + {1.79769e+308, 1.79769e+308} + + + ClockAppController + + + + + YES + + + orderFrontStandardAboutPanel: + + + + 142 + + + + hide: + + + + 367 + + + + hideOtherApplications: + + + + 368 + + + + terminate: + + + + 369 + + + + unhideAllApplications: + + + + 370 + + + + clockView + + + + 377 + + + + clockWindow + + + + 378 + + + + delegate + + + + 384 + + + + + YES + + 0 + + + + + + -2 + + + File's Owner + + + -1 + + + First Responder + + + -3 + + + Application + + + 29 + + + YES + + + + MainMenu + + + 56 + + + YES + + + + + + 57 + + + YES + + + + + + + + + + + + + + + + 58 + + + + + 134 + + + + + 150 + + + + + 136 + + + 1111 + + + 144 + + + + + 129 + + + 121 + + + 143 + + + + + 236 + + + + + 131 + + + YES + + + + + + 149 + + + + + 145 + + + + + 130 + + + + + 371 + + + YES + + + + clockWindow + + + 372 + + + YES + + + + + + 375 + + + + + 376 + + + + + + + YES + + YES + -3.IBPluginDependency + 129.IBPluginDependency + 129.ImportedFromIB2 + 130.IBPluginDependency + 130.ImportedFromIB2 + 130.editorWindowContentRectSynchronizationRect + 131.IBPluginDependency + 131.ImportedFromIB2 + 134.IBPluginDependency + 134.ImportedFromIB2 + 136.IBPluginDependency + 136.ImportedFromIB2 + 143.IBPluginDependency + 143.ImportedFromIB2 + 144.IBPluginDependency + 144.ImportedFromIB2 + 145.IBPluginDependency + 145.ImportedFromIB2 + 149.IBPluginDependency + 149.ImportedFromIB2 + 150.IBPluginDependency + 150.ImportedFromIB2 + 236.IBPluginDependency + 236.ImportedFromIB2 + 29.IBEditorWindowLastContentRect + 29.IBPluginDependency + 29.ImportedFromIB2 + 29.WindowOrigin + 29.editorWindowContentRectSynchronizationRect + 371.IBEditorWindowLastContentRect + 371.IBPluginDependency + 371.IBWindowTemplateEditedContentRect + 371.NSWindowTemplate.visibleAtLaunch + 371.editorWindowContentRectSynchronizationRect + 372.IBPluginDependency + 375.IBPluginDependency + 56.IBPluginDependency + 56.ImportedFromIB2 + 57.IBEditorWindowLastContentRect + 57.IBPluginDependency + 57.ImportedFromIB2 + 57.editorWindowContentRectSynchronizationRect + 58.IBPluginDependency + 58.ImportedFromIB2 + + + YES + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{536, 669}, {64, 6}} + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + com.apple.InterfaceBuilder.CocoaPlugin + + {{353, 730}, {124, 20}} + com.apple.InterfaceBuilder.CocoaPlugin + + {74, 862} + {{289, 735}, {288, 20}} + {{7, 260}, {1119, 261}} + com.apple.InterfaceBuilder.CocoaPlugin + {{7, 260}, {1119, 261}} + + {{-108, 390}, {1119, 261}} + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + com.apple.InterfaceBuilder.CocoaPlugin + + {{365, 547}, {212, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + {{301, 552}, {215, 183}} + com.apple.InterfaceBuilder.CocoaPlugin + + + + + YES + + + YES + + + + + YES + + + YES + + + + 384 + + + + YES + + ClockAppController + NSObject + + YES + + YES + clockView + clockWindow + + + YES + ClockView + ClockWindow + + + + IBProjectSource + source/ClockAppController.h + + + + ClockAppController + NSObject + + IBUserSource + + + + + ClockView + NSView + + IBProjectSource + source/ClockView.h + + + + ClockWindow + NSWindow + + IBProjectSource + source/ClockWindow.h + + + + + YES + + NSApplication + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSApplication.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSApplicationScripting.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSColorPanel.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSHelpManager.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSPageLayout.h + + + + NSApplication + + IBFrameworkSource + AppKit.framework/Headers/NSUserInterfaceItemSearching.h + + + + NSMenu + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenu.h + + + + NSMenuItem + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSMenuItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSAccessibility.h + + + + NSObject + + + + NSObject + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSControl.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDictionaryController.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSDragging.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontManager.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSFontPanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSKeyValueBinding.h + + + + NSObject + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSNibLoading.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSOutlineView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSPasteboard.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSSavePanel.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSTableView.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSToolbarItem.h + + + + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSView.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSError.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSFileManager.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyValueObserving.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSKeyedArchiver.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObject.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSObjectScripting.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSPortCoder.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSRunLoop.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptClassDescription.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptKeyValueCoding.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptObjectSpecifiers.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSScriptWhoseTests.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSThread.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURL.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLConnection.h + + + + NSObject + + IBFrameworkSource + Foundation.framework/Headers/NSURLDownload.h + + + + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSInterfaceStyle.h + + + + NSResponder + NSObject + + IBFrameworkSource + AppKit.framework/Headers/NSResponder.h + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSClipView.h + + + + NSView + + + + NSView + + IBFrameworkSource + AppKit.framework/Headers/NSRulerView.h + + + + NSView + NSResponder + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSDrawer.h + + + + NSWindow + NSResponder + + IBFrameworkSource + AppKit.framework/Headers/NSWindow.h + + + + NSWindow + + IBFrameworkSource + AppKit.framework/Headers/NSWindowScripting.h + + + + + 0 + IBCocoaFramework + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.macosx + + + + com.apple.InterfaceBuilder.CocoaPlugin.InterfaceBuilder3 + + + YES + ../../Clock.xcodeproj + 3 + + YES + + YES + NSMenuCheckmark + NSMenuMixedState + + + YES + {9, 8} + {7, 2} + + + + diff --git a/resources/English.lproj/MainMenu.nib/keyedobjects.nib b/resources/English.lproj/MainMenu.nib/keyedobjects.nib new file mode 100644 index 0000000..269304f Binary files /dev/null and b/resources/English.lproj/MainMenu.nib/keyedobjects.nib differ diff --git a/resources/Info.plist b/resources/Info.plist new file mode 100644 index 0000000..41077c4 --- /dev/null +++ b/resources/Info.plist @@ -0,0 +1,28 @@ + + + + + CFBundleDevelopmentRegion + English + CFBundleExecutable + ${EXECUTABLE_NAME} + CFBundleIconFile + big_clock.icns + CFBundleIdentifier + com.zachwaugh.clock + CFBundleInfoDictionaryVersion + 6.0 + CFBundleName + ${PRODUCT_NAME} + CFBundlePackageType + APPL + CFBundleSignature + ???? + CFBundleVersion + 1.0 + NSMainNibFile + MainMenu + NSPrincipalClass + NSApplication + + diff --git a/resources/big_clock.icns b/resources/big_clock.icns new file mode 100644 index 0000000..308d8d5 Binary files /dev/null and b/resources/big_clock.icns differ diff --git a/source/ClockAppController.h b/source/ClockAppController.h new file mode 100644 index 0000000..a94acef --- /dev/null +++ b/source/ClockAppController.h @@ -0,0 +1,25 @@ +// +// AppController.h +// Clock +// +// Created by Zach Waugh on 2/15/08. +// Copyright 2008 zachwaugh.com. All rights reserved. +// + +#import + +@class ClockView; +@class ClockWindow; + +@interface ClockAppController : NSObject +{ + IBOutlet ClockView *clockView; + IBOutlet ClockWindow *clockWindow; + NSTimer *timer; +} + +@property (retain) ClockView *clockView; +@property (retain) ClockWindow *clockWindow; +@property (retain) NSTimer *timer; + +@end diff --git a/source/ClockAppController.m b/source/ClockAppController.m new file mode 100644 index 0000000..5f9882b --- /dev/null +++ b/source/ClockAppController.m @@ -0,0 +1,59 @@ +// +// AppController.m +// Clock +// +// Created by Zach Waugh on 2/15/08. +// Copyright 2008 zachwaugh.com. All rights reserved. +// + +#import "ClockAppController.h" +#import "ClockView.h" +#import "ClockWindow.h" + +// Private methods +@interface ClockAppController () + +- (void)tick:(NSTimer *)aTimer; +- (void)startClock; +- (void)stopClock; + +@end + + +@implementation ClockAppController + +@synthesize clockView, clockWindow, timer; + + +- (void)awakeFromNib +{ + [self startClock]; +} + + +- (void)tick:(NSTimer *)aTimer +{ + [self.clockView setNeedsDisplay:YES]; +} + + +- (void)startClock +{ + self.timer = [NSTimer scheduledTimerWithTimeInterval:0.5 target:self selector:@selector(tick:) userInfo:NULL repeats:YES]; +} + + +- (void)stopClock +{ + [self.timer invalidate]; +} + + +- (void)applicationWillTerminate:(NSNotification *)aNotification +{ + // Probably don't really need to do this, but it's good to clean up after ourselves + [self stopClock]; +} + + +@end diff --git a/source/ClockView.h b/source/ClockView.h new file mode 100644 index 0000000..bf75fe4 --- /dev/null +++ b/source/ClockView.h @@ -0,0 +1,26 @@ +// +// ClockView.h +// Clock +// +// Created by Zach Waugh on 2/15/08. +// Copyright 2008 zachwaugh.com. All rights reserved. +// + +#import + +@interface ClockView : NSView +{ + NSRect textRect; + NSSize textSize; + NSColor *backgroundColor; + NSBezierPath *clipShape; + NSMutableDictionary *textAttributes; +} + +@property (assign) NSRect textRect; +@property (assign) NSSize textSize; +@property (retain) NSColor *backgroundColor; +@property (retain) NSBezierPath *clipShape; +@property (retain) NSMutableDictionary *textAttributes; + +@end diff --git a/source/ClockView.m b/source/ClockView.m new file mode 100644 index 0000000..5cd7b8e --- /dev/null +++ b/source/ClockView.m @@ -0,0 +1,89 @@ +// +// ClockView.m +// Clock +// +// Created by Zach Waugh on 2/15/08. +// Copyright 2008 zachwaugh.com. All rights reserved. +// + +#import "ClockView.h" + +@implementation ClockView + +@synthesize textRect, textSize, backgroundColor, clipShape, textAttributes; + + +- (id)initWithFrame:(NSRect)frame +{ + if (self = [super initWithFrame:frame]) + { + self.backgroundColor = [NSColor colorWithCalibratedWhite:0 alpha:0.35]; + + // Configure current time + NSString *clockDisplay = [[NSDate date] descriptionWithCalendarFormat:@"%I:%M:%S %p" timeZone:nil locale:nil]; + + // Create attributes dict for text formatting + self.textAttributes = [[NSMutableDictionary alloc] init]; + [self.textAttributes setObject:[NSFont fontWithName:@"Helvetica" size:225.0] forKey:NSFontAttributeName]; + [self.textAttributes setObject:[NSColor whiteColor] forKey:NSForegroundColorAttributeName]; + + NSShadow *shadow = [[NSShadow alloc] init]; + [shadow setShadowColor:self.backgroundColor]; + [shadow setShadowBlurRadius:10.0]; + [self.textAttributes setObject:shadow forKey:NSShadowAttributeName]; + + // Calculate size of displayed text on screen + NSSize displaySize = [clockDisplay sizeWithAttributes:self.textAttributes]; + displaySize.width += 100.0; + + // Give some space on sides of text + self.textSize = displaySize; + + // Create rounded rectangle + self.clipShape = [[NSBezierPath alloc] init]; + + // Specify clipshape dimensions now that we have calculated the size of the text display + [self.clipShape appendBezierPathWithRoundedRect:NSMakeRect(0.0, 0.0, self.textSize.width, self.textSize.height) xRadius:25.0 yRadius:25.0]; + + self.textRect = NSMakeRect(50.0, 0.0, self.textSize.width, self.textSize.height); + } + + return self; +} + + +- (void)awakeFromNib +{ + NSSize screenSize = [[NSScreen mainScreen] frame].size; + NSRect windowRect = NSMakeRect((screenSize.width - self.textSize.width) / 2, (screenSize.height - self.textSize.height) / 2, self.textSize.width, self.textSize.height); + [[self window] setFrame:windowRect display:YES]; +} + + +// Allow for transparency +- (BOOL)isOpaque +{ + return NO; +} + + +- (BOOL)isFlipped +{ + return YES; +} + + +- (void)drawRect:(NSRect)rect +{ + // Clear existing display + [[NSColor clearColor] set]; + NSRectFill(self.bounds); + + // Set color to semi-transparent black and fill clip shape + [self.backgroundColor set]; + [self.clipShape fill]; + + [[[NSDate date] descriptionWithCalendarFormat:@"%I:%M:%S %p" timeZone:nil locale:nil] drawInRect:self.textRect withAttributes:self.textAttributes]; +} + +@end diff --git a/source/ClockWindow.h b/source/ClockWindow.h new file mode 100644 index 0000000..1316f9b --- /dev/null +++ b/source/ClockWindow.h @@ -0,0 +1,13 @@ +// +// ClockWindow.h +// Clock +// +// Created by Zach Waugh on 2/15/08. +// Copyright 2008 zachwaugh.com. All rights reserved. +// + +#import + +@interface ClockWindow : NSWindow + +@end diff --git a/source/ClockWindow.m b/source/ClockWindow.m new file mode 100644 index 0000000..7c1fd49 --- /dev/null +++ b/source/ClockWindow.m @@ -0,0 +1,35 @@ +// +// ClockWindow.m +// Clock +// +// Created by Zach Waugh on 2/15/08. +// Copyright 2008 zachwaugh.com. All rights reserved. +// + +#import "ClockWindow.h" + +@implementation ClockWindow + + +- (id)initWithContentRect:(NSRect)contentRect styleMask:(NSUInteger)aStyle backing:(NSBackingStoreType)bufferingType defer:(BOOL)flag +{ + NSWindow *result = [super initWithContentRect:contentRect styleMask:NSBorderlessWindowMask backing:NSBackingStoreBuffered defer:NO]; + + [result setBackgroundColor:[NSColor clearColor]]; + [result setLevel:NSStatusWindowLevel]; + [result setAlphaValue:1.0]; + [result setOpaque:NO]; + [result setHasShadow:NO]; + [result setMovableByWindowBackground:YES]; + + return result; +} + + +- (BOOL)canBecomeKeyWindow +{ + return YES; +} + + +@end diff --git a/source/clock_Prefix.pch b/source/clock_Prefix.pch new file mode 100644 index 0000000..c2c1290 --- /dev/null +++ b/source/clock_Prefix.pch @@ -0,0 +1,7 @@ +// +// Prefix header for all source files of the 'quickclock' target in the 'quickclock' project +// + +#ifdef __OBJC__ + #import +#endif diff --git a/source/main.m b/source/main.m new file mode 100644 index 0000000..ce8df1f --- /dev/null +++ b/source/main.m @@ -0,0 +1,14 @@ +// +// main.m +// Clock +// +// Created by Zach Waugh on 2/15/08. +// Copyright zachwaugh.com 2008. All rights reserved. +// + +#import + +int main(int argc, char *argv[]) +{ + return NSApplicationMain(argc, (const char **) argv); +}