Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Merge branch 'master' into macvim73

  • Loading branch information...
commit 370077b53992aa98e705565e9e9ffa2176f69d8a 2 parents 5679cb5 + c1a59b5
@b4winckler b4winckler authored
Showing with 606 additions and 8,189 deletions.
  1. 0  src/MacVim/Advanced.png
  2. +0 −43 src/MacVim/AuthorizedShellCommand.h
  3. +0 −155 src/MacVim/AuthorizedShellCommand.m
  4. +0 −73 src/MacVim/CTGradient.h
  5. +0 −1,271 src/MacVim/CTGradient.m
  6. +0 −4 src/MacVim/Credits.rtf
  7. +98 −569 src/MacVim/English.lproj/Preferences.nib/designable.nib
  8. BIN  src/MacVim/English.lproj/Preferences.nib/keyedobjects.nib
  9. BIN  src/MacVim/Integration.png
  10. +0 −10 src/MacVim/MMAppController.h
  11. +0 −81 src/MacVim/MMAppController.m
  12. +1 −0  src/MacVim/MMAtsuiTextView.h
  13. +6 −26 src/MacVim/MMAtsuiTextView.m
  14. +12 −0 src/MacVim/MMBackend.h
  15. +65 −1 src/MacVim/MMBackend.m
  16. +230 −0 src/MacVim/MMCoreTextView+ToolTip.m
  17. +13 −0 src/MacVim/MMCoreTextView.h
  18. +0 −29 src/MacVim/MMCoreTextView.m
  19. +3 −0  src/MacVim/MMFullscreenWindow.m
  20. +0 −31 src/MacVim/MMPlugInManager.h
  21. +0 −151 src/MacVim/MMPlugInManager.m
  22. +0 −13 src/MacVim/MMPreferenceController.h
  23. +2 −322 src/MacVim/MMPreferenceController.m
  24. +2 −0  src/MacVim/MMTextView.h
  25. +6 −26 src/MacVim/MMTextView.m
  26. +0 −6 src/MacVim/MMTextViewHelper.h
  27. +4 −71 src/MacVim/MMTextViewHelper.m
  28. +0 −10 src/MacVim/MMVimController.h
  29. +43 −19 src/MacVim/MMVimController.m
  30. +26 −21 src/MacVim/MMVimView.m
  31. +3 −0  src/MacVim/MMWindow.m
  32. +2 −7 src/MacVim/MacVim.h
  33. +2 −0  src/MacVim/MacVim.m
  34. +4 −116 src/MacVim/MacVim.xcodeproj/project.pbxproj
  35. +0 −3  src/MacVim/Miscellaneous.h
  36. +0 −3  src/MacVim/Miscellaneous.m
  37. +0 −57 src/MacVim/PlugInGUI.h
  38. +0 −334 src/MacVim/PlugInGUI.m
  39. +0 −37 src/MacVim/PlugInImpl.h
  40. +0 −237 src/MacVim/PlugInImpl.m
  41. +0 −72 src/MacVim/PlugInInterface.h
  42. +0 −98 src/MacVim/PlugInView.nib/classes.nib
  43. +0 −20 src/MacVim/PlugInView.nib/info.nib
  44. BIN  src/MacVim/PlugInView.nib/keyedobjects.nib
  45. +0 −146 src/MacVim/RBSplitSubview.h
  46. +0 −929 src/MacVim/RBSplitSubview.m
  47. +0 −225 src/MacVim/RBSplitView.h
  48. +0 −1,736 src/MacVim/RBSplitView.m
  49. +0 −98 src/MacVim/RBSplitViewPrivateDefines.h
  50. +0 −288 src/MacVim/edit-in-odb/Edit in ODBEditor.xcodeproj/project.pbxproj
  51. +0 −7 src/MacVim/edit-in-odb/Edit in ODBEditor_Prefix.pch
  52. BIN  src/MacVim/edit-in-odb/English.lproj/InfoPlist.strings
  53. +0 −17 src/MacVim/edit-in-odb/Info
  54. +0 −26 src/MacVim/edit-in-odb/Info.plist
  55. +0 −2  src/MacVim/edit-in-odb/Makefile
  56. +0 −16 src/MacVim/edit-in-odb/src/Edit in ODBEditor.h
  57. +0 −291 src/MacVim/edit-in-odb/src/Edit in ODBEditor.mm
  58. +0 −60 src/MacVim/edit-in-odb/src/NSTextView: Edit in ODBEditor.mm
  59. +0 −414 src/MacVim/edit-in-odb/src/WebView: Edit in ODBEditor.mm
  60. +0 −5 src/MacVim/edit-in-odb/url map.plist
  61. +61 −0 src/MacVim/gui_macvim.m
  62. +3 −3 src/Makefile
  63. +3 −2 src/feature.h
  64. +3 −0  src/gui.c
  65. +7 −7 src/gui_beval.c
  66. +5 −1 src/gui_beval.h
  67. +2 −0  src/menu.c
View
0  src/MacVim/Advanced.png 100755 → 100644
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
43 src/MacVim/AuthorizedShellCommand.h
@@ -1,43 +0,0 @@
-/* vi:set ts=8 sts=4 sw=4 ft=objc:
- *
- * VIM - Vi IMproved by Bram Moolenaar
- * MacVim GUI port by Bjorn Winckler
- *
- * Do ":help uganda" in Vim to read copying and usage conditions.
- * Do ":help credits" in Vim to see a list of people who contributed.
- * See README.txt for an overview of the Vim source code.
- */
-
-#import <Cocoa/Cocoa.h>
-#import <Security/Authorization.h>
-
-
-@interface AuthorizedShellCommand : NSObject {
-
- NSArray *commands;
-
- AuthorizationRef authorizationRef;
-
-}
-
-// Pass an array of dictionaries. Each dictionary has to have the following
-// keys:
-//
-// * MMCommand: The command to execute, an NSString (e.g. @"/usr/bin/rm").
-// * MMArguments: An array of NSStrings, the arguments that are passed to
-// the command.
-//
-- (AuthorizedShellCommand *)initWithCommands:(NSArray *)theCommands;
-
-// Runs the command passed in the constructor.
-- (OSStatus)run;
-
-// This pops up the permission dialog. Called by run.
-- (OSStatus)askUserForPermission;
-
-@end
-
-
-extern NSString *MMCommand;
-extern NSString *MMArguments;
-
View
155 src/MacVim/AuthorizedShellCommand.m
@@ -1,155 +0,0 @@
-/* vi:set ts=8 sts=4 sw=4 ft=objc:
- *
- * VIM - Vi IMproved by Bram Moolenaar
- * MacVim GUI port by Bjorn Winckler
- *
- * Do ":help uganda" in Vim to read copying and usage conditions.
- * Do ":help credits" in Vim to see a list of people who contributed.
- * See README.txt for an overview of the Vim source code.
- */
-/*
- * AuthorizedCommand
- *
- * Runs a set of shell commands which may require authorization. Displays a
- * gui dialog to ask the user for authorized access.
- */
-
-#import "AuthorizedShellCommand.h"
-#import <Security/AuthorizationTags.h>
-
-
-@implementation AuthorizedShellCommand
-
-- (AuthorizedShellCommand *)initWithCommands:(NSArray *)theCommands
-{
- if (![super init])
- return nil;
-
- commands = [theCommands retain];
- return self;
-}
-
-- (void)dealloc
-{
- [super dealloc];
- [commands release];
-}
-
-- (OSStatus)run
-{
- OSStatus err;
- int i;
- const char** arguments = NULL;
- AuthorizationFlags flags = kAuthorizationFlagDefaults;
-
- err = AuthorizationCreate(NULL, kAuthorizationEmptyEnvironment,
- flags, &authorizationRef);
- if (err != errAuthorizationSuccess)
- return err;
-
- if ((err = [self askUserForPermission]) != errAuthorizationSuccess) {
- goto cleanup;
- }
-
- NSEnumerator* myIterator = [commands objectEnumerator];
- NSDictionary* currCommand;
-
- while ((currCommand = [myIterator nextObject])) {
- /* do something useful with currCommand */
- FILE *ioPipe = NULL;
- char junk[256];
-
- const char* toolPath = [[currCommand objectForKey:MMCommand] UTF8String];
- NSArray* argumentStrings = [currCommand objectForKey:MMArguments];
- arguments = (const char**)malloc(
- ([argumentStrings count] + 1) * sizeof(char*));
-
- for (i = 0; i < [argumentStrings count]; ++i) {
- arguments[i] = [[argumentStrings objectAtIndex:i] UTF8String];
- }
- arguments[i] = NULL;
-
- err = AuthorizationExecuteWithPrivileges (authorizationRef, toolPath,
- kAuthorizationFlagDefaults, (char*const*)arguments, &ioPipe);
- if (err != errAuthorizationSuccess)
- goto cleanup;
-
-#if 0
- // We use the pipe to signal us when the command has completed
- char *p;
- do {
- p = fgets(junk, sizeof(junk), ioPipe);
- } while (p);
-#else
- for(;;)
- {
- int bytesRead = read (fileno (ioPipe),
- junk, sizeof (junk));
- if (bytesRead < 1) break;
- write (fileno (stdout), junk, bytesRead);
- }
-#endif
-
- if (arguments != NULL) {
- free(arguments);
- arguments = NULL;
- }
- fclose(ioPipe);
- }
-
-
-
-cleanup:
- AuthorizationFree(authorizationRef, kAuthorizationFlagDefaults);
- authorizationRef = 0;
-
- if (arguments != NULL)
- free(arguments);
-
- return err;
-}
-
-- (OSStatus)askUserForPermission
-{
- int i;
-
- assert(authorizationRef != 0);
-
- // The documentation for AuthorizationItem says that `value` should be
- // the path to the full posix path for kAuthorizationRightExecute. But
- // the installer sample "Calling a Privileged Installer" sets it to NULL.
- // Gotta love Apple's documentation.
- //
- // If you don't set `value` correctly, you'll get an
- // `errAuthorizationToolEnvironmentError` when you try to execute the
- // command.
- AuthorizationItem* authItems =
- malloc([commands count] * sizeof(AuthorizationItem));
- for (i = 0; i < [commands count]; ++i) {
- authItems[i].name = kAuthorizationRightExecute;
- authItems[i].value = (void*)
- [[[commands objectAtIndex:i] objectForKey:MMCommand] UTF8String];
- authItems[i].valueLength = strlen(authItems[i].value);
- authItems[i].flags = 0;
- }
-
- AuthorizationRights rights = {
- [commands count], authItems
- };
-
- OSStatus err = AuthorizationCopyRights(authorizationRef, &rights, NULL,
- kAuthorizationFlagInteractionAllowed |
- kAuthorizationFlagPreAuthorize |
- kAuthorizationFlagExtendRights
- , NULL);
-
- free(authItems);
-
- return err;
-}
-
-@end
-
-NSString *MMCommand = @"MMCommand";
-NSString *MMArguments = @"MMArguments";
-
View
73 src/MacVim/CTGradient.h
@@ -1,73 +0,0 @@
-//
-// CTGradient.h
-//
-// Created by Chad Weider on 2/14/07.
-// Writtin by Chad Weider.
-//
-// Released into public domain on 4/10/08.
-//
-// Version: 1.8
-
-#import <Cocoa/Cocoa.h>
-
-typedef struct _CTGradientElement
- {
- float red, green, blue, alpha;
- float position;
-
- struct _CTGradientElement *nextElement;
- } CTGradientElement;
-
-typedef enum _CTBlendingMode
- {
- CTLinearBlendingMode,
- CTChromaticBlendingMode,
- CTInverseChromaticBlendingMode
- } CTGradientBlendingMode;
-
-
-@interface CTGradient : NSObject <NSCopying, NSCoding>
- {
- CTGradientElement* elementList;
- CTGradientBlendingMode blendingMode;
-
- CGFunctionRef gradientFunction;
- }
-
-+ (id)gradientWithBeginningColor:(NSColor *)begin endingColor:(NSColor *)end;
-
-+ (id)aquaSelectedGradient;
-+ (id)aquaNormalGradient;
-+ (id)aquaPressedGradient;
-
-+ (id)unifiedSelectedGradient;
-+ (id)unifiedNormalGradient;
-+ (id)unifiedPressedGradient;
-+ (id)unifiedDarkGradient;
-
-+ (id)sourceListSelectedGradient;
-+ (id)sourceListUnselectedGradient;
-
-+ (id)rainbowGradient;
-+ (id)hydrogenSpectrumGradient;
-
-- (CTGradient *)gradientWithAlphaComponent:(float)alpha;
-
-- (CTGradient *)addColorStop:(NSColor *)color atPosition:(float)position; //positions given relative to [0,1]
-- (CTGradient *)removeColorStopAtIndex:(unsigned)index;
-- (CTGradient *)removeColorStopAtPosition:(float)position;
-
-- (CTGradientBlendingMode)blendingMode;
-- (NSColor *)colorStopAtIndex:(unsigned)index;
-- (NSColor *)colorAtPosition:(float)position;
-
-
-- (void)drawSwatchInRect:(NSRect)rect;
-- (void)fillRect:(NSRect)rect angle:(float)angle; //fills rect with axial gradient
- // angle in degrees
-- (void)radialFillRect:(NSRect)rect; //fills rect with radial gradient
- // gradient from center outwards
-- (void)fillBezierPath:(NSBezierPath *)path angle:(float)angle;
-- (void)radialFillBezierPath:(NSBezierPath *)path;
-
-@end
View
1,271 src/MacVim/CTGradient.m
@@ -1,1271 +0,0 @@
-//
-// CTGradient.m
-//
-// Created by Chad Weider on 2/14/07.
-// Writtin by Chad Weider.
-//
-// Released into public domain on 4/10/08.
-//
-// Version: 1.8
-#ifdef MM_ENABLE_PLUGINS
-
-#import "CTGradient.h"
-
-@interface CTGradient (Private)
-- (void)_commonInit;
-- (void)setBlendingMode:(CTGradientBlendingMode)mode;
-- (void)addElement:(CTGradientElement*)newElement;
-
-- (CTGradientElement *)elementAtIndex:(unsigned)index;
-
-- (CTGradientElement)removeElementAtIndex:(unsigned)index;
-- (CTGradientElement)removeElementAtPosition:(float)position;
-@end
-
-//C Fuctions for color blending
-static void linearEvaluation (void *info, const float *in, float *out);
-static void chromaticEvaluation(void *info, const float *in, float *out);
-static void inverseChromaticEvaluation(void *info, const float *in, float *out);
-static void transformRGB_HSV(float *components);
-static void transformHSV_RGB(float *components);
-static void resolveHSV(float *color1, float *color2);
-
-
-@implementation CTGradient
-/////////////////////////////////////Initialization Type Stuff
-- (id)init
- {
- self = [super init];
-
- if (self != nil)
- {
- [self _commonInit];
- [self setBlendingMode:CTLinearBlendingMode];
- }
- return self;
- }
-
-- (void)_commonInit
- {
- elementList = nil;
- }
-
-- (void)dealloc
- {
- CGFunctionRelease(gradientFunction);
-
- CTGradientElement *elementToRemove = elementList;
- while(elementList != nil)
- {
- elementToRemove = elementList;
- elementList = elementList->nextElement;
- free(elementToRemove);
- }
-
- [super dealloc];
- }
-
-- (id)copyWithZone:(NSZone *)zone
- {
- CTGradient *copy = [[[self class] allocWithZone:zone] init];
-
- //now just copy my elementlist
- CTGradientElement *currentElement = elementList;
- while(currentElement != nil)
- {
- [copy addElement:currentElement];
- currentElement = currentElement->nextElement;
- }
-
- [copy setBlendingMode:blendingMode];
-
- return copy;
- }
-
-- (void)encodeWithCoder:(NSCoder *)coder
- {
- if([coder allowsKeyedCoding])
- {
- unsigned count = 0;
- CTGradientElement *currentElement = elementList;
- while(currentElement != nil)
- {
- [coder encodeValueOfObjCType:@encode(float) at:&(currentElement->red)];
- [coder encodeValueOfObjCType:@encode(float) at:&(currentElement->green)];
- [coder encodeValueOfObjCType:@encode(float) at:&(currentElement->blue)];
- [coder encodeValueOfObjCType:@encode(float) at:&(currentElement->alpha)];
- [coder encodeValueOfObjCType:@encode(float) at:&(currentElement->position)];
-
- count++;
- currentElement = currentElement->nextElement;
- }
- [coder encodeInt:count forKey:@"CTGradientElementCount"];
- [coder encodeInt:blendingMode forKey:@"CTGradientBlendingMode"];
- }
- else
- [NSException raise:NSInvalidArchiveOperationException format:@"Only supports NSKeyedArchiver coders"];
- }
-
-- (id)initWithCoder:(NSCoder *)coder
- {
- [self _commonInit];
-
- [self setBlendingMode:[coder decodeIntForKey:@"CTGradientBlendingMode"]];
- unsigned count = [coder decodeIntForKey:@"CTGradientElementCount"];
-
- while(count != 0)
- {
- CTGradientElement newElement;
-
- [coder decodeValueOfObjCType:@encode(float) at:&(newElement.red)];
- [coder decodeValueOfObjCType:@encode(float) at:&(newElement.green)];
- [coder decodeValueOfObjCType:@encode(float) at:&(newElement.blue)];
- [coder decodeValueOfObjCType:@encode(float) at:&(newElement.alpha)];
- [coder decodeValueOfObjCType:@encode(float) at:&(newElement.position)];
-
- count--;
- [self addElement:&newElement];
- }
- return self;
- }
-#pragma mark -
-
-
-
-#pragma mark Creation
-+ (id)gradientWithBeginningColor:(NSColor *)begin endingColor:(NSColor *)end
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- CTGradientElement color2;
-
- [[begin colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&color1.red
- green:&color1.green
- blue:&color1.blue
- alpha:&color1.alpha];
-
- [[end colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&color2.red
- green:&color2.green
- blue:&color2.blue
- alpha:&color2.alpha];
- color1.position = 0;
- color2.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- return [newInstance autorelease];
- }
-
-+ (id)aquaSelectedGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = 0.58;
- color1.green = 0.86;
- color1.blue = 0.98;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = 0.42;
- color2.green = 0.68;
- color2.blue = 0.90;
- color2.alpha = 1.00;
- color2.position = 11.5/23;
-
- CTGradientElement color3;
- color3.red = 0.64;
- color3.green = 0.80;
- color3.blue = 0.94;
- color3.alpha = 1.00;
- color3.position = 11.5/23;
-
- CTGradientElement color4;
- color4.red = 0.56;
- color4.green = 0.70;
- color4.blue = 0.90;
- color4.alpha = 1.00;
- color4.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
- [newInstance addElement:&color3];
- [newInstance addElement:&color4];
-
- return [newInstance autorelease];
- }
-
-+ (id)aquaNormalGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = color1.green = color1.blue = 0.95;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = color2.green = color2.blue = 0.83;
- color2.alpha = 1.00;
- color2.position = 11.5/23;
-
- CTGradientElement color3;
- color3.red = color3.green = color3.blue = 0.95;
- color3.alpha = 1.00;
- color3.position = 11.5/23;
-
- CTGradientElement color4;
- color4.red = color4.green = color4.blue = 0.92;
- color4.alpha = 1.00;
- color4.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
- [newInstance addElement:&color3];
- [newInstance addElement:&color4];
-
- return [newInstance autorelease];
- }
-
-+ (id)aquaPressedGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = color1.green = color1.blue = 0.80;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = color2.green = color2.blue = 0.64;
- color2.alpha = 1.00;
- color2.position = 11.5/23;
-
- CTGradientElement color3;
- color3.red = color3.green = color3.blue = 0.80;
- color3.alpha = 1.00;
- color3.position = 11.5/23;
-
- CTGradientElement color4;
- color4.red = color4.green = color4.blue = 0.77;
- color4.alpha = 1.00;
- color4.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
- [newInstance addElement:&color3];
- [newInstance addElement:&color4];
-
- return [newInstance autorelease];
- }
-
-+ (id)unifiedSelectedGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = color1.green = color1.blue = 0.85;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = color2.green = color2.blue = 0.95;
- color2.alpha = 1.00;
- color2.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- return [newInstance autorelease];
- }
-
-+ (id)unifiedNormalGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = color1.green = color1.blue = 0.75;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = color2.green = color2.blue = 0.90;
- color2.alpha = 1.00;
- color2.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- return [newInstance autorelease];
- }
-
-+ (id)unifiedPressedGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = color1.green = color1.blue = 0.60;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = color2.green = color2.blue = 0.75;
- color2.alpha = 1.00;
- color2.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- return [newInstance autorelease];
- }
-
-+ (id)unifiedDarkGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = color1.green = color1.blue = 0.68;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = color2.green = color2.blue = 0.83;
- color2.alpha = 1.00;
- color2.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- return [newInstance autorelease];
- }
-
-+ (id)sourceListSelectedGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = 0.06;
- color1.green = 0.37;
- color1.blue = 0.85;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = 0.30;
- color2.green = 0.60;
- color2.blue = 0.92;
- color2.alpha = 1.00;
- color2.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- return [newInstance autorelease];
- }
-
-+ (id)sourceListUnselectedGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = 0.43;
- color1.green = 0.43;
- color1.blue = 0.43;
- color1.alpha = 1.00;
- color1.position = 0;
-
- CTGradientElement color2;
- color2.red = 0.60;
- color2.green = 0.60;
- color2.blue = 0.60;
- color2.alpha = 1.00;
- color2.position = 1;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- return [newInstance autorelease];
- }
-
-+ (id)rainbowGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement color1;
- color1.red = 1.00;
- color1.green = 0.00;
- color1.blue = 0.00;
- color1.alpha = 1.00;
- color1.position = 0.0;
-
- CTGradientElement color2;
- color2.red = 0.54;
- color2.green = 0.00;
- color2.blue = 1.00;
- color2.alpha = 1.00;
- color2.position = 1.0;
-
- [newInstance addElement:&color1];
- [newInstance addElement:&color2];
-
- [newInstance setBlendingMode:CTChromaticBlendingMode];
-
- return [newInstance autorelease];
- }
-
-+ (id)hydrogenSpectrumGradient
- {
- id newInstance = [[[self class] alloc] init];
-
- struct {float hue; float position; float width;} colorBands[4];
-
- colorBands[0].hue = 22;
- colorBands[0].position = .145;
- colorBands[0].width = .01;
-
- colorBands[1].hue = 200;
- colorBands[1].position = .71;
- colorBands[1].width = .008;
-
- colorBands[2].hue = 253;
- colorBands[2].position = .885;
- colorBands[2].width = .005;
-
- colorBands[3].hue = 275;
- colorBands[3].position = .965;
- colorBands[3].width = .003;
-
- int i;
- /////////////////////////////
- for(i = 0; i < 4; i++)
- {
- float color[4];
- color[0] = colorBands[i].hue - 180*colorBands[i].width;
- color[1] = 1;
- color[2] = 0.001;
- color[3] = 1;
- transformHSV_RGB(color);
- CTGradientElement fadeIn;
- fadeIn.red = color[0];
- fadeIn.green = color[1];
- fadeIn.blue = color[2];
- fadeIn.alpha = color[3];
- fadeIn.position = colorBands[i].position - colorBands[i].width;
-
-
- color[0] = colorBands[i].hue;
- color[1] = 1;
- color[2] = 1;
- color[3] = 1;
- transformHSV_RGB(color);
- CTGradientElement band;
- band.red = color[0];
- band.green = color[1];
- band.blue = color[2];
- band.alpha = color[3];
- band.position = colorBands[i].position;
-
- color[0] = colorBands[i].hue + 180*colorBands[i].width;
- color[1] = 1;
- color[2] = 0.001;
- color[3] = 1;
- transformHSV_RGB(color);
- CTGradientElement fadeOut;
- fadeOut.red = color[0];
- fadeOut.green = color[1];
- fadeOut.blue = color[2];
- fadeOut.alpha = color[3];
- fadeOut.position = colorBands[i].position + colorBands[i].width;
-
-
- [newInstance addElement:&fadeIn];
- [newInstance addElement:&band];
- [newInstance addElement:&fadeOut];
- }
-
- [newInstance setBlendingMode:CTChromaticBlendingMode];
-
- return [newInstance autorelease];
- }
-
-#pragma mark -
-
-
-
-#pragma mark Modification
-- (CTGradient *)gradientWithAlphaComponent:(float)alpha
- {
- id newInstance = [[[self class] alloc] init];
-
- CTGradientElement *curElement = elementList;
- CTGradientElement tempElement;
-
- while(curElement != nil)
- {
- tempElement = *curElement;
- tempElement.alpha = alpha;
- [newInstance addElement:&tempElement];
-
- curElement = curElement->nextElement;
- }
-
- return [newInstance autorelease];
- }
-
-- (CTGradient *)gradientWithBlendingMode:(CTGradientBlendingMode)mode
- {
- CTGradient *newGradient = [self copy];
-
- [newGradient setBlendingMode:mode];
-
- return [newGradient autorelease];
- }
-
-
-//Adds a color stop with <color> at <position> in elementList
-//(if two elements are at the same position then added imediatly after the one that was there already)
-- (CTGradient *)addColorStop:(NSColor *)color atPosition:(float)position
- {
- CTGradient *newGradient = [self copy];
- CTGradientElement newGradientElement;
-
- //put the components of color into the newGradientElement - must make sure it is a RGB color (not Gray or CMYK)
- [[color colorUsingColorSpaceName:NSCalibratedRGBColorSpace] getRed:&newGradientElement.red
- green:&newGradientElement.green
- blue:&newGradientElement.blue
- alpha:&newGradientElement.alpha];
- newGradientElement.position = position;
-
- //Pass it off to addElement to take care of adding it to the elementList
- [newGradient addElement:&newGradientElement];
-
- return [newGradient autorelease];
- }
-
-
-//Removes the color stop at <position> from elementList
-- (CTGradient *)removeColorStopAtPosition:(float)position
- {
- CTGradient *newGradient = [self copy];
- CTGradientElement removedElement = [newGradient removeElementAtPosition:position];
-
- if(isnan(removedElement.position))
- [NSException raise:NSRangeException format:@"-[%@ removeColorStopAtPosition:]: no such colorStop at position (%f)", [self class], position];
-
- return [newGradient autorelease];
- }
-
-- (CTGradient *)removeColorStopAtIndex:(unsigned)index
- {
- CTGradient *newGradient = [self copy];
- CTGradientElement removedElement = [newGradient removeElementAtIndex:index];
-
- if(isnan(removedElement.position))
- [NSException raise:NSRangeException format:@"-[%@ removeColorStopAtIndex:]: index (%i) beyond bounds", [self class], index];
-
- return [newGradient autorelease];
- }
-#pragma mark -
-
-
-
-#pragma mark Information
-- (CTGradientBlendingMode)blendingMode
- {
- return blendingMode;
- }
-
-//Returns color at <position> in gradient
-- (NSColor *)colorStopAtIndex:(unsigned)index
- {
- CTGradientElement *element = [self elementAtIndex:index];
-
- if(element != nil)
- return [NSColor colorWithCalibratedRed:element->red
- green:element->green
- blue:element->blue
- alpha:element->alpha];
-
- [NSException raise:NSRangeException format:@"-[%@ removeColorStopAtIndex:]: index (%i) beyond bounds", [self class], index];
-
- return nil;
- }
-
-- (NSColor *)colorAtPosition:(float)position
- {
- float components[4];
-
- switch(blendingMode)
- {
- case CTLinearBlendingMode:
- linearEvaluation(&elementList, &position, components); break;
- case CTChromaticBlendingMode:
- chromaticEvaluation(&elementList, &position, components); break;
- case CTInverseChromaticBlendingMode:
- inverseChromaticEvaluation(&elementList, &position, components); break;
- }
-
-
- return [NSColor colorWithCalibratedRed:components[0]/components[3] //undo premultiplication that CG requires
- green:components[1]/components[3]
- blue:components[2]/components[3]
- alpha:components[3]];
- }
-#pragma mark -
-
-
-
-#pragma mark Drawing
-- (void)drawSwatchInRect:(NSRect)rect
- {
- [self fillRect:rect angle:45];
- }
-
-- (void)fillRect:(NSRect)rect angle:(float)angle
- {
- //First Calculate where the beginning and ending points should be
- CGPoint startPoint;
- CGPoint endPoint;
-
- if(angle == 0) //screw the calculations - we know the answer
- {
- startPoint = CGPointMake(NSMinX(rect), NSMinY(rect)); //right of rect
- endPoint = CGPointMake(NSMaxX(rect), NSMinY(rect)); //left of rect
- }
- else if(angle == 90) //same as above
- {
- startPoint = CGPointMake(NSMinX(rect), NSMinY(rect)); //bottom of rect
- endPoint = CGPointMake(NSMinX(rect), NSMaxY(rect)); //top of rect
- }
- else //ok, we'll do the calculations now
- {
- float x,y;
- float sina, cosa, tana;
-
- float length;
- float deltax,
- deltay;
-
- float rangle = angle * pi/180; //convert the angle to radians
-
- if(fabsf(tan(rangle))<=1) //for range [-45,45], [135,225]
- {
- x = NSWidth(rect);
- y = NSHeight(rect);
-
- sina = sin(rangle);
- cosa = cos(rangle);
- tana = tan(rangle);
-
- length = x/fabsf(cosa)+(y-x*fabsf(tana))*fabsf(sina);
-
- deltax = length*cosa/2;
- deltay = length*sina/2;
- }
- else //for range [45,135], [225,315]
- {
- x = NSHeight(rect);
- y = NSWidth(rect);
-
- sina = sin(rangle - 90*pi/180);
- cosa = cos(rangle - 90*pi/180);
- tana = tan(rangle - 90*pi/180);
-
- length = x/fabsf(cosa)+(y-x*fabsf(tana))*fabsf(sina);
-
- deltax =-length*sina/2;
- deltay = length*cosa/2;
- }
-
- startPoint = CGPointMake(NSMidX(rect)-deltax, NSMidY(rect)-deltay);
- endPoint = CGPointMake(NSMidX(rect)+deltax, NSMidY(rect)+deltay);
- }
-
- //Calls to CoreGraphics
- CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
- CGContextSaveGState(currentContext);
- #if MAC_OS_X_VERSION_MIN_REQUIRED >= MAC_OS_X_VERSION_10_4
- CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
- #else
- CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB();
- #endif
- CGShadingRef myCGShading = CGShadingCreateAxial(colorspace, startPoint, endPoint, gradientFunction, false, false);
-
- CGContextClipToRect (currentContext, *(CGRect *)&rect); //This is where the action happens
- CGContextDrawShading(currentContext, myCGShading);
-
- CGShadingRelease(myCGShading);
- CGColorSpaceRelease(colorspace );
- CGContextRestoreGState(currentContext);
- }
-
-- (void)radialFillRect:(NSRect)rect
- {
- CGPoint startPoint, endPoint;
- float startRadius, endRadius;
- float scalex, scaley, transx, transy;
-
- startPoint = endPoint = CGPointMake(NSMidX(rect), NSMidY(rect));
-
- startRadius = -1;
- if(NSHeight(rect)>NSWidth(rect))
- {
- scalex = NSWidth(rect)/NSHeight(rect);
- transx = (NSHeight(rect)-NSWidth(rect))/2;
- scaley = 1;
- transy = 1;
- endRadius = NSHeight(rect)/2;
- }
- else
- {
- scalex = 1;
- transx = 1;
- scaley = NSHeight(rect)/NSWidth(rect);
- transy = (NSWidth(rect)-NSHeight(rect))/2;
- endRadius = NSWidth(rect)/2;
- }
-
- //Calls to CoreGraphics
- CGContextRef currentContext = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
- CGContextSaveGState(currentContext);
- #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_4
- CGColorSpaceRef colorspace = CGColorSpaceCreateWithName(kCGColorSpaceGenericRGB);
- #else
- CGColorSpaceRef colorspace = CGColorSpaceCreateDeviceRGB();
- #endif
- CGShadingRef myCGShading = CGShadingCreateRadial(colorspace, startPoint, startRadius, endPoint, endRadius, gradientFunction, true, true);
-
- CGContextClipToRect (currentContext, *(CGRect *)&rect);
- CGContextScaleCTM (currentContext, scalex, scaley);
- CGContextTranslateCTM(currentContext, transx, transy);
- CGContextDrawShading (currentContext, myCGShading); //This is where the action happens
-
- CGShadingRelease(myCGShading);
- CGColorSpaceRelease(colorspace);
- CGContextRestoreGState(currentContext);
- }
-
-- (void)fillBezierPath:(NSBezierPath *)path angle:(float)angle
- {
- NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
- [currentContext saveGraphicsState];
- NSAffineTransform *transform = [[NSAffineTransform alloc] init];
-
- [transform rotateByDegrees:-angle];
- [path transformUsingAffineTransform:transform];
- [transform invert];
- [transform concat];
-
- [path addClip];
- [self fillRect:[path bounds] angle:0];
- [path transformUsingAffineTransform:transform];
- [transform release];
- [currentContext restoreGraphicsState];
- }
-- (void)radialFillBezierPath:(NSBezierPath *)path
- {
- NSGraphicsContext *currentContext = [NSGraphicsContext currentContext];
- [currentContext saveGraphicsState];
- [path addClip];
- [self radialFillRect:[path bounds]];
- [currentContext restoreGraphicsState];
- }
-#pragma mark -
-
-
-
-#pragma mark Private Methods
-- (void)setBlendingMode:(CTGradientBlendingMode)mode;
- {
- blendingMode = mode;
-
- //Choose what blending function to use
- void *evaluationFunction;
- switch(blendingMode)
- {
- case CTLinearBlendingMode:
- evaluationFunction = &linearEvaluation; break;
- case CTChromaticBlendingMode:
- evaluationFunction = &chromaticEvaluation; break;
- case CTInverseChromaticBlendingMode:
- evaluationFunction = &inverseChromaticEvaluation; break;
- }
-
- //replace the current CoreGraphics Function with new one
- if(gradientFunction != NULL)
- CGFunctionRelease(gradientFunction);
-
- CGFunctionCallbacks evaluationCallbackInfo = {0 , evaluationFunction, NULL}; //Version, evaluator function, cleanup function
-
- static const float input_value_range [2] = { 0, 1 }; //range for the evaluator input
- static const float output_value_ranges [8] = { 0, 1, 0, 1, 0, 1, 0, 1 }; //ranges for the evaluator output (4 returned values)
-
- gradientFunction = CGFunctionCreate(&elementList, //the two transition colors
- 1, input_value_range , //number of inputs (just fraction of progression)
- 4, output_value_ranges, //number of outputs (4 - RGBa)
- &evaluationCallbackInfo); //info for using the evaluator function
- }
-
-- (void)addElement:(CTGradientElement *)newElement
- {
- if(elementList == nil || newElement->position < elementList->position) //inserting at beginning of list
- {
- CTGradientElement *tmpNext = elementList;
- elementList = malloc(sizeof(CTGradientElement));
- *elementList = *newElement;
- elementList->nextElement = tmpNext;
- }
- else //inserting somewhere inside list
- {
- CTGradientElement *curElement = elementList;
-
- while(curElement->nextElement != nil && !((curElement->position <= newElement->position) && (newElement->position < curElement->nextElement->position)))
- {
- curElement = curElement->nextElement;
- }
-
- CTGradientElement *tmpNext = curElement->nextElement;
- curElement->nextElement = malloc(sizeof(CTGradientElement));
- *(curElement->nextElement) = *newElement;
- curElement->nextElement->nextElement = tmpNext;
- }
- }
-
-- (CTGradientElement)removeElementAtIndex:(unsigned)index
- {
- CTGradientElement removedElement;
-
- if(elementList != nil)
- {
- if(index == 0)
- {
- CTGradientElement *tmpNext = elementList;
- elementList = elementList->nextElement;
-
- removedElement = *tmpNext;
- free(tmpNext);
-
- return removedElement;
- }
-
- unsigned count = 1; //we want to start one ahead
- CTGradientElement *currentElement = elementList;
- while(currentElement->nextElement != nil)
- {
- if(count == index)
- {
- CTGradientElement *tmpNext = currentElement->nextElement;
- currentElement->nextElement = currentElement->nextElement->nextElement;
-
- removedElement = *tmpNext;
- free(tmpNext);
-
- return removedElement;
- }
-
- count++;
- currentElement = currentElement->nextElement;
- }
- }
-
- //element is not found, return empty element
- removedElement.red = 0.0;
- removedElement.green = 0.0;
- removedElement.blue = 0.0;
- removedElement.alpha = 0.0;
- removedElement.position = NAN;
- removedElement.nextElement = nil;
-
- return removedElement;
- }
-
-- (CTGradientElement)removeElementAtPosition:(float)position
- {
- CTGradientElement removedElement;
-
- if(elementList != nil)
- {
- if(elementList->position == position)
- {
- CTGradientElement *tmpNext = elementList;
- elementList = elementList->nextElement;
-
- removedElement = *tmpNext;
- free(tmpNext);
-
- return removedElement;
- }
- else
- {
- CTGradientElement *curElement = elementList;
- while(curElement->nextElement != nil)
- {
- if(curElement->nextElement->position == position)
- {
- CTGradientElement *tmpNext = curElement->nextElement;
- curElement->nextElement = curElement->nextElement->nextElement;
-
- removedElement = *tmpNext;
- free(tmpNext);
-
- return removedElement;
- }
- }
- }
- }
-
- //element is not found, return empty element
- removedElement.red = 0.0;
- removedElement.green = 0.0;
- removedElement.blue = 0.0;
- removedElement.alpha = 0.0;
- removedElement.position = NAN;
- removedElement.nextElement = nil;
-
- return removedElement;
- }
-
-
-- (CTGradientElement *)elementAtIndex:(unsigned)index;
- {
- unsigned count = 0;
- CTGradientElement *currentElement = elementList;
-
- while(currentElement != nil)
- {
- if(count == index)
- return currentElement;
-
- count++;
- currentElement = currentElement->nextElement;
- }
-
- return nil;
- }
-#pragma mark -
-
-
-
-#pragma mark Core Graphics
-//////////////////////////////////////Blending Functions/////////////////////////////////////
-void linearEvaluation (void *info, const float *in, float *out)
- {
- float position = *in;
-
- if(*(CTGradientElement **)info == nil) //if elementList is empty return clear color
- {
- out[0] = out[1] = out[2] = out[3] = 1;
- return;
- }
-
- //This grabs the first two colors in the sequence
- CTGradientElement *color1 = *(CTGradientElement **)info;
- CTGradientElement *color2 = color1->nextElement;
-
- //make sure first color and second color are on other sides of position
- while(color2 != nil && color2->position < position)
- {
- color1 = color2;
- color2 = color1->nextElement;
- }
- //if we don't have another color then make next color the same color
- if(color2 == nil)
- {
- color2 = color1;
- }
-
- //----------FailSafe settings----------
- //color1->red = 1; color2->red = 0;
- //color1->green = 1; color2->green = 0;
- //color1->blue = 1; color2->blue = 0;
- //color1->alpha = 1; color2->alpha = 1;
- //color1->position = .5;
- //color2->position = .5;
- //-------------------------------------
-
- if(position <= color1->position) //Make all below color color1's position equal to color1
- {
- out[0] = color1->red;
- out[1] = color1->green;
- out[2] = color1->blue;
- out[3] = color1->alpha;
- }
- else if (position >= color2->position) //Make all above color color2's position equal to color2
- {
- out[0] = color2->red;
- out[1] = color2->green;
- out[2] = color2->blue;
- out[3] = color2->alpha;
- }
- else //Interpolate color at postions between color1 and color1
- {
- //adjust position so that it goes from 0 to 1 in the range from color 1 & 2's position
- position = (position-color1->position)/(color2->position - color1->position);
-
- out[0] = (color2->red - color1->red )*position + color1->red;
- out[1] = (color2->green - color1->green)*position + color1->green;
- out[2] = (color2->blue - color1->blue )*position + color1->blue;
- out[3] = (color2->alpha - color1->alpha)*position + color1->alpha;
- }
-
- //Premultiply the color by the alpha.
- out[0] *= out[3];
- out[1] *= out[3];
- out[2] *= out[3];
- }
-
-
-
-
-//Chromatic Evaluation -
-// This blends colors by their Hue, Saturation, and Value(Brightness) right now I just
-// transform the RGB values stored in the CTGradientElements to HSB, in the future I may
-// streamline it to avoid transforming in and out of HSB colorspace *for later*
-//
-// For the chromatic blend we shift the hue of color1 to meet the hue of color2. To do
-// this we will add to the hue's angle (if we subtract we'll be doing the inverse
-// chromatic...scroll down more for that). All we need to do is keep adding to the hue
-// until we wrap around the colorwheel and get to color2.
-void chromaticEvaluation(void *info, const float *in, float *out)
- {
- float position = *in;
-
- if(*(CTGradientElement **)info == nil) //if elementList is empty return clear color
- {
- out[0] = out[1] = out[2] = out[3] = 1;
- return;
- }
-
- //This grabs the first two colors in the sequence
- CTGradientElement *color1 = *(CTGradientElement **)info;
- CTGradientElement *color2 = color1->nextElement;
-
- float c1[4];
- float c2[4];
-
- //make sure first color and second color are on other sides of position
- while(color2 != nil && color2->position < position)
- {
- color1 = color2;
- color2 = color1->nextElement;
- }
- //if we don't have another color then make next color the same color
- if(color2 == nil)
- {
- color2 = color1;
- }
-
-
- c1[0] = color1->red;
- c1[1] = color1->green;
- c1[2] = color1->blue;
- c1[3] = color1->alpha;
-
- c2[0] = color2->red;
- c2[1] = color2->green;
- c2[2] = color2->blue;
- c2[3] = color2->alpha;
-
- transformRGB_HSV(c1);
- transformRGB_HSV(c2);
- resolveHSV(c1,c2);
-
- if(c1[0] > c2[0]) //if color1's hue is higher than color2's hue then
- c2[0] += 360; // we need to move c2 one revolution around the wheel
-
-
- if(position <= color1->position) //Make all below color color1's position equal to color1
- {
- out[0] = c1[0];
- out[1] = c1[1];
- out[2] = c1[2];
- out[3] = c1[3];
- }
- else if (position >= color2->position) //Make all above color color2's position equal to color2
- {
- out[0] = c2[0];
- out[1] = c2[1];
- out[2] = c2[2];
- out[3] = c2[3];
- }
- else //Interpolate color at postions between color1 and color1
- {
- //adjust position so that it goes from 0 to 1 in the range from color 1 & 2's position
- position = (position-color1->position)/(color2->position - color1->position);
-
- out[0] = (c2[0] - c1[0])*position + c1[0];
- out[1] = (c2[1] - c1[1])*position + c1[1];
- out[2] = (c2[2] - c1[2])*position + c1[2];
- out[3] = (c2[3] - c1[3])*position + c1[3];
- }
-
- transformHSV_RGB(out);
-
- //Premultiply the color by the alpha.
- out[0] *= out[3];
- out[1] *= out[3];
- out[2] *= out[3];
- }
-
-
-
-//Inverse Chromatic Evaluation -
-// Inverse Chromatic is about the same story as Chromatic Blend, but here the Hue
-// is strictly decreasing, that is we need to get from color1 to color2 by decreasing
-// the 'angle' (i.e. 90¼ -> 180¼ would be done by subtracting 270¼ and getting -180¼...
-// which is equivalent to 180¼ mod 360¼
-void inverseChromaticEvaluation(void *info, const float *in, float *out)
- {
- float position = *in;
-
- if(*(CTGradientElement **)info == nil) //if elementList is empty return clear color
- {
- out[0] = out[1] = out[2] = out[3] = 1;
- return;
- }
-
- //This grabs the first two colors in the sequence
- CTGradientElement *color1 = *(CTGradientElement **)info;
- CTGradientElement *color2 = color1->nextElement;
-
- float c1[4];
- float c2[4];
-
- //make sure first color and second color are on other sides of position
- while(color2 != nil && color2->position < position)
- {
- color1 = color2;
- color2 = color1->nextElement;
- }
- //if we don't have another color then make next color the same color
- if(color2 == nil)
- {
- color2 = color1;
- }
-
- c1[0] = color1->red;
- c1[1] = color1->green;
- c1[2] = color1->blue;
- c1[3] = color1->alpha;
-
- c2[0] = color2->red;
- c2[1] = color2->green;
- c2[2] = color2->blue;
- c2[3] = color2->alpha;
-
- transformRGB_HSV(c1);
- transformRGB_HSV(c2);
- resolveHSV(c1,c2);
-
- if(c1[0] < c2[0]) //if color1's hue is higher than color2's hue then
- c1[0] += 360; // we need to move c2 one revolution back on the wheel
-
-
- if(position <= color1->position) //Make all below color color1's position equal to color1
- {
- out[0] = c1[0];
- out[1] = c1[1];
- out[2] = c1[2];
- out[3] = c1[3];
- }
- else if (position >= color2->position) //Make all above color color2's position equal to color2
- {
- out[0] = c2[0];
- out[1] = c2[1];
- out[2] = c2[2];
- out[3] = c2[3];
- }
- else //Interpolate color at postions between color1 and color1
- {
- //adjust position so that it goes from 0 to 1 in the range from color 1 & 2's position
- position = (position-color1->position)/(color2->position - color1->position);
-
- out[0] = (c2[0] - c1[0])*position + c1[0];
- out[1] = (c2[1] - c1[1])*position + c1[1];
- out[2] = (c2[2] - c1[2])*position + c1[2];
- out[3] = (c2[3] - c1[3])*position + c1[3];
- }
-
- transformHSV_RGB(out);
-
- //Premultiply the color by the alpha.
- out[0] *= out[3];
- out[1] *= out[3];
- out[2] *= out[3];
- }
-
-
-void transformRGB_HSV(float *components) //H,S,B -> R,G,B
- {
- float H, S, V;
- float R = components[0],
- G = components[1],
- B = components[2];
-
- float MAX = R > G ? (R > B ? R : B) : (G > B ? G : B),
- MIN = R < G ? (R < B ? R : B) : (G < B ? G : B);
-
- if(MAX == MIN)
- H = NAN;
- else if(MAX == R)
- if(G >= B)
- H = 60*(G-B)/(MAX-MIN)+0;
- else
- H = 60*(G-B)/(MAX-MIN)+360;
- else if(MAX == G)
- H = 60*(B-R)/(MAX-MIN)+120;
- else if(MAX == B)
- H = 60*(R-G)/(MAX-MIN)+240;
-
- S = MAX == 0 ? 0 : 1 - MIN/MAX;
- V = MAX;
-
- components[0] = H;
- components[1] = S;
- components[2] = V;
- }
-
-void transformHSV_RGB(float *components) //H,S,B -> R,G,B
- {
- float R, G, B;
- float H = fmodf(components[0],359), //map to [0,360)
- S = components[1],
- V = components[2];
-
- int Hi = (int)floorf(H/60.) % 6;
- float f = H/60-Hi,
- p = V*(1-S),
- q = V*(1-f*S),
- t = V*(1-(1-f)*S);
-
- switch (Hi)
- {
- case 0: R=V;G=t;B=p; break;
- case 1: R=q;G=V;B=p; break;
- case 2: R=p;G=V;B=t; break;
- case 3: R=p;G=q;B=V; break;
- case 4: R=t;G=p;B=V; break;
- case 5: R=V;G=p;B=q; break;
- }
-
- components[0] = R;
- components[1] = G;
- components[2] = B;
- }
-
-void resolveHSV(float *color1, float *color2) //H value may be undefined (i.e. graycale color)
- { // we want to fill it with a sensible value
- if(isnan(color1[0]) && isnan(color2[0]))
- color1[0] = color2[0] = 0;
- else if(isnan(color1[0]))
- color1[0] = color2[0];
- else if(isnan(color2[0]))
- color2[0] = color1[0];
- }
-
-@end
-
-#endif // MM_ENABLE_PLUGINS
View
4 src/MacVim/Credits.rtf
@@ -45,8 +45,4 @@ The default font in MacVim, DejaVu Sans Mono, is based on the Bitstream Vera\'99
\
Thanks to Andy Matuschak for {\field{\*\fldinst{HYPERLINK "http://sparkle.andymatuschak.org/"}}{\fldrslt Sparkle}}.\
\
-Thanks to Dave Batton for {\field{\*\fldinst{HYPERLINK "http://www.mere-mortal-software.com/blog/details.php?d=2007-03-11&c=show"}}{\fldrslt DBPrefsWindowController}}.\
-\
-Thanks to Allan Odgaard for making the "Edit in TextMate" input manager source code available, and also to Chris Eidhof and Eelco Lempsink for modifying it so that it could be used with any ODB capable editor.\
-\
Thanks to Damien Guard for {\field{\*\fldinst{HYPERLINK "http://damieng.com/blog/2008/05/26/envy-code-r-preview-7-coding-font-released"}}{\fldrslt Envy Code R}} (used in MacVim's 16x16 document icons).}
View
667 src/MacVim/English.lproj/Preferences.nib/designable.nib
@@ -2,13 +2,13 @@
<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="8.00">
<data>
<int key="IBDocument.SystemTarget">1050</int>
- <string key="IBDocument.SystemVersion">10C540</string>
- <string key="IBDocument.InterfaceBuilderVersion">732</string>
- <string key="IBDocument.AppKitVersion">1038.25</string>
- <string key="IBDocument.HIToolboxVersion">458.00</string>
+ <string key="IBDocument.SystemVersion">10F569</string>
+ <string key="IBDocument.InterfaceBuilderVersion">762</string>
+ <string key="IBDocument.AppKitVersion">1038.29</string>
+ <string key="IBDocument.HIToolboxVersion">461.00</string>
<object class="NSMutableDictionary" key="IBDocument.PluginVersions">
<string key="NS.key.0">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="NS.object.0">732</string>
+ <string key="NS.object.0">762</string>
</object>
<array class="NSMutableArray" key="IBDocument.EditedObjectIDs">
<integer value="620"/>
@@ -28,10 +28,6 @@
<string key="NSClassName">NSApplication</string>
</object>
<object class="NSUserDefaultsController" id="547503666">
- <array class="NSMutableArray" key="NSDeclaredKeys">
- <string>MM</string>
- <string>MMRenderer</string>
- </array>
<bool key="NSSharedInstance">YES</bool>
</object>
<object class="NSCustomView" id="225936320">
@@ -490,7 +486,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<reference key="NSControlView" ref="193610391"/>
<reference key="NSBackgroundColor" ref="821672772"/>
- <object class="NSColor" key="NSTextColor" id="1020327546">
+ <object class="NSColor" key="NSTextColor">
<int key="NSColorSpace">6</int>
<string key="NSCatalogName">System</string>
<string key="NSColorName">disabledControlTextColor</string>
@@ -713,242 +709,55 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="NSFrameSize">{483, 290}</string>
<string key="NSClassName">NSView</string>
</object>
- <object class="NSCustomView" id="443205242">
- <nil key="NSNextResponder"/>
+ <object class="NSCustomView" id="836854791">
+ <reference key="NSNextResponder"/>
<int key="NSvFlags">268</int>
<array class="NSMutableArray" key="NSSubviews">
- <object class="NSBox" id="1041056912">
- <reference key="NSNextResponder" ref="443205242"/>
- <int key="NSvFlags">292</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSView" id="887541683">
- <reference key="NSNextResponder" ref="1041056912"/>
- <int key="NSvFlags">256</int>
- <array class="NSMutableArray" key="NSSubviews">
- <object class="NSButton" id="841479415">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{12, 115}, {96, 32}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="624692609">
- <int key="NSCellFlags">604110336</int>
- <int key="NSCellFlags2">134217728</int>
- <string key="NSContents">Uninstall</string>
- <reference key="NSSupport" ref="398275172"/>
- <reference key="NSControlView" ref="841479415"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="799826912">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{15, 14}, {417, 51}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="10311595">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">External Editor is a bit of a hack. It could make other applications unstable, and it could stop working in new versions of OS X. But it usually works well, and uninstallation completely removes it.</string>
- <reference key="NSSupport" ref="398275172"/>
- <reference key="NSControlView" ref="799826912"/>
- <reference key="NSBackgroundColor" ref="821672772"/>
- <reference key="NSTextColor" ref="481736603"/>
- </object>
- </object>
- <object class="NSPopUpButton" id="635472630">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{211, 227}, {152, 26}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSPopUpButtonCell" key="NSCell" id="545964422">
- <int key="NSCellFlags">-1539178944</int>
- <int key="NSCellFlags2">2048</int>
- <reference key="NSSupport" ref="398275172"/>
- <reference key="NSControlView" ref="635472630"/>
- <int key="NSButtonFlags">109199615</int>
- <int key="NSButtonFlags2">1</int>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">400</int>
- <int key="NSPeriodicInterval">75</int>
- <nil key="NSMenuItem"/>
- <bool key="NSMenuItemRespectAlignment">YES</bool>
- <object class="NSMenu" key="NSMenu" id="89589003">
- <string key="NSTitle">OtherViews</string>
- <array class="NSMutableArray" key="NSMenuItems"/>
- </object>
- <int key="NSSelectedIndex">-1</int>
- <int key="NSPreferredEdge">1</int>
- <bool key="NSUsesItemFromMenu">YES</bool>
- <bool key="NSAltersState">YES</bool>
- <int key="NSArrowPosition">2</int>
- </object>
- </object>
- <object class="NSButton" id="249474193">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{12, 221}, {96, 32}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSButtonCell" key="NSCell" id="213101514">
- <int key="NSCellFlags">604110336</int>
- <int key="NSCellFlags2">134217728</int>
- <string key="NSContents">Install</string>
- <reference key="NSSupport" ref="398275172"/>
- <reference key="NSControlView" ref="249474193"/>
- <int key="NSButtonFlags">-2038284033</int>
- <int key="NSButtonFlags2">1</int>
- <string key="NSAlternateContents"/>
- <string key="NSKeyEquivalent"/>
- <int key="NSPeriodicDelay">200</int>
- <int key="NSPeriodicInterval">25</int>
- </object>
- </object>
- <object class="NSTextField" id="548095870">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{107, 159}, {325, 14}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="982688187">
- <int key="NSCellFlags">67239488</int>
- <int key="NSCellFlags2">272761856</int>
- <string key="NSContents">(version)</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="548095870"/>
- <reference key="NSBackgroundColor" ref="821672772"/>
- <reference key="NSTextColor" ref="1020327546"/>
- </object>
- </object>
- <object class="NSTextField" id="664524879">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{107, 231}, {102, 17}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="906295134">
- <int key="NSCellFlags">67239488</int>
- <int key="NSCellFlags2">272630784</int>
- <string key="NSContents">External Editor:</string>
- <reference key="NSSupport" ref="398275172"/>
- <reference key="NSControlView" ref="664524879"/>
- <reference key="NSBackgroundColor" ref="821672772"/>
- <reference key="NSTextColor" ref="481736603"/>
- </object>
- </object>
- <object class="NSTextField" id="808161291">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{107, 181}, {325, 42}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="760604180">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4325376</int>
- <string key="NSContents">Use this to write mails or to fill in web forms with your favorite editor. Save and close the file in your editor to copy the result back to the original application.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="808161291"/>
- <reference key="NSBackgroundColor" ref="821672772"/>
- <reference key="NSTextColor" ref="1020327546"/>
- </object>
- </object>
- <object class="NSTextField" id="228008295">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{15, 73}, {417, 34}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="979053968">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">You must restart applications that should notice any change you make above.</string>
- <reference key="NSSupport" ref="398275172"/>
- <reference key="NSControlView" ref="228008295"/>
- <reference key="NSBackgroundColor" ref="821672772"/>
- <reference key="NSTextColor" ref="481736603"/>
- </object>
- </object>
- <object class="NSTextField" id="627992137">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{107, 125}, {325, 14}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="641980577">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">1078067200</int>
- <string key="NSContents">This completely removes the External Editor functionality.</string>
- <reference key="NSSupport" ref="26"/>
- <reference key="NSControlView" ref="627992137"/>
- <reference key="NSBackgroundColor" ref="821672772"/>
- <reference key="NSTextColor" ref="1020327546"/>
- </object>
- </object>
- <object class="NSTextField" id="554064415">
- <reference key="NSNextResponder" ref="887541683"/>
- <int key="NSvFlags">268</int>
- <string key="NSFrame">{{15, 265}, {417, 34}}</string>
- <reference key="NSSuperview" ref="887541683"/>
- <bool key="NSEnabled">YES</bool>
- <object class="NSTextFieldCell" key="NSCell" id="483958140">
- <int key="NSCellFlags">67239424</int>
- <int key="NSCellFlags2">4194304</int>
- <string key="NSContents">Add “Edit in External Editor…” to the Edit menu of other applications like Mail or Safari.</string>
- <reference key="NSSupport" ref="398275172"/>
- <reference key="NSControlView" ref="554064415"/>
- <reference key="NSBackgroundColor" ref="821672772"/>
- <reference key="NSTextColor" ref="481736603"/>
- </object>
- </object>
- </array>
- <string key="NSFrame">{{1, 1}, {447, 309}}</string>
- <reference key="NSSuperview" ref="1041056912"/>
- </object>
- </array>
- <string key="NSFrame">{{17, 16}, {449, 325}}</string>
- <reference key="NSSuperview" ref="443205242"/>
- <string key="NSOffsets">{0, 0}</string>
- <object class="NSTextFieldCell" key="NSTitleCell">
+ <object class="NSButton" id="818542525">
+ <reference key="NSNextResponder" ref="836854791"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{18, 92}, {174, 18}}</string>
+ <reference key="NSSuperview" ref="836854791"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="948343868">
<int key="NSCellFlags">67239424</int>
<int key="NSCellFlags2">0</int>
- <string key="NSContents">External Editor</string>
+ <string key="NSContents">Draw marked text inline</string>
+ <reference key="NSSupport" ref="398275172"/>
+ <reference key="NSControlView" ref="818542525"/>
+ <int key="NSButtonFlags">1211912703</int>
+ <int key="NSButtonFlags2">2</int>
+ <reference key="NSNormalImage" ref="385062508"/>
+ <reference key="NSAlternateImage" ref="426852917"/>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ <object class="NSTextField" id="536705090">
+ <reference key="NSNextResponder" ref="836854791"/>
+ <int key="NSvFlags">268</int>
+ <string key="NSFrame">{{17, 20}, {444, 70}}</string>
+ <reference key="NSSuperview" ref="836854791"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSTextFieldCell" key="NSCell" id="581527358">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">272760832</int>
+ <string key="NSContents">This option causes marked text to be rendered like normal text which is very convenient when using a complex input method (e.g. Kotoeri). However, it has some known limitations which may be circumvented by disabling this option (e.g. mapping to "dead keys" may not work). Note that without this option the experimental renderer will not draw marked text at all.</string>
<reference key="NSSupport" ref="26"/>
- <object class="NSColor" key="NSBackgroundColor">
- <int key="NSColorSpace">6</int>
- <string key="NSCatalogName">System</string>
- <string key="NSColorName">textBackgroundColor</string>
- <reference key="NSColor" ref="208863654"/>
- </object>
- <object class="NSColor" key="NSTextColor">
+ <reference key="NSControlView" ref="536705090"/>
+ <reference key="NSBackgroundColor" ref="821672772"/>
+ <object class="NSColor" key="NSTextColor" id="1006868929">
<int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+ <bytes key="NSWhite">MC41AA</bytes>
</object>
</object>
- <reference key="NSContentView" ref="887541683"/>
- <int key="NSBorderType">1</int>
- <int key="NSBoxType">0</int>
- <int key="NSTitlePosition">2</int>
- <bool key="NSTransparent">NO</bool>
</object>
- </array>
- <string key="NSFrameSize">{483, 361}</string>
- <string key="NSClassName">NSView</string>
- </object>
- <object class="NSCustomView" id="836854791">
- <reference key="NSNextResponder"/>
- <int key="NSvFlags">268</int>
- <array class="NSMutableArray" key="NSSubviews">
<object class="NSButton" id="747671808">
<reference key="NSNextResponder" ref="836854791"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{18, 132}, {190, 18}}</string>
+ <string key="NSFrame">{{18, 228}, {190, 18}}</string>
<reference key="NSSuperview" ref="836854791"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="266098397">
@@ -970,7 +779,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="864999293">
<reference key="NSNextResponder" ref="836854791"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 102}, {449, 28}}</string>
+ <string key="NSFrame">{{17, 198}, {449, 28}}</string>
<reference key="NSSuperview" ref="836854791"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="526715553">
@@ -980,16 +789,13 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="NSSupport" ref="26"/>
<reference key="NSControlView" ref="864999293"/>
<reference key="NSBackgroundColor" ref="821672772"/>
- <object class="NSColor" key="NSTextColor">
- <int key="NSColorSpace">3</int>
- <bytes key="NSWhite">MC41AA</bytes>
- </object>
+ <reference key="NSTextColor" ref="1006868929"/>
</object>
</object>
<object class="NSButton" id="538640217">
<reference key="NSNextResponder" ref="836854791"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{18, 78}, {133, 18}}</string>
+ <string key="NSFrame">{{18, 174}, {133, 18}}</string>
<reference key="NSSuperview" ref="836854791"/>
<bool key="NSEnabled">YES</bool>
<object class="NSButtonCell" key="NSCell" id="1057999425">
@@ -1011,7 +817,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="NSTextField" id="202792916">
<reference key="NSNextResponder" ref="836854791"/>
<int key="NSvFlags">268</int>
- <string key="NSFrame">{{17, 20}, {449, 56}}</string>
+ <string key="NSFrame">{{17, 116}, {449, 56}}</string>
<reference key="NSSuperview" ref="836854791"/>
<bool key="NSEnabled">YES</bool>
<object class="NSTextFieldCell" key="NSCell" id="894089534">
@@ -1031,7 +837,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
</array>
- <string key="NSFrameSize">{483, 168}</string>
+ <string key="NSFrameSize">{483, 264}</string>
<reference key="NSSuperview"/>
<string key="NSClassName">NSView</string>
</object>
@@ -1079,62 +885,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<int key="connectionID">171</int>
</object>
<object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">integrationPreferences</string>
- <reference key="source" ref="816709129"/>
- <reference key="destination" ref="443205242"/>
- </object>
- <int key="connectionID">192</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">editors</string>
- <reference key="source" ref="816709129"/>
- <reference key="destination" ref="635472630"/>
- </object>
- <int key="connectionID">222</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">installOdbButton</string>
- <reference key="source" ref="816709129"/>
- <reference key="destination" ref="249474193"/>
- </object>
- <int key="connectionID">245</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">uninstallOdbButton</string>
- <reference key="source" ref="816709129"/>
- <reference key="destination" ref="841479415"/>
- </object>
- <int key="connectionID">246</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">uninstallOdb:</string>
- <reference key="source" ref="816709129"/>
- <reference key="destination" ref="841479415"/>
- </object>
- <int key="connectionID">266</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBActionConnection" key="connection">
- <string key="label">installOdb:</string>
- <reference key="source" ref="816709129"/>
- <reference key="destination" ref="249474193"/>
- </object>
- <int key="connectionID">286</int>
- </object>
- <object class="IBConnectionRecord">
- <object class="IBOutletConnection" key="connection">
- <string key="label">obdBundleVersionLabel</string>
- <reference key="source" ref="816709129"/>
- <reference key="destination" ref="548095870"/>
- </object>
- <int key="connectionID">308</int>
- </object>
- <object class="IBConnectionRecord">
<object class="IBBindingConnection" key="connection">
<string key="label">selectedTag: values.MMOpenLayout</string>
<reference key="source" ref="117328484"/>
@@ -1274,6 +1024,22 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
<int key="connectionID">1000</int>
</object>
+ <object class="IBConnectionRecord">
+ <object class="IBBindingConnection" key="connection">
+ <string key="label">value: values.MMUseInlineIm</string>
+ <reference key="source" ref="818542525"/>
+ <reference key="destination" ref="547503666"/>
+ <object class="NSNibBindingConnector" key="connector">
+ <reference key="NSSource" ref="818542525"/>
+ <reference key="NSDestination" ref="547503666"/>
+ <string key="NSLabel">value: values.MMUseInlineIm</string>
+ <string key="NSBinding">value</string>
+ <string key="NSKeyPath">values.MMUseInlineIm</string>
+ <int key="NSNibBindingConnectorVersion">2</int>
+ </object>
+ </object>
+ <int key="connectionID">1016</int>
+ </object>
</array>
<object class="IBMutableOrderedSet" key="objectRecords">
<array key="orderedObjects">
@@ -1436,32 +1202,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="parent" ref="225936320"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">191</int>
- <reference key="object" ref="443205242"/>
- <array class="NSMutableArray" key="children">
- <reference ref="1041056912"/>
- </array>
- <reference key="parent" ref="0"/>
- <string key="objectName">Integration</string>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">213</int>
- <reference key="object" ref="1041056912"/>
- <array class="NSMutableArray" key="children">
- <reference ref="841479415"/>
- <reference ref="799826912"/>
- <reference ref="635472630"/>
- <reference ref="249474193"/>
- <reference ref="548095870"/>
- <reference ref="664524879"/>
- <reference ref="808161291"/>
- <reference ref="228008295"/>
- <reference ref="627992137"/>
- <reference ref="554064415"/>
- </array>
- <reference key="parent" ref="443205242"/>
- </object>
- <object class="IBObjectRecord">
<int key="objectID">620</int>
<reference key="object" ref="836854791"/>
<array class="NSMutableArray" key="children">
@@ -1469,6 +1209,8 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference ref="538640217"/>
<reference ref="864999293"/>
<reference ref="747671808"/>
+ <reference ref="536705090"/>
+ <reference ref="818542525"/>
</array>
<reference key="parent" ref="0"/>
<string key="objectName">Advanced</string>
@@ -1638,148 +1380,41 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<reference key="parent" ref="249595117"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">195</int>
- <reference key="object" ref="841479415"/>
- <array class="NSMutableArray" key="children">
- <reference ref="624692609"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">981</int>
- <reference key="object" ref="624692609"/>
- <reference key="parent" ref="841479415"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">211</int>
- <reference key="object" ref="799826912"/>
- <array class="NSMutableArray" key="children">
- <reference ref="10311595"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">983</int>
- <reference key="object" ref="10311595"/>
- <reference key="parent" ref="799826912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">201</int>
- <reference key="object" ref="635472630"/>
- <array class="NSMutableArray" key="children">
- <reference ref="545964422"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">982</int>
- <reference key="object" ref="545964422"/>
- <array class="NSMutableArray" key="children">
- <reference ref="89589003"/>
- </array>
- <reference key="parent" ref="635472630"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">203</int>
- <reference key="object" ref="89589003"/>
- <reference key="parent" ref="545964422"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">193</int>
- <reference key="object" ref="249474193"/>
- <array class="NSMutableArray" key="children">
- <reference ref="213101514"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">980</int>
- <reference key="object" ref="213101514"/>
- <reference key="parent" ref="249474193"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">306</int>
- <reference key="object" ref="548095870"/>
- <array class="NSMutableArray" key="children">
- <reference ref="982688187"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">984</int>
- <reference key="object" ref="982688187"/>
- <reference key="parent" ref="548095870"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">334</int>
- <reference key="object" ref="664524879"/>
- <array class="NSMutableArray" key="children">
- <reference ref="906295134"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">985</int>
- <reference key="object" ref="906295134"/>
- <reference key="parent" ref="664524879"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">336</int>
- <reference key="object" ref="808161291"/>
- <array class="NSMutableArray" key="children">
- <reference ref="760604180"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">986</int>
- <reference key="object" ref="760604180"/>
- <reference key="parent" ref="808161291"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">338</int>
- <reference key="object" ref="228008295"/>
- <array class="NSMutableArray" key="children">
- <reference ref="979053968"/>
- </array>
- <reference key="parent" ref="1041056912"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">987</int>
- <reference key="object" ref="979053968"/>
- <reference key="parent" ref="228008295"/>
- </object>
- <object class="IBObjectRecord">
- <int key="objectID">340</int>
- <reference key="object" ref="627992137"/>
+ <int key="objectID">1001</int>
+ <reference key="object" ref="536705090"/>
<array class="NSMutableArray" key="children">
- <reference ref="641980577"/>
+ <reference ref="581527358"/>
</array>
- <reference key="parent" ref="1041056912"/>
+ <reference key="parent" ref="836854791"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">988</int>
- <reference key="object" ref="641980577"/>
- <reference key="parent" ref="627992137"/>
+ <int key="objectID">1004</int>
+ <reference key="object" ref="581527358"/>
+ <reference key="parent" ref="536705090"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">367</int>
- <reference key="object" ref="554064415"/>
+ <int key="objectID">1013</int>
+ <reference key="object" ref="818542525"/>
<array class="NSMutableArray" key="children">
- <reference ref="483958140"/>
+ <reference ref="948343868"/>
</array>
- <reference key="parent" ref="1041056912"/>
+ <reference key="parent" ref="836854791"/>
</object>
<object class="IBObjectRecord">
- <int key="objectID">989</int>
- <reference key="object" ref="483958140"/>
- <reference key="parent" ref="554064415"/>
+ <int key="objectID">1014</int>
+ <reference key="object" ref="948343868"/>
+ <reference key="parent" ref="818542525"/>
</object>
</array>
</object>
<dictionary class="NSMutableDictionary" key="flattenedProperties">
<string key="-3.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="-3.ImportedFromIB2"/>
+ <string key="1001.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <boolean value="YES" key="1001.ImportedFromIB2"/>
+ <string key="1004.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="1013.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string key="1014.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="115.IBEditorWindowLastContentRect">{{329, 705}, {483, 290}}</string>
<string key="115.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="115.ImportedFromIB2"/>
@@ -1809,32 +1444,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<boolean value="YES" key="138.ImportedFromIB2"/>
<string key="139.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="139.ImportedFromIB2"/>
- <string key="191.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="191.ImportedFromIB2"/>
- <string key="193.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="193.ImportedFromIB2"/>
- <string key="195.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="195.ImportedFromIB2"/>
- <string key="201.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="201.ImportedFromIB2"/>
- <string key="203.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="203.ImportedFromIB2"/>
- <string key="211.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="211.ImportedFromIB2"/>
- <string key="213.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="213.ImportedFromIB2"/>
- <string key="306.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="306.ImportedFromIB2"/>
- <string key="334.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="334.ImportedFromIB2"/>
- <string key="336.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="336.ImportedFromIB2"/>
- <string key="338.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="338.ImportedFromIB2"/>
- <string key="340.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="340.ImportedFromIB2"/>
- <string key="367.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <boolean value="YES" key="367.ImportedFromIB2"/>
<string key="427.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="427.ImportedFromIB2"/>
<string key="429.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1849,7 +1458,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<boolean value="YES" key="544.ImportedFromIB2"/>
<string key="58.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="58.ImportedFromIB2"/>
- <string key="620.IBEditorWindowLastContentRect">{{329, 804}, {483, 168}}</string>
+ <string key="620.IBEditorWindowLastContentRect">{{605, 600}, {483, 264}}</string>
<string key="620.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<boolean value="YES" key="620.ImportedFromIB2"/>
<string key="782.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1878,16 +1487,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<string key="977.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="978.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="979.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="980.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="981.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="982.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="983.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="984.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="985.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="986.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="987.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="988.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
- <string key="989.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="990.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="991.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
<string key="992.IBPluginDependency">com.apple.InterfaceBuilder.CocoaPlugin</string>
@@ -1899,7 +1498,7 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<nil key="activeLocalization"/>
<dictionary class="NSMutableDictionary" key="localizations"/>
<nil key="sourceID"/>
- <int key="maxID">1000</int>
+ <int key="maxID">1016</int>
</object>
<object class="IBClassDescriber" key="IBDocument.Classes">
<array class="NSMutableArray" key="referencedPartialClassDescriptions">
@@ -1935,20 +1534,14 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="IBPartialClassDescription">
<string key="className">MMPreferenceController</string>
<string key="superclassName">DBPrefsWindowController</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="installOdb:">id</string>
- <string key="openInCurrentWindowSelectionChanged:">id</string>
- <string key="uninstallOdb:">id</string>
- </dictionary>
+ <object class="NSMutableDictionary" key="actions">
+ <string key="NS.key.0">openInCurrentWindowSelectionChanged:</string>
+ <string key="NS.object.0">id</string>
+ </object>
<dictionary class="NSMutableDictionary" key="outlets">
<string key="advancedPreferences">NSView</string>
- <string key="editors">NSPopUpButton</string>
<string key="generalPreferences">NSView</string>
- <string key="installOdbButton">NSButton</string>
- <string key="integrationPreferences">NSView</string>
<string key="layoutPopUpButton">NSPopUpButton</string>
- <string key="obdBundleVersionLabel">NSTextField</string>
- <string key="uninstallOdbButton">NSButton</string>
</dictionary>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBProjectSource</string>
@@ -1985,68 +1578,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
<object class="IBPartialClassDescription">
<string key="className">NSObject</string>
<object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">PlugInInterface.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <dictionary class="NSMutableDictionary" key="actions">
- <string key="didAdjustSubviews:">RBSplitView</string>
- <string key="willAdjustSubviews:">RBSplitView</string>
- </dictionary>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="120214458">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">RBSplitView.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">NSObject</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">RBSplitSubview</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">RBSplitSubview.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">RBSplitSubview</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier" id="119043790">
- <string key="majorKey">IBProjectSource</string>
- <string key="minorKey">RBSplitViewPrivateDefines.h</string>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">RBSplitSubview</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBUserSource</string>
- <string key="minorKey"/>
- </object>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">RBSplitView</string>
- <string key="superclassName">RBSplitSubview</string>
- <object class="NSMutableDictionary" key="outlets">
- <string key="NS.key.0">delegate</string>
- <string key="NS.object.0">id</string>
- </object>
- <reference key="sourceIdentifier" ref="120214458"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">RBSplitView</string>
- <reference key="sourceIdentifier" ref="119043790"/>
- </object>
- <object class="IBPartialClassDescription">
- <string key="className">RBSplitView</string>
- <string key="superclassName">RBSplitSubview</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
<string key="majorKey">IBUserSource</string>
<string key="minorKey"/>
</object>
@@ -2105,14 +1636,6 @@ AAMAAAABAAEAAAFTAAMAAAAEAAAFwgAAAAAACAAIAAgACAABAAEAAQABA</bytes>
</object>
</object>
<object class="IBPartialClassDescription">
- <string key="className">NSBox</string>
- <string key="superclassName">NSView</string>
- <object class="IBClassDescriptionSource" key="sourceIdentifier">
- <string key="majorKey">IBFrameworkSource</string>
- <string key="minorKey">AppKit.framework/Headers/NSBox.h</string>