Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

first commit

  • Loading branch information...
commit 1dc632e3cf259c2a21d63bf322740d882433e18c 0 parents
@keefo authored
27 License.txt
@@ -0,0 +1,27 @@
+FreeBSD License
+Copyright 2011 Beyondcow. All rights reserved.
+
+Redistribution and use in source and binary forms, with or without modification, are
+permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this list of
+ conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list
+ of conditions and the following disclaimer in the documentation and/or other materials
+ provided with the distribution.
+
+THIS SOFTWARE IS PROVIDED BY Beyondcow "AS IS" AND ANY EXPRESS OR IMPLIED
+WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND
+FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL Beyondcow OR
+CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
+CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
+NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+The views and conclusions contained in the software and documentation are those of the
+authors and should not be interpreted as representing official policies, either expressed
+or implied, of Beyondcow.
+
3  README.markdown
@@ -0,0 +1,3 @@
+为窗口标题栏添加popup按钮的例子。
+
+![snapshot.png](https://github.com/keefo/WindowTitleMenu/raw/master/snapshot.jpg "Snapshot")
293 WindowTitleMenu.xcodeproj/project.pbxproj
@@ -0,0 +1,293 @@
+// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 46;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ A7EBCB8314A4E966007F4EAA /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A7EBCB8214A4E966007F4EAA /* Cocoa.framework */; };
+ A7EBCB8D14A4E966007F4EAA /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = A7EBCB8B14A4E966007F4EAA /* InfoPlist.strings */; };
+ A7EBCB8F14A4E966007F4EAA /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = A7EBCB8E14A4E966007F4EAA /* main.m */; };
+ A7EBCB9314A4E966007F4EAA /* Credits.rtf in Resources */ = {isa = PBXBuildFile; fileRef = A7EBCB9114A4E966007F4EAA /* Credits.rtf */; };
+ A7EBCB9614A4E966007F4EAA /* AppDelegate.m in Sources */ = {isa = PBXBuildFile; fileRef = A7EBCB9514A4E966007F4EAA /* AppDelegate.m */; };
+ A7EBCB9914A4E967007F4EAA /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = A7EBCB9714A4E967007F4EAA /* MainMenu.xib */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ A7EBCB7E14A4E966007F4EAA /* WindowTitleMenu.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = WindowTitleMenu.app; sourceTree = BUILT_PRODUCTS_DIR; };
+ A7EBCB8214A4E966007F4EAA /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
+ A7EBCB8514A4E966007F4EAA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; };
+ A7EBCB8614A4E966007F4EAA /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = System/Library/Frameworks/CoreData.framework; sourceTree = SDKROOT; };
+ A7EBCB8714A4E966007F4EAA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; };
+ A7EBCB8A14A4E966007F4EAA /* WindowTitleMenu-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "WindowTitleMenu-Info.plist"; sourceTree = "<group>"; };
+ A7EBCB8C14A4E966007F4EAA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ A7EBCB8E14A4E966007F4EAA /* main.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ A7EBCB9014A4E966007F4EAA /* WindowTitleMenu-Prefix.pch */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = "WindowTitleMenu-Prefix.pch"; sourceTree = "<group>"; };
+ A7EBCB9214A4E966007F4EAA /* en */ = {isa = PBXFileReference; lastKnownFileType = text.rtf; name = en; path = en.lproj/Credits.rtf; sourceTree = "<group>"; };
+ A7EBCB9414A4E966007F4EAA /* AppDelegate.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = "<group>"; };
+ A7EBCB9514A4E966007F4EAA /* AppDelegate.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = AppDelegate.m; sourceTree = "<group>"; };
+ A7EBCB9814A4E967007F4EAA /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ A7EBCB7B14A4E966007F4EAA /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A7EBCB8314A4E966007F4EAA /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ A7EBCB7314A4E966007F4EAA = {
+ isa = PBXGroup;
+ children = (
+ A7EBCB8814A4E966007F4EAA /* WindowTitleMenu */,
+ A7EBCB8114A4E966007F4EAA /* Frameworks */,
+ A7EBCB7F14A4E966007F4EAA /* Products */,
+ );
+ sourceTree = "<group>";
+ };
+ A7EBCB7F14A4E966007F4EAA /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ A7EBCB7E14A4E966007F4EAA /* WindowTitleMenu.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ A7EBCB8114A4E966007F4EAA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ A7EBCB8214A4E966007F4EAA /* Cocoa.framework */,
+ A7EBCB8414A4E966007F4EAA /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+ A7EBCB8414A4E966007F4EAA /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ A7EBCB8514A4E966007F4EAA /* AppKit.framework */,
+ A7EBCB8614A4E966007F4EAA /* CoreData.framework */,
+ A7EBCB8714A4E966007F4EAA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ A7EBCB8814A4E966007F4EAA /* WindowTitleMenu */ = {
+ isa = PBXGroup;
+ children = (
+ A7EBCB9414A4E966007F4EAA /* AppDelegate.h */,
+ A7EBCB9514A4E966007F4EAA /* AppDelegate.m */,
+ A7EBCB9714A4E967007F4EAA /* MainMenu.xib */,
+ A7EBCB8914A4E966007F4EAA /* Supporting Files */,
+ );
+ path = WindowTitleMenu;
+ sourceTree = "<group>";
+ };
+ A7EBCB8914A4E966007F4EAA /* Supporting Files */ = {
+ isa = PBXGroup;
+ children = (
+ A7EBCB8A14A4E966007F4EAA /* WindowTitleMenu-Info.plist */,
+ A7EBCB8B14A4E966007F4EAA /* InfoPlist.strings */,
+ A7EBCB8E14A4E966007F4EAA /* main.m */,
+ A7EBCB9014A4E966007F4EAA /* WindowTitleMenu-Prefix.pch */,
+ A7EBCB9114A4E966007F4EAA /* Credits.rtf */,
+ );
+ name = "Supporting Files";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ A7EBCB7D14A4E966007F4EAA /* WindowTitleMenu */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = A7EBCB9C14A4E967007F4EAA /* Build configuration list for PBXNativeTarget "WindowTitleMenu" */;
+ buildPhases = (
+ A7EBCB7A14A4E966007F4EAA /* Sources */,
+ A7EBCB7B14A4E966007F4EAA /* Frameworks */,
+ A7EBCB7C14A4E966007F4EAA /* Resources */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = WindowTitleMenu;
+ productName = WindowTitleMenu;
+ productReference = A7EBCB7E14A4E966007F4EAA /* WindowTitleMenu.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ A7EBCB7514A4E966007F4EAA /* Project object */ = {
+ isa = PBXProject;
+ attributes = {
+ LastUpgradeCheck = 0420;
+ };
+ buildConfigurationList = A7EBCB7814A4E966007F4EAA /* Build configuration list for PBXProject "WindowTitleMenu" */;
+ compatibilityVersion = "Xcode 3.2";
+ developmentRegion = English;
+ hasScannedForEncodings = 0;
+ knownRegions = (
+ en,
+ );
+ mainGroup = A7EBCB7314A4E966007F4EAA;
+ productRefGroup = A7EBCB7F14A4E966007F4EAA /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ A7EBCB7D14A4E966007F4EAA /* WindowTitleMenu */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ A7EBCB7C14A4E966007F4EAA /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A7EBCB8D14A4E966007F4EAA /* InfoPlist.strings in Resources */,
+ A7EBCB9314A4E966007F4EAA /* Credits.rtf in Resources */,
+ A7EBCB9914A4E967007F4EAA /* MainMenu.xib in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ A7EBCB7A14A4E966007F4EAA /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ A7EBCB8F14A4E966007F4EAA /* main.m in Sources */,
+ A7EBCB9614A4E966007F4EAA /* AppDelegate.m in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ A7EBCB8B14A4E966007F4EAA /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A7EBCB8C14A4E966007F4EAA /* en */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ A7EBCB9114A4E966007F4EAA /* Credits.rtf */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A7EBCB9214A4E966007F4EAA /* en */,
+ );
+ name = Credits.rtf;
+ sourceTree = "<group>";
+ };
+ A7EBCB9714A4E967007F4EAA /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ A7EBCB9814A4E967007F4EAA /* en */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ A7EBCB9A14A4E967007F4EAA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ 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_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ ONLY_ACTIVE_ARCH = YES;
+ SDKROOT = macosx;
+ };
+ name = Debug;
+ };
+ A7EBCB9B14A4E967007F4EAA /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ ARCHS = "$(ARCHS_STANDARD_64_BIT)";
+ 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_MISSING_PROTOTYPES = YES;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ MACOSX_DEPLOYMENT_TARGET = 10.7;
+ SDKROOT = macosx;
+ };
+ name = Release;
+ };
+ A7EBCB9D14A4E967007F4EAA /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "WindowTitleMenu/WindowTitleMenu-Prefix.pch";
+ INFOPLIST_FILE = "WindowTitleMenu/WindowTitleMenu-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Debug;
+ };
+ A7EBCB9E14A4E967007F4EAA /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = "WindowTitleMenu/WindowTitleMenu-Prefix.pch";
+ INFOPLIST_FILE = "WindowTitleMenu/WindowTitleMenu-Info.plist";
+ PRODUCT_NAME = "$(TARGET_NAME)";
+ WRAPPER_EXTENSION = app;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ A7EBCB7814A4E966007F4EAA /* Build configuration list for PBXProject "WindowTitleMenu" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A7EBCB9A14A4E967007F4EAA /* Debug */,
+ A7EBCB9B14A4E967007F4EAA /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ A7EBCB9C14A4E967007F4EAA /* Build configuration list for PBXNativeTarget "WindowTitleMenu" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ A7EBCB9D14A4E967007F4EAA /* Debug */,
+ A7EBCB9E14A4E967007F4EAA /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = A7EBCB7514A4E966007F4EAA /* Project object */;
+}
7 WindowTitleMenu.xcodeproj/project.xcworkspace/contents.xcworkspacedata
@@ -0,0 +1,7 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<Workspace
+ version = "1.0">
+ <FileRef
+ location = "self:WindowTitleMenu.xcodeproj">
+ </FileRef>
+</Workspace>
BIN  WindowTitleMenu.xcodeproj/project.xcworkspace/xcuserdata/xulian.xcuserdatad/UserInterfaceState.xcuserstate
Binary file not shown
84 WindowTitleMenu.xcodeproj/xcuserdata/xulian.xcuserdatad/xcschemes/WindowTitleMenu.xcscheme
@@ -0,0 +1,84 @@
+<?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 = "A7EBCB7D14A4E966007F4EAA"
+ BuildableName = "WindowTitleMenu.app"
+ BlueprintName = "WindowTitleMenu"
+ ReferencedContainer = "container:WindowTitleMenu.xcodeproj">
+ </BuildableReference>
+ </BuildActionEntry>
+ </BuildActionEntries>
+ </BuildAction>
+ <TestAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ buildConfiguration = "Debug">
+ <Testables>
+ </Testables>
+ <MacroExpansion>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A7EBCB7D14A4E966007F4EAA"
+ BuildableName = "WindowTitleMenu.app"
+ BlueprintName = "WindowTitleMenu"
+ ReferencedContainer = "container:WindowTitleMenu.xcodeproj">
+ </BuildableReference>
+ </MacroExpansion>
+ </TestAction>
+ <LaunchAction
+ selectedDebuggerIdentifier = "Xcode.DebuggerFoundation.Debugger.GDB"
+ selectedLauncherIdentifier = "Xcode.DebuggerFoundation.Launcher.GDB"
+ launchStyle = "0"
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Debug"
+ debugDocumentVersioning = "YES"
+ allowLocationSimulation = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A7EBCB7D14A4E966007F4EAA"
+ BuildableName = "WindowTitleMenu.app"
+ BlueprintName = "WindowTitleMenu"
+ ReferencedContainer = "container:WindowTitleMenu.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ <AdditionalOptions>
+ </AdditionalOptions>
+ </LaunchAction>
+ <ProfileAction
+ shouldUseLaunchSchemeArgsEnv = "YES"
+ savedToolIdentifier = ""
+ useCustomWorkingDirectory = "NO"
+ buildConfiguration = "Release"
+ debugDocumentVersioning = "YES">
+ <BuildableProductRunnable>
+ <BuildableReference
+ BuildableIdentifier = "primary"
+ BlueprintIdentifier = "A7EBCB7D14A4E966007F4EAA"
+ BuildableName = "WindowTitleMenu.app"
+ BlueprintName = "WindowTitleMenu"
+ ReferencedContainer = "container:WindowTitleMenu.xcodeproj">
+ </BuildableReference>
+ </BuildableProductRunnable>
+ </ProfileAction>
+ <AnalyzeAction
+ buildConfiguration = "Debug">
+ </AnalyzeAction>
+ <ArchiveAction
+ buildConfiguration = "Release"
+ revealArchiveInOrganizer = "YES">
+ </ArchiveAction>
+</Scheme>
22 WindowTitleMenu.xcodeproj/xcuserdata/xulian.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>WindowTitleMenu.xcscheme</key>
+ <dict>
+ <key>orderHint</key>
+ <integer>0</integer>
+ </dict>
+ </dict>
+ <key>SuppressBuildableAutocreation</key>
+ <dict>
+ <key>A7EBCB7D14A4E966007F4EAA</key>
+ <dict>
+ <key>primary</key>
+ <true/>
+ </dict>
+ </dict>
+</dict>
+</plist>
19 WindowTitleMenu/AppDelegate.h
@@ -0,0 +1,19 @@
+//
+// AppDelegate.h
+// WindowTitleMenu
+//
+// Created by xu lian on 11-12-23.
+// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+@interface AppDelegate : NSObject <NSApplicationDelegate>
+
+@property (assign) IBOutlet NSWindow *window;
+@property (assign) IBOutlet NSPopUpButton *popupButton;
+@property (assign) IBOutlet NSTextField *textLabel;
+
+- (IBAction)popupButtonAction:(id)sender;
+
+@end
38 WindowTitleMenu/AppDelegate.m
@@ -0,0 +1,38 @@
+//
+// AppDelegate.m
+// WindowTitleMenu
+//
+// Created by xu lian on 11-12-23.
+// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import "AppDelegate.h"
+
+@implementation AppDelegate
+
+@synthesize window = _window;
+@synthesize popupButton = _popupButton;
+@synthesize textLabel = _textLabel;
+
+- (void)awakeFromNib
+{
+ [_popupButton setFrameOrigin:NSMakePoint(_window.frame.size.width-_popupButton.frame.size.width-3, _window.frame.size.height-_popupButton.frame.size.height)];
+ [[[_window contentView] superview] addSubview:_popupButton];
+}
+
+- (void)dealloc
+{
+ [super dealloc];
+}
+
+- (IBAction)popupButtonAction:(id)sender;
+{
+ [_textLabel setStringValue:[[_popupButton selectedItem] title]];
+}
+
+- (void)applicationDidFinishLaunching:(NSNotification *)aNotification
+{
+ // Insert code here to initialize your application
+}
+
+@end
34 WindowTitleMenu/WindowTitleMenu-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.beyondcow.${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 © 2011 __MyCompanyName__. All rights reserved.</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
7 WindowTitleMenu/WindowTitleMenu-Prefix.pch
@@ -0,0 +1,7 @@
+//
+// Prefix header for all source files of the 'WindowTitleMenu' target in the 'WindowTitleMenu' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
29 WindowTitleMenu/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\
+}
2  WindowTitleMenu/en.lproj/InfoPlist.strings
@@ -0,0 +1,2 @@
+/* Localized versions of Info.plist keys */
+
3,498 WindowTitleMenu/en.lproj/MainMenu.xib
3,498 additions, 0 deletions not shown
14 WindowTitleMenu/main.m
@@ -0,0 +1,14 @@
+//
+// main.m
+// WindowTitleMenu
+//
+// Created by xu lian on 11-12-23.
+// Copyright (c) 2011 __MyCompanyName__. All rights reserved.
+//
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **)argv);
+}
BIN  snapshot.jpg
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Please sign in to comment.
Something went wrong with that request. Please try again.