diff options
Diffstat (limited to 'scintilla/cocoa')
35 files changed, 11916 insertions, 0 deletions
diff --git a/scintilla/cocoa/Framework.mk b/scintilla/cocoa/Framework.mk new file mode 100644 index 0000000..88358ac --- /dev/null +++ b/scintilla/cocoa/Framework.mk @@ -0,0 +1,85 @@ +### start defines ###
+
+ARCH=-arch i386
+CC=gcc -x c++ $(ARCH)
+CO=gcc -x objective-c++ $(ARCH)
+
+INST_NAME=-install_name @executable_path/../Frameworks/Sci.framework/Versions/A/Sci
+LD=gcc $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME)
+
+gDEFs=-DSCI_NAMESPACE -DSCI_LEXER
+
+INCS=-I../src/ -I../include/ -I.
+CCX=$(CC) $(gDEFs) $(INCS)
+CCO=$(CO) $(gDEFs) $(INCS)
+
+BLD=build/framebuild
+
+SCI_LEXERS=LexAPDL.o LexASY.o LexAU3.o LexAVE.o LexAbaqus.o LexAda.o LexAsm.o LexAsn1.o \
+ LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCLW.o LexCOBOL.o LexCPP.o LexCSS.o \
+ LexCaml.o LexCmake.o LexConf.o LexCrontab.o LexCsound.o LexD.o LexEScript.o LexEiffel.o \
+ LexErlang.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o LexGui4Cli.o LexHTML.o \
+ LexHaskell.o LexInno.o LexKix.o LexLisp.o LexLout.o LexLua.o LexMMIXAL.o LexMPT.o \
+ LexMSSQL.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o LexMySQL.o LexNimrod.o \
+ LexNsis.o LexOpal.o LexOthers.o LexPB.o LexPLM.o LexPOV.o LexPS.o LexPascal.o LexPerl.o \
+ LexPowerPro.o LexPowerShell.o LexProgress.o LexPython.o LexR.o LexRebol.o LexRuby.o \
+ LexSML.o LexSQL.o LexScriptol.o LexSmalltalk.o LexSorcus.o LexSpecman.o LexSpice.o \
+ LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVHDL.o LexVerilog.o LexYAML.o
+
+SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o ContractionState.o Decoration.o \
+ Document.o DocumentAccessor.o Editor.o ExternalLexer.o Indicator.o KeyMap.o KeyWords.o \
+ LineMarker.o PerLine.o PositionCache.o PropSet.o RESearch.o RunStyles.o ScintillaBase.o \
+ Style.o StyleContext.o UniConversion.o ViewStyle.o WindowAccessor.o XPM.o Selection.o $(SCI_LEXERS)
+COC_OBJ=PlatCocoa.o ScintillaCocoa.o ScintillaView.o InfoBar.o
+
+OBJ=$(SCI_OBJ) $(COC_OBJ)
+OBJS=$(addprefix $(BLD)/,$(OBJ))
+
+TARG=$(APP)/Versions/A/Sci
+APP=$(BLD)/Sci.framework
+### end defines ###
+
+### start targets ###
+
+all: $(BLD) $(TARG)
+
+$(APP): $(BLD)
+ -rm -rf $(APP)
+ -mkdir $(APP)
+ -mkdir $(APP)/Versions
+ -mkdir $(APP)/Versions/A
+ -mkdir $(APP)/Versions/A/Headers
+ -mkdir $(APP)/Versions/A/Resources
+ -ln -sf `pwd`/$(APP)/Versions/A `pwd`/$(APP)/Versions/Current
+ -ln -sf `pwd`/$(APP)/Versions/A/Headers `pwd`/$(APP)/Headers
+ -ln -sf `pwd`/$(APP)/Versions/A/Resources `pwd`/$(APP)/Resources
+ -cp *.h $(APP)/Headers/
+ -cp ../src/*.h $(APP)/Headers/
+ -cp ../include/*.h $(APP)/Headers/
+ -cp -R ScintillaFramework/English.lproj $(APP)/Resources
+ -cp res/*.png $(APP)/Resources
+ -cp ScintillaFramework/Info.plist $(APP)/Resources
+
+$(TARG) : $(OBJS) $(APP)
+ $(LD) $(OBJS) $(gDEFs) -o $(TARG) -lstdc++
+ -ln `pwd`/$(TARG) `pwd`/$(APP)/Sci
+
+$(BLD):
+ -mkdir build
+ -mkdir $(BLD)
+
+clean:
+ -rm -rf $(BLD)
+
+$(BLD)/%.o : ../src/%.cxx
+ $(CCX) -c ../src/$< -o $@
+
+$(BLD)/%.o : %.mm
+ $(CCO) -c $< -o $@
+
+### get around to filling out the real dependencies later ###
+$(BLD)/AutoComplete.o : ../src/AutoComplete.cxx ../src/AutoComplete.h ../include/Platform.h
+
+$(BLD)/CallTip.o : ../src/CallTip.cxx ../src/CallTip.h ../include/Platform.h
+
+### end targets ###
\ No newline at end of file diff --git a/scintilla/cocoa/InfoBar.h b/scintilla/cocoa/InfoBar.h new file mode 100644 index 0000000..9624811 --- /dev/null +++ b/scintilla/cocoa/InfoBar.h @@ -0,0 +1,55 @@ +
+/**
+ * Scintilla source code edit control
+ * InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with
+ * ScintillaView.
+ *
+ * Mike Lischke <mlischke@sun.com>
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import <Cocoa/Cocoa.h>
+#import "InfoBarCommunicator.h"
+
+/**
+ * Extended text cell for vertically aligned text.
+ */
+@interface VerticallyCenteredTextFieldCell : NSTextFieldCell
+{
+ BOOL mIsEditingOrSelecting;
+}
+
+@end
+
+@interface InfoBar : NSView <InfoBarCommunicator>
+{
+@private
+ NSImage* mBackground;
+ IBDisplay mDisplayMask;
+
+ float mScaleFactor;
+ NSPopUpButton* mZoomPopup;
+
+ int mCurrentCaretX;
+ int mCurrentCaretY;
+ NSTextField* mCaretPositionLabel;
+ NSTextField* mStatusTextLabel;
+
+ id <InfoBarCommunicator> mCallback;
+}
+
+- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
+ value: (float) value;
+- (void) setCallback: (id <InfoBarCommunicator>) callback;
+
+- (void) createItems;
+- (void) layout;
+- (void) setDisplay: (IBDisplay) display;
+- (void) zoomItemAction: (id) sender;
+- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag;
+- (void) setCaretPosition: (NSPoint) position;
+- (void) sizeToFit;
+
+@end
diff --git a/scintilla/cocoa/InfoBar.mm b/scintilla/cocoa/InfoBar.mm new file mode 100644 index 0000000..27b9aa1 --- /dev/null +++ b/scintilla/cocoa/InfoBar.mm @@ -0,0 +1,448 @@ +
+/**
+ * Scintilla source code edit control
+ * InfoBar.mm - Implements special info bar with zoom info, caret position etc. to be used with
+ * ScintillaView.
+ *
+ * Mike Lischke <mlischke@sun.com>
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import "InfoBar.h"
+
+//--------------------------------------------------------------------------------------------------
+
+@implementation VerticallyCenteredTextFieldCell
+
+// Inspired by code from Daniel Jalkut, Red Sweater Software.
+
+- (NSRect) drawingRectForBounds: (NSRect) theRect
+{
+ // Get the parent's idea of where we should draw
+ NSRect newRect = [super drawingRectForBounds: theRect];
+
+ // When the text field is being edited or selected, we have to turn off the magic because it
+ // screws up the configuration of the field editor. We sneak around this by intercepting
+ // selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute.
+ if (mIsEditingOrSelecting == NO)
+ {
+ // Get our ideal size for current text
+ NSSize textSize = [self cellSizeForBounds: theRect];
+
+ // Center that in the proposed rect
+ float heightDelta = newRect.size.height - textSize.height;
+ if (heightDelta > 0)
+ {
+ newRect.size.height -= heightDelta;
+ newRect.origin.y += ceil(heightDelta / 2);
+ }
+ }
+
+ return newRect;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) selectWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj
+ delegate:(id) anObject start: (int) selStart length: (int) selLength
+{
+ aRect = [self drawingRectForBounds: aRect];
+ mIsEditingOrSelecting = YES;
+ [super selectWithFrame: aRect
+ inView: controlView
+ editor: textObj
+ delegate: anObject
+ start: selStart
+ length: selLength];
+ mIsEditingOrSelecting = NO;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) editWithFrame: (NSRect) aRect inView: (NSView*) controlView editor: (NSText*) textObj
+ delegate: (id) anObject event: (NSEvent*) theEvent
+{
+ aRect = [self drawingRectForBounds: aRect];
+ mIsEditingOrSelecting = YES;
+ [super editWithFrame: aRect
+ inView: controlView
+ editor: textObj
+ delegate: anObject
+ event: theEvent];
+ mIsEditingOrSelecting = NO;
+}
+
+@end
+
+//--------------------------------------------------------------------------------------------------
+
+@implementation InfoBar
+
+- (id) initWithFrame: (NSRect) frame
+{
+ self = [super initWithFrame: frame];
+ if (self)
+ {
+ NSBundle* bundle = [NSBundle bundleForClass: [InfoBar class]];
+
+ NSString* path = [bundle pathForResource: @"info_bar_bg" ofType: @"png" inDirectory: nil];
+ mBackground = [[[NSImage alloc] initWithContentsOfFile: path] retain];
+ if (![mBackground isValid])
+ NSLog(@"Background image for info bar is invalid.");
+
+ mScaleFactor = 1.0;
+ mCurrentCaretX = 0;
+ mCurrentCaretY = 0;
+ [self createItems];
+ }
+ return self;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by a connected compontent (usually the info bar) if something changed there.
+ *
+ * @param type The type of the notification.
+ * @param message Carries the new status message if the type is a status message change.
+ * @param location Carries the new location (e.g. caret) if the type is a caret change or similar type.
+ * @param location Carries the new zoom value if the type is a zoom change.
+ */
+- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
+ value: (float) value
+{
+ switch (type)
+ {
+ case IBNZoomChanged:
+ [self setScaleFactor: value adjustPopup: YES];
+ break;
+ case IBNCaretChanged:
+ [self setCaretPosition: location];
+ break;
+ case IBNStatusChanged:
+ [mStatusTextLabel setStringValue: message];
+ break;
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to set a protocol object we can use to send change notifications to.
+ */
+- (void) setCallback: (id <InfoBarCommunicator>) callback
+{
+ mCallback = callback;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+static NSString *DefaultScaleMenuLabels[] = {
+ @"20%", @"30%", @"50%", @"75%", @"100%", @"130%", @"160%", @"200%", @"250%", @"300%"
+};
+static float DefaultScaleMenuFactors[] = {
+ 0.2, 0.3, 0.5, 0.75, 1.0, 1.3, 1.6, 2.0, 2.5, 3.0
+};
+static unsigned DefaultScaleMenuSelectedItemIndex = 4;
+static float BarFontSize = 10.0;
+
+- (void) createItems
+{
+ // 1) The zoom popup.
+ unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *);
+
+ // Create the popup button.
+ mZoomPopup = [[NSPopUpButton allocWithZone:[self zone]] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];
+
+ // No border or background please.
+ [[mZoomPopup cell] setBordered: NO];
+ [[mZoomPopup cell] setArrowPosition: NSPopUpArrowAtBottom];
+
+ // Fill it.
+ for (unsigned count = 0; count < numberOfDefaultItems; count++)
+ {
+ [mZoomPopup addItemWithTitle: NSLocalizedStringFromTable(DefaultScaleMenuLabels[count], @"ZoomValues", nil)];
+ id currentItem = [mZoomPopup itemAtIndex: count];
+ if (DefaultScaleMenuFactors[count] != 0.0)
+ [currentItem setRepresentedObject: [NSNumber numberWithFloat: DefaultScaleMenuFactors[count]]];
+ }
+ [mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex];
+
+ // Hook it up.
+ [mZoomPopup setTarget: self];
+ [mZoomPopup setAction: @selector(zoomItemAction:)];
+
+ // Set a suitable font.
+ [mZoomPopup setFont: [NSFont menuBarFontOfSize: BarFontSize]];
+
+ // Make sure the popup is big enough to fit the cells.
+ [mZoomPopup sizeToFit];
+
+ // Don't let it become first responder
+ [mZoomPopup setRefusesFirstResponder: YES];
+
+ // put it in the scrollview.
+ [self addSubview: mZoomPopup];
+ [mZoomPopup release];
+
+ // 2) The caret position label.
+ Class oldCellClass = [NSTextField cellClass];
+ [NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]];
+
+ mCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)];
+ [mCaretPositionLabel setBezeled: NO];
+ [mCaretPositionLabel setBordered: NO];
+ [mCaretPositionLabel setEditable: NO];
+ [mCaretPositionLabel setSelectable: NO];
+ [mCaretPositionLabel setDrawsBackground: NO];
+ [mCaretPositionLabel setFont: [NSFont menuBarFontOfSize: BarFontSize]];
+
+ NSTextFieldCell* cell = [mCaretPositionLabel cell];
+ [cell setPlaceholderString: @"0:0"];
+ [cell setAlignment: NSCenterTextAlignment];
+
+ [self addSubview: mCaretPositionLabel];
+ [mCaretPositionLabel release];
+
+ // 3) The status text.
+ mStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)];
+ [mStatusTextLabel setBezeled: NO];
+ [mStatusTextLabel setBordered: NO];
+ [mStatusTextLabel setEditable: NO];
+ [mStatusTextLabel setSelectable: NO];
+ [mStatusTextLabel setDrawsBackground: NO];
+ [mStatusTextLabel setFont: [NSFont menuBarFontOfSize: BarFontSize]];
+
+ cell = [mStatusTextLabel cell];
+ [cell setPlaceholderString: @""];
+
+ [self addSubview: mStatusTextLabel];
+ [mStatusTextLabel release];
+
+ // Restore original cell class so that everything else doesn't get broken
+ [NSTextField setCellClass: oldCellClass];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) dealloc
+{
+ [mBackground release];
+ [super dealloc];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Fill the background.
+ */
+- (void) drawRect: (NSRect) rect
+{
+ // Since the background is seamless, we don't need to take care for the proper offset.
+ // Simply tile the background over the invalid rectangle.
+ NSPoint target = {rect.origin.x, 0};
+ while (target.x < rect.origin.x + rect.size.width)
+ {
+ [mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositeCopy fraction: 1];
+ target.x += mBackground.size.width;
+ }
+
+ // Draw separator lines between items.
+ NSRect verticalLineRect;
+ float component = 190.0 / 255.0;
+ NSColor* lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1];
+
+ if (mDisplayMask & IBShowZoom)
+ {
+ verticalLineRect = [mZoomPopup frame];
+ verticalLineRect.origin.x += verticalLineRect.size.width + 1.0;
+ verticalLineRect.size.width = 1.0;
+ if (NSIntersectsRect(rect, verticalLineRect))
+ {
+ [lineColor set];
+ NSRectFill(verticalLineRect);
+ }
+ }
+
+ if (mDisplayMask & IBShowCaretPosition)
+ {
+ verticalLineRect = [mCaretPositionLabel frame];
+ verticalLineRect.origin.x += verticalLineRect.size.width + 1.0;
+ verticalLineRect.size.width = 1.0;
+ if (NSIntersectsRect(rect, verticalLineRect))
+ {
+ [lineColor set];
+ NSRectFill(verticalLineRect);
+ }
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (BOOL) isOpaque
+{
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to reposition our content depending on the size of the view.
+ */
+- (void) setFrame: (NSRect) newFrame
+{
+ [super setFrame: newFrame];
+ [self layout];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) layout
+{
+ NSRect currentBounds = {0, 0, 0, [self frame].size.height};
+ if (mDisplayMask & IBShowZoom)
+ {
+ [mZoomPopup setHidden: NO];
+ currentBounds.size.width = [mZoomPopup frame].size.width;
+ [mZoomPopup setFrame: currentBounds];
+ currentBounds.origin.x += currentBounds.size.width + 1; // Add 1 for the separator.
+ }
+ else
+ [mZoomPopup setHidden: YES];
+
+ if (mDisplayMask & IBShowCaretPosition)
+ {
+ [mCaretPositionLabel setHidden: NO];
+ currentBounds.size.width = [mCaretPositionLabel frame].size.width;
+ [mCaretPositionLabel setFrame: currentBounds];
+ currentBounds.origin.x += currentBounds.size.width + 1;
+ }
+ else
+ [mCaretPositionLabel setHidden: YES];
+
+ if (mDisplayMask & IBShowStatusText)
+ {
+ // The status text always takes the rest of the available space.
+ [mStatusTextLabel setHidden: NO];
+ currentBounds.size.width = [self frame].size.width - currentBounds.origin.x;
+ [mStatusTextLabel setFrame: currentBounds];
+ }
+ else
+ [mStatusTextLabel setHidden: YES];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to switch the visible parts of the info bar.
+ *
+ * @param display Bitwise ORed IBDisplay values which determine what to show on the bar.
+ */
+- (void) setDisplay: (IBDisplay) display
+{
+ if (mDisplayMask != display)
+ {
+ mDisplayMask = display;
+ [self layout];
+ [self needsDisplay];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Handler for selection changes in the zoom menu.
+ */
+- (void) zoomItemAction: (id) sender
+{
+ NSNumber* selectedFactorObject = [[sender selectedCell] representedObject];
+
+ if (selectedFactorObject == nil)
+ {
+ NSLog(@"Scale popup action: setting arbitrary zoom factors is not yet supported.");
+ return;
+ }
+ else
+ {
+ [self setScaleFactor: [selectedFactorObject floatValue] adjustPopup: NO];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag
+{
+ if (mScaleFactor != newScaleFactor)
+ {
+ mScaleFactor = newScaleFactor;
+ if (flag)
+ {
+ unsigned count = 0;
+ unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float);
+
+ // We only work with some preset zoom values. If the given value does not correspond
+ // to one then show no selection.
+ while (count < numberOfDefaultItems && (fabs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
+ count++;
+ if (count == numberOfDefaultItems)
+ [mZoomPopup selectItemAtIndex: -1];
+ else
+ {
+ [mZoomPopup selectItemAtIndex: count];
+
+ // Set scale factor to found preset value if it comes close.
+ mScaleFactor = DefaultScaleMenuFactors[count];
+ }
+ }
+ else
+ {
+ // Internally set. Notify owner.
+ [mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor];
+ }
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called from the notification method to update the caret position display.
+ */
+- (void) setCaretPosition: (NSPoint) position
+{
+ // Make the position one-based.
+ int newX = (int) position.x + 1;
+ int newY = (int) position.y + 1;
+
+ if (mCurrentCaretX != newX || mCurrentCaretY != newY)
+ {
+ mCurrentCaretX = newX;
+ mCurrentCaretY = newY;
+
+ [mCaretPositionLabel setStringValue: [NSString stringWithFormat: @"%d:%d", newX, newY]];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Makes the bar resize to the smallest width that can accomodate the currently enabled items.
+ */
+- (void) sizeToFit
+{
+ NSRect frame = [self frame];
+ frame.size.width = 0;
+ if (mDisplayMask & IBShowZoom)
+ frame.size.width += [mZoomPopup frame].size.width;
+
+ if (mDisplayMask & IBShowCaretPosition)
+ frame.size.width += [mCaretPositionLabel frame].size.width;
+
+ if (mDisplayMask & IBShowStatusText)
+ frame.size.width += [mStatusTextLabel frame].size.width;
+
+ [self setFrame: frame];
+}
+
+@end
diff --git a/scintilla/cocoa/InfoBarCommunicator.h b/scintilla/cocoa/InfoBarCommunicator.h new file mode 100644 index 0000000..ba8ae7a --- /dev/null +++ b/scintilla/cocoa/InfoBarCommunicator.h @@ -0,0 +1,35 @@ +/*
+ * InfoBarCommunicator.h - Definitions of a communication protocol and other data types used for
+ * the info bar implementation.
+ *
+ * Mike Lischke <mlischke@sun.com>
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+enum IBDisplay {
+ IBShowZoom = 0x01,
+ IBShowCaretPosition = 0x02,
+ IBShowStatusText = 0x04,
+ IBShowAll = 0xFF
+};
+
+/**
+ * The info bar communicator protocol is used for communication between ScintillaView and its
+ * information bar component. Using this protocol decouples any potential info target from the main
+ * ScintillaView implementation. The protocol is used two-way.
+ */
+
+enum NotificationType {
+ IBNZoomChanged, // The user selected another zoom value.
+ IBNCaretChanged, // The caret in the editor changed.
+ IBNStatusChanged, // The application set a new status message.
+};
+
+@protocol InfoBarCommunicator
+- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
+ value: (float) value;
+- (void) setCallback: (id <InfoBarCommunicator>) callback;
+@end
+
diff --git a/scintilla/cocoa/PlatCocoa.h b/scintilla/cocoa/PlatCocoa.h new file mode 100644 index 0000000..a85462e --- /dev/null +++ b/scintilla/cocoa/PlatCocoa.h @@ -0,0 +1,119 @@ +
+/**
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#ifndef PLATCOCOA_H
+#define PLATCOCOA_H
+
+#include <cstring>
+#include <cstdio>
+#include <cstdlib>
+
+#include <assert.h>
+
+#include <sys/time.h>
+
+#include <Cocoa/Cocoa.h>
+#include "QuartzTextLayout.h"
+
+#include "Platform.h"
+#include "Scintilla.h"
+
+NSRect PRectangleToNSRect(Scintilla::PRectangle& rc);
+Scintilla::PRectangle NSRectToPRectangle(NSRect& rc);
+
+@interface ScintillaContextMenu : NSMenu
+{
+ Scintilla::ScintillaCocoa* owner;
+}
+- (void) handleCommand: (NSMenuItem*) sender;
+- (void) setOwner: (Scintilla::ScintillaCocoa*) newOwner;
+
+@end
+
+namespace Scintilla {
+
+// A class to do the actual text rendering for us using Quartz 2D.
+class SurfaceImpl : public Surface
+{
+private:
+ bool unicodeMode;
+ float x;
+ float y;
+
+ CGContextRef gc;
+
+ /** The text layout instance */
+ QuartzTextLayout* textLayout;
+ /** If the surface is a bitmap context, contains a reference to the bitmap data. */
+ uint8_t* bitmapData;
+ /** If the surface is a bitmap context, stores the dimensions of the bitmap. */
+ int bitmapWidth;
+ int bitmapHeight;
+
+ /** Set the CGContext's fill colour to the specified allocated colour. */
+ void FillColour( const ColourAllocated& back );
+
+
+ // 24-bit RGB+A bitmap data constants
+ static const int BITS_PER_COMPONENT = 8;
+ static const int BITS_PER_PIXEL = BITS_PER_COMPONENT * 4;
+ static const int BYTES_PER_PIXEL = BITS_PER_PIXEL / 8;
+public:
+ SurfaceImpl();
+ ~SurfaceImpl();
+
+ void Init(WindowID wid);
+ void Init(SurfaceID sid, WindowID wid);
+ void InitPixMap(int width, int height, Surface *surface_, WindowID wid);
+ CGContextRef GetContext() { return gc; }
+
+ void Release();
+ bool Initialised();
+ void PenColour(ColourAllocated fore);
+
+ /** Returns a CGImageRef that represents the surface. Returns NULL if this is not possible. */
+ CGImageRef GetImage();
+ void CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect);
+
+ int LogPixelsY();
+ int DeviceHeightFont(int points);
+ void MoveTo(int x_, int y_);
+ void LineTo(int x_, int y_);
+ void Polygon(Scintilla::Point *pts, int npts, ColourAllocated fore, ColourAllocated back);
+ void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back);
+ void FillRectangle(PRectangle rc, ColourAllocated back);
+ void FillRectangle(PRectangle rc, Surface &surfacePattern);
+ void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back);
+ void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill,
+ ColourAllocated outline, int alphaOutline, int flags);
+ void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back);
+ void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource);
+ void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore,
+ ColourAllocated back);
+ void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore,
+ ColourAllocated back);
+ void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore);
+ void MeasureWidths(Font &font_, const char *s, int len, int *positions);
+ int WidthText(Font &font_, const char *s, int len);
+ int WidthChar(Font &font_, char ch);
+ int Ascent(Font &font_);
+ int Descent(Font &font_);
+ int InternalLeading(Font &font_);
+ int ExternalLeading(Font &font_);
+ int Height(Font &font_);
+ int AverageCharWidth(Font &font_);
+
+ int SetPalette(Scintilla::Palette *pal, bool inBackGround);
+ void SetClip(PRectangle rc);
+ void FlushCachedState();
+
+ void SetUnicodeMode(bool unicodeMode_);
+ void SetDBCSMode(int codePage);
+}; // SurfaceImpl class
+
+} // Scintilla namespace
+
+#endif
diff --git a/scintilla/cocoa/PlatCocoa.mm b/scintilla/cocoa/PlatCocoa.mm new file mode 100644 index 0000000..09591c2 --- /dev/null +++ b/scintilla/cocoa/PlatCocoa.mm @@ -0,0 +1,2124 @@ +/**
+ * Scintilla source code edit control
+ * PlatCocoa.mm - implementation of platform facilities on MacOS X/Cocoa
+ *
+ * Written by Mike Lischke
+ * Based on PlatMacOSX.cxx
+ * Based on work by Evan Jones (c) 2002 <ejones@uwaterloo.ca>
+ * Based on PlatGTK.cxx Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
+ * The License.txt file describes the conditions under which this software may be distributed.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import <ScintillaView.h>
+
+#include "PlatCocoa.h"
+
+#include <cstring>
+#include <cstdio>
+#include <cstdlib>
+#include <assert.h>
+#include <sys/time.h>
+#include <stdexcept>
+
+#include "XPM.h"
+
+#import <Foundation/NSGeometry.h>
+
+#import <Carbon/Carbon.h> // Temporary
+
+using namespace Scintilla;
+
+extern sptr_t scintilla_send_message(void* sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Converts a PRectangle as used by Scintilla to standard Obj-C NSRect structure .
+ */
+NSRect PRectangleToNSRect(PRectangle& rc)
+{
+ return NSMakeRect(rc.left, rc.top, rc.Width(), rc.Height());
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Converts an NSRect as used by the system to a native Scintilla rectangle.
+ */
+PRectangle NSRectToPRectangle(NSRect& rc)
+{
+ return PRectangle(rc.origin.x, rc.origin.y, rc.size.width + rc.origin.x, rc.size.height + rc.origin.y);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Converts a PRctangle as used by Scintilla to a Quartz-style rectangle.
+ */
+inline CGRect PRectangleToCGRect(PRectangle& rc)
+{
+ return CGRectMake(rc.left, rc.top, rc.Width(), rc.Height());
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Converts a Quartz-style rectangle to a PRectangle structure as used by Scintilla.
+ */
+inline PRectangle CGRectToPRectangle(const CGRect& rect)
+{
+ PRectangle rc;
+ rc.left = (int)(rect.origin.x + 0.5);
+ rc.top = (int)(rect.origin.y + 0.5);
+ rc.right = (int)(rect.origin.x + rect.size.width + 0.5);
+ rc.bottom = (int)(rect.origin.y + rect.size.height + 0.5);
+ return rc;
+}
+
+//----------------- Point --------------------------------------------------------------------------
+
+/**
+ * Converts a point given as a long into a native Point structure.
+ */
+Scintilla::Point Scintilla::Point::FromLong(long lpoint)
+{
+ return Scintilla::Point(
+ Platform::LowShortFromLong(lpoint),
+ Platform::HighShortFromLong(lpoint)
+ );
+}
+
+//----------------- Palette ------------------------------------------------------------------------
+
+// The Palette implementation is only here because we would get linker errors if not.
+// We don't use indexed colors in ScintillaCocoa.
+
+Scintilla::Palette::Palette()
+{
+}
+
+//--------------------------------------------------------------------------------------------------
+
+Scintilla::Palette::~Palette()
+{
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Scintilla::Palette::Release()
+{
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to transform a given color, if needed. If the caller tries to find a color that matches the
+ * desired color then we simply pass it on, as we support the full color space.
+ */
+void Scintilla::Palette::WantFind(ColourPair &cp, bool want)
+{
+ if (!want)
+ cp.allocated.Set(cp.desired.AsLong());
+
+ // Don't do anything if the caller wants the color it has already set.
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Scintilla::Palette::Allocate(Window& w)
+{
+ // Nothing to allocate as we don't use palettes.
+}
+
+//----------------- Font ---------------------------------------------------------------------------
+
+Font::Font(): fid(0)
+{
+}
+
+//--------------------------------------------------------------------------------------------------
+
+Font::~Font()
+{
+ Release();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Creates a Quartz 2D font with the given properties.
+ * TODO: rewrite to use NSFont.
+ */
+void Font::Create(const char *faceName, int characterSet, int size, bool bold, bool italic,
+ int extraFontFlag)
+{
+ // TODO: How should I handle the characterSet request?
+ Release();
+
+ QuartzTextStyle* style = new QuartzTextStyle();
+ fid = style;
+
+ // Find the font
+ QuartzFont font(faceName, strlen(faceName));
+
+ // We set Font, Size, Bold, Italic
+ QuartzTextSize textSize(size);
+ QuartzTextBold isBold(bold);
+ QuartzTextItalic isItalic(italic);
+
+ // Actually set the attributes
+ QuartzTextStyleAttribute* attributes[] = { &font, &textSize, &isBold, &isItalic };
+ style->setAttributes(attributes, sizeof(attributes) / sizeof(*attributes));
+ style->setFontFeature(kLigaturesType, kCommonLigaturesOffSelector);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Font::Release()
+{
+ if (fid)
+ delete reinterpret_cast<QuartzTextStyle*>( fid );
+ fid = 0;
+}
+
+//----------------- SurfaceImpl --------------------------------------------------------------------
+
+SurfaceImpl::SurfaceImpl()
+{
+ bitmapData = NULL; // Release will try and delete bitmapData if != NULL
+ gc = NULL;
+ textLayout = new QuartzTextLayout(NULL);
+ Release();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+SurfaceImpl::~SurfaceImpl()
+{
+ Release();
+ delete textLayout;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::Release()
+{
+ textLayout->setContext (NULL);
+ if ( bitmapData != NULL )
+ {
+ delete[] bitmapData;
+ // We only "own" the graphics context if we are a bitmap context
+ if (gc != NULL)
+ CGContextRelease(gc);
+ }
+ bitmapData = NULL;
+ gc = NULL;
+
+ bitmapWidth = 0;
+ bitmapHeight = 0;
+ x = 0;
+ y = 0;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool SurfaceImpl::Initialised()
+{
+ // We are initalised if the graphics context is not null
+ return gc != NULL;// || port != NULL;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::Init(WindowID wid)
+{
+ // To be able to draw, the surface must get a CGContext handle. We save the graphics port,
+ // then aquire/release the context on an as-need basis (see above).
+ // XXX Docs on QDBeginCGContext are light, a better way to do this would be good.
+ // AFAIK we should not hold onto a context retrieved this way, thus the need for
+ // aquire/release of the context.
+
+ Release();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::Init(SurfaceID sid, WindowID wid)
+{
+ Release();
+ gc = reinterpret_cast<CGContextRef>(sid);
+ CGContextSetLineWidth(gc, 1.0);
+ textLayout->setContext(gc);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::InitPixMap(int width, int height, Surface* surface_, WindowID wid)
+{
+ Release();
+
+ // Create a new bitmap context, along with the RAM for the bitmap itself
+ bitmapWidth = width;
+ bitmapHeight = height;
+
+ const int bitmapBytesPerRow = (width * BYTES_PER_PIXEL);
+ const int bitmapByteCount = (bitmapBytesPerRow * height);
+
+ // Create an RGB color space.
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ if (colorSpace == NULL)
+ return;
+
+ // Create the bitmap.
+ bitmapData = new uint8_t[bitmapByteCount];
+ if (bitmapData != NULL)
+ {
+ // create the context
+ gc = CGBitmapContextCreate(bitmapData,
+ width,
+ height,
+ BITS_PER_COMPONENT,
+ bitmapBytesPerRow,
+ colorSpace,
+ kCGImageAlphaPremultipliedLast);
+
+ if (gc == NULL)
+ {
+ // the context couldn't be created for some reason,
+ // and we have no use for the bitmap without the context
+ delete[] bitmapData;
+ bitmapData = NULL;
+ }
+ textLayout->setContext (gc);
+ }
+
+ // the context retains the color space, so we can release it
+ CGColorSpaceRelease(colorSpace);
+
+ if (gc != NULL && bitmapData != NULL)
+ {
+ // "Erase" to white.
+ CGContextClearRect( gc, CGRectMake( 0, 0, width, height ) );
+ CGContextSetRGBFillColor( gc, 1.0, 1.0, 1.0, 1.0 );
+ CGContextFillRect( gc, CGRectMake( 0, 0, width, height ) );
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::PenColour(ColourAllocated fore)
+{
+ if (gc)
+ {
+ ColourDesired colour(fore.AsLong());
+
+ // Set the Stroke color to match
+ CGContextSetRGBStrokeColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
+ colour.GetBlue() / 255.0, 1.0 );
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::FillColour(const ColourAllocated& back)
+{
+ if (gc)
+ {
+ ColourDesired colour(back.AsLong());
+
+ // Set the Fill color to match
+ CGContextSetRGBFillColor(gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0,
+ colour.GetBlue() / 255.0, 1.0 );
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+CGImageRef SurfaceImpl::GetImage()
+{
+ // For now, assume that GetImage can only be called on PixMap surfaces.
+ if (bitmapData == NULL)
+ return NULL;
+
+ CGContextFlush(gc);
+
+ // Create an RGB color space.
+ CGColorSpaceRef colorSpace = CGColorSpaceCreateDeviceRGB();
+ if( colorSpace == NULL )
+ return NULL;
+
+ const int bitmapBytesPerRow = ((int) bitmapWidth * BYTES_PER_PIXEL);
+ const int bitmapByteCount = (bitmapBytesPerRow * (int) bitmapHeight);
+
+ // Create a data provider.
+ CGDataProviderRef dataProvider = CGDataProviderCreateWithData(NULL, bitmapData, bitmapByteCount,
+ NULL);
+ CGImageRef image = NULL;
+ if (dataProvider != NULL)
+ {
+ // Create the CGImage.
+ image = CGImageCreate(bitmapWidth,
+ bitmapHeight,
+ BITS_PER_COMPONENT,
+ BITS_PER_PIXEL,
+ bitmapBytesPerRow,
+ colorSpace,
+ kCGImageAlphaPremultipliedLast,
+ dataProvider,
+ NULL,
+ 0,
+ kCGRenderingIntentDefault);
+ }
+
+ // The image retains the color space, so we can release it.
+ CGColorSpaceRelease(colorSpace);
+ colorSpace = NULL;
+
+ // Done with the data provider.
+ CGDataProviderRelease(dataProvider);
+ dataProvider = NULL;
+
+ return image;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Returns the vertical logical device resolution of the main monitor.
+ */
+int SurfaceImpl::LogPixelsY()
+{
+ NSSize deviceResolution = [[[[NSScreen mainScreen] deviceDescription]
+ objectForKey: NSDeviceResolution] sizeValue];
+ return (int) deviceResolution.height;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Converts the logical font height (in dpi) into a pixel height for the current main screen.
+ */
+int SurfaceImpl::DeviceHeightFont(int points)
+{
+ int logPix = LogPixelsY();
+ return (points * logPix + logPix / 2) / 72;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::MoveTo(int x_, int y_)
+{
+ x = x_;
+ y = y_;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::LineTo(int x_, int y_)
+{
+ CGContextBeginPath( gc );
+
+ // Because Quartz is based on floating point, lines are drawn with half their colour
+ // on each side of the line. Integer coordinates specify the INTERSECTION of the pixel
+ // divison lines. If you specify exact pixel values, you get a line that
+ // is twice as thick but half as intense. To get pixel aligned rendering,
+ // we render the "middle" of the pixels by adding 0.5 to the coordinates.
+ CGContextMoveToPoint( gc, x + 0.5, y + 0.5 );
+ CGContextAddLineToPoint( gc, x_ + 0.5, y_ + 0.5 );
+ CGContextStrokePath( gc );
+ x = x_;
+ y = y_;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::Polygon(Scintilla::Point *pts, int npts, ColourAllocated fore,
+ ColourAllocated back)
+{
+ // Allocate memory for the array of points.
+ CGPoint *points = new CGPoint[npts];
+
+ for (int i = 0;i < npts;i++)
+ {
+ // Quartz floating point issues: plot the MIDDLE of the pixels
+ points[i].x = pts[i].x + 0.5;
+ points[i].y = pts[i].y + 0.5;
+ }
+
+ CGContextBeginPath(gc);
+
+ // Set colours
+ FillColour(back);
+ PenColour(fore);
+
+ // Draw the polygon
+ CGContextAddLines(gc, points, npts);
+
+ // TODO: Should the path be automatically closed, or is that the caller's responsability?
+ // Explicitly close the path, so it is closed for stroking AND filling (implicit close = filling only)
+ CGContextClosePath( gc );
+ CGContextDrawPath( gc, kCGPathFillStroke );
+
+ // Deallocate memory.
+ delete points;
+ points = NULL;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back)
+{
+ if (gc)
+ {
+ CGContextBeginPath( gc );
+ FillColour(back);
+ PenColour(fore);
+
+ // Quartz integer -> float point conversion fun (see comment in SurfaceImpl::LineTo)
+ // We subtract 1 from the Width() and Height() so that all our drawing is within the area defined
+ // by the PRectangle. Otherwise, we draw one pixel too far to the right and bottom.
+ // TODO: Create some version of PRectangleToCGRect to do this conversion for us?
+ CGContextAddRect( gc, CGRectMake( rc.left + 0.5, rc.top + 0.5, rc.Width() - 1, rc.Height() - 1 ) );
+ CGContextDrawPath( gc, kCGPathFillStroke );
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::FillRectangle(PRectangle rc, ColourAllocated back)
+{
+ if (gc)
+ {
+ FillColour(back);
+ CGRect rect = PRectangleToCGRect(rc);
+ CGContextFillRect(gc, rect);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void drawImageRefCallback(CGImageRef pattern, CGContextRef gc)
+{
+ CGContextDrawImage(gc, CGRectMake(0, 0, CGImageGetWidth(pattern), CGImageGetHeight(pattern)), pattern);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::FillRectangle(PRectangle rc, Surface &surfacePattern)
+{
+ SurfaceImpl& patternSurface = static_cast<SurfaceImpl &>(surfacePattern);
+
+ // For now, assume that copy can only be called on PixMap surfaces. Shows up black.
+ CGImageRef image = patternSurface.GetImage();
+ if (image == NULL)
+ {
+ FillRectangle(rc, ColourAllocated(0));
+ return;
+ }
+
+ const CGPatternCallbacks drawImageCallbacks = { 0,
+ reinterpret_cast<CGPatternDrawPatternCallback>(drawImageRefCallback), NULL };
+
+ CGPatternRef pattern = CGPatternCreate(image,
+ CGRectMake(0, 0, patternSurface.bitmapWidth, patternSurface.bitmapHeight),
+ CGAffineTransformIdentity,
+ patternSurface.bitmapWidth,
+ patternSurface.bitmapHeight,
+ kCGPatternTilingNoDistortion,
+ true,
+ &drawImageCallbacks
+ );
+ if (pattern != NULL)
+ {
+ // Create a pattern color space
+ CGColorSpaceRef colorSpace = CGColorSpaceCreatePattern( NULL );
+ if( colorSpace != NULL ) {
+
+ CGContextSaveGState( gc );
+ CGContextSetFillColorSpace( gc, colorSpace );
+
+ // Unlike the documentation, you MUST pass in a "components" parameter:
+ // For coloured patterns it is the alpha value.
+ const float alpha = 1.0;
+ CGContextSetFillPattern( gc, pattern, &alpha );
+ CGContextFillRect( gc, PRectangleToCGRect( rc ) );
+ CGContextRestoreGState( gc );
+ // Free the color space, the pattern and image
+ CGColorSpaceRelease( colorSpace );
+ } /* colorSpace != NULL */
+ colorSpace = NULL;
+ CGPatternRelease( pattern );
+ pattern = NULL;
+ CGImageRelease( image );
+ image = NULL;
+ } /* pattern != NULL */
+}
+
+void SurfaceImpl::RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
+ // TODO: Look at the Win32 API to determine what this is supposed to do:
+ // ::RoundRect(hdc, rc.left + 1, rc.top, rc.right - 1, rc.bottom, 8, 8 );
+
+ // Create a rectangle with semicircles at the corners
+ const int MAX_RADIUS = 4;
+ int radius = Platform::Minimum( MAX_RADIUS, rc.Height()/2 );
+ radius = Platform::Minimum( radius, rc.Width()/2 );
+
+ // Points go clockwise, starting from just below the top left
+ // Corners are kept together, so we can easily create arcs to connect them
+ CGPoint corners[4][3] =
+ {
+ {
+ { rc.left, rc.top + radius },
+ { rc.left, rc.top },
+ { rc.left + radius, rc.top },
+ },
+ {
+ { rc.right - radius - 1, rc.top },
+ { rc.right - 1, rc.top },
+ { rc.right - 1, rc.top + radius },
+ },
+ {
+ { rc.right - 1, rc.bottom - radius - 1 },
+ { rc.right - 1, rc.bottom - 1 },
+ { rc.right - radius - 1, rc.bottom - 1 },
+ },
+ {
+ { rc.left + radius, rc.bottom - 1 },
+ { rc.left, rc.bottom - 1 },
+ { rc.left, rc.bottom - radius - 1 },
+ },
+ };
+
+ // Align the points in the middle of the pixels
+ // TODO: Should I include these +0.5 in the array creation code above?
+ for( int i = 0; i < 4*3; ++ i )
+ {
+ CGPoint* c = (CGPoint*) corners;
+ c[i].x += 0.5;
+ c[i].y += 0.5;
+ }
+
+ PenColour( fore );
+ FillColour( back );
+
+ // Move to the last point to begin the path
+ CGContextBeginPath( gc );
+ CGContextMoveToPoint( gc, corners[3][2].x, corners[3][2].y );
+
+ for ( int i = 0; i < 4; ++ i )
+ {
+ CGContextAddLineToPoint( gc, corners[i][0].x, corners[i][0].y );
+ CGContextAddArcToPoint( gc, corners[i][1].x, corners[i][1].y, corners[i][2].x, corners[i][2].y, radius );
+ }
+
+ // Close the path to enclose it for stroking and for filling, then draw it
+ CGContextClosePath( gc );
+ CGContextDrawPath( gc, kCGPathFillStroke );
+}
+
+void Scintilla::SurfaceImpl::AlphaRectangle(PRectangle rc, int /*cornerSize*/, ColourAllocated fill, int alphaFill,
+ ColourAllocated /*outline*/, int /*alphaOutline*/, int /*flags*/)
+{
+ if ( gc ) {
+ ColourDesired colour( fill.AsLong() );
+
+ // Set the Fill color to match
+ CGContextSetRGBFillColor( gc, colour.GetRed() / 255.0, colour.GetGreen() / 255.0, colour.GetBlue() / 255.0, alphaFill / 100.0 );
+ CGRect rect = PRectangleToCGRect( rc );
+ CGContextFillRect( gc, rect );
+ }
+}
+
+void SurfaceImpl::Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back) {
+ // Drawing an ellipse with bezier curves. Code modified from:
+ // http://www.codeguru.com/gdi/ellipse.shtml
+ // MAGICAL CONSTANT to map ellipse to beziers 2/3*(sqrt(2)-1)
+ const double EToBConst = 0.2761423749154;
+
+ CGSize offset = CGSizeMake((int)(rc.Width() * EToBConst), (int)(rc.Height() * EToBConst));
+ CGPoint centre = CGPointMake((rc.left + rc.right) / 2, (rc.top + rc.bottom) / 2);
+
+ // The control point array
+ CGPoint cCtlPt[13];
+
+ // Assign values to all the control points
+ cCtlPt[0].x =
+ cCtlPt[1].x =
+ cCtlPt[11].x =
+ cCtlPt[12].x = rc.left + 0.5;
+ cCtlPt[5].x =
+ cCtlPt[6].x =
+ cCtlPt[7].x = rc.right - 0.5;
+ cCtlPt[2].x =
+ cCtlPt[10].x = centre.x - offset.width + 0.5;
+ cCtlPt[4].x =
+ cCtlPt[8].x = centre.x + offset.width + 0.5;
+ cCtlPt[3].x =
+ cCtlPt[9].x = centre.x + 0.5;
+
+ cCtlPt[2].y =
+ cCtlPt[3].y =
+ cCtlPt[4].y = rc.top + 0.5;
+ cCtlPt[8].y =
+ cCtlPt[9].y =
+ cCtlPt[10].y = rc.bottom - 0.5;
+ cCtlPt[7].y =
+ cCtlPt[11].y = centre.y + offset.height + 0.5;
+ cCtlPt[1].y =
+ cCtlPt[5].y = centre.y - offset.height + 0.5;
+ cCtlPt[0].y =
+ cCtlPt[12].y =
+ cCtlPt[6].y = centre.y + 0.5;
+
+ FillColour(back);
+ PenColour(fore);
+
+ CGContextBeginPath( gc );
+ CGContextMoveToPoint( gc, cCtlPt[0].x, cCtlPt[0].y );
+
+ for ( int i = 1; i < 13; i += 3 )
+ {
+ CGContextAddCurveToPoint( gc, cCtlPt[i].x, cCtlPt[i].y, cCtlPt[i+1].x, cCtlPt[i+1].y, cCtlPt[i+2].x, cCtlPt[i+2].y );
+ }
+
+ // Close the path to enclose it for stroking and for filling, then draw it
+ CGContextClosePath( gc );
+ CGContextDrawPath( gc, kCGPathFillStroke );
+}
+
+void SurfaceImpl::CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect)
+{
+ SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);
+ CGImageRef image = source.GetImage();
+
+ CGRect src = PRectangleToCGRect(srcRect);
+ CGRect dst = PRectangleToCGRect(dstRect);
+
+ /* source from QuickDrawToQuartz2D.pdf on developer.apple.com */
+ float w = (float) CGImageGetWidth(image);
+ float h = (float) CGImageGetHeight(image);
+ CGRect drawRect = CGRectMake (0, 0, w, h);
+ if (!CGRectEqualToRect (src, dst))
+ {
+ float sx = CGRectGetWidth(dst) / CGRectGetWidth(src);
+ float sy = CGRectGetHeight(dst) / CGRectGetHeight(src);
+ float dx = CGRectGetMinX(dst) - (CGRectGetMinX(src) * sx);
+ float dy = CGRectGetMinY(dst) - (CGRectGetMinY(src) * sy);
+ drawRect = CGRectMake (dx, dy, w*sx, h*sy);
+ }
+ CGContextSaveGState (gc);
+ CGContextClipToRect (gc, dst);
+ CGContextDrawImage (gc, drawRect, image);
+ CGContextRestoreGState (gc);
+}
+
+void SurfaceImpl::Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource) {
+ // Maybe we have to make the Surface two contexts:
+ // a bitmap context which we do all the drawing on, and then a "real" context
+ // which we copy the output to when we call "Synchronize". Ugh! Gross and slow!
+
+ // For now, assume that copy can only be called on PixMap surfaces
+ SurfaceImpl& source = static_cast<SurfaceImpl &>(surfaceSource);
+
+ // Get the CGImageRef
+ CGImageRef image = source.GetImage();
+ // If we could not get an image reference, fill the rectangle black
+ if ( image == NULL )
+ {
+ FillRectangle( rc, ColourAllocated( 0 ) );
+ return;
+ }
+
+ // Now draw the image on the surface
+
+ // Some fancy clipping work is required here: draw only inside of rc
+ CGContextSaveGState( gc );
+ CGContextClipToRect( gc, PRectangleToCGRect( rc ) );
+
+ //Platform::DebugPrintf(stderr, "Copy: CGContextDrawImage: (%d, %d) - (%d X %d)\n", rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight );
+ CGContextDrawImage( gc, CGRectMake( rc.left - from.x, rc.top - from.y, source.bitmapWidth, source.bitmapHeight ), image );
+
+ // Undo the clipping fun
+ CGContextRestoreGState( gc );
+
+ // Done with the image
+ CGImageRelease( image );
+ image = NULL;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len,
+ ColourAllocated fore, ColourAllocated back)
+{
+ FillRectangle(rc, back);
+ DrawTextTransparent(rc, font_, ybase, s, len, fore);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len,
+ ColourAllocated fore, ColourAllocated back)
+{
+ CGContextSaveGState(gc);
+ CGContextClipToRect(gc, PRectangleToCGRect(rc));
+ DrawTextNoClip(rc, font_, ybase, s, len, fore, back);
+ CGContextRestoreGState(gc);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len,
+ ColourAllocated fore)
+{
+ textLayout->setText (reinterpret_cast<const UInt8*>(s), len, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
+
+ // The Quartz RGB fill color influences the ATSUI color
+ FillColour(fore);
+
+ // Draw text vertically flipped as OS X uses a coordinate system where +Y is upwards.
+ textLayout->draw(rc.left, ybase, true);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void SurfaceImpl::MeasureWidths(Font &font_, const char *s, int len, int *positions)
+{
+ // sample at http://developer.apple.com/samplecode/ATSUICurveAccessDemo/listing1.html
+ // sample includes use of ATSUGetGlyphInfo which would be better for older
+ // OSX systems. We should expand to using that on older systems as well.
+ for (int i = 0; i < len; i++)
+ positions [i] = 0;
+
+ // We need the right X coords, so we have to append a char to get the left coord of thast extra char
+ char* buf = (char*) malloc (len+1);
+ if (!buf)
+ return;
+
+ memcpy (buf, s, len);
+ buf [len] = '.';
+
+ textLayout->setText (reinterpret_cast<const UInt8*>(buf), len+1, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
+ ATSUGlyphInfoArray* theGlyphInfoArrayPtr;
+ ByteCount theArraySize;
+
+ // Get the GlyphInfoArray
+ ATSUTextLayout layout = textLayout->getLayout();
+ if ( noErr == ATSUGetGlyphInfo (layout, 0, textLayout->getLength(), &theArraySize, NULL))
+ {
+ theGlyphInfoArrayPtr = (ATSUGlyphInfoArray *) malloc (theArraySize + sizeof(ItemCount) + sizeof(ATSUTextLayout));
+ if (theGlyphInfoArrayPtr)
+ {
+ if (noErr == ATSUGetGlyphInfo (layout, 0, textLayout->getLength(), &theArraySize, theGlyphInfoArrayPtr))
+ {
+ // do not count the first item, which is at the beginning of the line
+ for ( UniCharCount unicodePosition = 1, i = 0; i < len && unicodePosition < theGlyphInfoArrayPtr->numGlyphs; unicodePosition ++ )
+ {
+ // The ideal position is the x coordinate of the glyph, relative to the beginning of the line
+ int position = (int)( theGlyphInfoArrayPtr->glyphs[unicodePosition].idealX + 0.5 ); // These older APIs return float values
+ unsigned char uch = s[i];
+ positions[i++] = position;
+
+ // If we are using unicode (UTF8), map the Unicode position back to the UTF8 characters,
+ // as 1 unicode character can map to multiple UTF8 characters.
+ // See: http://www.tbray.org/ongoing/When/200x/2003/04/26/UTF
+ // Or: http://www.cl.cam.ac.uk/~mgk25/unicode.html
+ if ( unicodeMode )
+ {
+ unsigned char mask = 0xc0;
+ int count = 1;
+ // Add one additonal byte for each extra high order one in the byte
+ while ( uch >= mask && count < 8 )
+ {
+ positions[i++] = position;
+ count ++;
+ mask = mask >> 1 | 0x80; // add an additional one in the highest order position
+ }
+ }
+ }
+ }
+
+ // Free the GlyphInfoArray
+ free (theGlyphInfoArrayPtr);
+ }
+ }
+ free (buf);
+}
+
+int SurfaceImpl::WidthText(Font &font_, const char *s, int len) {
+ if (font_.GetID())
+ {
+ textLayout->setText (reinterpret_cast<const UInt8*>(s), len, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
+
+ // TODO: Maybe I should add some sort of text measurement features to QuartzTextLayout?
+ unsigned long actualNumberOfBounds = 0;
+ ATSTrapezoid glyphBounds;
+
+ // We get a single bound, since the text should only require one. If it requires more, there is an issue
+ if ( ATSUGetGlyphBounds( textLayout->getLayout(), 0, 0, kATSUFromTextBeginning, kATSUToTextEnd, kATSUseDeviceOrigins, 1, &glyphBounds, &actualNumberOfBounds ) != noErr || actualNumberOfBounds != 1 )
+ {
+ Platform::DebugDisplay( "ATSUGetGlyphBounds failed in WidthText" );
+ return 0;
+ }
+
+ //Platform::DebugPrintf( "WidthText: \"%*s\" = %ld\n", len, s, Fix2Long( glyphBounds.upperRight.x - glyphBounds.upperLeft.x ) );
+ return Fix2Long( glyphBounds.upperRight.x - glyphBounds.upperLeft.x );
+ }
+ return 1;
+}
+
+int SurfaceImpl::WidthChar(Font &font_, char ch) {
+ char str[2] = { ch, '\0' };
+ if (font_.GetID())
+ {
+ textLayout->setText (reinterpret_cast<const UInt8*>(str), 1, *reinterpret_cast<QuartzTextStyle*>(font_.GetID()));
+
+ // TODO: Maybe I should add some sort of text measurement features to QuartzTextLayout?
+ unsigned long actualNumberOfBounds = 0;
+ ATSTrapezoid glyphBounds;
+
+ // We get a single bound, since the text should only require one. If it requires more, there is an issue
+ if ( ATSUGetGlyphBounds( textLayout->getLayout(), 0, 0, kATSUFromTextBeginning, kATSUToTextEnd, kATSUseDeviceOrigins, 1, &glyphBounds, &actualNumberOfBounds ) != noErr || actualNumberOfBounds != 1 )
+ {
+ Platform::DebugDisplay( "ATSUGetGlyphBounds failed in WidthChar" );
+ return 0;
+ }
+
+ return Fix2Long( glyphBounds.upperRight.x - glyphBounds.upperLeft.x );
+ }
+ else
+ return 1;
+}
+
+// Three possible strategies for determining ascent and descent of font:
+// 1) Call ATSUGetGlyphBounds with string containing all letters, numbers and punctuation.
+// 2) Use the ascent and descent fields of the font.
+// 3) Call ATSUGetGlyphBounds with string as 1 but also including accented capitals.
+// Smallest values given by 1 and largest by 3 with 2 in between.
+// Techniques 1 and 2 sometimes chop off extreme portions of ascenders and
+// descenders but are mostly OK except for accented characters which are
+// rarely used in code.
+
+// This string contains a good range of characters to test for size.
+const char sizeString[] = "`~!@#$%^&*()-_=+\\|[]{};:\"\'<,>.?/1234567890"
+"abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ";
+
+int SurfaceImpl::Ascent(Font &font_) {
+ if (!font_.GetID())
+ return 1;
+
+ ATSUTextMeasurement ascent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAttribute<ATSUTextMeasurement>( kATSUAscentTag );
+ return Fix2Long( ascent );
+}
+
+int SurfaceImpl::Descent(Font &font_) {
+ if (!font_.GetID())
+ return 1;
+
+ ATSUTextMeasurement descent = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAttribute<ATSUTextMeasurement>( kATSUDescentTag );
+ return Fix2Long( descent );
+}
+
+int SurfaceImpl::InternalLeading(Font &) {
+ // TODO: How do we get EM_Size?
+ // internal leading = ascent - descent - EM_size
+ return 0;
+}
+
+int SurfaceImpl::ExternalLeading(Font &font_) {
+ if (!font_.GetID())
+ return 1;
+
+ ATSUTextMeasurement lineGap = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getAttribute<ATSUTextMeasurement>( kATSULeadingTag );
+ return Fix2Long( lineGap );
+}
+
+int SurfaceImpl::Height(Font &font_) {
+ return Ascent(font_) + Descent(font_);
+}
+
+int SurfaceImpl::AverageCharWidth(Font &font_) {
+
+ if (!font_.GetID())
+ return 1;
+
+ const int sizeStringLength = (sizeof( sizeString ) / sizeof( sizeString[0] ) - 1);
+ int width = WidthText( font_, sizeString, sizeStringLength );
+
+ return (int) ((width / (float) sizeStringLength) + 0.5);
+
+ /*
+ ATSUStyle textStyle = reinterpret_cast<QuartzTextStyle*>( font_.GetID() )->getATSUStyle();
+ ATSUFontID fontID;
+
+ ByteCount actualSize = 0;
+ if ( ATSUGetAttribute( textStyle, kATSUFontTag, sizeof( fontID ), &fontID, &actualSize ) != noErr )
+ {
+ Platform::DebugDisplay( "ATSUGetAttribute failed" );
+ return 1;
+ }
+
+ ATSFontMetrics metrics;
+ memset( &metrics, 0, sizeof( metrics ) );
+ if ( ATSFontGetHorizontalMetrics( fontID, kATSOptionFlagsDefault, &metrics ) != noErr )
+ {
+ Platform::DebugDisplay( "ATSFontGetHorizontalMetrics failed in AverageCharWidth" );
+ return 1;
+ }
+
+ printf( "%f %f %f\n", metrics.avgAdvanceWidth * 32, metrics.ascent * 32, metrics.descent * 32 );
+
+ return (int) (metrics.avgAdvanceWidth + 0.5);*/
+}
+
+int SurfaceImpl::SetPalette(Scintilla::Palette *, bool) {
+ // Mac OS X is always true colour (I think) so this doesn't matter
+ return 0;
+}
+
+void SurfaceImpl::SetClip(PRectangle rc) {
+ CGContextClipToRect( gc, PRectangleToCGRect( rc ) );
+}
+
+void SurfaceImpl::FlushCachedState() {
+ CGContextSynchronize( gc );
+}
+
+void SurfaceImpl::SetUnicodeMode(bool unicodeMode_) {
+ unicodeMode = unicodeMode_;
+}
+
+void SurfaceImpl::SetDBCSMode(int codePage) {
+ // TODO: Implement this for code pages != UTF-8
+}
+
+Surface *Surface::Allocate()
+{
+ return new SurfaceImpl();
+}
+
+//----------------- Window -------------------------------------------------------------------------
+
+Window::~Window() {
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Window::Destroy()
+{
+ if (windowRef)
+ {
+ // not used
+ }
+ wid = 0;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool Window::HasFocus()
+{
+ NSView* container = reinterpret_cast<NSView*>(wid);
+ return [[container window] firstResponder] == container;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+PRectangle Window::GetPosition()
+{
+ NSRect rect= [reinterpret_cast<NSView*>(wid) frame];
+
+ return PRectangle(NSMinX(rect), NSMinY(rect), NSMaxX(rect), NSMaxY(rect));
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Window::SetPosition(PRectangle rc)
+{
+ // Moves this view inside the parent view
+ if ( wid )
+ {
+ // Set the frame on the view, the function handles the rest
+ // CGRect r = PRectangleToCGRect( rc );
+ // HIViewSetFrame( reinterpret_cast<HIViewRef>( wid ), &r );
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Window::SetPositionRelative(PRectangle rc, Window window) {
+ // // used to actually move child windows (ie. listbox/calltip) so we have to move
+ // // the window, not the hiview
+ // if (windowRef) {
+ // // we go through some contortions here to get an accurate location for our
+ // // child windows. This is necessary due to the multiple ways an embedding
+ // // app may be setup. See SciTest/main.c (GOOD && BAD) for test case.
+ // WindowRef relativeWindow = GetControlOwner(reinterpret_cast<HIViewRef>( window.GetID() ));
+ // WindowRef thisWindow = reinterpret_cast<WindowRef>( windowRef );
+ //
+ // Rect portBounds;
+ // ::GetWindowBounds(relativeWindow, kWindowStructureRgn, &portBounds);
+ // //fprintf(stderr, "portBounds %d %d %d %d\n", portBounds.left, portBounds.top, portBounds.right, portBounds.bottom);
+ // PRectangle hbounds = window.GetPosition();
+ // //fprintf(stderr, "hbounds %d %d %d %d\n", hbounds.left, hbounds.top, hbounds.right, hbounds.bottom);
+ // HIViewRef parent = HIViewGetSuperview(reinterpret_cast<HIViewRef>( window.GetID() ));
+ // Rect pbounds;
+ // GetControlBounds(parent, &pbounds);
+ // //fprintf(stderr, "pbounds %d %d %d %d\n", pbounds.left, pbounds.top, pbounds.right, pbounds.bottom);
+ //
+ // PRectangle bounds;
+ // bounds.top = portBounds.top + pbounds.top + hbounds.top + rc.top;
+ // bounds.bottom = bounds.top + rc.Height();
+ // bounds.left = portBounds.left + pbounds.left + hbounds.left + rc.left;
+ // bounds.right = bounds.left + rc.Width();
+ // //fprintf(stderr, "bounds %d %d %d %d\n", bounds.left, bounds.top, bounds.right, bounds.bottom);
+ //
+ // MoveWindow(thisWindow, bounds.left, bounds.top, false);
+ // SizeWindow(thisWindow, bounds.Width(), bounds.Height(), true);
+ //
+ // SetPosition(PRectangle(0,0,rc.Width(),rc.Height()));
+ // } else {
+ // SetPosition(rc);
+ // }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+PRectangle Window::GetClientPosition()
+{
+ // This means, in MacOS X terms, get the "frame bounds". Call GetPosition, just like on Win32.
+ return GetPosition();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Window::Show(bool show)
+{
+ // if ( wid ) {
+ // HIViewSetVisible( reinterpret_cast<HIViewRef>( wid ), show );
+ // }
+ // // this is necessary for calltip/listbox
+ // if (windowRef) {
+ // WindowRef thisWindow = reinterpret_cast<WindowRef>( windowRef );
+ // if (show) {
+ // ShowWindow( thisWindow );
+ // DrawControls( thisWindow );
+ // } else
+ // HideWindow( thisWindow );
+ // }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Invalidates the entire window (here an NSView) so it is completely redrawn.
+ */
+void Window::InvalidateAll()
+{
+ if (wid)
+ {
+ NSView* container = reinterpret_cast<NSView*>(wid);
+ container.needsDisplay = YES;
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Invalidates part of the window (here an NSView) so only this part redrawn.
+ */
+void Window::InvalidateRectangle(PRectangle rc)
+{
+ if (wid)
+ {
+ NSView* container = reinterpret_cast<NSView*>(wid);
+ [container setNeedsDisplayInRect: PRectangleToNSRect(rc)];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Window::SetFont(Font &)
+{
+ // TODO: Do I need to implement this? MSDN: specifies the font that a control is to use when drawing text.
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Converts the Scintilla cursor enum into an NSCursor and stores it in the associated NSView,
+ * which then will take care to set up a new mouse tracking rectangle.
+ */
+void Window::SetCursor(Cursor curs)
+{
+ if (wid)
+ {
+ InnerView* container = reinterpret_cast<InnerView*>(wid);
+ [container setCursor: curs];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Window::SetTitle(const char *s)
+{
+ // WindowRef window = GetControlOwner(reinterpret_cast<HIViewRef>( wid ));
+ // CFStringRef title = CFStringCreateWithCString(kCFAllocatorDefault, s, kCFStringEncodingMacRoman);
+ // SetWindowTitleWithCFString(window, title);
+ // CFRelease(title);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+PRectangle Window::GetMonitorRect(Point)
+{
+ return PRectangle();
+}
+
+//----------------- ListBox ------------------------------------------------------------------------
+
+ListBox::ListBox()
+{
+}
+
+//--------------------------------------------------------------------------------------------------
+
+ListBox::~ListBox()
+{
+}
+
+//--------------------------------------------------------------------------------------------------
+
+static const OSType scintillaListBoxType = 'sclb';
+
+enum {
+ kItemsPerContainer = 1,
+ kIconColumn = 'icon',
+ kTextColumn = 'text'
+};
+static SInt32 kScrollBarWidth = 0;
+
+class LineData {
+ int *types;
+ CFStringRef *strings;
+ int len;
+ int maximum;
+public:
+ LineData() :types(0), strings(0), len(0), maximum(0) {}
+ ~LineData() {
+ Clear();
+ }
+ void Clear() {
+ delete []types;
+ types = 0;
+ for (int i=0; i<maximum; i++) {
+ if (strings[i]) CFRelease(strings[i]);
+ }
+ delete []strings;
+ strings = 0;
+ len = 0;
+ maximum = 0;
+ }
+ void Add(int index, int type, CFStringRef str ) {
+ if (index >= maximum) {
+ if (index >= len) {
+ int lenNew = (index+1) * 2;
+ int *typesNew = new int[lenNew];
+ CFStringRef *stringsNew = new CFStringRef[lenNew];
+ for (int i=0; i<maximum; i++) {
+ typesNew[i] = types[i];
+ stringsNew[i] = strings[i];
+ }
+ delete []types;
+ delete []strings;
+ types = typesNew;
+ strings = stringsNew;
+ len = lenNew;
+ }
+ while (maximum < index) {
+ types[maximum] = 0;
+ strings[maximum] = 0;
+ maximum++;
+ }
+ }
+ types[index] = type;
+ strings[index] = str;
+ if (index == maximum) {
+ maximum++;
+ }
+ }
+ int GetType(int index) {
+ if (index < maximum) {
+ return types[index];
+ } else {
+ return 0;
+ }
+ }
+ CFStringRef GetString(int index) {
+ if (index < maximum) {
+ return strings[index];
+ } else {
+ return 0;
+ }
+ }
+};
+
+//----------------- ListBoxImpl --------------------------------------------------------------------
+
+class ListBoxImpl : public ListBox
+{
+private:
+ ControlRef lb;
+ XPMSet xset;
+ int lineHeight;
+ bool unicodeMode;
+ int desiredVisibleRows;
+ unsigned int maxItemWidth;
+ unsigned int aveCharWidth;
+ Font font;
+ int maxWidth;
+
+ void InstallDataBrowserCustomCallbacks();
+ void ConfigureDataBrowser();
+
+ static pascal OSStatus WindowEventHandler(EventHandlerCallRef inCallRef,
+ EventRef inEvent,
+ void *inUserData );
+ EventHandlerRef eventHandler;
+
+protected:
+ WindowRef windowRef;
+
+public:
+ LineData ld;
+ CallBackAction doubleClickAction;
+ void *doubleClickActionData;
+
+ ListBoxImpl() : lb(NULL), lineHeight(10), unicodeMode(false),
+ desiredVisibleRows(5), maxItemWidth(0), aveCharWidth(8),
+ doubleClickAction(NULL), doubleClickActionData(NULL)
+ {
+ if (kScrollBarWidth == 0)
+ ;//GetThemeMetric(kThemeMetricScrollBarWidth, &kScrollBarWidth);
+ }
+
+ ~ListBoxImpl() {};
+ void SetFont(Font &font);
+ void Create(Window &parent, int ctrlID, Scintilla::Point pt, int lineHeight_, bool unicodeMode_);
+ void SetAverageCharWidth(int width);
+ void SetVisibleRows(int rows);
+ int GetVisibleRows() const;
+ PRectangle GetDesiredRect();
+ int CaretFromEdge();
+ void Clear();
+ void Append(char *s, int type = -1);
+ int Length();
+ void Select(int n);
+ int GetSelection();
+ int Find(const char *prefix);
+ void GetValue(int n, char *value, int len);
+ void Sort();
+ void RegisterImage(int type, const char *xpm_data);
+ void ClearRegisteredImages();
+ void SetDoubleClickAction(CallBackAction action, void *data) {
+ doubleClickAction = action;
+ doubleClickActionData = data;
+ }
+
+ int IconWidth();
+ void ShowHideScrollbar();
+#ifdef DB_TABLE_ROW_HEIGHT
+ void SetRowHeight(DataBrowserItemID itemID);
+#endif
+
+ void DrawRow(DataBrowserItemID item,
+ DataBrowserPropertyID property,
+ DataBrowserItemState itemState,
+ const Rect *theRect);
+
+ void SetList(const char* list, char separator, char typesep);
+};
+
+ListBox *ListBox::Allocate() {
+ ListBoxImpl *lb = new ListBoxImpl();
+ return lb;
+}
+
+void ListBoxImpl::Create(Window &/*parent*/, int /*ctrlID*/, Scintilla::Point /*pt*/,
+ int lineHeight_, bool unicodeMode_) {
+ lineHeight = lineHeight_;
+ unicodeMode = unicodeMode_;
+ maxWidth = 2000;
+
+ //WindowClass windowClass = kHelpWindowClass;
+ //WindowAttributes attributes = kWindowNoAttributes;
+ Rect contentBounds;
+ WindowRef outWindow;
+
+ contentBounds.top = contentBounds.left = 0;
+ contentBounds.right = 100;
+ contentBounds.bottom = lineHeight * desiredVisibleRows;
+
+ //CreateNewWindow(windowClass, attributes, &contentBounds, &outWindow);
+
+ //InstallStandardEventHandler(GetWindowEventTarget(outWindow));
+
+ //ControlRef root;
+ //CreateRootControl(outWindow, &root);
+
+ //CreateDataBrowserControl(outWindow, &contentBounds, kDataBrowserListView, &lb);
+
+#ifdef DB_TABLE_ROW_HEIGHT
+ // TODO: does not seem to have any effect
+ //SetDataBrowserTableViewRowHeight(lb, lineHeight);
+#endif
+
+ // get rid of the frame, forces databrowser to the full size
+ // of the window
+ //Boolean frameAndFocus = false;
+ //SetControlData(lb, kControlNoPart, kControlDataBrowserIncludesFrameAndFocusTag,
+ // sizeof(frameAndFocus), &frameAndFocus);
+
+ //ListBoxImpl* lbThis = this;
+ //SetControlProperty( lb, scintillaListBoxType, 0, sizeof( this ), &lbThis );
+
+ ConfigureDataBrowser();
+ InstallDataBrowserCustomCallbacks();
+
+ // install event handlers
+ /*
+ static const EventTypeSpec kWindowEvents[] =
+ {
+ { kEventClassMouse, kEventMouseDown },
+ { kEventClassMouse, kEventMouseMoved },
+ };
+ */
+
+ eventHandler = NULL;
+ //InstallWindowEventHandler( outWindow, WindowEventHandler,
+ // GetEventTypeCount( kWindowEvents ),
+ // kWindowEvents, this, &eventHandler );
+
+ wid = lb;
+ //SetControlVisibility(lb, true, true);
+ SetControl(lb);
+ SetWindow(outWindow);
+}
+
+pascal OSStatus ListBoxImpl::WindowEventHandler(
+ EventHandlerCallRef inCallRef,
+ EventRef inEvent,
+ void* inUserData )
+{
+
+ switch (kEventClassMouse /* GetEventClass(inEvent) */) {
+ case kEventClassMouse:
+ switch (kEventMouseDown /* GetEventKind(inEvent) */ )
+ {
+ case kEventMouseMoved:
+ {
+ //SetThemeCursor( kThemeArrowCursor );
+ break;
+ }
+ case kEventMouseDown:
+ {
+ // we cannot handle the double click from the databrowser notify callback as
+ // calling doubleClickAction causes the listbox to be destroyed. It is
+ // safe to do it from this event handler since the destroy event will be queued
+ // until we're done here.
+ /*
+ TCarbonEvent event( inEvent );
+ EventMouseButton inMouseButton;
+ event.GetParameter<EventMouseButton>( kEventParamMouseButton, typeMouseButton, &inMouseButton );
+
+ UInt32 inClickCount;
+ event.GetParameter( kEventParamClickCount, &inClickCount );
+ if (inMouseButton == kEventMouseButtonPrimary && inClickCount == 2) {
+ // handle our single mouse click now
+ ListBoxImpl* listbox = reinterpret_cast<ListBoxImpl*>( inUserData );
+ const WindowRef window = GetControlOwner(listbox->lb);
+ const HIViewRef rootView = HIViewGetRoot( window );
+ HIViewRef targetView = NULL;
+ HIViewGetViewForMouseEvent( rootView, inEvent, &targetView );
+ if ( targetView == listbox->lb )
+ {
+ if (listbox->doubleClickAction != NULL) {
+ listbox->doubleClickAction(listbox->doubleClickActionData);
+ }
+ }
+ }
+ */
+ }
+ }
+ }
+ return eventNotHandledErr;
+}
+
+#ifdef DB_TABLE_ROW_HEIGHT
+void ListBoxImpl::SetRowHeight(DataBrowserItemID itemID)
+{
+ // XXX does not seem to have any effect
+ //SetDataBrowserTableViewItemRowHeight(lb, itemID, lineHeight);
+}
+#endif
+
+void ListBoxImpl::DrawRow(DataBrowserItemID item,
+ DataBrowserPropertyID property,
+ DataBrowserItemState itemState,
+ const Rect *theRect)
+{
+ Rect row = *theRect;
+ row.left = 0;
+
+ ColourPair fore;
+
+ if (itemState == kDataBrowserItemIsSelected) {
+ long systemVersion;
+ Gestalt( gestaltSystemVersion, &systemVersion );
+ // Panther DB starts using kThemeBrushSecondaryHighlightColor for inactive browser hilighting
+ if ( (systemVersion >= 0x00001030) )//&& (IsControlActive( lb ) == false) )
+ ;//SetThemePen( kThemeBrushSecondaryHighlightColor, 32, true );
+ else
+ ; //SetThemePen( kThemeBrushAlternatePrimaryHighlightColor, 32, true );
+
+ PaintRect(&row);
+ fore = ColourDesired(0xff,0xff,0xff);
+ }
+
+ int widthPix = xset.GetWidth() + 2;
+ int pixId = ld.GetType(item - 1);
+ XPM *pxpm = xset.Get(pixId);
+
+ char s[255];
+ GetValue(item - 1, s, 255);
+
+ Surface *surfaceItem = Surface::Allocate();
+ if (surfaceItem) {
+ CGContextRef cgContext;
+ GrafPtr port;
+ Rect bounds;
+
+ //GetControlBounds(lb, &bounds);
+ GetPort( &port );
+ QDBeginCGContext( port, &cgContext );
+
+ CGContextSaveGState( cgContext );
+ CGContextTranslateCTM(cgContext, 0, bounds.bottom - bounds.top);
+ CGContextScaleCTM(cgContext, 1.0, -1.0);
+
+ surfaceItem->Init(cgContext, NULL);
+
+ int left = row.left;
+ if (pxpm) {
+ PRectangle rc(left + 1, row.top,
+ left + 1 + widthPix, row.bottom);
+ pxpm->Draw(surfaceItem, rc);
+ }
+
+ // draw the text
+ PRectangle trc(left + 2 + widthPix, row.top, row.right, row.bottom);
+ int ascent = surfaceItem->Ascent(font) - surfaceItem->InternalLeading(font);
+ int ytext = trc.top + ascent + 1;
+ trc.bottom = ytext + surfaceItem->Descent(font) + 1;
+ surfaceItem->DrawTextTransparent( trc, font, ytext, s, strlen(s), fore.allocated );
+
+ CGContextRestoreGState( cgContext );
+ QDEndCGContext( port, &cgContext );
+ delete surfaceItem;
+ }
+}
+
+
+pascal void ListBoxDrawItemCallback(ControlRef browser, DataBrowserItemID item,
+ DataBrowserPropertyID property,
+ DataBrowserItemState itemState,
+ const Rect *theRect, SInt16 gdDepth,
+ Boolean colorDevice)
+{
+ if (property != kIconColumn) return;
+ ListBoxImpl* lbThis = NULL;
+ //OSStatus err;
+ //err = GetControlProperty( browser, scintillaListBoxType, 0, sizeof( lbThis ), NULL, &lbThis );
+ // adjust our rect
+ lbThis->DrawRow(item, property, itemState, theRect);
+
+}
+
+void ListBoxImpl::ConfigureDataBrowser()
+{
+ DataBrowserViewStyle viewStyle;
+ //DataBrowserSelectionFlags selectionFlags;
+ //GetDataBrowserViewStyle(lb, &viewStyle);
+
+ //SetDataBrowserHasScrollBars(lb, false, true);
+ //SetDataBrowserListViewHeaderBtnHeight(lb, 0);
+ //GetDataBrowserSelectionFlags(lb, &selectionFlags);
+ //SetDataBrowserSelectionFlags(lb, selectionFlags |= kDataBrowserSelectOnlyOne);
+ // if you change the hilite style, also change the style in ListBoxDrawItemCallback
+ //SetDataBrowserTableViewHiliteStyle(lb, kDataBrowserTableViewFillHilite);
+
+ Rect insetRect;
+ //GetDataBrowserScrollBarInset(lb, &insetRect);
+
+ insetRect.right = kScrollBarWidth - 1;
+ //SetDataBrowserScrollBarInset(lb, &insetRect);
+
+ switch (viewStyle)
+ {
+ case kDataBrowserListView:
+ {
+ DataBrowserListViewColumnDesc iconCol;
+ iconCol.headerBtnDesc.version = kDataBrowserListViewLatestHeaderDesc;
+ iconCol.headerBtnDesc.minimumWidth = 0;
+ iconCol.headerBtnDesc.maximumWidth = maxWidth;
+ iconCol.headerBtnDesc.titleOffset = 0;
+ iconCol.headerBtnDesc.titleString = NULL;
+ iconCol.headerBtnDesc.initialOrder = kDataBrowserOrderIncreasing;
+
+ iconCol.headerBtnDesc.btnFontStyle.flags = kControlUseJustMask;
+ iconCol.headerBtnDesc.btnFontStyle.just = teFlushLeft;
+
+ iconCol.headerBtnDesc.btnContentInfo.contentType = kControlContentTextOnly;
+
+ iconCol.propertyDesc.propertyID = kIconColumn;
+ iconCol.propertyDesc.propertyType = kDataBrowserCustomType;
+ iconCol.propertyDesc.propertyFlags = kDataBrowserListViewSelectionColumn;
+
+ //AddDataBrowserListViewColumn(lb, &iconCol, kDataBrowserListViewAppendColumn);
+ } break;
+
+ }
+}
+
+void ListBoxImpl::InstallDataBrowserCustomCallbacks()
+{
+ /*
+ DataBrowserCustomCallbacks callbacks;
+
+ callbacks.version = kDataBrowserLatestCustomCallbacks;
+ verify_noerr(InitDataBrowserCustomCallbacks(&callbacks));
+ callbacks.u.v1.drawItemCallback = NewDataBrowserDrawItemUPP(ListBoxDrawItemCallback);
+ callbacks.u.v1.hitTestCallback = NULL;//NewDataBrowserHitTestUPP(ListBoxHitTestCallback);
+ callbacks.u.v1.trackingCallback = NULL;//NewDataBrowserTrackingUPP(ListBoxTrackingCallback);
+ callbacks.u.v1.editTextCallback = NULL;
+ callbacks.u.v1.dragRegionCallback = NULL;
+ callbacks.u.v1.acceptDragCallback = NULL;
+ callbacks.u.v1.receiveDragCallback = NULL;
+
+ SetDataBrowserCustomCallbacks(lb, &callbacks);
+ */
+}
+
+void ListBoxImpl::SetFont(Font &font_) {
+ // Having to do this conversion is LAME
+ QuartzTextStyle *ts = reinterpret_cast<QuartzTextStyle*>( font_.GetID() );
+ ControlFontStyleRec style;
+ ATSUAttributeValuePtr value;
+ ATSUFontID fontID;
+ style.flags = kControlUseFontMask | kControlUseSizeMask | kControlAddToMetaFontMask;
+ ts->getAttribute( kATSUFontTag, sizeof(fontID), &fontID, NULL );
+ ATSUFontIDtoFOND(fontID, &style.font, NULL);
+ ts->getAttribute( kATSUSizeTag, sizeof(Fixed), &value, NULL );
+ style.size = ((SInt16)FixRound((SInt32)value));
+ //SetControlFontStyle(lb, &style);
+
+#ifdef DB_TABLE_ROW_HEIGHT
+ // XXX this doesn't *stick*
+ ATSUTextMeasurement ascent = ts->getAttribute<ATSUTextMeasurement>( kATSUAscentTag );
+ ATSUTextMeasurement descent = ts->getAttribute<ATSUTextMeasurement>( kATSUDescentTag );
+ lineHeight = Fix2Long( ascent ) + Fix2Long( descent );
+ //SetDataBrowserTableViewRowHeight(lb, lineHeight + lineLeading);
+#endif
+
+ // !@&^#%$ we cant copy Font, but we need one for our custom drawing
+ Str255 fontName255;
+ char fontName[256];
+ FMGetFontFamilyName(style.font, fontName255);
+
+ CFStringRef fontNameCF = ::CFStringCreateWithPascalString( kCFAllocatorDefault, fontName255, kCFStringEncodingMacRoman );
+ ::CFStringGetCString( fontNameCF, fontName, (CFIndex)255, kCFStringEncodingMacRoman );
+
+ font.Create((const char *)fontName, 0, style.size, false, false);
+}
+
+void ListBoxImpl::SetAverageCharWidth(int width) {
+ aveCharWidth = width;
+}
+
+void ListBoxImpl::SetVisibleRows(int rows) {
+ desiredVisibleRows = rows;
+}
+
+int ListBoxImpl::GetVisibleRows() const {
+ // XXX Windows & GTK do this, but it seems incorrect to me. Other logic
+ // to do with visible rows is essentially the same across platforms.
+ return desiredVisibleRows;
+ /*
+ // This would be more correct
+ int rows = Length();
+ if ((rows == 0) || (rows > desiredVisibleRows))
+ rows = desiredVisibleRows;
+ return rows;
+ */
+}
+
+PRectangle ListBoxImpl::GetDesiredRect() {
+ PRectangle rcDesired = GetPosition();
+
+ // XXX because setting the line height on the table doesnt
+ // *stick*, we'll have to suffer and just use whatever
+ // the table desides is the correct height.
+ UInt16 itemHeight;// = lineHeight;
+ //GetDataBrowserTableViewRowHeight(lb, &itemHeight);
+
+ int rows = Length();
+ if ((rows == 0) || (rows > desiredVisibleRows))
+ rows = desiredVisibleRows;
+
+ rcDesired.bottom = itemHeight * rows;
+ rcDesired.right = rcDesired.left + maxItemWidth + aveCharWidth;
+
+ if (Length() > rows)
+ rcDesired.right += kScrollBarWidth;
+ rcDesired.right += IconWidth();
+
+ // Set the column width
+ //SetDataBrowserTableViewColumnWidth (lb, UInt16 (rcDesired.right - rcDesired.left));
+ return rcDesired;
+}
+
+void ListBoxImpl::ShowHideScrollbar() {
+ int rows = Length();
+ if (rows > desiredVisibleRows) {
+ //SetDataBrowserHasScrollBars(lb, false, true);
+ } else {
+ //SetDataBrowserHasScrollBars(lb, false, false);
+ }
+}
+
+int ListBoxImpl::IconWidth() {
+ return xset.GetWidth() + 2;
+}
+
+int ListBoxImpl::CaretFromEdge() {
+ return 0;
+}
+
+void ListBoxImpl::Clear() {
+ // passing NULL to "items" arg 4 clears the list
+ maxItemWidth = 0;
+ ld.Clear();
+ //AddDataBrowserItems (lb, kDataBrowserNoItem, 0, NULL, kDataBrowserItemNoProperty);
+}
+
+void ListBoxImpl::Append(char *s, int type) {
+ int count = Length();
+ CFStringRef r = CFStringCreateWithCString(NULL, s, kTextEncodingMacRoman);
+ ld.Add(count, type, r);
+
+ Scintilla::SurfaceImpl surface;
+ unsigned int width = surface.WidthText (font, s, strlen (s));
+ if (width > maxItemWidth)
+ maxItemWidth = width;
+
+ DataBrowserItemID items[1];
+ items[0] = count + 1;
+ //AddDataBrowserItems (lb, kDataBrowserNoItem, 1, items, kDataBrowserItemNoProperty);
+ ShowHideScrollbar();
+}
+
+void ListBoxImpl::SetList(const char* list, char separator, char typesep) {
+ // XXX copied from PlatGTK, should be in base class
+ Clear();
+ int count = strlen(list) + 1;
+ char *words = new char[count];
+ if (words) {
+ memcpy(words, list, count);
+ char *startword = words;
+ char *numword = NULL;
+ int i = 0;
+ for (; words[i]; i++) {
+ if (words[i] == separator) {
+ words[i] = '\0';
+ if (numword)
+ *numword = '\0';
+ Append(startword, numword?atoi(numword + 1):-1);
+ startword = words + i + 1;
+ numword = NULL;
+ } else if (words[i] == typesep) {
+ numword = words + i;
+ }
+ }
+ if (startword) {
+ if (numword)
+ *numword = '\0';
+ Append(startword, numword?atoi(numword + 1):-1);
+ }
+ delete []words;
+ }
+}
+
+int ListBoxImpl::Length() {
+ UInt32 numItems = 0;
+ //GetDataBrowserItemCount(lb, kDataBrowserNoItem, false, kDataBrowserItemAnyState, &numItems);
+ return (int)numItems;
+}
+
+void ListBoxImpl::Select(int n) {
+ DataBrowserItemID items[1];
+ items[0] = n + 1;
+ //SetDataBrowserSelectedItems(lb, 1, items, kDataBrowserItemsAssign);
+ //RevealDataBrowserItem(lb, items[0], kIconColumn, kDataBrowserRevealOnly);
+ // force update on selection
+ //Draw1Control(lb);
+}
+
+int ListBoxImpl::GetSelection() {
+ Handle selectedItems = NewHandle(0);
+ //GetDataBrowserItems(lb, kDataBrowserNoItem, true, kDataBrowserItemIsSelected, selectedItems);
+ UInt32 numSelectedItems = GetHandleSize(selectedItems)/sizeof(DataBrowserItemID);
+ if (numSelectedItems == 0) {
+ return -1;
+ }
+ HLock( selectedItems );
+ DataBrowserItemID *individualItem = (DataBrowserItemID*)( *selectedItems );
+ DataBrowserItemID selected[numSelectedItems];
+ selected[0] = *individualItem;
+ HUnlock( selectedItems );
+ return selected[0] - 1;
+}
+
+int ListBoxImpl::Find(const char *prefix) {
+ int count = Length();
+ char s[255];
+ for (int i = 0; i < count; i++) {
+ GetValue(i, s, 255);
+ if ((s[0] != '\0') && (0 == strncmp(prefix, s, strlen(prefix)))) {
+ return i;
+ }
+ }
+ return - 1;
+}
+
+void ListBoxImpl::GetValue(int n, char *value, int len) {
+ CFStringRef textString = ld.GetString(n);
+ if (textString == NULL) {
+ value[0] = '\0';
+ return;
+ }
+ CFIndex numUniChars = CFStringGetLength( textString );
+
+ // XXX how do we know the encoding of the listbox?
+ CFStringEncoding encoding = kCFStringEncodingUTF8; //( IsUnicodeMode() ? kCFStringEncodingUTF8 : kCFStringEncodingASCII);
+ CFIndex maximumByteLength = CFStringGetMaximumSizeForEncoding( numUniChars, encoding ) + 1;
+ char* text = new char[maximumByteLength];
+ CFIndex usedBufferLength = 0;
+ CFStringGetBytes( textString, CFRangeMake( 0, numUniChars ), encoding,
+ '?', false, reinterpret_cast<UInt8*>( text ),
+ maximumByteLength, &usedBufferLength );
+ text[usedBufferLength] = '\0'; // null terminate the ASCII/UTF8 string
+
+ if (text && len > 0) {
+ strncpy(value, text, len);
+ value[len - 1] = '\0';
+ } else {
+ value[0] = '\0';
+ }
+ delete text;
+}
+
+void ListBoxImpl::Sort() {
+ // TODO: Implement this
+ fprintf(stderr, "ListBox::Sort\n");
+}
+
+void ListBoxImpl::RegisterImage(int type, const char *xpm_data) {
+ xset.Add(type, xpm_data);
+}
+
+void ListBoxImpl::ClearRegisteredImages() {
+ xset.Clear();
+}
+
+//----------------- ScintillaContextMenu -----------------------------------------------------------
+
+@implementation ScintillaContextMenu : NSMenu
+
+// This NSMenu subclass serves also as target for menu commands and forwards them as
+// notfication messages to the front end.
+
+- (void) handleCommand: (NSMenuItem*) sender
+{
+ owner->HandleCommand([sender tag]);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) setOwner: (Scintilla::ScintillaCocoa*) newOwner
+{
+ owner = newOwner;
+}
+
+@end
+
+//----------------- Menu ---------------------------------------------------------------------------
+
+Menu::Menu()
+ : mid(0)
+{
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Menu::CreatePopUp()
+{
+ Destroy();
+ mid = [[ScintillaContextMenu alloc] initWithTitle: @""];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Menu::Destroy()
+{
+ ScintillaContextMenu* menu = reinterpret_cast<ScintillaContextMenu*>(mid);
+ [menu release];
+ mid = NULL;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Menu::Show(Point pt, Window &)
+{
+ // Cocoa menus are handled a bit differently. We only create the menu. The framework
+ // takes care to show it properly.
+}
+
+//----------------- ElapsedTime --------------------------------------------------------------------
+
+// TODO: Consider if I should be using GetCurrentEventTime instead of gettimeoday
+ElapsedTime::ElapsedTime() {
+ struct timeval curTime;
+ int retVal;
+ retVal = gettimeofday( &curTime, NULL );
+
+ bigBit = curTime.tv_sec;
+ littleBit = curTime.tv_usec;
+}
+
+double ElapsedTime::Duration(bool reset) {
+ struct timeval curTime;
+ int retVal;
+ retVal = gettimeofday( &curTime, NULL );
+ long endBigBit = curTime.tv_sec;
+ long endLittleBit = curTime.tv_usec;
+ double result = 1000000.0 * (endBigBit - bigBit);
+ result += endLittleBit - littleBit;
+ result /= 1000000.0;
+ if (reset) {
+ bigBit = endBigBit;
+ littleBit = endLittleBit;
+ }
+ return result;
+}
+
+//----------------- Platform -----------------------------------------------------------------------
+
+ColourDesired Platform::Chrome()
+{
+ return ColourDesired(0xE0, 0xE0, 0xE0);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+ColourDesired Platform::ChromeHighlight()
+{
+ return ColourDesired(0xFF, 0xFF, 0xFF);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Returns the currently set system font for the user.
+ */
+const char *Platform::DefaultFont()
+{
+ NSString* name = [[NSUserDefaults standardUserDefaults] stringForKey: @"NSFixedPitchFont"];
+ return [name UTF8String];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Returns the currently set system font size for the user.
+ */
+int Platform::DefaultFontSize()
+{
+ return [[NSUserDefaults standardUserDefaults] integerForKey: @"NSFixedPitchFontSize"];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Returns the time span in which two consequtive mouse clicks must occur to be considered as
+ * double click.
+ *
+ * @return
+ */
+unsigned int Platform::DoubleClickTime()
+{
+ float threshold = [[NSUserDefaults standardUserDefaults] floatForKey:
+ @"com.apple.mouse.doubleClickThreshold"];
+ if (threshold == 0)
+ threshold = 0.5;
+ return static_cast<unsigned int>(threshold / kEventDurationMillisecond);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool Platform::MouseButtonBounce()
+{
+ return false;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Helper method for the backend to reach through to the scintiall window.
+ */
+long Platform::SendScintilla(WindowID w, unsigned int msg, unsigned long wParam, long lParam)
+{
+ return scintilla_send_message(w, msg, wParam, lParam);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Helper method for the backend to reach through to the scintiall window.
+ */
+long Platform::SendScintillaPointer(WindowID w, unsigned int msg, unsigned long wParam, void *lParam)
+{
+ return scintilla_send_message(w, msg, wParam, (long) lParam);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool Platform::IsDBCSLeadByte(int codePage, char ch)
+{
+ // No support for DBCS.
+ return false;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+int Platform::DBCSCharLength(int codePage, const char* s)
+{
+ // No support for DBCS.
+ return 1;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+int Platform::DBCSCharMaxLength()
+{
+ // No support for DBCS.
+ return 2;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+int Platform::Minimum(int a, int b)
+{
+ return (a < b) ? a : b;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+int Platform::Maximum(int a, int b) {
+ return (a > b) ? a : b;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+//#define TRACE
+#ifdef TRACE
+
+void Platform::DebugDisplay(const char *s)
+{
+ fprintf( stderr, s );
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Platform::DebugPrintf(const char *format, ...)
+{
+ const int BUF_SIZE = 2000;
+ char buffer[BUF_SIZE];
+
+ va_list pArguments;
+ va_start(pArguments, format);
+ vsnprintf(buffer, BUF_SIZE, format, pArguments);
+ va_end(pArguments);
+ Platform::DebugDisplay(buffer);
+}
+
+#else
+
+void Platform::DebugDisplay(const char *) {}
+
+void Platform::DebugPrintf(const char *, ...) {}
+
+#endif
+
+//--------------------------------------------------------------------------------------------------
+
+static bool assertionPopUps = true;
+
+bool Platform::ShowAssertionPopUps(bool assertionPopUps_)
+{
+ bool ret = assertionPopUps;
+ assertionPopUps = assertionPopUps_;
+ return ret;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void Platform::Assert(const char *c, const char *file, int line)
+{
+ char buffer[2000];
+ sprintf(buffer, "Assertion [%s] failed at %s %d", c, file, line);
+ strcat(buffer, "\r\n");
+ Platform::DebugDisplay(buffer);
+#ifdef DEBUG
+ // Jump into debugger in assert on Mac (CL269835)
+ ::Debugger();
+#endif
+}
+
+//--------------------------------------------------------------------------------------------------
+
+int Platform::Clamp(int val, int minVal, int maxVal)
+{
+ if (val > maxVal)
+ val = maxVal;
+ if (val < minVal)
+ val = minVal;
+ return val;
+}
+
+//----------------- DynamicLibrary -----------------------------------------------------------------
+
+/**
+ * Implements the platform specific part of library loading.
+ *
+ * @param modulePath The path to the module to load.
+ * @return A library instance or NULL if the module could not be found or another problem occured.
+ */
+DynamicLibrary* DynamicLibrary::Load(const char* modulePath)
+{
+ return NULL;
+}
+
+//--------------------------------------------------------------------------------------------------
+
diff --git a/scintilla/cocoa/QuartzTextLayout.h b/scintilla/cocoa/QuartzTextLayout.h new file mode 100644 index 0000000..c032da9 --- /dev/null +++ b/scintilla/cocoa/QuartzTextLayout.h @@ -0,0 +1,141 @@ +/*
+ * QuartzTextLayout.h
+ *
+ * Original Code by Evan Jones on Wed Oct 02 2002.
+ * Contributors:
+ * Shane Caraveo, ActiveState
+ * Bernd Paradies, Adobe
+ *
+ */
+
+#ifndef _QUARTZ_TEXT_LAYOUT_H
+#define _QUARTZ_TEXT_LAYOUT_H
+
+#include <Cocoa/Cocoa.h>
+
+#include "QuartzTextStyle.h"
+
+class QuartzTextLayout
+{
+public:
+ /** Create a text layout for drawing on the specified context. */
+ QuartzTextLayout( CGContextRef context ) : layout( NULL ), unicode_string( NULL ), unicode_length( 0 )
+ {
+ OSStatus err = ATSUCreateTextLayout( &layout );
+ if (0 != err)
+ layout = NULL;
+
+ setContext(context);
+
+ ATSUAttributeTag tag = kATSULineLayoutOptionsTag;
+ ByteCount size = sizeof( ATSLineLayoutOptions );
+ ATSLineLayoutOptions rendering = kATSLineUseDeviceMetrics; //| kATSLineFractDisable | kATSLineUseQDRendering
+ ATSUAttributeValuePtr valuePtr = &rendering;
+ err = ATSUSetLayoutControls( layout, 1, &tag, &size, &valuePtr );
+ }
+
+ ~QuartzTextLayout()
+ {
+ if (NULL != layout)
+ ATSUDisposeTextLayout( layout );
+ layout = NULL;
+
+ if ( unicode_string != NULL )
+ {
+ delete[] unicode_string;
+ unicode_string = NULL;
+ unicode_length = 0;
+ }
+ }
+
+ /** Assign a string to the text layout object. */
+ // TODO: Create a UTF8 version
+ // TODO: Optimise the ASCII version by not copying so much
+ OSStatus setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding )
+ {
+ if (NULL == layout)
+ return -1;
+ CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );
+ if (!str)
+ return -1;
+
+ unicode_length = CFStringGetLength( str );
+ if (unicode_string)
+ delete[] unicode_string;
+ unicode_string = new UniChar[ unicode_length ];
+ CFStringGetCharacters( str, CFRangeMake( 0, unicode_length ), unicode_string );
+
+ CFRelease( str );
+ str = NULL;
+
+ OSStatus err;
+ err = ATSUSetTextPointerLocation( layout, unicode_string, kATSUFromTextBeginning, kATSUToTextEnd, unicode_length );
+ if( err != noErr ) return err;
+
+ // Turn on the default font fallbacks
+ return ATSUSetTransientFontMatching( layout, true );
+ }
+
+ inline void setText( const UInt8* buffer, size_t byteLength, const QuartzTextStyle& r )
+ {
+ this->setText( buffer, byteLength, kCFStringEncodingUTF8 );
+ ATSUSetRunStyle( layout, r.getATSUStyle(), 0, unicode_length );
+ }
+
+ /** Apply the specified text style on the entire range of text. */
+ void setStyle( const QuartzTextStyle& style )
+ {
+ ATSUSetRunStyle( layout, style.getATSUStyle(), kATSUFromTextBeginning, kATSUToTextEnd );
+ }
+
+ /** Draw the text layout into the current CGContext at the specified position, flipping the CGContext's Y axis if required.
+ * @param x The x axis position to draw the baseline in the current CGContext.
+ * @param y The y axis position to draw the baseline in the current CGContext.
+ * @param flipTextYAxis If true, the CGContext's Y axis will be flipped before drawing the text, and restored afterwards. Use this when drawing in an HIView's CGContext, where the origin is the top left corner. */
+ void draw( float x, float y, bool flipTextYAxis = false )
+ {
+ if (NULL == layout || 0 == unicode_length)
+ return;
+ if ( flipTextYAxis )
+ {
+ CGContextSaveGState( gc );
+ CGContextScaleCTM( gc, 1.0, -1.0 );
+ y = -y;
+ }
+
+ OSStatus err;
+ err = ATSUDrawText( layout, kATSUFromTextBeginning, kATSUToTextEnd, X2Fix( x ), X2Fix( y ) );
+
+ if ( flipTextYAxis ) CGContextRestoreGState( gc );
+ }
+
+ /** Sets a single text layout control on the ATSUTextLayout object.
+ * @param tag The control to set.
+ * @param size The size of the parameter pointed to by value.
+ * @param value A pointer to the new value for the control.
+ */
+ void setControl( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value )
+ {
+ ATSUSetLayoutControls( layout, 1, &tag, &size, &value );
+ }
+
+ ATSUTextLayout getLayout() {
+ return layout;
+ }
+
+ inline CFIndex getLength() const { return unicode_length; }
+ inline void setContext (CGContextRef context)
+ {
+ gc = context;
+ if (NULL != layout)
+ setControl( kATSUCGContextTag, sizeof( gc ), &gc );
+ }
+
+private:
+ ATSUTextLayout layout;
+ UniChar* unicode_string;
+ int unicode_length;
+ CGContextRef gc;
+};
+
+#endif
diff --git a/scintilla/cocoa/QuartzTextStyle.h b/scintilla/cocoa/QuartzTextStyle.h new file mode 100644 index 0000000..58f0849 --- /dev/null +++ b/scintilla/cocoa/QuartzTextStyle.h @@ -0,0 +1,90 @@ +/*
+ * QuartzTextStyle.h
+ *
+ * Created by Evan Jones on Wed Oct 02 2002.
+ *
+ */
+
+#ifndef _QUARTZ_TEXT_STYLE_H
+#define _QUARTZ_TEXT_STYLE_H
+
+#include "QuartzTextStyleAttribute.h"
+
+class QuartzTextStyle
+{
+public:
+ QuartzTextStyle()
+ {
+ ATSUCreateStyle( &style );
+ }
+
+ ~QuartzTextStyle()
+ {
+ if ( style != NULL )
+ ATSUDisposeStyle( style );
+ style = NULL;
+ }
+
+ void setAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value )
+ {
+ ATSUSetAttributes( style, 1, &tag, &size, &value );
+ }
+
+ void setAttribute( QuartzTextStyleAttribute& attribute )
+ {
+ setAttribute( attribute.getTag(), attribute.getSize(), attribute.getValuePtr() );
+ }
+
+ void getAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value, ByteCount* actualSize )
+ {
+ ATSUGetAttribute( style, tag, size, value, actualSize );
+ }
+
+ template <class T>
+ T getAttribute( ATSUAttributeTag tag )
+ {
+ T value;
+ ByteCount actualSize;
+ ATSUGetAttribute( style, tag, sizeof( T ), &value, &actualSize );
+ return value;
+ }
+
+ // TODO: Is calling this actually faster than calling setAttribute multiple times?
+ void setAttributes( QuartzTextStyleAttribute* attributes[], int number )
+ {
+ // Create the parallel arrays and initialize them properly
+ ATSUAttributeTag* tags = new ATSUAttributeTag[ number ];
+ ByteCount* sizes = new ByteCount[ number ];
+ ATSUAttributeValuePtr* values = new ATSUAttributeValuePtr[ number ];
+
+ for ( int i = 0; i < number; ++ i )
+ {
+ tags[i] = attributes[i]->getTag();
+ sizes[i] = attributes[i]->getSize();
+ values[i] = attributes[i]->getValuePtr();
+ }
+
+ ATSUSetAttributes( style, number, tags, sizes, values );
+
+ // Free the arrays that were allocated
+ delete[] tags;
+ delete[] sizes;
+ delete[] values;
+ }
+
+ void setFontFeature( ATSUFontFeatureType featureType, ATSUFontFeatureSelector selector )
+ {
+ ATSUSetFontFeatures( style, 1, &featureType, &selector );
+ }
+
+ const ATSUStyle& getATSUStyle() const
+ {
+ return style;
+ }
+
+private:
+ ATSUStyle style;
+};
+
+#endif
+
diff --git a/scintilla/cocoa/QuartzTextStyleAttribute.h b/scintilla/cocoa/QuartzTextStyleAttribute.h new file mode 100644 index 0000000..21f6abc --- /dev/null +++ b/scintilla/cocoa/QuartzTextStyleAttribute.h @@ -0,0 +1,142 @@ +/**
+ * QuartzTextStyleAttribute.h
+ *
+ * Original Code by Evan Jones on Wed Oct 02 2002.
+ * Contributors:
+ * Shane Caraveo, ActiveState
+ * Bernd Paradies, Adobe
+ *
+ */
+
+
+#ifndef _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
+#define _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
+
+class QuartzTextStyleAttribute
+{
+public:
+ QuartzTextStyleAttribute() {}
+ virtual ~QuartzTextStyleAttribute() {}
+ virtual ByteCount getSize() const = 0;
+ virtual ATSUAttributeValuePtr getValuePtr() = 0;
+ virtual ATSUAttributeTag getTag() const = 0;
+};
+
+class QuartzTextSize : public QuartzTextStyleAttribute
+{
+public:
+ QuartzTextSize( float points )
+ {
+ size = X2Fix( points );
+ }
+
+ ByteCount getSize() const
+ {
+ return sizeof( size );
+ }
+
+ ATSUAttributeValuePtr getValuePtr()
+ {
+ return &size;
+ }
+
+ ATSUAttributeTag getTag() const
+ {
+ return kATSUSizeTag;
+ }
+
+private:
+ Fixed size;
+};
+
+class QuartzTextStyleAttributeBoolean : public QuartzTextStyleAttribute
+{
+public:
+ QuartzTextStyleAttributeBoolean( bool newVal ) : value( newVal ) {}
+
+ ByteCount getSize() const
+ {
+ return sizeof( value );
+ }
+ ATSUAttributeValuePtr getValuePtr()
+ {
+ return &value;
+ }
+
+ virtual ATSUAttributeTag getTag() const = 0;
+
+private:
+ Boolean value;
+};
+
+class QuartzTextBold : public QuartzTextStyleAttributeBoolean
+{
+public:
+ QuartzTextBold( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
+ ATSUAttributeTag getTag() const
+ {
+ return kATSUQDBoldfaceTag;
+ }
+};
+
+class QuartzTextItalic : public QuartzTextStyleAttributeBoolean
+{
+public:
+ QuartzTextItalic( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
+ ATSUAttributeTag getTag() const
+ {
+ return kATSUQDItalicTag;
+ }
+};
+
+class QuartzTextUnderline : public QuartzTextStyleAttributeBoolean
+{
+public:
+ QuartzTextUnderline( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
+ ATSUAttributeTag getTag() const {
+ return kATSUQDUnderlineTag;
+ }
+};
+
+class QuartzFont : public QuartzTextStyleAttribute
+{
+public:
+ /** Create a font style from a name. */
+ QuartzFont( const char* name, int length )
+ {
+ assert( name != NULL && length > 0 && name[length] == '\0' );
+ // try to create font
+ OSStatus err = ATSUFindFontFromName( const_cast<char*>( name ), length, kFontFullName, (unsigned) kFontNoPlatform, kFontRomanScript, (unsigned) kFontNoLanguage, &fontid );
+
+ // need a fallback if font isn't installed
+ if( err != noErr || fontid == kATSUInvalidFontID )
+ ::ATSUFindFontFromName( "Lucida Grande", 13, kFontFullName, (unsigned) kFontNoPlatform, kFontRomanScript, (unsigned) kFontNoLanguage, &fontid );
+ }
+
+ ByteCount getSize() const
+ {
+ return sizeof( fontid );
+ }
+
+ ATSUAttributeValuePtr getValuePtr()
+ {
+ return &fontid;
+ }
+
+ ATSUAttributeTag getTag() const
+ {
+ return kATSUFontTag;
+ }
+
+ ATSUFontID getFontID() const
+ {
+ return fontid;
+ }
+
+private:
+ ATSUFontID fontid;
+};
+
+
+#endif
+
diff --git a/scintilla/cocoa/SciTest.mk b/scintilla/cocoa/SciTest.mk new file mode 100644 index 0000000..9023def --- /dev/null +++ b/scintilla/cocoa/SciTest.mk @@ -0,0 +1,54 @@ +### start defines ###
+NAME=Editor
+
+ARCH=-arch i386
+CC=gcc -x c++ $(ARCH)
+CO=gcc -x objective-c++ $(ARCH)
+LD=gcc $(ARCH) -framework Cocoa
+
+gDEFs=-DSCI_NAMESPACE -DSCI_LEXER
+
+INCS=-I../src/ -I../include/ -I.
+CCX=$(CC) $(gDEFs) $(INCS)
+CCO=$(CO) $(gDEFs) $(INCS)
+
+BLD=build/SciAppBuild
+TARG=$(APP)/Contents/MacOS/$(NAME)
+APP=$(BLD)/$(NAME).app
+
+all: $(BLD) $(TARG)
+
+clean:
+ -rm -rf $(BLD)
+
+$(APP):
+ -rm -rf $(APP)
+ -mkdir $(APP)
+ -mkdir $(APP)/Contents/
+ -mkdir $(APP)/Contents/Frameworks/
+ -mkdir $(APP)/Contents/MacOS/
+ -mkdir $(APP)/Contents/Resources/
+ -cp ScintillaTest/Info.plist $(APP)/Contents/Info.plist.bak
+ -sed "s/\$${EXECUTABLE_NAME}/$(NAME)/g" < $(APP)/Contents/Info.plist.bak > $(APP)/Contents/Info.plist.bak2
+ -sed "s/\$${PRODUCT_NAME}/$(NAME)/g" < $(APP)/Contents/Info.plist.bak2 > $(APP)/Contents/Info.plist
+ -rm $(APP)/Contents/Info.plist.bak $(APP)/Contents/Info.plist.bak2
+ -cp -r ScintillaTest/English.lproj $(APP)/Contents/Resources/
+ /Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text \
+ --compile $(APP)/Contents/Resources/English.lproj/MainMenu.nib ScintillaTest/English.lproj/MainMenu.xib
+ -cp ScintillaTest/TestData.sql $(APP)/Contents/Resources/
+ -make -f Framework.mk all
+
+$(TARG) : $(BLD)/main.o $(BLD)/AppController.o $(APP)
+ -cp -R build/framebuild/Sci.framework $(APP)/Contents/Frameworks/
+ $(LD) $(BLD)/main.o $(BLD)/AppController.o $(APP)/Contents/Frameworks/Sci.framework/Sci -o $(TARG) -lstdc++
+
+
+$(BLD) :
+ -mkdir build
+ -mkdir $(BLD)
+
+$(BLD)/%.o : ScintillaTest/%.mm
+ $(CCO) -c $< -o $@
+
+$(BLD)/%.o : ScintillaTest/%.m
+ $(CCO) -c $< -o $@
diff --git a/scintilla/cocoa/ScintillaCallTip.h b/scintilla/cocoa/ScintillaCallTip.h new file mode 100644 index 0000000..74c551a --- /dev/null +++ b/scintilla/cocoa/ScintillaCallTip.h @@ -0,0 +1,63 @@ +/*
+ * ScintillaMacOSX.h
+ * tutorial
+ *
+ * Created by Evan Jones on Sun Sep 01 2002.
+ *
+ */
+#ifndef SCINTILLA_CALLTIP_H
+#define SCINTILLA_CALLTIP_H
+
+#include "TView.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <time.h>
+
+#include "Platform.h"
+#include "Scintilla.h"
+
+static const OSType scintillaCallTipType = 'Scct';
+
+namespace Scintilla {
+
+class ScintillaCallTip : public TView
+{
+public:
+ // Private so ScintillaCallTip objects can not be copied
+ ScintillaCallTip(const ScintillaCallTip &) : TView( NULL ) {}
+ ScintillaCallTip &operator=(const ScintillaCallTip &) { return * this; }
+ ~ScintillaCallTip() {};
+
+public:
+ /** This is the class ID that we've assigned to Scintilla. */
+ static const CFStringRef kScintillaCallTipClassID;
+ static const ControlKind kScintillaCallTipKind;
+
+ ScintillaCallTip( void* windowid );
+
+ /** Returns the HIView object kind, needed to subclass TView. */
+ virtual ControlKind GetKind() { return kScintillaCallTipKind; }
+
+private:
+
+ virtual ControlPartCode HitTest( const HIPoint& where );
+ virtual void Draw( RgnHandle rgn, CGContextRef gc );
+ virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
+ virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
+ virtual OSStatus MouseDragged( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
+
+public:
+ static HIViewRef Create();
+private:
+ static OSStatus Construct( HIViewRef inControl, TView** outView );
+
+};
+
+
+}
+
+
+#endif
diff --git a/scintilla/cocoa/ScintillaCallTip.mm b/scintilla/cocoa/ScintillaCallTip.mm new file mode 100644 index 0000000..db72ee1 --- /dev/null +++ b/scintilla/cocoa/ScintillaCallTip.mm @@ -0,0 +1,117 @@ +
+#include "ScintillaCocoa.h"
+#include "ScintillaCallTip.h"
+#include "CallTip.h"
+
+using namespace Scintilla;
+
+const CFStringRef ScintillaCallTip::kScintillaCallTipClassID = CFSTR( "org.scintilla.calltip" );
+const ControlKind ScintillaCallTip::kScintillaCallTipKind = { 'ejon', 'Scct' };
+
+ScintillaCallTip::ScintillaCallTip( void* windowid ) :
+ TView( reinterpret_cast<HIViewRef>( windowid ) )
+{
+ ActivateInterface( kMouse );
+ // debugPrint = true;
+}
+
+void ScintillaCallTip::Draw(
+ RgnHandle /*inLimitRgn*/,
+ CGContextRef inContext )
+{
+ // Get a reference to the Scintilla C++ object
+ CallTip* ctip = NULL;
+ OSStatus err;
+ err = GetControlProperty( GetViewRef(), scintillaCallTipType, 0, sizeof( ctip ), NULL, &ctip );
+ assert(err == noErr);
+ if (ctip == NULL) return;
+
+ Rect contentBounds;
+ GetControlBounds(GetViewRef(), &contentBounds);
+
+ HIRect controlFrame;
+ HIViewGetFrame( GetViewRef(), &controlFrame );
+
+ // what is the global pos?
+ Surface *surfaceWindow = Surface::Allocate();
+ if (surfaceWindow) {
+ surfaceWindow->Init(inContext, GetViewRef());
+ ctip->PaintCT(surfaceWindow);
+ surfaceWindow->Release();
+ delete surfaceWindow;
+ }
+
+}
+
+ControlPartCode ScintillaCallTip::HitTest( const HIPoint& where )
+{
+ if ( CGRectContainsPoint( Bounds(), where ) )
+ return 1;
+ else
+ return kControlNoPart;
+}
+
+OSStatus ScintillaCallTip::MouseDown(HIPoint& location, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
+{
+ if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
+ CallTip* ctip = NULL;
+ ScintillaCocoa *sciThis = NULL;
+ OSStatus err = GetControlProperty( GetViewRef(), scintillaCallTipType, 0, sizeof( ctip ), NULL, &ctip );
+ err = GetControlProperty( GetViewRef(), scintillaMacOSType, 0, sizeof( sciThis ), NULL, &sciThis );
+ ctip->MouseClick( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ));
+ sciThis->CallTipClick();
+ return noErr;
+}
+
+OSStatus ScintillaCallTip::MouseUp(HIPoint& /*inMouseLocation*/, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
+{
+ if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
+ return noErr;
+}
+
+OSStatus ScintillaCallTip::MouseDragged( HIPoint& location, UInt32 /*modifiers*/, EventMouseButton /*button*/, UInt32 /*clickCount*/ )
+{
+ SetThemeCursor( kThemeArrowCursor );
+ return noErr;
+}
+
+HIViewRef ScintillaCallTip::Create()
+{
+ // Register the HIView, if needed
+ static bool registered = false;
+
+ if ( not registered )
+ {
+ TView::RegisterSubclass( kScintillaCallTipClassID, Construct );
+ registered = true;
+ }
+
+ OSStatus err = noErr;
+ EventRef event = CreateInitializationEvent();
+ assert( event != NULL );
+
+ HIViewRef control = NULL;
+ err = HIObjectCreate( kScintillaCallTipClassID, event, reinterpret_cast<HIObjectRef*>( &control ) );
+ ReleaseEvent( event );
+ if ( err == noErr ) {
+ Platform::DebugPrintf("ScintillaCallTip::Create control %08X\n",control);
+ return control;
+ }
+ return NULL;
+}
+
+OSStatus ScintillaCallTip::Construct( HIViewRef inControl, TView** outView )
+{
+ *outView = new ScintillaCallTip( inControl );
+ Platform::DebugPrintf("ScintillaCallTip::Construct scintilla %08X\n",*outView);
+ if ( *outView != NULL )
+ return noErr;
+ else
+ return memFullErr;
+}
+
+extern "C" {
+HIViewRef scintilla_calltip_new() {
+ return ScintillaCallTip::Create();
+}
+}
diff --git a/scintilla/cocoa/ScintillaCocoa.h b/scintilla/cocoa/ScintillaCocoa.h new file mode 100644 index 0000000..03b239c --- /dev/null +++ b/scintilla/cocoa/ScintillaCocoa.h @@ -0,0 +1,211 @@ +/*
+ * ScintillaCocoa.h
+ *
+ * Mike Lischke <mlischke@sun.com>
+ *
+ * Based on ScintillaMacOSX.h
+ * Original code by Evan Jones on Sun Sep 01 2002.
+ * Contributors:
+ * Shane Caraveo, ActiveState
+ * Bernd Paradies, Adobe
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <time.h>
+
+#include <vector>
+
+#ifdef SCI_LEXER
+#include "SciLexer.h"
+#include "PropSet.h"
+#include "PropSetSimple.h"
+#include "Accessor.h"
+#include "KeyWords.h"
+#endif
+
+#include "SVector.h"
+#include "SplitVector.h"
+#include "Partitioning.h"
+#include "RunStyles.h"
+#include "ContractionState.h"
+#include "CellBuffer.h"
+#include "CallTip.h"
+#include "KeyMap.h"
+#include "Indicator.h"
+#include "XPM.h"
+#include "LineMarker.h"
+#include "Style.h"
+#include "AutoComplete.h"
+#include "ViewStyle.h"
+#include "CharClassify.h"
+#include "Decoration.h"
+#include "Document.h"
+#include "Selection.h"
+#include "PositionCache.h"
+#include "Editor.h"
+//#include "ScintillaCallTip.h"
+
+#include "ScintillaBase.h"
+
+extern "C" NSString* ScintillaRecPboardType;
+
+@class ScintillaView;
+
+/**
+ * Helper class to be used as timer target (NSTimer).
+ */
+@interface TimerTarget : NSObject
+{
+ void* mTarget;
+ NSNotificationQueue* notificationQueue;
+}
+- (id) init: (void*) target;
+- (void) timerFired: (NSTimer*) timer;
+- (void) idleTimerFired: (NSTimer*) timer;
+- (void) idleTriggered: (NSNotification*) notification;
+@end
+
+namespace Scintilla {
+
+/**
+ * On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
+ * back to the parent. Therefore, there must be a callback handler that acts
+ * like a Windows WndProc, where Scintilla can send notifications to. Use
+ * ScintillaCocoa::RegisterNotifyHandler() to register such a handler.
+ * Message format is:
+ * <br>
+ * WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = 0 (no control ID), lParam = ScintillaCocoa*
+ * <br>
+ * WM_NOTIFY: wParam = 0 (no control ID), lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa*
+ */
+typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
+
+/**
+ * Scintilla sends these two messages to the nofity handler. Please refer
+ * to the Windows API doc for details about the message format.
+ */
+#define WM_COMMAND 1001
+#define WM_NOTIFY 1002
+
+/**
+ * Main scintilla class, implemented for OS X (Cocoa).
+ */
+class ScintillaCocoa : public ScintillaBase
+{
+private:
+ TimerTarget* timerTarget;
+ NSEvent* lastMouseEvent;
+
+ SciNotifyFunc notifyProc;
+ intptr_t notifyObj;
+
+ bool capturedMouse;
+
+ // Private so ScintillaCocoa objects can not be copied
+ ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {}
+ ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; }
+
+ bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText);
+ void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText);
+
+ int scrollSpeed;
+ int scrollTicks;
+protected:
+ NSView* ContentView();
+ PRectangle GetClientRectangle();
+ Point ConvertPoint(NSPoint point);
+
+ virtual void Initialise();
+ virtual void Finalise();
+public:
+ ScintillaCocoa(NSView* view);
+ virtual ~ScintillaCocoa();
+
+ void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
+ sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
+
+ ScintillaView* TopContainer();
+
+ void SyncPaint(void* gc, PRectangle rc);
+ void Draw(NSRect rect, CGContextRef gc);
+
+ virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
+ void SetTicking(bool on);
+ bool SetIdle(bool on);
+ void SetMouseCapture(bool on);
+ bool HaveMouseCapture();
+ void SetVerticalScrollPos();
+ void SetHorizontalScrollPos();
+ bool ModifyScrollBars(int nMax, int nPage);
+ void Resize();
+ void DoScroll(float position, NSScrollerPart part, bool horizontal);
+
+ // Notifications for the owner.
+ void NotifyChange();
+ void NotifyFocus(bool focus);
+ void NotifyParent(SCNotification scn);
+ void NotifyURIDropped(const char *uri);
+
+ bool HasSelection();
+ bool CanUndo();
+ bool CanRedo();
+ virtual void CopyToClipboard(const SelectionText &selectedText);
+ virtual void Copy();
+ virtual bool CanPaste();
+ virtual void Paste();
+ virtual void Paste(bool rectangular);
+ virtual void CreateCallTipWindow(PRectangle rc);
+ virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
+ virtual void ClaimSelection();
+
+ NSPoint GetCaretPosition();
+
+ static sptr_t DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
+
+ void TimerFired(NSTimer* timer);
+ void IdleTimerFired();
+ int InsertText(NSString* input);
+
+ bool KeyboardInput(NSEvent* event);
+ void MouseDown(NSEvent* event);
+ void MouseMove(NSEvent* event);
+ void MouseUp(NSEvent* event);
+ void MouseEntered(NSEvent* event);
+ void MouseExited(NSEvent* event);
+ void MouseWheel(NSEvent* event);
+
+ // Drag and drop
+ void StartDrag();
+ bool GetDragData(id <NSDraggingInfo> info, NSPasteboard &pasteBoard, SelectionText* selectedText);
+ NSDragOperation DraggingEntered(id <NSDraggingInfo> info);
+ NSDragOperation DraggingUpdated(id <NSDraggingInfo> info);
+ void DraggingExited(id <NSDraggingInfo> info);
+ bool PerformDragOperation(id <NSDraggingInfo> info);
+ void DragScroll();
+
+ // Promote some methods needed for NSResponder actions.
+ virtual void SelectAll();
+ void DeleteBackward();
+ virtual void Cut();
+ virtual void Undo();
+ virtual void Redo();
+
+ virtual NSMenu* CreateContextMenu(NSEvent* event);
+ void HandleCommand(NSInteger command);
+
+// virtual OSStatus ActiveStateChanged();
+//
+// virtual void CallTipClick();
+
+};
+
+
+}
+
+
diff --git a/scintilla/cocoa/ScintillaCocoa.mm b/scintilla/cocoa/ScintillaCocoa.mm new file mode 100644 index 0000000..9cb14a4 --- /dev/null +++ b/scintilla/cocoa/ScintillaCocoa.mm @@ -0,0 +1,1471 @@ +
+/**
+ * Scintilla source code edit control
+ * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase
+ *
+ * Written by Mike Lischke <mlischke@sun.com>
+ *
+ * Loosely based on ScintillaMacOSX.cxx.
+ * Copyright 2003 by Evan Jones <ejones@uwaterloo.ca>
+ * Based on ScintillaGTK.cxx Copyright 1998-2002 by Neil Hodgson <neilh@scintilla.org>
+ * The License.txt file describes the conditions under which this software may be distributed.
+ *
+ * Copyright (c) 2009, 2010 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#import <Carbon/Carbon.h> // Temporary
+
+#include "ScintillaView.h"
+#include "PlatCocoa.h"
+
+using namespace Scintilla;
+
+#ifndef WM_UNICHAR
+#define WM_UNICHAR 0x0109
+#endif
+
+NSString* ScintillaRecPboardType = @"com.scintilla.utf16-plain-text.rectangular";
+
+//--------------------------------------------------------------------------------------------------
+
+// Define keyboard shortcuts (equivalents) the Mac way.
+#define SCI_CMD ( SCI_ALT | SCI_CTRL)
+#define SCI_SCMD ( SCI_CMD | SCI_SHIFT)
+
+static const KeyToCommand macMapDefault[] =
+{
+ {SCK_DOWN, SCI_CMD, SCI_DOCUMENTEND},
+ {SCK_UP, SCI_CMD, SCI_DOCUMENTSTART},
+ {SCK_LEFT, SCI_CMD, SCI_VCHOME},
+ {SCK_LEFT, SCI_SCMD, SCI_VCHOMEEXTEND},
+ {SCK_RIGHT, SCI_CMD, SCI_LINEEND},
+ {SCK_RIGHT, SCI_SCMD, SCI_LINEENDEXTEND},
+ {SCK_DOWN, SCI_NORM, SCI_LINEDOWN},
+ {SCK_DOWN, SCI_SHIFT, SCI_LINEDOWNEXTEND},
+ {SCK_DOWN, SCI_CTRL, SCI_LINESCROLLDOWN},
+ {SCK_DOWN, SCI_ASHIFT, SCI_LINEDOWNRECTEXTEND},
+ {SCK_UP, SCI_NORM, SCI_LINEUP},
+ {SCK_UP, SCI_SHIFT, SCI_LINEUPEXTEND},
+ {SCK_UP, SCI_CTRL, SCI_LINESCROLLUP},
+ {SCK_UP, SCI_ASHIFT, SCI_LINEUPRECTEXTEND},
+ {'[', SCI_CTRL, SCI_PARAUP},
+ {'[', SCI_CSHIFT, SCI_PARAUPEXTEND},
+ {']', SCI_CTRL, SCI_PARADOWN},
+ {']', SCI_CSHIFT, SCI_PARADOWNEXTEND},
+ {SCK_LEFT, SCI_NORM, SCI_CHARLEFT},
+ {SCK_LEFT, SCI_SHIFT, SCI_CHARLEFTEXTEND},
+ {SCK_LEFT, SCI_ALT, SCI_WORDLEFT},
+ {SCK_LEFT, SCI_CSHIFT, SCI_WORDLEFTEXTEND},
+ {SCK_LEFT, SCI_ASHIFT, SCI_WORDLEFTEXTEND},
+ {SCK_RIGHT, SCI_NORM, SCI_CHARRIGHT},
+ {SCK_RIGHT, SCI_SHIFT, SCI_CHARRIGHTEXTEND},
+ {SCK_RIGHT, SCI_ALT, SCI_WORDRIGHT},
+ {SCK_RIGHT, SCI_CSHIFT, SCI_WORDRIGHTEXTEND},
+ {SCK_RIGHT, SCI_ASHIFT, SCI_WORDRIGHTEXTEND},
+ {'/', SCI_CTRL, SCI_WORDPARTLEFT},
+ {'/', SCI_CSHIFT, SCI_WORDPARTLEFTEXTEND},
+ {'\\', SCI_CTRL, SCI_WORDPARTRIGHT},
+ {'\\', SCI_CSHIFT, SCI_WORDPARTRIGHTEXTEND},
+ {SCK_HOME, SCI_NORM, SCI_VCHOME},
+ {SCK_HOME, SCI_SHIFT, SCI_VCHOMEEXTEND},
+ {SCK_HOME, SCI_CTRL, SCI_DOCUMENTSTART},
+ {SCK_HOME, SCI_CSHIFT, SCI_DOCUMENTSTARTEXTEND},
+ {SCK_HOME, SCI_ALT, SCI_HOMEDISPLAY},
+ {SCK_HOME, SCI_ASHIFT, SCI_VCHOMERECTEXTEND},
+ {SCK_END, SCI_NORM, SCI_LINEEND},
+ {SCK_END, SCI_SHIFT, SCI_LINEENDEXTEND},
+ {SCK_END, SCI_CTRL, SCI_DOCUMENTEND},
+ {SCK_END, SCI_CSHIFT, SCI_DOCUMENTENDEXTEND},
+ {SCK_END, SCI_ALT, SCI_LINEENDDISPLAY},
+ {SCK_END, SCI_ASHIFT, SCI_LINEENDRECTEXTEND},
+ {SCK_PRIOR, SCI_NORM, SCI_PAGEUP},
+ {SCK_PRIOR, SCI_SHIFT, SCI_PAGEUPEXTEND},
+ {SCK_PRIOR, SCI_ASHIFT, SCI_PAGEUPRECTEXTEND},
+ {SCK_NEXT, SCI_NORM, SCI_PAGEDOWN},
+ {SCK_NEXT, SCI_SHIFT, SCI_PAGEDOWNEXTEND},
+ {SCK_NEXT, SCI_ASHIFT, SCI_PAGEDOWNRECTEXTEND},
+ {SCK_DELETE, SCI_NORM, SCI_CLEAR},
+ {SCK_DELETE, SCI_SHIFT, SCI_CUT},
+ {SCK_DELETE, SCI_CTRL, SCI_DELWORDRIGHT},
+ {SCK_DELETE, SCI_CSHIFT, SCI_DELLINERIGHT},
+ {SCK_INSERT, SCI_NORM, SCI_EDITTOGGLEOVERTYPE},
+ {SCK_INSERT, SCI_SHIFT, SCI_PASTE},
+ {SCK_INSERT, SCI_CTRL, SCI_COPY},
+ {SCK_ESCAPE, SCI_NORM, SCI_CANCEL},
+ {SCK_BACK, SCI_NORM, SCI_DELETEBACK},
+ {SCK_BACK, SCI_SHIFT, SCI_DELETEBACK},
+ {SCK_BACK, SCI_CTRL, SCI_DELWORDLEFT},
+ {SCK_BACK, SCI_ALT, SCI_UNDO},
+ {SCK_BACK, SCI_CSHIFT, SCI_DELLINELEFT},
+ {'z', SCI_CMD, SCI_UNDO},
+ {'z', SCI_SCMD, SCI_REDO},
+ {'x', SCI_CMD, SCI_CUT},
+ {'c', SCI_CMD, SCI_COPY},
+ {'v', SCI_CMD, SCI_PASTE},
+ {'a', SCI_CMD, SCI_SELECTALL},
+ {SCK_TAB, SCI_NORM, SCI_TAB},
+ {SCK_TAB, SCI_SHIFT, SCI_BACKTAB},
+ {SCK_RETURN, SCI_NORM, SCI_NEWLINE},
+ {SCK_RETURN, SCI_SHIFT, SCI_NEWLINE},
+ {SCK_ADD, SCI_CMD, SCI_ZOOMIN},
+ {SCK_SUBTRACT, SCI_CMD, SCI_ZOOMOUT},
+ {SCK_DIVIDE, SCI_CMD, SCI_SETZOOM},
+ {'l', SCI_CMD, SCI_LINECUT},
+ {'l', SCI_CSHIFT, SCI_LINEDELETE},
+ {'t', SCI_CSHIFT, SCI_LINECOPY},
+ {'t', SCI_CTRL, SCI_LINETRANSPOSE},
+ {'d', SCI_CTRL, SCI_SELECTIONDUPLICATE},
+ {'u', SCI_CTRL, SCI_LOWERCASE},
+ {'u', SCI_CSHIFT, SCI_UPPERCASE},
+ {0, 0, 0},
+};
+
+//--------------------------------------------------------------------------------------------------
+
+@implementation TimerTarget
+
+- (id) init: (void*) target
+{
+ [super init];
+ if (self != nil)
+ {
+ mTarget = target;
+
+ // Get the default notification queue for the thread which created the instance (usually the
+ // main thread). We need that later for idle event processing.
+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
+ notificationQueue = [[NSNotificationQueue alloc] initWithNotificationCenter: center];
+ [center addObserver: self selector: @selector(idleTriggered:) name: @"Idle" object: nil];
+ }
+ return self;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) dealloc
+{
+ [notificationQueue release];
+ [super dealloc];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Method called by a timer installed by ScintillaCocoa. This two step approach is needed because
+ * a native Obj-C class is required as target for the timer.
+ */
+- (void) timerFired: (NSTimer*) timer
+{
+ reinterpret_cast<ScintillaCocoa*>(mTarget)->TimerFired(timer);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Another timer callback for the idle timer.
+ */
+- (void) idleTimerFired: (NSTimer*) timer
+{
+ // Idle timer event.
+ // Post a new idle notification, which gets executed when the run loop is idle.
+ // Since we are coalescing on name and sender there will always be only one actual notification
+ // even for multiple requests.
+ NSNotification *notification = [NSNotification notificationWithName: @"Idle" object: self];
+ [notificationQueue enqueueNotification: notification
+ postingStyle: NSPostWhenIdle
+ coalesceMask: (NSNotificationCoalescingOnName | NSNotificationCoalescingOnSender)
+ forModes: nil];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Another step for idle events. The timer (for idle events) simply requests a notification on
+ * idle time. Only when this notification is send we actually call back the editor.
+ */
+- (void) idleTriggered: (NSNotification*) notification
+{
+ reinterpret_cast<ScintillaCocoa*>(mTarget)->IdleTimerFired();
+}
+
+@end
+
+//----------------- ScintillaCocoa -----------------------------------------------------------------
+
+ScintillaCocoa::ScintillaCocoa(NSView* view)
+{
+ wMain= [view retain];
+ timerTarget = [[[TimerTarget alloc] init: this] retain];
+ Initialise();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+ScintillaCocoa::~ScintillaCocoa()
+{
+ SetTicking(false);
+ [timerTarget release];
+ NSView* container = ContentView();
+ [container release];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Core initialization of the control. Everything that needs to be set up happens here.
+ */
+void ScintillaCocoa::Initialise()
+{
+ notifyObj = NULL;
+ notifyProc = NULL;
+
+ capturedMouse = false;
+
+ // Tell Scintilla not to buffer: Quartz buffers drawing for us.
+ WndProc(SCI_SETBUFFEREDDRAW, 0, 0);
+
+ // We are working with Unicode exclusively.
+ WndProc(SCI_SETCODEPAGE, SC_CP_UTF8, 0);
+
+ // Add Mac specific key bindings.
+ for (int i = 0; macMapDefault[i].key; i++)
+ kmap.AssignCmdKey(macMapDefault[i].key, macMapDefault[i].modifiers, macMapDefault[i].msg);
+
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * We need some clean up. Do it here.
+ */
+void ScintillaCocoa::Finalise()
+{
+ SetTicking(false);
+ ScintillaBase::Finalise();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Helper function to get the outer container which represents the Scintilla editor on application side.
+ */
+ScintillaView* ScintillaCocoa::TopContainer()
+{
+ NSView* container = static_cast<NSView*>(wMain.GetID());
+ return static_cast<ScintillaView*>([container superview]);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Helper function to get the inner container which represents the actual "canvas" we work with.
+ */
+NSView* ScintillaCocoa::ContentView()
+{
+ return static_cast<NSView*>(wMain.GetID());
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Instead of returning the size of the inner view we have to return the visible part of it
+ * in order to make scrolling working properly.
+ */
+PRectangle ScintillaCocoa::GetClientRectangle()
+{
+ NSView* host = ContentView();
+ NSSize size = [host frame].size;
+ return PRectangle(0, 0, size.width, size.height);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Converts the given point from base coordinates to local coordinates and at the same time into
+ * a native Point structure. Base coordinates are used for the top window used in the view hierarchy.
+ */
+Scintilla::Point ScintillaCocoa::ConvertPoint(NSPoint point)
+{
+ NSView* container = ContentView();
+ NSPoint result = [container convertPoint: point fromView: nil];
+
+ return Point(result.x, result.y);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * A function to directly execute code that would usually go the long way via window messages.
+ * However this is a Windows metapher and not used here, hence we just call our fake
+ * window proc. The given parameters directly reflect the message parameters used on Windows.
+ *
+ * @param sciThis The target which is to be called.
+ * @param iMessage A code that indicates which message was sent.
+ * @param wParam One of the two free parameters for the message. Traditionally a word sized parameter
+ * (hence the w prefix).
+ * @param lParam The other of the two free parameters. A signed long.
+ */
+sptr_t ScintillaCocoa::DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam,
+ sptr_t lParam)
+{
+ return sciThis->WndProc(iMessage, wParam, lParam);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * This method is very similar to DirectFunction. On Windows it sends a message (not in the Obj-C sense)
+ * to the target window. Here we simply call our fake window proc.
+ */
+sptr_t scintilla_send_message(void* sci, unsigned int iMessage, uptr_t wParam, sptr_t lParam)
+{
+ ScintillaView *control = reinterpret_cast<ScintillaView*>(sci);
+ ScintillaCocoa* scintilla = [control backend];
+ return scintilla->WndProc(iMessage, wParam, lParam);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * That's our fake window procedure. On Windows each window has a dedicated procedure to handle
+ * commands (also used to synchronize UI and background threads), which is not the case in Cocoa.
+ *
+ * Messages handled here are almost solely for special commands of the backend. Everything which
+ * would be sytem messages on Windows (e.g. for key down, mouse move etc.) are handled by
+ * directly calling appropriate handlers.
+ */
+sptr_t ScintillaCocoa::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam)
+{
+ switch (iMessage)
+ {
+ case SCI_GETDIRECTFUNCTION:
+ return reinterpret_cast<sptr_t>(DirectFunction);
+
+ case SCI_GETDIRECTPOINTER:
+ return reinterpret_cast<sptr_t>(this);
+
+ case SCI_GRABFOCUS:
+ // TODO: implement it
+ break;
+
+ case WM_UNICHAR:
+ // Special case not used normally. Characters passed in this way will be inserted
+ // regardless of their value or modifier states. That means no command interpretation is
+ // performed.
+ if (IsUnicodeMode())
+ {
+ NSString* input = [[NSString stringWithCharacters: (const unichar*) &wParam length: 1] autorelease];
+ const char* utf8 = [input UTF8String];
+ AddCharUTF((char*) utf8, strlen(utf8), false);
+ return 1;
+ }
+ return 0;
+
+ default:
+ unsigned int r = ScintillaBase::WndProc(iMessage, wParam, lParam);
+
+ return r;
+ }
+ return 0l;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * In Windows lingo this is the handler which handles anything that wasn't handled in the normal
+ * window proc which would usually send the message back to generic window proc that Windows uses.
+ */
+sptr_t ScintillaCocoa::DefWndProc(unsigned int, uptr_t, sptr_t)
+{
+ return 0;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Enables or disables a timer that can trigger background processing at a regular interval, like
+ * drag scrolling or caret blinking.
+ */
+void ScintillaCocoa::SetTicking(bool on)
+{
+ if (timer.ticking != on)
+ {
+ timer.ticking = on;
+ if (timer.ticking)
+ {
+ // Scintilla ticks = milliseconds
+ // Using userInfo as flag to distinct between tick and idle timer.
+ NSTimer* tickTimer = [NSTimer scheduledTimerWithTimeInterval: timer.tickSize / 1000.0
+ target: timerTarget
+ selector: @selector(timerFired:)
+ userInfo: nil
+ repeats: YES];
+ timer.tickerID = reinterpret_cast<TickerID>(tickTimer);
+ }
+ else
+ if (timer.tickerID != NULL)
+ {
+ [reinterpret_cast<NSTimer*>(timer.tickerID) invalidate];
+ timer.tickerID = 0;
+ }
+ }
+ timer.ticksToWait = caret.period;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool ScintillaCocoa::SetIdle(bool on)
+{
+ if (idler.state != on)
+ {
+ idler.state = on;
+ if (idler.state)
+ {
+ // Scintilla ticks = milliseconds
+ NSTimer* idleTimer = [NSTimer scheduledTimerWithTimeInterval: timer.tickSize / 1000.0
+ target: timerTarget
+ selector: @selector(idleTimerFired:)
+ userInfo: nil
+ repeats: YES];
+ idler.idlerID = reinterpret_cast<IdlerID>(idleTimer);
+ }
+ else
+ if (idler.idlerID != NULL)
+ {
+ [reinterpret_cast<NSTimer*>(idler.idlerID) invalidate];
+ idler.idlerID = 0;
+ }
+ }
+ return true;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::CopyToClipboard(const SelectionText &selectedText)
+{
+ SetPasteboardData([NSPasteboard generalPasteboard], selectedText);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::Copy()
+{
+ if (!sel.Empty())
+ {
+ SelectionText selectedText;
+ CopySelectionRange(&selectedText);
+ CopyToClipboard(selectedText);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool ScintillaCocoa::CanPaste()
+{
+ if (!Editor::CanPaste())
+ return false;
+
+ return GetPasteboardData([NSPasteboard generalPasteboard], NULL);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::Paste()
+{
+ Paste(false);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Pastes data from the paste board into the editor.
+ */
+void ScintillaCocoa::Paste(bool forceRectangular)
+{
+ SelectionText selectedText;
+ bool ok = GetPasteboardData([NSPasteboard generalPasteboard], &selectedText);
+ if (forceRectangular)
+ selectedText.rectangular = forceRectangular;
+
+ if (!ok || !selectedText.s)
+ // No data or no flavor we support.
+ return;
+
+ pdoc->BeginUndoAction();
+ ClearSelection();
+ if (selectedText.rectangular)
+ {
+ SelectionPosition selStart = sel.RangeMain().Start();
+ PasteRectangular(selStart, selectedText.s, selectedText.len);
+ }
+ else
+ if (pdoc->InsertString(sel.RangeMain().caret.Position(), selectedText.s, selectedText.len))
+ SetEmptySelection(sel.RangeMain().caret.Position() + selectedText.len);
+
+ pdoc->EndUndoAction();
+
+ Redraw();
+ EnsureCaretVisible();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::CreateCallTipWindow(PRectangle rc)
+{
+/*
+ // create a calltip window
+ if (!ct.wCallTip.Created()) {
+ WindowClass windowClass = kHelpWindowClass;
+ WindowAttributes attributes = kWindowNoAttributes;
+ Rect contentBounds;
+ WindowRef outWindow;
+
+ // convert PRectangle to Rect
+ // this adjustment gets the calltip window placed in the correct location relative
+ // to our editor window
+ Rect bounds;
+ OSStatus err;
+ err = GetWindowBounds( this->GetOwner(), kWindowGlobalPortRgn, &bounds );
+ assert( err == noErr );
+ contentBounds.top = rc.top + bounds.top;
+ contentBounds.bottom = rc.bottom + bounds.top;
+ contentBounds.right = rc.right + bounds.left;
+ contentBounds.left = rc.left + bounds.left;
+
+ // create our calltip hiview
+ HIViewRef ctw = scintilla_calltip_new();
+ CallTip* objectPtr = &ct;
+ ScintillaCocoa* sciThis = this;
+ SetControlProperty( ctw, scintillaMacOSType, 0, sizeof( this ), &sciThis );
+ SetControlProperty( ctw, scintillaCallTipType, 0, sizeof( objectPtr ), &objectPtr );
+
+ CreateNewWindow(windowClass, attributes, &contentBounds, &outWindow);
+ ControlRef root;
+ CreateRootControl(outWindow, &root);
+
+ HIViewRef hiroot = HIViewGetRoot (outWindow);
+ HIViewAddSubview(hiroot, ctw);
+
+ HIRect boundsRect;
+ HIViewGetFrame(hiroot, &boundsRect);
+ HIViewSetFrame( ctw, &boundsRect );
+
+ // bind the size of the calltip to the size of it's container window
+ HILayoutInfo layout = {
+ kHILayoutInfoVersionZero,
+ {
+ { NULL, kHILayoutBindTop, 0 },
+ { NULL, kHILayoutBindLeft, 0 },
+ { NULL, kHILayoutBindBottom, 0 },
+ { NULL, kHILayoutBindRight, 0 }
+ },
+ {
+ { NULL, kHILayoutScaleAbsolute, 0 },
+ { NULL, kHILayoutScaleAbsolute, 0 }
+
+ },
+ {
+ { NULL, kHILayoutPositionTop, 0 },
+ { NULL, kHILayoutPositionLeft, 0 }
+ }
+ };
+ HIViewSetLayoutInfo(ctw, &layout);
+
+ ct.wCallTip = root;
+ ct.wDraw = ctw;
+ ct.wCallTip.SetWindow(outWindow);
+ HIViewSetVisible(ctw,true);
+
+ }
+*/
+}
+
+
+void ScintillaCocoa::AddToPopUp(const char *label, int cmd, bool enabled)
+{
+ NSMenuItem* item;
+ ScintillaContextMenu *menu= reinterpret_cast<ScintillaContextMenu*>(popup.GetID());
+ [menu setOwner: this];
+ [menu setAutoenablesItems: NO];
+
+ if (cmd == 0)
+ item = [NSMenuItem separatorItem];
+ else
+ item = [[NSMenuItem alloc] init];
+
+ [item setTarget: menu];
+ [item setAction: @selector(handleCommand:)];
+ [item setTag: cmd];
+ [item setTitle: [NSString stringWithUTF8String: label]];
+ [item setEnabled: enabled];
+
+ [menu addItem: item];
+}
+
+// -------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::ClaimSelection()
+{
+ // Mac OS X does not have a primary selection.
+}
+
+// -------------------------------------------------------------------------------------------------
+
+/**
+ * Returns the current caret position (which is tracked as an offset into the entire text string)
+ * as a row:column pair. The result is zero-based.
+ */
+NSPoint ScintillaCocoa::GetCaretPosition()
+{
+ NSPoint result;
+
+ result.y = pdoc->LineFromPosition(sel.RangeMain().caret.Position());
+ result.x = sel.RangeMain().caret.Position() - pdoc->LineStart(result.y);
+ return result;
+}
+
+// -------------------------------------------------------------------------------------------------
+
+#pragma segment Drag
+
+/**
+ * Triggered by the tick timer on a regular basis to scroll the content during a drag operation.
+ */
+void ScintillaCocoa::DragScroll()
+{
+ if (!posDrag.IsValid())
+ {
+ scrollSpeed = 1;
+ scrollTicks = 2000;
+ return;
+ }
+
+ // TODO: does not work for wrapped lines, fix it.
+ int line = pdoc->LineFromPosition(posDrag.Position());
+ int currentVisibleLine = cs.DisplayFromDoc(line);
+ int lastVisibleLine = Platform::Minimum(topLine + LinesOnScreen(), cs.LinesDisplayed()) - 2;
+
+ if (currentVisibleLine <= topLine && topLine > 0)
+ ScrollTo(topLine - scrollSpeed);
+ else
+ if (currentVisibleLine >= lastVisibleLine)
+ ScrollTo(topLine + scrollSpeed);
+ else
+ {
+ scrollSpeed = 1;
+ scrollTicks = 2000;
+ return;
+ }
+
+ // TODO: also handle horizontal scrolling.
+
+ if (scrollSpeed == 1)
+ {
+ scrollTicks -= timer.tickSize;
+ if (scrollTicks <= 0)
+ {
+ scrollSpeed = 5;
+ scrollTicks = 2000;
+ }
+ }
+
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called when a drag operation was initiated from within Scintilla.
+ */
+void ScintillaCocoa::StartDrag()
+{
+ if (sel.Empty())
+ return;
+
+ // Put the data to be dragged on the drag pasteboard.
+ SelectionText selectedText;
+ NSPasteboard* pasteboard = [NSPasteboard pasteboardWithName: NSDragPboard];
+ CopySelectionRange(&selectedText);
+ SetPasteboardData(pasteboard, selectedText);
+
+ // Prepare drag image.
+ PRectangle localRectangle = RectangleFromRange(sel.RangeMain().Start().Position(), sel.RangeMain().End().Position());
+ NSRect selectionRectangle = PRectangleToNSRect(localRectangle);
+
+ NSView* content = ContentView();
+
+#if 0 // TODO: fix initialization of the drag image with CGImageRef.
+ // To get a bitmap of the text we're dragging, we just use Paint on a pixmap surface.
+ SurfaceImpl *sw = new SurfaceImpl();
+ SurfaceImpl *pixmap = NULL;
+
+ bool lastHideSelection = hideSelection;
+ hideSelection = true;
+ if (sw)
+ {
+ pixmap = new SurfaceImpl();
+ if (pixmap)
+ {
+ PRectangle client = GetClientRectangle();
+ PRectangle imageRect = NSRectToPRectangle(selectionRectangle);
+ paintState = painting;
+ //sw->InitPixMap(client.Width(), client.Height(), NULL, NULL);
+ sw->InitPixMap(imageRect.Width(), imageRect.Height(), NULL, NULL);
+ paintingAllText = true;
+ Paint(sw, imageRect);
+ paintState = notPainting;
+
+ pixmap->InitPixMap(imageRect.Width(), imageRect.Height(), NULL, NULL);
+
+ CGContextRef gc = pixmap->GetContext();
+
+ // To make Paint() work on a bitmap, we have to flip our coordinates and translate the origin
+ CGContextTranslateCTM(gc, 0, imageRect.Height());
+ CGContextScaleCTM(gc, 1.0, -1.0);
+
+ pixmap->CopyImageRectangle(*sw, imageRect, PRectangle(0, 0, imageRect.Width(), imageRect.Height()));
+ // XXX TODO: overwrite any part of the image that is not part of the
+ // selection to make it transparent. right now we just use
+ // the full rectangle which may include non-selected text.
+ }
+ sw->Release();
+ delete sw;
+ }
+ hideSelection = lastHideSelection;
+
+ NSBitmapImageRep* bitmap = NULL;
+ if (pixmap)
+ {
+ bitmap = [[[NSBitmapImageRep alloc] initWithCGImage: pixmap->GetImage()] autorelease];
+ pixmap->Release();
+ delete pixmap;
+ }
+#else
+
+ // Poor man's drag image: take a snapshot of the content view.
+ [content lockFocus];
+ NSBitmapImageRep* bitmap = [[[NSBitmapImageRep alloc] initWithFocusedViewRect: selectionRectangle] autorelease];
+ [bitmap setColorSpaceName: NSDeviceRGBColorSpace];
+ [content unlockFocus];
+
+#endif
+
+ NSImage* image = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];
+ [image addRepresentation: bitmap];
+
+ NSImage* dragImage = [[[NSImage alloc] initWithSize: selectionRectangle.size] autorelease];
+ [dragImage setBackgroundColor: [NSColor clearColor]];
+ [dragImage lockFocus];
+ [image dissolveToPoint: NSMakePoint(0.0, 0.0) fraction: 0.5];
+ [dragImage unlockFocus];
+
+ NSPoint startPoint;
+ startPoint.x = selectionRectangle.origin.x;
+ startPoint.y = selectionRectangle.origin.y + selectionRectangle.size.height;
+ [content dragImage: dragImage
+ at: startPoint
+ offset: NSZeroSize
+ event: lastMouseEvent // Set in MouseMove.
+ pasteboard: pasteboard
+ source: content
+ slideBack: YES];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called when a drag operation reaches the control which was initiated outside.
+ */
+NSDragOperation ScintillaCocoa::DraggingEntered(id <NSDraggingInfo> info)
+{
+ inDragDrop = ddDragging;
+ return DraggingUpdated(info);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called frequently during a drag operation if we are the target. Keep telling the caller
+ * what drag operation we accept and update the drop caret position to indicate the
+ * potential insertion point of the dragged data.
+ */
+NSDragOperation ScintillaCocoa::DraggingUpdated(id <NSDraggingInfo> info)
+{
+ // Convert the drag location from window coordinates to view coordinates and
+ // from there to a text position to finally set the drag position.
+ Point location = ConvertPoint([info draggingLocation]);
+ SetDragPosition(SPositionFromLocation(location));
+
+ NSDragOperation sourceDragMask = [info draggingSourceOperationMask];
+ if (sourceDragMask == NSDragOperationNone)
+ return sourceDragMask;
+
+ NSPasteboard* pasteboard = [info draggingPasteboard];
+
+ // Return what type of operation we will perform. Prefer move over copy.
+ if ([[pasteboard types] containsObject: NSStringPboardType] ||
+ [[pasteboard types] containsObject: ScintillaRecPboardType])
+ return (sourceDragMask & NSDragOperationMove) ? NSDragOperationMove : NSDragOperationCopy;
+
+ if ([[pasteboard types] containsObject: NSFilenamesPboardType])
+ return (sourceDragMask & NSDragOperationGeneric);
+ return NSDragOperationNone;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Resets the current drag position as we are no longer the drag target.
+ */
+void ScintillaCocoa::DraggingExited(id <NSDraggingInfo> info)
+{
+ SetDragPosition(SelectionPosition(invalidPosition));
+ inDragDrop = ddNone;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Here is where the real work is done. Insert the text from the pasteboard.
+ */
+bool ScintillaCocoa::PerformDragOperation(id <NSDraggingInfo> info)
+{
+ NSPasteboard* pasteboard = [info draggingPasteboard];
+
+ if ([[pasteboard types] containsObject: NSFilenamesPboardType])
+ {
+ NSArray* files = [pasteboard propertyListForType: NSFilenamesPboardType];
+ for (NSString* uri in files)
+ NotifyURIDropped([uri UTF8String]);
+ }
+ else
+ {
+ SelectionText text;
+ GetPasteboardData(pasteboard, &text);
+
+ if (text.len > 0)
+ {
+ NSDragOperation operation = [info draggingSourceOperationMask];
+ bool moving = (operation & NSDragOperationMove) != 0;
+
+ DropAt(posDrag, text.s, moving, text.rectangular);
+ };
+ }
+
+ return true;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::SetPasteboardData(NSPasteboard* board, const SelectionText &selectedText)
+{
+ if (selectedText.len == 0)
+ return;
+
+ NSString *string;
+ string = [NSString stringWithUTF8String: selectedText.s];
+
+ [board declareTypes:[NSArray arrayWithObjects:
+ NSStringPboardType,
+ selectedText.rectangular ? ScintillaRecPboardType : nil,
+ nil] owner:nil];
+
+ if (selectedText.rectangular)
+ {
+ // This is specific to scintilla, allows us to drag rectangular selections around the document.
+ [board setString: string forType: ScintillaRecPboardType];
+ }
+
+ [board setString: string forType: NSStringPboardType];
+
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Helper method to retrieve the best fitting alternative from the general pasteboard.
+ */
+bool ScintillaCocoa::GetPasteboardData(NSPasteboard* board, SelectionText* selectedText)
+{
+ NSArray* supportedTypes = [NSArray arrayWithObjects: ScintillaRecPboardType,
+ NSStringPboardType,
+ nil];
+ NSString *bestType = [board availableTypeFromArray: supportedTypes];
+ NSString* data = [board stringForType: bestType];
+
+ if (data != nil)
+ {
+ if (selectedText != nil)
+ {
+ char* text = (char*) [data UTF8String];
+ bool rectangular = bestType == ScintillaRecPboardType;
+ selectedText->Copy(text, strlen(text) + 1, SC_CP_UTF8, SC_CHARSET_DEFAULT , rectangular, false);
+ }
+ return true;
+ }
+
+ return false;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::SetMouseCapture(bool on)
+{
+ capturedMouse = on;
+ /*
+ if (mouseDownCaptures)
+ {
+ if (capturedMouse)
+ WndProc(SCI_SETCURSOR, Window::cursorArrow, 0);
+ else
+ // Reset to normal. Actual image will be set on mouse move.
+ WndProc(SCI_SETCURSOR, (unsigned int) SC_CURSORNORMAL, 0);
+ }
+ */
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool ScintillaCocoa::HaveMouseCapture()
+{
+ return capturedMouse;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Synchronously paint a rectangle of the window.
+ */
+void ScintillaCocoa::SyncPaint(void* gc, PRectangle rc)
+{
+ paintState = painting;
+ rcPaint = rc;
+ PRectangle rcText = GetTextRectangle();
+ paintingAllText = rcPaint.Contains(rcText);
+ Surface *sw = Surface::Allocate();
+ if (sw)
+ {
+ sw->Init(gc, wMain.GetID());
+ Paint(sw, rc);
+ if (paintState == paintAbandoned)
+ {
+ // Do a full paint.
+ rcPaint = GetClientRectangle();
+ paintState = painting;
+ paintingAllText = true;
+ Paint(sw, rcPaint);
+ }
+ sw->Release();
+ delete sw;
+ }
+ paintState = notPainting;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Modfies the vertical scroll position to make the current top line show up as such.
+ */
+void ScintillaCocoa::SetVerticalScrollPos()
+{
+ ScintillaView* topContainer = TopContainer();
+
+ // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area
+ // does *not* belong to the scroll range.
+ float relativePosition = (float) topLine / MaxScrollPos();
+ [topContainer setVerticalScrollPosition: relativePosition];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::SetHorizontalScrollPos()
+{
+ ScintillaView* topContainer = TopContainer();
+ PRectangle textRect = GetTextRectangle();
+
+ // Convert absolute coordinate into the range [0..1]. Keep in mind that the visible area
+ // does *not* belong to the scroll range.
+ float relativePosition = (float) xOffset / (scrollWidth - textRect.Width());
+ [topContainer setHorizontalScrollPosition: relativePosition];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to adjust both scrollers to reflect the current scroll range and position in the editor.
+ *
+ * @param nMax Number of lines in the editor.
+ * @param nPage Number of lines per scroll page.
+ * @return True if there was a change, otherwise false.
+ */
+bool ScintillaCocoa::ModifyScrollBars(int nMax, int nPage)
+{
+ // Input values are given in lines, not pixels, so we have to convert.
+ int lineHeight = WndProc(SCI_TEXTHEIGHT, 0, 0);
+ PRectangle bounds = GetTextRectangle();
+ ScintillaView* topContainer = TopContainer();
+
+ // Set page size to the same value as the scroll range to hide the scrollbar.
+ int scrollRange = lineHeight * (nMax + 1); // +1 because the caller subtracted one.
+ int pageSize;
+ if (verticalScrollBarVisible)
+ pageSize = bounds.Height();
+ else
+ pageSize = scrollRange;
+ bool verticalChange = [topContainer setVerticalScrollRange: scrollRange page: pageSize];
+
+ scrollRange = scrollWidth;
+ if (horizontalScrollBarVisible)
+ pageSize = bounds.Width();
+ else
+ pageSize = scrollRange;
+ bool horizontalChange = [topContainer setHorizontalScrollRange: scrollRange page: pageSize];
+
+ return verticalChange || horizontalChange;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::Resize()
+{
+ ChangeSize();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by the frontend control when the user manipulates one of the scrollers.
+ *
+ * @param position The relative position of the scroller in the range of [0..1].
+ * @param part Specifies which part was clicked on by the user, so we can handle thumb tracking
+ * as well as page and line scrolling.
+ * @param horizontal True if the horizontal scroller was hit, otherwise false.
+ */
+void ScintillaCocoa::DoScroll(float position, NSScrollerPart part, bool horizontal)
+{
+ // If the given scroller part is not the knob (or knob slot) then the given position is not yet
+ // current and we have to update it.
+ if (horizontal)
+ {
+ // Horizontal offset is given in pixels.
+ PRectangle textRect = GetTextRectangle();
+ int offset = (int) (position * (scrollWidth - textRect.Width()));
+ int smallChange = (int) (textRect.Width() / 30);
+ if (smallChange < 5)
+ smallChange = 5;
+ switch (part)
+ {
+ case NSScrollerDecrementLine:
+ offset -= smallChange;
+ break;
+ case NSScrollerDecrementPage:
+ offset -= textRect.Width();
+ break;
+ case NSScrollerIncrementLine:
+ offset += smallChange;
+ break;
+ case NSScrollerIncrementPage:
+ offset += textRect.Width();
+ break;
+ };
+ HorizontalScrollTo(offset);
+ }
+ else
+ {
+ // VerticalScrolling is by line.
+ int topLine = (int) (position * MaxScrollPos());
+ int page = LinesOnScreen();
+ switch (part)
+ {
+ case NSScrollerDecrementLine:
+ topLine--;
+ break;
+ case NSScrollerDecrementPage:
+ topLine -= page;
+ break;
+ case NSScrollerIncrementLine:
+ topLine++;
+ break;
+ case NSScrollerIncrementPage:
+ topLine += page;
+ break;
+ };
+ ScrollTo(topLine, true);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to register a callback function for a given window. This is used to emulate the way
+ * Windows notfies other controls (mainly up in the view hierarchy) about certain events.
+ *
+ * @param windowid A handle to a window. That value is generic and can be anything. It is passed
+ * through to the callback.
+ * @param callback The callback function to be used for future notifications. If NULL then no
+ * notifications will be sent anymore.
+ */
+void ScintillaCocoa::RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback)
+{
+ notifyObj = windowid;
+ notifyProc = callback;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::NotifyChange()
+{
+ if (notifyProc != NULL)
+ notifyProc(notifyObj, WM_COMMAND, (uintptr_t) (SCEN_CHANGE << 16), (uintptr_t) this);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::NotifyFocus(bool focus)
+{
+ if (notifyProc != NULL)
+ notifyProc(notifyObj, WM_COMMAND, (uintptr_t) ((focus ? SCEN_SETFOCUS : SCEN_KILLFOCUS) << 16), (uintptr_t) this);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to send a notification (as WM_NOTIFY call) to the procedure, which has been set by the call
+ * to RegisterNotifyCallback (so it is not necessarily the parent window).
+ *
+ * @param scn The notification to send.
+ */
+void ScintillaCocoa::NotifyParent(SCNotification scn)
+{
+ if (notifyProc != NULL)
+ {
+ scn.nmhdr.hwndFrom = (void*) this;
+ scn.nmhdr.idFrom = (unsigned int) wMain.GetID();
+ notifyProc(notifyObj, WM_NOTIFY, (uintptr_t) 0, (uintptr_t) &scn);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::NotifyURIDropped(const char *uri)
+{
+ SCNotification scn;
+ scn.nmhdr.code = SCN_URIDROPPED;
+ scn.text = uri;
+
+ NotifyParent(scn);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool ScintillaCocoa::HasSelection()
+{
+ return !sel.Empty();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool ScintillaCocoa::CanUndo()
+{
+ return pdoc->CanUndo();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+bool ScintillaCocoa::CanRedo()
+{
+ return pdoc->CanRedo();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::TimerFired(NSTimer* timer)
+{
+ Tick();
+ DragScroll();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::IdleTimerFired()
+{
+ bool more = Idle();
+ if (!more)
+ SetIdle(false);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Main entry point for drawing the control.
+ *
+ * @param rect The area to paint, given in the sender's coordinate.
+ * @param gc The context we can use to paint.
+ */
+void ScintillaCocoa::Draw(NSRect rect, CGContextRef gc)
+{
+ SyncPaint(gc, NSRectToPRectangle(rect));
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Helper function to translate OS X key codes to Scintilla key codes.
+ */
+static inline UniChar KeyTranslate(UniChar unicodeChar)
+{
+ switch (unicodeChar)
+ {
+ case NSDownArrowFunctionKey:
+ return SCK_DOWN;
+ case NSUpArrowFunctionKey:
+ return SCK_UP;
+ case NSLeftArrowFunctionKey:
+ return SCK_LEFT;
+ case NSRightArrowFunctionKey:
+ return SCK_RIGHT;
+ case NSHomeFunctionKey:
+ return SCK_HOME;
+ case NSEndFunctionKey:
+ return SCK_END;
+ case NSPageUpFunctionKey:
+ return SCK_PRIOR;
+ case NSPageDownFunctionKey:
+ return SCK_NEXT;
+ case NSDeleteFunctionKey:
+ return SCK_DELETE;
+ case NSInsertFunctionKey:
+ return SCK_INSERT;
+ case '\n':
+ case 3:
+ return SCK_RETURN;
+ case 27:
+ return SCK_ESCAPE;
+ case 127:
+ return SCK_BACK;
+ case '\t':
+ case 25: // Shift tab, return to unmodified tab and handle that via modifiers.
+ return SCK_TAB;
+ default:
+ return unicodeChar;
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Main keyboard input handling method. It is called for any key down event, including function keys,
+ * numeric keypad input and whatnot.
+ *
+ * @param event The event instance associated with the key down event.
+ * @return True if the input was handled, false otherwise.
+ */
+bool ScintillaCocoa::KeyboardInput(NSEvent* event)
+{
+ // For now filter out function keys.
+ NSUInteger modifiers = [event modifierFlags];
+
+ NSString* input = [event characters];
+
+ bool control = (modifiers & NSControlKeyMask) != 0;
+ bool shift = (modifiers & NSShiftKeyMask) != 0;
+ bool command = (modifiers & NSCommandKeyMask) != 0;
+ bool alt = (modifiers & NSAlternateKeyMask) != 0;
+
+ bool handled = false;
+
+ // Handle each entry individually. Usually we only have one entry anway.
+ for (int i = 0; i < input.length; i++)
+ {
+ const UniChar originalKey = [input characterAtIndex: i];
+ UniChar key = KeyTranslate(originalKey);
+
+ bool consumed = false; // Consumed as command?
+
+ // Signal command as control + alt. This leaves us without command + control and command + alt
+ // but that's what we get when we have a modifier key more than other platforms.
+ if (KeyDown(key, shift, control || command, alt || command, &consumed))
+ handled = true;
+ if (consumed)
+ handled = true;
+ }
+
+ return handled;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to insert already processed text provided by the Cocoa text input system.
+ */
+int ScintillaCocoa::InsertText(NSString* input)
+{
+ const char* utf8 = [input UTF8String];
+ AddCharUTF((char*) utf8, strlen(utf8), false);
+ return true;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by the owning view when the mouse pointer enters the control.
+ */
+void ScintillaCocoa::MouseEntered(NSEvent* event)
+{
+ if (!HaveMouseCapture())
+ {
+ WndProc(SCI_SETCURSOR, (long int)SC_CURSORNORMAL, 0);
+
+ // Mouse location is given in screen coordinates and might also be outside of our bounds.
+ Point location = ConvertPoint([event locationInWindow]);
+ ButtonMove(location);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::MouseExited(NSEvent* event)
+{
+ // Nothing to do here.
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::MouseDown(NSEvent* event)
+{
+ Point location = ConvertPoint([event locationInWindow]);
+ NSTimeInterval time = [event timestamp];
+ bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;
+ bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0;
+ bool control = ([event modifierFlags] & NSControlKeyMask) != 0;
+
+ ButtonDown(Point(location.x, location.y), (int) (time * 1000), shift, control, command);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::MouseMove(NSEvent* event)
+{
+ lastMouseEvent = event;
+
+ ButtonMove(ConvertPoint([event locationInWindow]));
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::MouseUp(NSEvent* event)
+{
+ NSTimeInterval time = [event timestamp];
+ bool control = ([event modifierFlags] & NSControlKeyMask) != 0;
+
+ ButtonUp(ConvertPoint([event locationInWindow]), (int) (time * 1000), control);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+void ScintillaCocoa::MouseWheel(NSEvent* event)
+{
+ bool command = ([event modifierFlags] & NSCommandKeyMask) != 0;
+ bool shift = ([event modifierFlags] & NSShiftKeyMask) != 0;
+ int delta;
+ if (shift)
+ delta = 10 * [event deltaX]; // Arbitrary scale factor.
+ else
+ {
+ // In order to make scrolling with larger offset smoother we scroll less lines the larger the
+ // delta value is.
+ if ([event deltaY] < 0)
+ delta = -(int) sqrt(-10.0 * [event deltaY]);
+ else
+ delta = (int) sqrt(10.0 * [event deltaY]);
+ }
+
+ if (command)
+ {
+ // Zoom! We play with the font sizes in the styles.
+ // Number of steps/line is ignored, we just care if sizing up or down.
+ if (delta > 0)
+ KeyCommand(SCI_ZOOMIN);
+ else
+ KeyCommand(SCI_ZOOMOUT);
+ }
+ else
+ if (shift)
+ HorizontalScrollTo(xOffset - delta);
+ else
+ ScrollTo(topLine - delta, true);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+// Helper methods for NSResponder actions.
+
+void ScintillaCocoa::SelectAll()
+{
+ Editor::SelectAll();
+}
+
+void ScintillaCocoa::DeleteBackward()
+{
+ KeyDown(SCK_BACK, false, false, false, nil);
+}
+
+void ScintillaCocoa::Cut()
+{
+ Editor::Cut();
+}
+
+void ScintillaCocoa::Undo()
+{
+ Editor::Undo();
+}
+
+void ScintillaCocoa::Redo()
+{
+ Editor::Undo();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Creates and returns a popup menu, which is then displayed by the Cocoa framework.
+ */
+NSMenu* ScintillaCocoa::CreateContextMenu(NSEvent* event)
+{
+ // Call ScintillaBase to create the context menu.
+ ContextMenu(Point(0, 0));
+
+ return reinterpret_cast<NSMenu*>(popup.GetID());
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * An intermediate function to forward context menu commands from the menu action handler to
+ * scintilla.
+ */
+void ScintillaCocoa::HandleCommand(NSInteger command)
+{
+ Command(command);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+//OSStatus ScintillaCocoa::ActiveStateChanged()
+//{
+// // If the window is being deactivated, lose the focus and turn off the ticking
+// if ( ! this->IsActive() ) {
+// DropCaret();
+// //SetFocusState( false );
+// SetTicking( false );
+// } else {
+// ShowCaretAtCurrentPosition();
+// }
+// return noErr;
+//}
+//
+
+//--------------------------------------------------------------------------------------------------
+
diff --git a/scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings b/scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings Binary files differnew file mode 100644 index 0000000..85e4bb6 --- /dev/null +++ b/scintilla/cocoa/ScintillaFramework/English.lproj/InfoPlist.strings diff --git a/scintilla/cocoa/ScintillaFramework/Info.plist b/scintilla/cocoa/ScintillaFramework/Info.plist new file mode 100644 index 0000000..08f1e5d --- /dev/null +++ b/scintilla/cocoa/ScintillaFramework/Info.plist @@ -0,0 +1,26 @@ +<?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>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.sun.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSPrincipalClass</key>
+ <string></string>
+</dict>
+</plist>
diff --git a/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj b/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj new file mode 100644 index 0000000..4c96bca --- /dev/null +++ b/scintilla/cocoa/ScintillaFramework/ScintillaFramework.xcodeproj/project.pbxproj @@ -0,0 +1,969 @@ +// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 11374AAA10514AA900651FE9 /* LexMarkdown.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11374AA910514AA900651FE9 /* LexMarkdown.cxx */; };
+ 2744E4DC0FC1682C00E85C33 /* AutoComplete.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4CF0FC1682C00E85C33 /* AutoComplete.cxx */; };
+ 2744E4DD0FC1682C00E85C33 /* CallTip.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D00FC1682C00E85C33 /* CallTip.cxx */; };
+ 2744E4DE0FC1682C00E85C33 /* CellBuffer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D10FC1682C00E85C33 /* CellBuffer.cxx */; };
+ 2744E4DF0FC1682C00E85C33 /* CharClassify.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D20FC1682C00E85C33 /* CharClassify.cxx */; };
+ 2744E4E00FC1682C00E85C33 /* ContractionState.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D30FC1682C00E85C33 /* ContractionState.cxx */; };
+ 2744E4E10FC1682C00E85C33 /* Decoration.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D40FC1682C00E85C33 /* Decoration.cxx */; };
+ 2744E4E20FC1682C00E85C33 /* Document.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D50FC1682C00E85C33 /* Document.cxx */; };
+ 2744E4E30FC1682C00E85C33 /* DocumentAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D60FC1682C00E85C33 /* DocumentAccessor.cxx */; };
+ 2744E4E40FC1682C00E85C33 /* Editor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D70FC1682C00E85C33 /* Editor.cxx */; };
+ 2744E4E50FC1682C00E85C33 /* ExternalLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D80FC1682C00E85C33 /* ExternalLexer.cxx */; };
+ 2744E4E60FC1682C00E85C33 /* Indicator.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D90FC1682C00E85C33 /* Indicator.cxx */; };
+ 2744E4E70FC1682C00E85C33 /* KeyMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4DA0FC1682C00E85C33 /* KeyMap.cxx */; };
+ 2744E4E80FC1682C00E85C33 /* KeyWords.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4DB0FC1682C00E85C33 /* KeyWords.cxx */; };
+ 2744E5360FC1684700E85C33 /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4E90FC1684700E85C33 /* LexAbaqus.cxx */; };
+ 2744E5370FC1684700E85C33 /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EA0FC1684700E85C33 /* LexAda.cxx */; };
+ 2744E5380FC1684700E85C33 /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EB0FC1684700E85C33 /* LexAPDL.cxx */; };
+ 2744E5390FC1684700E85C33 /* LexAsm.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EC0FC1684700E85C33 /* LexAsm.cxx */; };
+ 2744E53A0FC1684700E85C33 /* LexAsn1.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4ED0FC1684700E85C33 /* LexAsn1.cxx */; };
+ 2744E53B0FC1684700E85C33 /* LexASY.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EE0FC1684700E85C33 /* LexASY.cxx */; };
+ 2744E53C0FC1684700E85C33 /* LexAU3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EF0FC1684700E85C33 /* LexAU3.cxx */; };
+ 2744E53D0FC1684700E85C33 /* LexAVE.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F00FC1684700E85C33 /* LexAVE.cxx */; };
+ 2744E53E0FC1684700E85C33 /* LexBaan.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F10FC1684700E85C33 /* LexBaan.cxx */; };
+ 2744E53F0FC1684700E85C33 /* LexBash.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F20FC1684700E85C33 /* LexBash.cxx */; };
+ 2744E5400FC1684700E85C33 /* LexBasic.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F30FC1684700E85C33 /* LexBasic.cxx */; };
+ 2744E5410FC1684700E85C33 /* LexBullant.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F40FC1684700E85C33 /* LexBullant.cxx */; };
+ 2744E5420FC1684700E85C33 /* LexCaml.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F50FC1684700E85C33 /* LexCaml.cxx */; };
+ 2744E5430FC1684700E85C33 /* LexCLW.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F60FC1684700E85C33 /* LexCLW.cxx */; };
+ 2744E5440FC1684700E85C33 /* LexCmake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F70FC1684700E85C33 /* LexCmake.cxx */; };
+ 2744E5450FC1684700E85C33 /* LexCOBOL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F80FC1684700E85C33 /* LexCOBOL.cxx */; };
+ 2744E5460FC1684700E85C33 /* LexConf.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F90FC1684700E85C33 /* LexConf.cxx */; };
+ 2744E5470FC1684700E85C33 /* LexCPP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FA0FC1684700E85C33 /* LexCPP.cxx */; };
+ 2744E5480FC1684700E85C33 /* LexCrontab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FB0FC1684700E85C33 /* LexCrontab.cxx */; };
+ 2744E5490FC1684700E85C33 /* LexCsound.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FC0FC1684700E85C33 /* LexCsound.cxx */; };
+ 2744E54A0FC1684700E85C33 /* LexCSS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FD0FC1684700E85C33 /* LexCSS.cxx */; };
+ 2744E54B0FC1684700E85C33 /* LexD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FE0FC1684700E85C33 /* LexD.cxx */; };
+ 2744E54C0FC1684700E85C33 /* LexEiffel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FF0FC1684700E85C33 /* LexEiffel.cxx */; };
+ 2744E54D0FC1684700E85C33 /* LexErlang.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5000FC1684700E85C33 /* LexErlang.cxx */; };
+ 2744E54E0FC1684700E85C33 /* LexEScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5010FC1684700E85C33 /* LexEScript.cxx */; };
+ 2744E54F0FC1684700E85C33 /* LexFlagship.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5020FC1684700E85C33 /* LexFlagship.cxx */; };
+ 2744E5500FC1684700E85C33 /* LexForth.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5030FC1684700E85C33 /* LexForth.cxx */; };
+ 2744E5510FC1684700E85C33 /* LexFortran.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5040FC1684700E85C33 /* LexFortran.cxx */; };
+ 2744E5520FC1684700E85C33 /* LexGAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5050FC1684700E85C33 /* LexGAP.cxx */; };
+ 2744E5530FC1684700E85C33 /* LexGui4Cli.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5060FC1684700E85C33 /* LexGui4Cli.cxx */; };
+ 2744E5540FC1684700E85C33 /* LexHaskell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5070FC1684700E85C33 /* LexHaskell.cxx */; };
+ 2744E5550FC1684700E85C33 /* LexHTML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5080FC1684700E85C33 /* LexHTML.cxx */; };
+ 2744E5560FC1684700E85C33 /* LexInno.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5090FC1684700E85C33 /* LexInno.cxx */; };
+ 2744E5570FC1684700E85C33 /* LexKix.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50A0FC1684700E85C33 /* LexKix.cxx */; };
+ 2744E5580FC1684700E85C33 /* LexLisp.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50B0FC1684700E85C33 /* LexLisp.cxx */; };
+ 2744E5590FC1684700E85C33 /* LexLout.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50C0FC1684700E85C33 /* LexLout.cxx */; };
+ 2744E55A0FC1684700E85C33 /* LexLua.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50D0FC1684700E85C33 /* LexLua.cxx */; };
+ 2744E55B0FC1684700E85C33 /* LexMagik.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50E0FC1684700E85C33 /* LexMagik.cxx */; };
+ 2744E55C0FC1684700E85C33 /* LexMatlab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50F0FC1684700E85C33 /* LexMatlab.cxx */; };
+ 2744E55D0FC1684700E85C33 /* LexMetapost.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5100FC1684700E85C33 /* LexMetapost.cxx */; };
+ 2744E55E0FC1684700E85C33 /* LexMMIXAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5110FC1684700E85C33 /* LexMMIXAL.cxx */; };
+ 2744E55F0FC1684700E85C33 /* LexMPT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5120FC1684700E85C33 /* LexMPT.cxx */; };
+ 2744E5600FC1684700E85C33 /* LexMSSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5130FC1684700E85C33 /* LexMSSQL.cxx */; };
+ 2744E5610FC1684700E85C33 /* LexMySQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5140FC1684700E85C33 /* LexMySQL.cxx */; };
+ 2744E5620FC1684700E85C33 /* LexNimrod.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5150FC1684700E85C33 /* LexNimrod.cxx */; };
+ 2744E5630FC1684700E85C33 /* LexNsis.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5160FC1684700E85C33 /* LexNsis.cxx */; };
+ 2744E5640FC1684700E85C33 /* LexOpal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5170FC1684700E85C33 /* LexOpal.cxx */; };
+ 2744E5650FC1684700E85C33 /* LexOthers.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5180FC1684700E85C33 /* LexOthers.cxx */; };
+ 2744E5660FC1684700E85C33 /* LexPascal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5190FC1684700E85C33 /* LexPascal.cxx */; };
+ 2744E5670FC1684700E85C33 /* LexPB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51A0FC1684700E85C33 /* LexPB.cxx */; };
+ 2744E5680FC1684700E85C33 /* LexPerl.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51B0FC1684700E85C33 /* LexPerl.cxx */; };
+ 2744E5690FC1684700E85C33 /* LexPLM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51C0FC1684700E85C33 /* LexPLM.cxx */; };
+ 2744E56A0FC1684700E85C33 /* LexPOV.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51D0FC1684700E85C33 /* LexPOV.cxx */; };
+ 2744E56B0FC1684700E85C33 /* LexPowerPro.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51E0FC1684700E85C33 /* LexPowerPro.cxx */; };
+ 2744E56C0FC1684700E85C33 /* LexPowerShell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51F0FC1684700E85C33 /* LexPowerShell.cxx */; };
+ 2744E56D0FC1684700E85C33 /* LexProgress.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5200FC1684700E85C33 /* LexProgress.cxx */; };
+ 2744E56E0FC1684700E85C33 /* LexPS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5210FC1684700E85C33 /* LexPS.cxx */; };
+ 2744E56F0FC1684700E85C33 /* LexPython.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5220FC1684700E85C33 /* LexPython.cxx */; };
+ 2744E5700FC1684700E85C33 /* LexR.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5230FC1684700E85C33 /* LexR.cxx */; };
+ 2744E5710FC1684700E85C33 /* LexRebol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5240FC1684700E85C33 /* LexRebol.cxx */; };
+ 2744E5720FC1684700E85C33 /* LexRuby.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5250FC1684700E85C33 /* LexRuby.cxx */; };
+ 2744E5730FC1684700E85C33 /* LexScriptol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5260FC1684700E85C33 /* LexScriptol.cxx */; };
+ 2744E5740FC1684700E85C33 /* LexSmalltalk.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5270FC1684700E85C33 /* LexSmalltalk.cxx */; };
+ 2744E5750FC1684700E85C33 /* LexSML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5280FC1684700E85C33 /* LexSML.cxx */; };
+ 2744E5760FC1684700E85C33 /* LexSorcus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5290FC1684700E85C33 /* LexSorcus.cxx */; };
+ 2744E5770FC1684700E85C33 /* LexSpecman.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52A0FC1684700E85C33 /* LexSpecman.cxx */; };
+ 2744E5780FC1684700E85C33 /* LexSpice.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52B0FC1684700E85C33 /* LexSpice.cxx */; };
+ 2744E5790FC1684700E85C33 /* LexSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52C0FC1684700E85C33 /* LexSQL.cxx */; };
+ 2744E57A0FC1684700E85C33 /* LexTACL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52D0FC1684700E85C33 /* LexTACL.cxx */; };
+ 2744E57B0FC1684700E85C33 /* LexTADS3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52E0FC1684700E85C33 /* LexTADS3.cxx */; };
+ 2744E57C0FC1684700E85C33 /* LexTAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52F0FC1684700E85C33 /* LexTAL.cxx */; };
+ 2744E57D0FC1684700E85C33 /* LexTCL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5300FC1684700E85C33 /* LexTCL.cxx */; };
+ 2744E57E0FC1684700E85C33 /* LexTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5310FC1684700E85C33 /* LexTeX.cxx */; };
+ 2744E57F0FC1684700E85C33 /* LexVB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5320FC1684700E85C33 /* LexVB.cxx */; };
+ 2744E5800FC1684700E85C33 /* LexVerilog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5330FC1684700E85C33 /* LexVerilog.cxx */; };
+ 2744E5810FC1684700E85C33 /* LexVHDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5340FC1684700E85C33 /* LexVHDL.cxx */; };
+ 2744E5820FC1684700E85C33 /* LexYAML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5350FC1684700E85C33 /* LexYAML.cxx */; };
+ 2744E5900FC1685C00E85C33 /* LineMarker.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5830FC1685C00E85C33 /* LineMarker.cxx */; };
+ 2744E5910FC1685C00E85C33 /* PerLine.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5840FC1685C00E85C33 /* PerLine.cxx */; };
+ 2744E5920FC1685C00E85C33 /* PositionCache.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5850FC1685C00E85C33 /* PositionCache.cxx */; };
+ 2744E5930FC1685C00E85C33 /* PropSet.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5860FC1685C00E85C33 /* PropSet.cxx */; };
+ 2744E5940FC1685C00E85C33 /* RESearch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5870FC1685C00E85C33 /* RESearch.cxx */; };
+ 2744E5950FC1685C00E85C33 /* RunStyles.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5880FC1685C00E85C33 /* RunStyles.cxx */; };
+ 2744E5960FC1685C00E85C33 /* ScintillaBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5890FC1685C00E85C33 /* ScintillaBase.cxx */; };
+ 2744E5970FC1685C00E85C33 /* Style.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58A0FC1685C00E85C33 /* Style.cxx */; };
+ 2744E5980FC1685C00E85C33 /* StyleContext.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58B0FC1685C00E85C33 /* StyleContext.cxx */; };
+ 2744E5990FC1685C00E85C33 /* UniConversion.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58C0FC1685C00E85C33 /* UniConversion.cxx */; };
+ 2744E59A0FC1685C00E85C33 /* ViewStyle.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58D0FC1685C00E85C33 /* ViewStyle.cxx */; };
+ 2744E59B0FC1685C00E85C33 /* WindowAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58E0FC1685C00E85C33 /* WindowAccessor.cxx */; };
+ 2744E59C0FC1685C00E85C33 /* XPM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58F0FC1685C00E85C33 /* XPM.cxx */; };
+ 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2744E5B20FC168C500E85C33 /* InfoBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5AD0FC168C500E85C33 /* InfoBar.mm */; };
+ 2744E5B30FC168C500E85C33 /* PlatCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5AE0FC168C500E85C33 /* PlatCocoa.mm */; };
+ 2744E5B50FC168C500E85C33 /* ScintillaCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5B00FC168C500E85C33 /* ScintillaCocoa.mm */; };
+ 2744E5B60FC168C500E85C33 /* ScintillaView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5B10FC168C500E85C33 /* ScintillaView.mm */; };
+ 277B5BDA104EE6B900F40CE4 /* Selection.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 277B5BD9104EE6B900F40CE4 /* Selection.cxx */; };
+ 277B5BDD104EE6CF00F40CE4 /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 277B5BDB104EE6CF00F40CE4 /* PropSetSimple.h */; };
+ 277B5BDE104EE6CF00F40CE4 /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 277B5BDC104EE6CF00F40CE4 /* Selection.h */; };
+ 2791F3C60FC19F71009DBCF9 /* PlatCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59E0FC168A100E85C33 /* PlatCocoa.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4850FC1678600E85C33 /* Platform.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4870FC1678600E85C33 /* SciLexer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4880FC1678600E85C33 /* Scintilla.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A20FC168A100E85C33 /* ScintillaCocoa.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3E30FC1A3AE009DBCF9 /* QuartzTextLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59F0FC168A100E85C33 /* QuartzTextLayout.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3E40FC1A3AE009DBCF9 /* QuartzTextStyleAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A00FC168A100E85C33 /* QuartzTextStyleAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3E50FC1A3AE009DBCF9 /* Accessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4830FC1678600E85C33 /* Accessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3E60FC1A3AE009DBCF9 /* KeyWords.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4840FC1678600E85C33 /* KeyWords.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3E70FC1A3AE009DBCF9 /* PropSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4860FC1678600E85C33 /* PropSet.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3E80FC1A3AE009DBCF9 /* ScintillaWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E48A0FC1678600E85C33 /* ScintillaWidget.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3EA0FC1A3AE009DBCF9 /* WindowAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E48C0FC1678600E85C33 /* WindowAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3EB0FC1A3BD009DBCF9 /* AutoComplete.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4990FC1681200E85C33 /* AutoComplete.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3EC0FC1A3BD009DBCF9 /* CallTip.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49A0FC1681200E85C33 /* CallTip.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3ED0FC1A3BD009DBCF9 /* CellBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49B0FC1681200E85C33 /* CellBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3EE0FC1A3BD009DBCF9 /* CharacterSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49C0FC1681200E85C33 /* CharacterSet.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3EF0FC1A3BD009DBCF9 /* CharClassify.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49D0FC1681200E85C33 /* CharClassify.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F00FC1A3BD009DBCF9 /* ContractionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49E0FC1681200E85C33 /* ContractionState.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F10FC1A3BD009DBCF9 /* Decoration.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49F0FC1681200E85C33 /* Decoration.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F20FC1A3BD009DBCF9 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A00FC1681200E85C33 /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F30FC1A3BD009DBCF9 /* DocumentAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A10FC1681200E85C33 /* DocumentAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F40FC1A3BD009DBCF9 /* Editor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A20FC1681200E85C33 /* Editor.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F50FC1A3BD009DBCF9 /* ExternalLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A30FC1681200E85C33 /* ExternalLexer.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F60FC1A3BD009DBCF9 /* Indicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A40FC1681200E85C33 /* Indicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F70FC1A3BD009DBCF9 /* KeyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A50FC1681200E85C33 /* KeyMap.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F80FC1A3BD009DBCF9 /* LineMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A60FC1681200E85C33 /* LineMarker.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3F90FC1A3BD009DBCF9 /* Partitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A70FC1681200E85C33 /* Partitioning.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3FA0FC1A3BD009DBCF9 /* PerLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A80FC1681200E85C33 /* PerLine.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3FB0FC1A3BD009DBCF9 /* PositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A90FC1681200E85C33 /* PositionCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3FC0FC1A3BD009DBCF9 /* RESearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AA0FC1681200E85C33 /* RESearch.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3FD0FC1A3BD009DBCF9 /* RunStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AB0FC1681200E85C33 /* RunStyles.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3FE0FC1A3BD009DBCF9 /* ScintillaBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AC0FC1681200E85C33 /* ScintillaBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F3FF0FC1A3BD009DBCF9 /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AD0FC1681200E85C33 /* SplitVector.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F4000FC1A3BD009DBCF9 /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AE0FC1681200E85C33 /* Style.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F4010FC1A3BD009DBCF9 /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AF0FC1681200E85C33 /* StyleContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F4020FC1A3BD009DBCF9 /* SVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B00FC1681200E85C33 /* SVector.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F4030FC1A3BD009DBCF9 /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B10FC1681200E85C33 /* UniConversion.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F4040FC1A3BD009DBCF9 /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B20FC1681200E85C33 /* ViewStyle.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 2791F4050FC1A3BD009DBCF9 /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B30FC1681200E85C33 /* XPM.h */; settings = {ATTRIBUTES = (Public, ); }; };
+ 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4510FC1B413005E115A /* info_bar_bg.png */; };
+ 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */; };
+ 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */; };
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
+ 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXFileReference section */
+ 0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 11374AA910514AA900651FE9 /* LexMarkdown.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMarkdown.cxx; path = ../../src/LexMarkdown.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4830FC1678600E85C33 /* Accessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Accessor.h; path = ../../include/Accessor.h; sourceTree = SOURCE_ROOT; };
+ 2744E4840FC1678600E85C33 /* KeyWords.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyWords.h; path = ../../include/KeyWords.h; sourceTree = SOURCE_ROOT; };
+ 2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; };
+ 2744E4860FC1678600E85C33 /* PropSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSet.h; path = ../../include/PropSet.h; sourceTree = SOURCE_ROOT; };
+ 2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; };
+ 2744E4880FC1678600E85C33 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; };
+ 2744E48A0FC1678600E85C33 /* ScintillaWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaWidget.h; path = ../../include/ScintillaWidget.h; sourceTree = SOURCE_ROOT; };
+ 2744E48C0FC1678600E85C33 /* WindowAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WindowAccessor.h; path = ../../include/WindowAccessor.h; sourceTree = SOURCE_ROOT; };
+ 2744E4990FC1681200E85C33 /* AutoComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoComplete.h; path = ../../src/AutoComplete.h; sourceTree = SOURCE_ROOT; };
+ 2744E49A0FC1681200E85C33 /* CallTip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallTip.h; path = ../../src/CallTip.h; sourceTree = SOURCE_ROOT; };
+ 2744E49B0FC1681200E85C33 /* CellBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CellBuffer.h; path = ../../src/CellBuffer.h; sourceTree = SOURCE_ROOT; };
+ 2744E49C0FC1681200E85C33 /* CharacterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterSet.h; path = ../../src/CharacterSet.h; sourceTree = SOURCE_ROOT; };
+ 2744E49D0FC1681200E85C33 /* CharClassify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharClassify.h; path = ../../src/CharClassify.h; sourceTree = SOURCE_ROOT; };
+ 2744E49E0FC1681200E85C33 /* ContractionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContractionState.h; path = ../../src/ContractionState.h; sourceTree = SOURCE_ROOT; };
+ 2744E49F0FC1681200E85C33 /* Decoration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Decoration.h; path = ../../src/Decoration.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A00FC1681200E85C33 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Document.h; path = ../../src/Document.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A10FC1681200E85C33 /* DocumentAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocumentAccessor.h; path = ../../src/DocumentAccessor.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A20FC1681200E85C33 /* Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editor.h; path = ../../src/Editor.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A30FC1681200E85C33 /* ExternalLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalLexer.h; path = ../../src/ExternalLexer.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A40FC1681200E85C33 /* Indicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indicator.h; path = ../../src/Indicator.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A50FC1681200E85C33 /* KeyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyMap.h; path = ../../src/KeyMap.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A60FC1681200E85C33 /* LineMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineMarker.h; path = ../../src/LineMarker.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A70FC1681200E85C33 /* Partitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Partitioning.h; path = ../../src/Partitioning.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A80FC1681200E85C33 /* PerLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PerLine.h; path = ../../src/PerLine.h; sourceTree = SOURCE_ROOT; };
+ 2744E4A90FC1681200E85C33 /* PositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PositionCache.h; path = ../../src/PositionCache.h; sourceTree = SOURCE_ROOT; };
+ 2744E4AA0FC1681200E85C33 /* RESearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RESearch.h; path = ../../src/RESearch.h; sourceTree = SOURCE_ROOT; };
+ 2744E4AB0FC1681200E85C33 /* RunStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunStyles.h; path = ../../src/RunStyles.h; sourceTree = SOURCE_ROOT; };
+ 2744E4AC0FC1681200E85C33 /* ScintillaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaBase.h; path = ../../src/ScintillaBase.h; sourceTree = SOURCE_ROOT; };
+ 2744E4AD0FC1681200E85C33 /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; };
+ 2744E4AE0FC1681200E85C33 /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; };
+ 2744E4AF0FC1681200E85C33 /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../src/StyleContext.h; sourceTree = SOURCE_ROOT; };
+ 2744E4B00FC1681200E85C33 /* SVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVector.h; path = ../../src/SVector.h; sourceTree = SOURCE_ROOT; };
+ 2744E4B10FC1681200E85C33 /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; };
+ 2744E4B20FC1681200E85C33 /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; };
+ 2744E4B30FC1681200E85C33 /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = SOURCE_ROOT; };
+ 2744E4CF0FC1682C00E85C33 /* AutoComplete.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoComplete.cxx; path = ../../src/AutoComplete.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D00FC1682C00E85C33 /* CallTip.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CallTip.cxx; path = ../../src/CallTip.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D10FC1682C00E85C33 /* CellBuffer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CellBuffer.cxx; path = ../../src/CellBuffer.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D20FC1682C00E85C33 /* CharClassify.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharClassify.cxx; path = ../../src/CharClassify.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D30FC1682C00E85C33 /* ContractionState.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContractionState.cxx; path = ../../src/ContractionState.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D40FC1682C00E85C33 /* Decoration.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Decoration.cxx; path = ../../src/Decoration.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D50FC1682C00E85C33 /* Document.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Document.cxx; path = ../../src/Document.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D60FC1682C00E85C33 /* DocumentAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocumentAccessor.cxx; path = ../../src/DocumentAccessor.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D70FC1682C00E85C33 /* Editor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Editor.cxx; path = ../../src/Editor.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D80FC1682C00E85C33 /* ExternalLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExternalLexer.cxx; path = ../../src/ExternalLexer.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4D90FC1682C00E85C33 /* Indicator.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indicator.cxx; path = ../../src/Indicator.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4DA0FC1682C00E85C33 /* KeyMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyMap.cxx; path = ../../src/KeyMap.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4DB0FC1682C00E85C33 /* KeyWords.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyWords.cxx; path = ../../src/KeyWords.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4E90FC1684700E85C33 /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../src/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4EA0FC1684700E85C33 /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../src/LexAda.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4EB0FC1684700E85C33 /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../src/LexAPDL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4EC0FC1684700E85C33 /* LexAsm.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsm.cxx; path = ../../src/LexAsm.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4ED0FC1684700E85C33 /* LexAsn1.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsn1.cxx; path = ../../src/LexAsn1.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4EE0FC1684700E85C33 /* LexASY.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexASY.cxx; path = ../../src/LexASY.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4EF0FC1684700E85C33 /* LexAU3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAU3.cxx; path = ../../src/LexAU3.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F00FC1684700E85C33 /* LexAVE.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVE.cxx; path = ../../src/LexAVE.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F10FC1684700E85C33 /* LexBaan.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBaan.cxx; path = ../../src/LexBaan.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F20FC1684700E85C33 /* LexBash.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBash.cxx; path = ../../src/LexBash.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F30FC1684700E85C33 /* LexBasic.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBasic.cxx; path = ../../src/LexBasic.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F40FC1684700E85C33 /* LexBullant.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBullant.cxx; path = ../../src/LexBullant.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F50FC1684700E85C33 /* LexCaml.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCaml.cxx; path = ../../src/LexCaml.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F60FC1684700E85C33 /* LexCLW.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCLW.cxx; path = ../../src/LexCLW.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F70FC1684700E85C33 /* LexCmake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCmake.cxx; path = ../../src/LexCmake.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F80FC1684700E85C33 /* LexCOBOL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCOBOL.cxx; path = ../../src/LexCOBOL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4F90FC1684700E85C33 /* LexConf.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexConf.cxx; path = ../../src/LexConf.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4FA0FC1684700E85C33 /* LexCPP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCPP.cxx; path = ../../src/LexCPP.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4FB0FC1684700E85C33 /* LexCrontab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCrontab.cxx; path = ../../src/LexCrontab.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4FC0FC1684700E85C33 /* LexCsound.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCsound.cxx; path = ../../src/LexCsound.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4FD0FC1684700E85C33 /* LexCSS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCSS.cxx; path = ../../src/LexCSS.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4FE0FC1684700E85C33 /* LexD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexD.cxx; path = ../../src/LexD.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E4FF0FC1684700E85C33 /* LexEiffel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEiffel.cxx; path = ../../src/LexEiffel.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5000FC1684700E85C33 /* LexErlang.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexErlang.cxx; path = ../../src/LexErlang.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5010FC1684700E85C33 /* LexEScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEScript.cxx; path = ../../src/LexEScript.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5020FC1684700E85C33 /* LexFlagship.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFlagship.cxx; path = ../../src/LexFlagship.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5030FC1684700E85C33 /* LexForth.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexForth.cxx; path = ../../src/LexForth.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5040FC1684700E85C33 /* LexFortran.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFortran.cxx; path = ../../src/LexFortran.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5050FC1684700E85C33 /* LexGAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGAP.cxx; path = ../../src/LexGAP.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5060FC1684700E85C33 /* LexGui4Cli.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGui4Cli.cxx; path = ../../src/LexGui4Cli.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5070FC1684700E85C33 /* LexHaskell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHaskell.cxx; path = ../../src/LexHaskell.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5080FC1684700E85C33 /* LexHTML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHTML.cxx; path = ../../src/LexHTML.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5090FC1684700E85C33 /* LexInno.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexInno.cxx; path = ../../src/LexInno.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E50A0FC1684700E85C33 /* LexKix.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKix.cxx; path = ../../src/LexKix.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E50B0FC1684700E85C33 /* LexLisp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLisp.cxx; path = ../../src/LexLisp.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E50C0FC1684700E85C33 /* LexLout.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLout.cxx; path = ../../src/LexLout.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E50D0FC1684700E85C33 /* LexLua.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLua.cxx; path = ../../src/LexLua.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E50E0FC1684700E85C33 /* LexMagik.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMagik.cxx; path = ../../src/LexMagik.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E50F0FC1684700E85C33 /* LexMatlab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMatlab.cxx; path = ../../src/LexMatlab.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5100FC1684700E85C33 /* LexMetapost.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMetapost.cxx; path = ../../src/LexMetapost.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5110FC1684700E85C33 /* LexMMIXAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMMIXAL.cxx; path = ../../src/LexMMIXAL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5120FC1684700E85C33 /* LexMPT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMPT.cxx; path = ../../src/LexMPT.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5130FC1684700E85C33 /* LexMSSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMSSQL.cxx; path = ../../src/LexMSSQL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5140FC1684700E85C33 /* LexMySQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMySQL.cxx; path = ../../src/LexMySQL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5150FC1684700E85C33 /* LexNimrod.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNimrod.cxx; path = ../../src/LexNimrod.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5160FC1684700E85C33 /* LexNsis.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNsis.cxx; path = ../../src/LexNsis.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5170FC1684700E85C33 /* LexOpal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOpal.cxx; path = ../../src/LexOpal.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5180FC1684700E85C33 /* LexOthers.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOthers.cxx; path = ../../src/LexOthers.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5190FC1684700E85C33 /* LexPascal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPascal.cxx; path = ../../src/LexPascal.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E51A0FC1684700E85C33 /* LexPB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPB.cxx; path = ../../src/LexPB.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E51B0FC1684700E85C33 /* LexPerl.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPerl.cxx; path = ../../src/LexPerl.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E51C0FC1684700E85C33 /* LexPLM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPLM.cxx; path = ../../src/LexPLM.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E51D0FC1684700E85C33 /* LexPOV.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPOV.cxx; path = ../../src/LexPOV.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E51E0FC1684700E85C33 /* LexPowerPro.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerPro.cxx; path = ../../src/LexPowerPro.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E51F0FC1684700E85C33 /* LexPowerShell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerShell.cxx; path = ../../src/LexPowerShell.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5200FC1684700E85C33 /* LexProgress.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProgress.cxx; path = ../../src/LexProgress.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5210FC1684700E85C33 /* LexPS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPS.cxx; path = ../../src/LexPS.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5220FC1684700E85C33 /* LexPython.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPython.cxx; path = ../../src/LexPython.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5230FC1684700E85C33 /* LexR.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexR.cxx; path = ../../src/LexR.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5240FC1684700E85C33 /* LexRebol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRebol.cxx; path = ../../src/LexRebol.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5250FC1684700E85C33 /* LexRuby.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRuby.cxx; path = ../../src/LexRuby.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5260FC1684700E85C33 /* LexScriptol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexScriptol.cxx; path = ../../src/LexScriptol.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5270FC1684700E85C33 /* LexSmalltalk.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSmalltalk.cxx; path = ../../src/LexSmalltalk.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5280FC1684700E85C33 /* LexSML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSML.cxx; path = ../../src/LexSML.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5290FC1684700E85C33 /* LexSorcus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSorcus.cxx; path = ../../src/LexSorcus.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E52A0FC1684700E85C33 /* LexSpecman.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpecman.cxx; path = ../../src/LexSpecman.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E52B0FC1684700E85C33 /* LexSpice.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpice.cxx; path = ../../src/LexSpice.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E52C0FC1684700E85C33 /* LexSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSQL.cxx; path = ../../src/LexSQL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E52D0FC1684700E85C33 /* LexTACL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTACL.cxx; path = ../../src/LexTACL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E52E0FC1684700E85C33 /* LexTADS3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../src/LexTADS3.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E52F0FC1684700E85C33 /* LexTAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTAL.cxx; path = ../../src/LexTAL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5300FC1684700E85C33 /* LexTCL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCL.cxx; path = ../../src/LexTCL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5310FC1684700E85C33 /* LexTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTeX.cxx; path = ../../src/LexTeX.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5320FC1684700E85C33 /* LexVB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVB.cxx; path = ../../src/LexVB.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5330FC1684700E85C33 /* LexVerilog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVerilog.cxx; path = ../../src/LexVerilog.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5340FC1684700E85C33 /* LexVHDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVHDL.cxx; path = ../../src/LexVHDL.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5350FC1684700E85C33 /* LexYAML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexYAML.cxx; path = ../../src/LexYAML.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5830FC1685C00E85C33 /* LineMarker.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineMarker.cxx; path = ../../src/LineMarker.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5840FC1685C00E85C33 /* PerLine.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerLine.cxx; path = ../../src/PerLine.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5850FC1685C00E85C33 /* PositionCache.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PositionCache.cxx; path = ../../src/PositionCache.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5860FC1685C00E85C33 /* PropSet.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PropSet.cxx; path = ../../src/PropSet.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5870FC1685C00E85C33 /* RESearch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RESearch.cxx; path = ../../src/RESearch.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5880FC1685C00E85C33 /* RunStyles.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RunStyles.cxx; path = ../../src/RunStyles.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E5890FC1685C00E85C33 /* ScintillaBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScintillaBase.cxx; path = ../../src/ScintillaBase.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E58A0FC1685C00E85C33 /* Style.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Style.cxx; path = ../../src/Style.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E58B0FC1685C00E85C33 /* StyleContext.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleContext.cxx; path = ../../src/StyleContext.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E58C0FC1685C00E85C33 /* UniConversion.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniConversion.cxx; path = ../../src/UniConversion.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E58D0FC1685C00E85C33 /* ViewStyle.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStyle.cxx; path = ../../src/ViewStyle.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E58E0FC1685C00E85C33 /* WindowAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WindowAccessor.cxx; path = ../../src/WindowAccessor.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E58F0FC1685C00E85C33 /* XPM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XPM.cxx; path = ../../src/XPM.cxx; sourceTree = SOURCE_ROOT; };
+ 2744E59D0FC168A100E85C33 /* InfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBar.h; path = ../InfoBar.h; sourceTree = SOURCE_ROOT; };
+ 2744E59E0FC168A100E85C33 /* PlatCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatCocoa.h; path = ../PlatCocoa.h; sourceTree = SOURCE_ROOT; };
+ 2744E59F0FC168A100E85C33 /* QuartzTextLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextLayout.h; path = ../QuartzTextLayout.h; sourceTree = SOURCE_ROOT; };
+ 2744E5A00FC168A100E85C33 /* QuartzTextStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyleAttribute.h; path = ../QuartzTextStyleAttribute.h; sourceTree = SOURCE_ROOT; };
+ 2744E5A20FC168A100E85C33 /* ScintillaCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaCocoa.h; path = ../ScintillaCocoa.h; sourceTree = "<group>"; };
+ 2744E5A30FC168A100E85C33 /* ScintillaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaView.h; path = ../ScintillaView.h; sourceTree = "<group>"; };
+ 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBarCommunicator.h; path = ../InfoBarCommunicator.h; sourceTree = SOURCE_ROOT; };
+ 2744E5AD0FC168C500E85C33 /* InfoBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InfoBar.mm; path = ../InfoBar.mm; sourceTree = SOURCE_ROOT; };
+ 2744E5AE0FC168C500E85C33 /* PlatCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatCocoa.mm; path = ../PlatCocoa.mm; sourceTree = SOURCE_ROOT; };
+ 2744E5B00FC168C500E85C33 /* ScintillaCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaCocoa.mm; path = ../ScintillaCocoa.mm; sourceTree = "<group>"; };
+ 2744E5B10FC168C500E85C33 /* ScintillaView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaView.mm; path = ../ScintillaView.mm; sourceTree = "<group>"; };
+ 277B5BD9104EE6B900F40CE4 /* Selection.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Selection.cxx; path = ../../src/Selection.cxx; sourceTree = SOURCE_ROOT; };
+ 277B5BDB104EE6CF00F40CE4 /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../src/PropSetSimple.h; sourceTree = SOURCE_ROOT; };
+ 277B5BDC104EE6CF00F40CE4 /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = SOURCE_ROOT; };
+ 27FEF4510FC1B413005E115A /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info_bar_bg.png; sourceTree = "<group>"; };
+ 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_busy.png; sourceTree = "<group>"; };
+ 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_flipped.png; sourceTree = "<group>"; };
+ 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; };
+ 8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };
+ D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8DC2EF560486A6940098B216 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 034768DFFF38A50411DB9C8B /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8DC2EF5B0486A6940098B216 /* Scintilla.framework */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 0867D691FE84028FC02AAC07 /* Scintilla */ = {
+ isa = PBXGroup;
+ children = (
+ 2744E47D0FC1674E00E85C33 /* Lexers */,
+ 2744E47C0FC1674100E85C33 /* Backend */,
+ 08FB77AEFE84172EC02AAC07 /* Classes */,
+ 32C88DFF0371C24200C91783 /* Other Sources */,
+ 089C1665FE841158C02AAC07 /* Resources */,
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
+ 034768DFFF38A50411DB9C8B /* Products */,
+ );
+ name = Scintilla;
+ sourceTree = "<group>";
+ };
+ 0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
+ 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
+ );
+ name = "External Frameworks and Libraries";
+ sourceTree = "<group>";
+ };
+ 089C1665FE841158C02AAC07 /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 27FEF4500FC1B413005E115A /* res */,
+ 8DC2EF5A0486A6940098B216 /* Info.plist */,
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 08FB77AEFE84172EC02AAC07 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 2744E4980FC167ED00E85C33 /* Source Files */,
+ 2744E4970FC167E400E85C33 /* Header Files */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 0867D6A5FE840307C02AAC07 /* AppKit.framework */,
+ D2F7E79907B2D74100F64583 /* CoreData.framework */,
+ 0867D69BFE84028FC02AAC07 /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 2744E47C0FC1674100E85C33 /* Backend */ = {
+ isa = PBXGroup;
+ children = (
+ 2744E47F0FC1676400E85C33 /* Source Files */,
+ 2744E47E0FC1675800E85C33 /* Header Files */,
+ );
+ name = Backend;
+ sourceTree = "<group>";
+ };
+ 2744E47D0FC1674E00E85C33 /* Lexers */ = {
+ isa = PBXGroup;
+ children = (
+ 11374AA910514AA900651FE9 /* LexMarkdown.cxx */,
+ 2744E4E90FC1684700E85C33 /* LexAbaqus.cxx */,
+ 2744E4EA0FC1684700E85C33 /* LexAda.cxx */,
+ 2744E4EB0FC1684700E85C33 /* LexAPDL.cxx */,
+ 2744E4EC0FC1684700E85C33 /* LexAsm.cxx */,
+ 2744E4ED0FC1684700E85C33 /* LexAsn1.cxx */,
+ 2744E4EE0FC1684700E85C33 /* LexASY.cxx */,
+ 2744E4EF0FC1684700E85C33 /* LexAU3.cxx */,
+ 2744E4F00FC1684700E85C33 /* LexAVE.cxx */,
+ 2744E4F10FC1684700E85C33 /* LexBaan.cxx */,
+ 2744E4F20FC1684700E85C33 /* LexBash.cxx */,
+ 2744E4F30FC1684700E85C33 /* LexBasic.cxx */,
+ 2744E4F40FC1684700E85C33 /* LexBullant.cxx */,
+ 2744E4F50FC1684700E85C33 /* LexCaml.cxx */,
+ 2744E4F60FC1684700E85C33 /* LexCLW.cxx */,
+ 2744E4F70FC1684700E85C33 /* LexCmake.cxx */,
+ 2744E4F80FC1684700E85C33 /* LexCOBOL.cxx */,
+ 2744E4F90FC1684700E85C33 /* LexConf.cxx */,
+ 2744E4FA0FC1684700E85C33 /* LexCPP.cxx */,
+ 2744E4FB0FC1684700E85C33 /* LexCrontab.cxx */,
+ 2744E4FC0FC1684700E85C33 /* LexCsound.cxx */,
+ 2744E4FD0FC1684700E85C33 /* LexCSS.cxx */,
+ 2744E4FE0FC1684700E85C33 /* LexD.cxx */,
+ 2744E4FF0FC1684700E85C33 /* LexEiffel.cxx */,
+ 2744E5000FC1684700E85C33 /* LexErlang.cxx */,
+ 2744E5010FC1684700E85C33 /* LexEScript.cxx */,
+ 2744E5020FC1684700E85C33 /* LexFlagship.cxx */,
+ 2744E5030FC1684700E85C33 /* LexForth.cxx */,
+ 2744E5040FC1684700E85C33 /* LexFortran.cxx */,
+ 2744E5050FC1684700E85C33 /* LexGAP.cxx */,
+ 2744E5060FC1684700E85C33 /* LexGui4Cli.cxx */,
+ 2744E5070FC1684700E85C33 /* LexHaskell.cxx */,
+ 2744E5080FC1684700E85C33 /* LexHTML.cxx */,
+ 2744E5090FC1684700E85C33 /* LexInno.cxx */,
+ 2744E50A0FC1684700E85C33 /* LexKix.cxx */,
+ 2744E50B0FC1684700E85C33 /* LexLisp.cxx */,
+ 2744E50C0FC1684700E85C33 /* LexLout.cxx */,
+ 2744E50D0FC1684700E85C33 /* LexLua.cxx */,
+ 2744E50E0FC1684700E85C33 /* LexMagik.cxx */,
+ 2744E50F0FC1684700E85C33 /* LexMatlab.cxx */,
+ 2744E5100FC1684700E85C33 /* LexMetapost.cxx */,
+ 2744E5110FC1684700E85C33 /* LexMMIXAL.cxx */,
+ 2744E5120FC1684700E85C33 /* LexMPT.cxx */,
+ 2744E5130FC1684700E85C33 /* LexMSSQL.cxx */,
+ 2744E5140FC1684700E85C33 /* LexMySQL.cxx */,
+ 2744E5150FC1684700E85C33 /* LexNimrod.cxx */,
+ 2744E5160FC1684700E85C33 /* LexNsis.cxx */,
+ 2744E5170FC1684700E85C33 /* LexOpal.cxx */,
+ 2744E5180FC1684700E85C33 /* LexOthers.cxx */,
+ 2744E5190FC1684700E85C33 /* LexPascal.cxx */,
+ 2744E51A0FC1684700E85C33 /* LexPB.cxx */,
+ 2744E51B0FC1684700E85C33 /* LexPerl.cxx */,
+ 2744E51C0FC1684700E85C33 /* LexPLM.cxx */,
+ 2744E51D0FC1684700E85C33 /* LexPOV.cxx */,
+ 2744E51E0FC1684700E85C33 /* LexPowerPro.cxx */,
+ 2744E51F0FC1684700E85C33 /* LexPowerShell.cxx */,
+ 2744E5200FC1684700E85C33 /* LexProgress.cxx */,
+ 2744E5210FC1684700E85C33 /* LexPS.cxx */,
+ 2744E5220FC1684700E85C33 /* LexPython.cxx */,
+ 2744E5230FC1684700E85C33 /* LexR.cxx */,
+ 2744E5240FC1684700E85C33 /* LexRebol.cxx */,
+ 2744E5250FC1684700E85C33 /* LexRuby.cxx */,
+ 2744E5260FC1684700E85C33 /* LexScriptol.cxx */,
+ 2744E5270FC1684700E85C33 /* LexSmalltalk.cxx */,
+ 2744E5280FC1684700E85C33 /* LexSML.cxx */,
+ 2744E5290FC1684700E85C33 /* LexSorcus.cxx */,
+ 2744E52A0FC1684700E85C33 /* LexSpecman.cxx */,
+ 2744E52B0FC1684700E85C33 /* LexSpice.cxx */,
+ 2744E52C0FC1684700E85C33 /* LexSQL.cxx */,
+ 2744E52D0FC1684700E85C33 /* LexTACL.cxx */,
+ 2744E52E0FC1684700E85C33 /* LexTADS3.cxx */,
+ 2744E52F0FC1684700E85C33 /* LexTAL.cxx */,
+ 2744E5300FC1684700E85C33 /* LexTCL.cxx */,
+ 2744E5310FC1684700E85C33 /* LexTeX.cxx */,
+ 2744E5320FC1684700E85C33 /* LexVB.cxx */,
+ 2744E5330FC1684700E85C33 /* LexVerilog.cxx */,
+ 2744E5340FC1684700E85C33 /* LexVHDL.cxx */,
+ 2744E5350FC1684700E85C33 /* LexYAML.cxx */,
+ );
+ name = Lexers;
+ sourceTree = "<group>";
+ };
+ 2744E47E0FC1675800E85C33 /* Header Files */ = {
+ isa = PBXGroup;
+ children = (
+ 277B5BDB104EE6CF00F40CE4 /* PropSetSimple.h */,
+ 277B5BDC104EE6CF00F40CE4 /* Selection.h */,
+ 2744E4990FC1681200E85C33 /* AutoComplete.h */,
+ 2744E49A0FC1681200E85C33 /* CallTip.h */,
+ 2744E49B0FC1681200E85C33 /* CellBuffer.h */,
+ 2744E49C0FC1681200E85C33 /* CharacterSet.h */,
+ 2744E49D0FC1681200E85C33 /* CharClassify.h */,
+ 2744E49E0FC1681200E85C33 /* ContractionState.h */,
+ 2744E49F0FC1681200E85C33 /* Decoration.h */,
+ 2744E4A00FC1681200E85C33 /* Document.h */,
+ 2744E4A10FC1681200E85C33 /* DocumentAccessor.h */,
+ 2744E4A20FC1681200E85C33 /* Editor.h */,
+ 2744E4A30FC1681200E85C33 /* ExternalLexer.h */,
+ 2744E4A40FC1681200E85C33 /* Indicator.h */,
+ 2744E4A50FC1681200E85C33 /* KeyMap.h */,
+ 2744E4A60FC1681200E85C33 /* LineMarker.h */,
+ 2744E4A70FC1681200E85C33 /* Partitioning.h */,
+ 2744E4A80FC1681200E85C33 /* PerLine.h */,
+ 2744E4A90FC1681200E85C33 /* PositionCache.h */,
+ 2744E4AA0FC1681200E85C33 /* RESearch.h */,
+ 2744E4AB0FC1681200E85C33 /* RunStyles.h */,
+ 2744E4AC0FC1681200E85C33 /* ScintillaBase.h */,
+ 2744E4AD0FC1681200E85C33 /* SplitVector.h */,
+ 2744E4AE0FC1681200E85C33 /* Style.h */,
+ 2744E4AF0FC1681200E85C33 /* StyleContext.h */,
+ 2744E4B00FC1681200E85C33 /* SVector.h */,
+ 2744E4B10FC1681200E85C33 /* UniConversion.h */,
+ 2744E4B20FC1681200E85C33 /* ViewStyle.h */,
+ 2744E4B30FC1681200E85C33 /* XPM.h */,
+ );
+ name = "Header Files";
+ sourceTree = "<group>";
+ };
+ 2744E47F0FC1676400E85C33 /* Source Files */ = {
+ isa = PBXGroup;
+ children = (
+ 277B5BD9104EE6B900F40CE4 /* Selection.cxx */,
+ 2744E4CF0FC1682C00E85C33 /* AutoComplete.cxx */,
+ 2744E4D00FC1682C00E85C33 /* CallTip.cxx */,
+ 2744E4D10FC1682C00E85C33 /* CellBuffer.cxx */,
+ 2744E4D20FC1682C00E85C33 /* CharClassify.cxx */,
+ 2744E4D30FC1682C00E85C33 /* ContractionState.cxx */,
+ 2744E4D40FC1682C00E85C33 /* Decoration.cxx */,
+ 2744E4D50FC1682C00E85C33 /* Document.cxx */,
+ 2744E4D60FC1682C00E85C33 /* DocumentAccessor.cxx */,
+ 2744E4D70FC1682C00E85C33 /* Editor.cxx */,
+ 2744E4D80FC1682C00E85C33 /* ExternalLexer.cxx */,
+ 2744E4D90FC1682C00E85C33 /* Indicator.cxx */,
+ 2744E4DA0FC1682C00E85C33 /* KeyMap.cxx */,
+ 2744E4DB0FC1682C00E85C33 /* KeyWords.cxx */,
+ 2744E5830FC1685C00E85C33 /* LineMarker.cxx */,
+ 2744E5840FC1685C00E85C33 /* PerLine.cxx */,
+ 2744E5850FC1685C00E85C33 /* PositionCache.cxx */,
+ 2744E5860FC1685C00E85C33 /* PropSet.cxx */,
+ 2744E5870FC1685C00E85C33 /* RESearch.cxx */,
+ 2744E5880FC1685C00E85C33 /* RunStyles.cxx */,
+ 2744E5890FC1685C00E85C33 /* ScintillaBase.cxx */,
+ 2744E58A0FC1685C00E85C33 /* Style.cxx */,
+ 2744E58B0FC1685C00E85C33 /* StyleContext.cxx */,
+ 2744E58C0FC1685C00E85C33 /* UniConversion.cxx */,
+ 2744E58D0FC1685C00E85C33 /* ViewStyle.cxx */,
+ 2744E58E0FC1685C00E85C33 /* WindowAccessor.cxx */,
+ 2744E58F0FC1685C00E85C33 /* XPM.cxx */,
+ );
+ name = "Source Files";
+ sourceTree = "<group>";
+ };
+ 2744E4970FC167E400E85C33 /* Header Files */ = {
+ isa = PBXGroup;
+ children = (
+ 2744E59D0FC168A100E85C33 /* InfoBar.h */,
+ 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */,
+ 2744E59E0FC168A100E85C33 /* PlatCocoa.h */,
+ 2744E59F0FC168A100E85C33 /* QuartzTextLayout.h */,
+ 2744E5A00FC168A100E85C33 /* QuartzTextStyleAttribute.h */,
+ 2744E5A20FC168A100E85C33 /* ScintillaCocoa.h */,
+ 2744E5A30FC168A100E85C33 /* ScintillaView.h */,
+ 2744E4830FC1678600E85C33 /* Accessor.h */,
+ 2744E4840FC1678600E85C33 /* KeyWords.h */,
+ 2744E4850FC1678600E85C33 /* Platform.h */,
+ 2744E4860FC1678600E85C33 /* PropSet.h */,
+ 2744E4870FC1678600E85C33 /* SciLexer.h */,
+ 2744E4880FC1678600E85C33 /* Scintilla.h */,
+ 2744E48A0FC1678600E85C33 /* ScintillaWidget.h */,
+ 2744E48C0FC1678600E85C33 /* WindowAccessor.h */,
+ );
+ name = "Header Files";
+ sourceTree = "<group>";
+ };
+ 2744E4980FC167ED00E85C33 /* Source Files */ = {
+ isa = PBXGroup;
+ children = (
+ 2744E5AD0FC168C500E85C33 /* InfoBar.mm */,
+ 2744E5AE0FC168C500E85C33 /* PlatCocoa.mm */,
+ 2744E5B00FC168C500E85C33 /* ScintillaCocoa.mm */,
+ 2744E5B10FC168C500E85C33 /* ScintillaView.mm */,
+ );
+ name = "Source Files";
+ sourceTree = "<group>";
+ };
+ 27FEF4500FC1B413005E115A /* res */ = {
+ isa = PBXGroup;
+ children = (
+ 27FEF4510FC1B413005E115A /* info_bar_bg.png */,
+ 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */,
+ 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */,
+ );
+ name = res;
+ path = ../res;
+ sourceTree = SOURCE_ROOT;
+ };
+ 32C88DFF0371C24200C91783 /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXHeadersBuildPhase section */
+ 8DC2EF500486A6940098B216 /* Headers */ = {
+ isa = PBXHeadersBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2791F3EB0FC1A3BD009DBCF9 /* AutoComplete.h in Headers */,
+ 2791F3EC0FC1A3BD009DBCF9 /* CallTip.h in Headers */,
+ 2791F3ED0FC1A3BD009DBCF9 /* CellBuffer.h in Headers */,
+ 2791F3EE0FC1A3BD009DBCF9 /* CharacterSet.h in Headers */,
+ 2791F3EF0FC1A3BD009DBCF9 /* CharClassify.h in Headers */,
+ 2791F3F00FC1A3BD009DBCF9 /* ContractionState.h in Headers */,
+ 2791F3F10FC1A3BD009DBCF9 /* Decoration.h in Headers */,
+ 2791F3F20FC1A3BD009DBCF9 /* Document.h in Headers */,
+ 2791F3F30FC1A3BD009DBCF9 /* DocumentAccessor.h in Headers */,
+ 2791F3F40FC1A3BD009DBCF9 /* Editor.h in Headers */,
+ 2791F3F50FC1A3BD009DBCF9 /* ExternalLexer.h in Headers */,
+ 2791F3F60FC1A3BD009DBCF9 /* Indicator.h in Headers */,
+ 2791F3F70FC1A3BD009DBCF9 /* KeyMap.h in Headers */,
+ 2791F3F80FC1A3BD009DBCF9 /* LineMarker.h in Headers */,
+ 2791F3F90FC1A3BD009DBCF9 /* Partitioning.h in Headers */,
+ 2791F3FA0FC1A3BD009DBCF9 /* PerLine.h in Headers */,
+ 2791F3FB0FC1A3BD009DBCF9 /* PositionCache.h in Headers */,
+ 2791F3FC0FC1A3BD009DBCF9 /* RESearch.h in Headers */,
+ 2791F3FD0FC1A3BD009DBCF9 /* RunStyles.h in Headers */,
+ 2791F3FE0FC1A3BD009DBCF9 /* ScintillaBase.h in Headers */,
+ 2791F3FF0FC1A3BD009DBCF9 /* SplitVector.h in Headers */,
+ 2791F4000FC1A3BD009DBCF9 /* Style.h in Headers */,
+ 2791F4010FC1A3BD009DBCF9 /* StyleContext.h in Headers */,
+ 2791F4020FC1A3BD009DBCF9 /* SVector.h in Headers */,
+ 2791F4030FC1A3BD009DBCF9 /* UniConversion.h in Headers */,
+ 2791F4040FC1A3BD009DBCF9 /* ViewStyle.h in Headers */,
+ 2791F4050FC1A3BD009DBCF9 /* XPM.h in Headers */,
+ 2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */,
+ 2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */,
+ 2791F3C60FC19F71009DBCF9 /* PlatCocoa.h in Headers */,
+ 2791F3E30FC1A3AE009DBCF9 /* QuartzTextLayout.h in Headers */,
+ 2791F3E40FC1A3AE009DBCF9 /* QuartzTextStyleAttribute.h in Headers */,
+ 2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */,
+ 2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */,
+ 2791F3E50FC1A3AE009DBCF9 /* Accessor.h in Headers */,
+ 2791F3E60FC1A3AE009DBCF9 /* KeyWords.h in Headers */,
+ 2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */,
+ 2791F3E70FC1A3AE009DBCF9 /* PropSet.h in Headers */,
+ 2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */,
+ 2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */,
+ 2791F3E80FC1A3AE009DBCF9 /* ScintillaWidget.h in Headers */,
+ 2791F3EA0FC1A3AE009DBCF9 /* WindowAccessor.h in Headers */,
+ 277B5BDD104EE6CF00F40CE4 /* PropSetSimple.h in Headers */,
+ 277B5BDE104EE6CF00F40CE4 /* Selection.h in Headers */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXHeadersBuildPhase section */
+
+/* Begin PBXNativeTarget section */
+ 8DC2EF4F0486A6940098B216 /* Scintilla */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "Scintilla" */;
+ buildPhases = (
+ 8DC2EF500486A6940098B216 /* Headers */,
+ 8DC2EF520486A6940098B216 /* Resources */,
+ 8DC2EF540486A6940098B216 /* Sources */,
+ 8DC2EF560486A6940098B216 /* Frameworks */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ );
+ name = Scintilla;
+ productInstallPath = "$(HOME)/Library/Frameworks";
+ productName = Scintilla;
+ productReference = 8DC2EF5B0486A6940098B216 /* Scintilla.framework */;
+ productType = "com.apple.product-type.framework";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 0867D690FE84028FC02AAC07 /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 0867D691FE84028FC02AAC07 /* Scintilla */;
+ productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
+ projectDirPath = "";
+ projectRoot = "";
+ targets = (
+ 8DC2EF4F0486A6940098B216 /* Scintilla */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8DC2EF520486A6940098B216 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
+ 27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */,
+ 27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */,
+ 27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8DC2EF540486A6940098B216 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 2744E4DC0FC1682C00E85C33 /* AutoComplete.cxx in Sources */,
+ 2744E4DD0FC1682C00E85C33 /* CallTip.cxx in Sources */,
+ 2744E4DE0FC1682C00E85C33 /* CellBuffer.cxx in Sources */,
+ 2744E4DF0FC1682C00E85C33 /* CharClassify.cxx in Sources */,
+ 2744E4E00FC1682C00E85C33 /* ContractionState.cxx in Sources */,
+ 2744E4E10FC1682C00E85C33 /* Decoration.cxx in Sources */,
+ 2744E4E20FC1682C00E85C33 /* Document.cxx in Sources */,
+ 2744E4E30FC1682C00E85C33 /* DocumentAccessor.cxx in Sources */,
+ 2744E4E40FC1682C00E85C33 /* Editor.cxx in Sources */,
+ 2744E4E50FC1682C00E85C33 /* ExternalLexer.cxx in Sources */,
+ 2744E4E60FC1682C00E85C33 /* Indicator.cxx in Sources */,
+ 2744E4E70FC1682C00E85C33 /* KeyMap.cxx in Sources */,
+ 2744E4E80FC1682C00E85C33 /* KeyWords.cxx in Sources */,
+ 2744E5360FC1684700E85C33 /* LexAbaqus.cxx in Sources */,
+ 2744E5370FC1684700E85C33 /* LexAda.cxx in Sources */,
+ 2744E5380FC1684700E85C33 /* LexAPDL.cxx in Sources */,
+ 2744E5390FC1684700E85C33 /* LexAsm.cxx in Sources */,
+ 2744E53A0FC1684700E85C33 /* LexAsn1.cxx in Sources */,
+ 2744E53B0FC1684700E85C33 /* LexASY.cxx in Sources */,
+ 2744E53C0FC1684700E85C33 /* LexAU3.cxx in Sources */,
+ 2744E53D0FC1684700E85C33 /* LexAVE.cxx in Sources */,
+ 2744E53E0FC1684700E85C33 /* LexBaan.cxx in Sources */,
+ 2744E53F0FC1684700E85C33 /* LexBash.cxx in Sources */,
+ 2744E5400FC1684700E85C33 /* LexBasic.cxx in Sources */,
+ 2744E5410FC1684700E85C33 /* LexBullant.cxx in Sources */,
+ 2744E5420FC1684700E85C33 /* LexCaml.cxx in Sources */,
+ 2744E5430FC1684700E85C33 /* LexCLW.cxx in Sources */,
+ 2744E5440FC1684700E85C33 /* LexCmake.cxx in Sources */,
+ 2744E5450FC1684700E85C33 /* LexCOBOL.cxx in Sources */,
+ 2744E5460FC1684700E85C33 /* LexConf.cxx in Sources */,
+ 2744E5470FC1684700E85C33 /* LexCPP.cxx in Sources */,
+ 2744E5480FC1684700E85C33 /* LexCrontab.cxx in Sources */,
+ 2744E5490FC1684700E85C33 /* LexCsound.cxx in Sources */,
+ 2744E54A0FC1684700E85C33 /* LexCSS.cxx in Sources */,
+ 2744E54B0FC1684700E85C33 /* LexD.cxx in Sources */,
+ 2744E54C0FC1684700E85C33 /* LexEiffel.cxx in Sources */,
+ 2744E54D0FC1684700E85C33 /* LexErlang.cxx in Sources */,
+ 2744E54E0FC1684700E85C33 /* LexEScript.cxx in Sources */,
+ 2744E54F0FC1684700E85C33 /* LexFlagship.cxx in Sources */,
+ 2744E5500FC1684700E85C33 /* LexForth.cxx in Sources */,
+ 2744E5510FC1684700E85C33 /* LexFortran.cxx in Sources */,
+ 2744E5520FC1684700E85C33 /* LexGAP.cxx in Sources */,
+ 2744E5530FC1684700E85C33 /* LexGui4Cli.cxx in Sources */,
+ 2744E5540FC1684700E85C33 /* LexHaskell.cxx in Sources */,
+ 2744E5550FC1684700E85C33 /* LexHTML.cxx in Sources */,
+ 2744E5560FC1684700E85C33 /* LexInno.cxx in Sources */,
+ 2744E5570FC1684700E85C33 /* LexKix.cxx in Sources */,
+ 2744E5580FC1684700E85C33 /* LexLisp.cxx in Sources */,
+ 2744E5590FC1684700E85C33 /* LexLout.cxx in Sources */,
+ 2744E55A0FC1684700E85C33 /* LexLua.cxx in Sources */,
+ 2744E55B0FC1684700E85C33 /* LexMagik.cxx in Sources */,
+ 2744E55C0FC1684700E85C33 /* LexMatlab.cxx in Sources */,
+ 2744E55D0FC1684700E85C33 /* LexMetapost.cxx in Sources */,
+ 2744E55E0FC1684700E85C33 /* LexMMIXAL.cxx in Sources */,
+ 2744E55F0FC1684700E85C33 /* LexMPT.cxx in Sources */,
+ 2744E5600FC1684700E85C33 /* LexMSSQL.cxx in Sources */,
+ 2744E5610FC1684700E85C33 /* LexMySQL.cxx in Sources */,
+ 2744E5620FC1684700E85C33 /* LexNimrod.cxx in Sources */,
+ 2744E5630FC1684700E85C33 /* LexNsis.cxx in Sources */,
+ 2744E5640FC1684700E85C33 /* LexOpal.cxx in Sources */,
+ 2744E5650FC1684700E85C33 /* LexOthers.cxx in Sources */,
+ 2744E5660FC1684700E85C33 /* LexPascal.cxx in Sources */,
+ 2744E5670FC1684700E85C33 /* LexPB.cxx in Sources */,
+ 2744E5680FC1684700E85C33 /* LexPerl.cxx in Sources */,
+ 2744E5690FC1684700E85C33 /* LexPLM.cxx in Sources */,
+ 2744E56A0FC1684700E85C33 /* LexPOV.cxx in Sources */,
+ 2744E56B0FC1684700E85C33 /* LexPowerPro.cxx in Sources */,
+ 2744E56C0FC1684700E85C33 /* LexPowerShell.cxx in Sources */,
+ 2744E56D0FC1684700E85C33 /* LexProgress.cxx in Sources */,
+ 2744E56E0FC1684700E85C33 /* LexPS.cxx in Sources */,
+ 2744E56F0FC1684700E85C33 /* LexPython.cxx in Sources */,
+ 2744E5700FC1684700E85C33 /* LexR.cxx in Sources */,
+ 2744E5710FC1684700E85C33 /* LexRebol.cxx in Sources */,
+ 2744E5720FC1684700E85C33 /* LexRuby.cxx in Sources */,
+ 2744E5730FC1684700E85C33 /* LexScriptol.cxx in Sources */,
+ 2744E5740FC1684700E85C33 /* LexSmalltalk.cxx in Sources */,
+ 2744E5750FC1684700E85C33 /* LexSML.cxx in Sources */,
+ 2744E5760FC1684700E85C33 /* LexSorcus.cxx in Sources */,
+ 2744E5770FC1684700E85C33 /* LexSpecman.cxx in Sources */,
+ 2744E5780FC1684700E85C33 /* LexSpice.cxx in Sources */,
+ 2744E5790FC1684700E85C33 /* LexSQL.cxx in Sources */,
+ 2744E57A0FC1684700E85C33 /* LexTACL.cxx in Sources */,
+ 2744E57B0FC1684700E85C33 /* LexTADS3.cxx in Sources */,
+ 2744E57C0FC1684700E85C33 /* LexTAL.cxx in Sources */,
+ 2744E57D0FC1684700E85C33 /* LexTCL.cxx in Sources */,
+ 2744E57E0FC1684700E85C33 /* LexTeX.cxx in Sources */,
+ 2744E57F0FC1684700E85C33 /* LexVB.cxx in Sources */,
+ 2744E5800FC1684700E85C33 /* LexVerilog.cxx in Sources */,
+ 2744E5810FC1684700E85C33 /* LexVHDL.cxx in Sources */,
+ 2744E5820FC1684700E85C33 /* LexYAML.cxx in Sources */,
+ 2744E5900FC1685C00E85C33 /* LineMarker.cxx in Sources */,
+ 2744E5910FC1685C00E85C33 /* PerLine.cxx in Sources */,
+ 2744E5920FC1685C00E85C33 /* PositionCache.cxx in Sources */,
+ 2744E5930FC1685C00E85C33 /* PropSet.cxx in Sources */,
+ 2744E5940FC1685C00E85C33 /* RESearch.cxx in Sources */,
+ 2744E5950FC1685C00E85C33 /* RunStyles.cxx in Sources */,
+ 2744E5960FC1685C00E85C33 /* ScintillaBase.cxx in Sources */,
+ 2744E5970FC1685C00E85C33 /* Style.cxx in Sources */,
+ 2744E5980FC1685C00E85C33 /* StyleContext.cxx in Sources */,
+ 2744E5990FC1685C00E85C33 /* UniConversion.cxx in Sources */,
+ 2744E59A0FC1685C00E85C33 /* ViewStyle.cxx in Sources */,
+ 2744E59B0FC1685C00E85C33 /* WindowAccessor.cxx in Sources */,
+ 2744E59C0FC1685C00E85C33 /* XPM.cxx in Sources */,
+ 2744E5B20FC168C500E85C33 /* InfoBar.mm in Sources */,
+ 2744E5B30FC168C500E85C33 /* PlatCocoa.mm in Sources */,
+ 2744E5B50FC168C500E85C33 /* ScintillaCocoa.mm in Sources */,
+ 2744E5B60FC168C500E85C33 /* ScintillaView.mm in Sources */,
+ 277B5BDA104EE6B900F40CE4 /* Selection.cxx in Sources */,
+ 11374AAA10514AA900651FE9 /* LexMarkdown.cxx in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXVariantGroup section */
+ 089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C1667FE841158C02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ 1DEB91AE08733DA50010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Scintilla_Prefix.pch;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ SCI_NAMESPACE,
+ SCI_LEXER,
+ );
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ PRODUCT_NAME = Scintilla;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Debug;
+ };
+ 1DEB91AF08733DA50010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ DYLIB_COMPATIBILITY_VERSION = 1;
+ DYLIB_CURRENT_VERSION = 1;
+ FRAMEWORK_VERSION = A;
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = Scintilla_Prefix.pch;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ SCI_NAMESPACE,
+ SCI_LEXER,
+ );
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "@executable_path/../Frameworks";
+ PRODUCT_NAME = Scintilla;
+ WRAPPER_EXTENSION = framework;
+ };
+ name = Release;
+ };
+ 1DEB91B208733DA50010E9CD /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Debug;
+ };
+ 1DEB91B308733DA50010E9CD /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "Scintilla" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB91AE08733DA50010E9CD /* Debug */,
+ 1DEB91AF08733DA50010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ 1DEB91B208733DA50010E9CD /* Debug */,
+ 1DEB91B308733DA50010E9CD /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
+}
diff --git a/scintilla/cocoa/ScintillaFramework/Scintilla_Prefix.pch b/scintilla/cocoa/ScintillaFramework/Scintilla_Prefix.pch new file mode 100644 index 0000000..d14300b --- /dev/null +++ b/scintilla/cocoa/ScintillaFramework/Scintilla_Prefix.pch @@ -0,0 +1,7 @@ +//
+// Prefix header for all source files of the 'Scintilla' target in the 'Scintilla' project.
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
diff --git a/scintilla/cocoa/ScintillaListBox.h b/scintilla/cocoa/ScintillaListBox.h new file mode 100644 index 0000000..9f6b722 --- /dev/null +++ b/scintilla/cocoa/ScintillaListBox.h @@ -0,0 +1,64 @@ +
+/*
+ * ScintillaMacOSX.h
+ * tutorial
+ *
+ * Created by Evan Jones on Sun Sep 01 2002.
+ *
+ */
+
+#ifndef SCINTILLA_LISTBOX_H
+#define SCINTILLA_LISTBOX_H
+
+#include "TView.h"
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+#include <ctype.h>
+#include <time.h>
+
+#include "Platform.h"
+#include "Scintilla.h"
+
+static const OSType scintillaListBoxType = 'sclb';
+
+namespace Scintilla {
+
+class ScintillaListBox : public TView
+{
+public:
+ // Private so ScintillaListBox objects can not be copied
+ ScintillaListBox(const ScintillaListBox &) : TView( NULL ) {}
+ ScintillaListBox &operator=(const ScintillaListBox &) { return * this; }
+ ~ScintillaListBox() {};
+
+public:
+ /** This is the class ID that we've assigned to Scintilla. */
+ static const CFStringRef kScintillaListBoxClassID;
+ static const ControlKind kScintillaListBoxKind;
+
+ ScintillaListBox( void* windowid );
+
+ /** Returns the HIView object kind, needed to subclass TView. */
+ virtual ControlKind GetKind() { return kScintillaListBoxKind; }
+
+private:
+
+ virtual ControlPartCode HitTest( const HIPoint& where );
+ virtual void Draw( RgnHandle rgn, CGContextRef gc );
+ virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
+ virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
+
+public:
+ static HIViewRef Create();
+private:
+ static OSStatus Construct( HIViewRef inControl, TView** outView );
+
+};
+
+
+}
+
+
+#endif
diff --git a/scintilla/cocoa/ScintillaListBox.mm b/scintilla/cocoa/ScintillaListBox.mm new file mode 100644 index 0000000..8c51785 --- /dev/null +++ b/scintilla/cocoa/ScintillaListBox.mm @@ -0,0 +1,110 @@ +
+#include "ScintillaCocoa.h"
+#include "ScintillaListBox.h"
+
+using namespace Scintilla;
+
+const CFStringRef ScintillaListBox::kScintillaListBoxClassID = CFSTR( "org.scintilla.listbox" );
+const ControlKind ScintillaListBox::kScintillaListBoxKind = { 'ejon', 'Sclb' };
+
+ScintillaListBox::ScintillaListBox( void* windowid ) :
+ TView( reinterpret_cast<HIViewRef>( windowid ) )
+{
+ ActivateInterface( kMouse );
+ // debugPrint = true;
+}
+
+void ScintillaListBox::Draw(
+ RgnHandle /*inLimitRgn*/,
+ CGContextRef inContext )
+{
+ Rect contentBounds;
+ GetControlBounds(GetViewRef(), &contentBounds);
+
+ HIRect controlFrame;
+ HIViewGetFrame( GetViewRef(), &controlFrame );
+
+ // what is the global pos?
+ Surface *surfaceWindow = Surface::Allocate();
+ if (surfaceWindow)
+ {
+ surfaceWindow->Init(inContext, GetViewRef());
+
+ // TODO: Implement or find workaround
+ // ctip->PaintCT(surfaceWindow);
+ surfaceWindow->Release();
+ delete surfaceWindow;
+ }
+
+}
+
+ControlPartCode ScintillaListBox::HitTest( const HIPoint& where )
+{
+ if ( CGRectContainsPoint( Bounds(), where ) )
+ return 1;
+ else
+ return kControlNoPart;
+}
+
+OSStatus ScintillaListBox::MouseDown(HIPoint& location, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
+{
+ if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
+ ListBox* ctip = NULL;
+ ScintillaCocoa *sciThis = NULL;
+ OSStatus err = GetControlProperty( GetViewRef(), scintillaListBoxType, 0, sizeof( ctip ), NULL, &ctip );
+ err = GetControlProperty( GetViewRef(), scintillaMacOSType, 0, sizeof( sciThis ), NULL, &sciThis );
+
+ // TODO: Implement of find work around.
+ // ctip->MouseClick( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ));
+
+ // TODO: still needed?
+ // sciThis->ListBoxClick();
+ return noErr;
+}
+
+OSStatus ScintillaListBox::MouseUp(HIPoint& /*inMouseLocation*/, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
+{
+ if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
+ return noErr;
+}
+
+HIViewRef ScintillaListBox::Create()
+{
+ // Register the HIView, if needed
+ static bool registered = false;
+
+ if ( not registered )
+ {
+ TView::RegisterSubclass( kScintillaListBoxClassID, Construct );
+ registered = true;
+ }
+
+ OSStatus err = noErr;
+ EventRef event = CreateInitializationEvent();
+ assert( event != NULL );
+
+ HIViewRef control = NULL;
+ err = HIObjectCreate( kScintillaListBoxClassID, event, reinterpret_cast<HIObjectRef*>( &control ) );
+ ReleaseEvent( event );
+ if ( err == noErr ) {
+ Platform::DebugPrintf("ScintillaListBox::Create control %08X\n",control);
+ return control;
+ }
+ return NULL;
+}
+
+OSStatus ScintillaListBox::Construct( HIViewRef inControl, TView** outView )
+{
+ *outView = new ScintillaListBox( inControl );
+ Platform::DebugPrintf("ScintillaListBox::Construct scintilla %08X\n",*outView);
+ if ( *outView != NULL )
+ return noErr;
+ else
+ return memFullErr;
+}
+
+extern "C" {
+HIViewRef scintilla_listbox_new() {
+ return ScintillaListBox::Create();
+}
+}
diff --git a/scintilla/cocoa/ScintillaTest/AppController.h b/scintilla/cocoa/ScintillaTest/AppController.h new file mode 100644 index 0000000..fe84e0a --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/AppController.h @@ -0,0 +1,23 @@ +/**
+ * AppController.h
+ * SciTest
+ *
+ * Created by Mike Lischke on 01.04.09.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#import "ScintillaView.h"
+#import "InfoBar.h"
+
+@interface AppController : NSObject {
+ IBOutlet NSBox *mEditHost;
+ ScintillaView* mEditor;
+}
+
+- (void) awakeFromNib;
+- (void) setupEditor;
+
+@end
diff --git a/scintilla/cocoa/ScintillaTest/AppController.mm b/scintilla/cocoa/ScintillaTest/AppController.mm new file mode 100644 index 0000000..217bc9c --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/AppController.mm @@ -0,0 +1,215 @@ +/**
+ * AppController.m
+ * ScintillaTest
+ *
+ * Created by Mike Lischke on 01.04.09.
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import "AppController.h"
+
+const char major_keywords[] =
+ "accessible add all alter analyze and as asc asensitive "
+ "before between bigint binary blob both by "
+ "call cascade case change char character check collate column condition connection constraint "
+ "continue convert create cross current_date current_time current_timestamp current_user cursor "
+ "database databases day_hour day_microsecond day_minute day_second dec decimal declare default "
+ "delayed delete desc describe deterministic distinct distinctrow div double drop dual "
+ "each else elseif enclosed escaped exists exit explain "
+ "false fetch float float4 float8 for force foreign from fulltext "
+ "goto grant group "
+ "having high_priority hour_microsecond hour_minute hour_second "
+ "if ignore in index infile inner inout insensitive insert int int1 int2 int3 int4 int8 integer "
+ "interval into is iterate "
+ "join "
+ "key keys kill "
+ "label leading leave left like limit linear lines load localtime localtimestamp lock long "
+ "longblob longtext loop low_priority "
+ "master_ssl_verify_server_cert match mediumblob mediumint mediumtext middleint minute_microsecond "
+ "minute_second mod modifies "
+ "natural not no_write_to_binlog null numeric "
+ "on optimize option optionally or order out outer outfile "
+ "precision primary procedure purge "
+ "range read reads read_only read_write real references regexp release rename repeat replace "
+ "require restrict return revoke right rlike "
+ "schema schemas second_microsecond select sensitive separator set show smallint spatial specific "
+ "sql sqlexception sqlstate sqlwarning sql_big_result sql_calc_found_rows sql_small_result ssl "
+ "starting straight_join "
+ "table terminated then tinyblob tinyint tinytext to trailing trigger true "
+ "undo union unique unlock unsigned update upgrade usage use using utc_date utc_time utc_timestamp "
+ "values varbinary varchar varcharacter varying "
+ "when where while with write "
+ "xor "
+ "year_month "
+ "zerofill";
+
+const char procedure_keywords[] = // Not reserved words but intrinsic part of procedure definitions.
+ "begin comment end";
+
+const char client_keywords[] = // Definition of keywords only used by clients, not the server itself.
+ "delimiter";
+
+const char user_keywords[] = // Definition of own keywords, not used by MySQL.
+ "edit";
+
+//--------------------------------------------------------------------------------------------------
+
+@implementation AppController
+
+- (void) awakeFromNib
+{
+ // Manually set up the scintilla editor. Create an instance and dock it to our edit host.
+ // Leave some free space around the new view to avoid overlapping with the box borders.
+ NSRect newFrame = mEditHost.frame;
+ newFrame.size.width -= 2 * newFrame.origin.x;
+ newFrame.size.height -= 3 * newFrame.origin.y;
+
+ mEditor = [[[ScintillaView alloc] initWithFrame: newFrame] autorelease];
+
+ [mEditHost.contentView addSubview: mEditor];
+ [mEditor setAutoresizesSubviews: YES];
+ [mEditor setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
+
+ // Let's load some text for the editor, as initial content.
+ NSError* error = nil;
+
+ NSString* path = [[NSBundle mainBundle] pathForResource: @"TestData"
+ ofType: @"sql" inDirectory: nil];
+
+ NSString* sql = [NSString stringWithContentsOfFile: path
+ encoding: NSUTF8StringEncoding
+ error: &error];
+ if (error && [[error domain] isEqual: NSCocoaErrorDomain])
+ NSLog(@"%@", error);
+
+ [mEditor setString: sql];
+
+ [self setupEditor];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Initialize scintilla editor (styles, colors, markers, folding etc.].
+ */
+- (void) setupEditor
+{
+ // Lexer type is MySQL.
+ [mEditor setGeneralProperty: SCI_SETLEXER parameter: SCLEX_MYSQL value: 0];
+ // alternatively: [mEditor setEditorProperty: SCI_SETLEXERLANGUAGE parameter: nil value: (sptr_t) "mysql"];
+
+ // Number of styles we use with this lexer.
+ [mEditor setGeneralProperty: SCI_SETSTYLEBITS parameter: 5 value: 0];
+
+ // Keywords to highlight. Indices are:
+ // 0 - Major keywords (reserved keywords)
+ // 1 - Normal keywords (everything not reserved but integral part of the language)
+ // 2 - Database objects
+ // 3 - Function keywords
+ // 4 - System variable keywords
+ // 5 - Procedure keywords (keywords used in procedures like "begin" and "end")
+ // 6..8 - User keywords 1..3
+ [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 0 value: major_keywords];
+ [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 5 value: procedure_keywords];
+ [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 6 value: client_keywords];
+ [mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 7 value: user_keywords];
+
+ // Colors and styles for various syntactic elements. First the default style.
+ [mEditor setStringProperty: SCI_STYLESETFONT parameter: STYLE_DEFAULT value: @"Andale Mono"];
+ // [mEditor setStringProperty: SCI_STYLESETFONT parameter: STYLE_DEFAULT value: @"Monospac821 BT"]; // Very pleasing programmer's font.
+ [mEditor setGeneralProperty: SCI_STYLESETSIZE parameter: STYLE_DEFAULT value: 14];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: STYLE_DEFAULT value: [NSColor blackColor]];
+
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DEFAULT value: [NSColor blackColor]];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_COMMENT fromHTML: @"#097BF7"];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_COMMENTLINE fromHTML: @"#097BF7"];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_HIDDENCOMMAND fromHTML: @"#097BF7"];
+ [mEditor setColorProperty: SCI_STYLESETBACK parameter: SCE_MYSQL_HIDDENCOMMAND fromHTML: @"#F0F0F0"];
+
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_VARIABLE fromHTML: @"378EA5"];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_SYSTEMVARIABLE fromHTML: @"378EA5"];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_KNOWNSYSTEMVARIABLE fromHTML: @"#3A37A5"];
+
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_NUMBER fromHTML: @"#7F7F00"];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_SQSTRING fromHTML: @"#FFAA3E"];
+
+ // Note: if we were using ANSI quotes we would set the DQSTRING to the same color as the
+ // the back tick string.
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DQSTRING fromHTML: @"#274A6D"];
+
+ // Keyword highlighting.
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_MAJORKEYWORD fromHTML: @"#007F00"];
+ [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_MAJORKEYWORD value: 1];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_KEYWORD fromHTML: @"#007F00"];
+ [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_KEYWORD value: 1];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_PROCEDUREKEYWORD fromHTML: @"#56007F"];
+ [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_PROCEDUREKEYWORD value: 1];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_USER1 fromHTML: @"#808080"];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_USER2 fromHTML: @"#808080"];
+ [mEditor setColorProperty: SCI_STYLESETBACK parameter: SCE_MYSQL_USER2 fromHTML: @"#F0E0E0"];
+
+ // The following 3 styles have no impact as we did not set a keyword list for any of them.
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DATABASEOBJECT value: [NSColor redColor]];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_FUNCTION value: [NSColor redColor]];
+
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_IDENTIFIER value: [NSColor blackColor]];
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_QUOTEDIDENTIFIER fromHTML: @"#274A6D"];
+ [mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_SQL_OPERATOR value: 1];
+
+ // Line number style.
+ [mEditor setColorProperty: SCI_STYLESETFORE parameter: STYLE_LINENUMBER fromHTML: @"#F0F0F0"];
+ [mEditor setColorProperty: SCI_STYLESETBACK parameter: STYLE_LINENUMBER fromHTML: @"#808080"];
+
+ [mEditor setGeneralProperty: SCI_SETMARGINTYPEN parameter: 0 value: SC_MARGIN_NUMBER];
+ [mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 0 value: 35];
+
+ // Markers.
+ [mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 1 value: 16];
+
+ // Some special lexer properties.
+ [mEditor setLexerProperty: @"fold" value: @"1"];
+ [mEditor setLexerProperty: @"fold.compact" value: @"0"];
+ [mEditor setLexerProperty: @"fold.comment" value: @"1"];
+ [mEditor setLexerProperty: @"fold.preprocessor" value: @"1"];
+
+ // Folder setup.
+ [mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 2 value: 16];
+ [mEditor setGeneralProperty: SCI_SETMARGINMASKN parameter: 2 value: SC_MASK_FOLDERS];
+ [mEditor setGeneralProperty: SCI_SETMARGINSENSITIVEN parameter: 2 value: 1];
+ [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEROPEN value: SC_MARK_BOXMINUS];
+ [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDER value: SC_MARK_BOXPLUS];
+ [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERSUB value: SC_MARK_VLINE];
+ [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERTAIL value: SC_MARK_LCORNER];
+ [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEREND value: SC_MARK_BOXPLUSCONNECTED];
+ [mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEROPENMID value: SC_MARK_BOXMINUSCONNECTED];
+ [mEditor setGeneralProperty
+ : SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERMIDTAIL value: SC_MARK_TCORNER];
+ for (int n= 25; n < 32; ++n) // Markers 25..31 are reserved for folding.
+ {
+ [mEditor setColorProperty: SCI_MARKERSETFORE parameter: n value: [NSColor whiteColor]];
+ [mEditor setColorProperty: SCI_MARKERSETBACK parameter: n value: [NSColor blackColor]];
+ }
+
+ // Init markers & indicators for highlighting of syntax errors.
+ [mEditor setColorProperty: SCI_INDICSETFORE parameter: 0 value: [NSColor redColor]];
+ [mEditor setGeneralProperty: SCI_INDICSETUNDER parameter: 0 value: 1];
+ [mEditor setGeneralProperty: SCI_INDICSETSTYLE parameter: 0 value: INDIC_SQUIGGLE];
+
+ [mEditor setColorProperty: SCI_MARKERSETBACK parameter: 0 fromHTML: @"#B1151C"];
+
+ [mEditor setColorProperty: SCI_SETSELBACK parameter: 1 value: [NSColor selectedTextBackgroundColor]];
+
+ // Uncomment if you wanna see auto wrapping in action.
+ //[mEditor setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 0];
+
+ InfoBar* infoBar = [[[InfoBar alloc] initWithFrame: NSMakeRect(0, 0, 400, 0)] autorelease];
+ [infoBar setDisplay: IBShowAll];
+ [mEditor setInfoBar: infoBar top: NO];
+ [mEditor setStatusText: @"Operation complete"];
+}
+
+@end
+
+//--------------------------------------------------------------------------------------------------
+
diff --git a/scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings b/scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings Binary files differnew file mode 100644 index 0000000..85e4bb6 --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/English.lproj/InfoPlist.strings diff --git a/scintilla/cocoa/ScintillaTest/English.lproj/MainMenu.xib b/scintilla/cocoa/ScintillaTest/English.lproj/MainMenu.xib new file mode 100644 index 0000000..253d29d --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/English.lproj/MainMenu.xib @@ -0,0 +1,3185 @@ +<?xml version="1.0" encoding="UTF-8"?>
+<archive type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="7.03">
+ <data>
+ <int key="IBDocument.SystemTarget">1050</int>
+ <string key="IBDocument.SystemVersion">9G55</string>
+ <string key="IBDocument.InterfaceBuilderVersion">677</string>
+ <string key="IBDocument.AppKitVersion">949.43</string>
+ <string key="IBDocument.HIToolboxVersion">353.00</string>
+ <object class="NSMutableArray" key="IBDocument.EditedObjectIDs">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <integer value="372"/>
+ </object>
+ <object class="NSArray" key="IBDocument.PluginDependencies">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ </object>
+ <object class="NSMutableDictionary" key="IBDocument.Metadata">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <object class="NSMutableArray" key="IBDocument.RootObjects" id="1048">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSCustomObject" id="1021">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSCustomObject" id="1014">
+ <string key="NSClassName">FirstResponder</string>
+ </object>
+ <object class="NSCustomObject" id="1050">
+ <string key="NSClassName">NSApplication</string>
+ </object>
+ <object class="NSMenu" id="649796088">
+ <string key="NSTitle">AMainMenu</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="694149608">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle">NewApplication</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <object class="NSCustomResource" key="NSOnImage" id="35465992">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuCheckmark</string>
+ </object>
+ <object class="NSCustomResource" key="NSMixedImage" id="502551668">
+ <string key="NSClassName">NSImage</string>
+ <string key="NSResourceName">NSMenuMixedState</string>
+ </object>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="110575045">
+ <string key="NSTitle">NewApplication</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="238522557">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">About NewApplication</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="304266470">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="609285721">
+ <reference key="NSMenu" ref="110575045"/>
+ <string type="base64-UTF8" key="NSTitle">UHJlZmVyZW5jZXPigKY</string>
+ <string key="NSKeyEquiv">,</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="481834944">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1046388886">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Services</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="752062318">
+ <string key="NSTitle">Services</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <string key="NSName">_NSServicesMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="646227648">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="755159360">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Hide NewApplication</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="342932134">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Hide Others</string>
+ <string key="NSKeyEquiv">h</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="908899353">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Show All</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1056857174">
+ <reference key="NSMenu" ref="110575045"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="632727374">
+ <reference key="NSMenu" ref="110575045"/>
+ <string key="NSTitle">Quit NewApplication</string>
+ <string key="NSKeyEquiv">q</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ <string key="NSName">_NSAppleMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="379814623">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle">File</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="720053764">
+ <string key="NSTitle">File</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="705341025">
+ <reference key="NSMenu" ref="720053764"/>
+ <string key="NSTitle">New</string>
+ <string key="NSKeyEquiv">n</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="722745758">
+ <reference key="NSMenu" ref="720053764"/>
+ <string type="base64-UTF8" key="NSTitle">T3BlbuKApg</string>
+ <string key="NSKeyEquiv">o</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1025936716">
+ <reference key="NSMenu" ref="720053764"/>
+ <string key="NSTitle">Open Recent</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="1065607017">
+ <string key="NSTitle">Open Recent</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="759406840">
+ <reference key="NSMenu" ref="1065607017"/>
+ <string key="NSTitle">Clear Menu</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ <string key="NSName">_NSRecentDocumentsMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="425164168">
+ <reference key="NSMenu" ref="720053764"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="776162233">
+ <reference key="NSMenu" ref="720053764"/>
+ <string key="NSTitle">Close</string>
+ <string key="NSKeyEquiv">w</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1023925487">
+ <reference key="NSMenu" ref="720053764"/>
+ <string key="NSTitle">Save</string>
+ <string key="NSKeyEquiv">s</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="117038363">
+ <reference key="NSMenu" ref="720053764"/>
+ <string type="base64-UTF8" key="NSTitle">U2F2ZSBBc+KApg</string>
+ <string key="NSKeyEquiv">S</string>
+ <int key="NSKeyEquivModMask">1179648</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="579971712">
+ <reference key="NSMenu" ref="720053764"/>
+ <string key="NSTitle">Revert to Saved</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1010469920">
+ <reference key="NSMenu" ref="720053764"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="294629803">
+ <reference key="NSMenu" ref="720053764"/>
+ <string key="NSTitle">Page Setup...</string>
+ <string key="NSKeyEquiv">P</string>
+ <int key="NSKeyEquivModMask">1179648</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSToolTip"/>
+ </object>
+ <object class="NSMenuItem" id="49223823">
+ <reference key="NSMenu" ref="720053764"/>
+ <string type="base64-UTF8" key="NSTitle">UHJpbnTigKY</string>
+ <string key="NSKeyEquiv">p</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="952259628">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle">Edit</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="789758025">
+ <string key="NSTitle">Edit</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="1058277027">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Undo</string>
+ <string key="NSKeyEquiv">z</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="790794224">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Redo</string>
+ <string key="NSKeyEquiv">Z</string>
+ <int key="NSKeyEquivModMask">1179648</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1040322652">
+ <reference key="NSMenu" ref="789758025"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="296257095">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Cut</string>
+ <string key="NSKeyEquiv">x</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="860595796">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Copy</string>
+ <string key="NSKeyEquiv">c</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="29853731">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Paste</string>
+ <string key="NSKeyEquiv">v</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="437104165">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Delete</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="583158037">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Select All</string>
+ <string key="NSKeyEquiv">a</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="212016141">
+ <reference key="NSMenu" ref="789758025"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="892235320">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Find</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="963351320">
+ <string key="NSTitle">Find</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="447796847">
+ <reference key="NSMenu" ref="963351320"/>
+ <string type="base64-UTF8" key="NSTitle">RmluZOKApg</string>
+ <string key="NSKeyEquiv">f</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">1</int>
+ </object>
+ <object class="NSMenuItem" id="326711663">
+ <reference key="NSMenu" ref="963351320"/>
+ <string key="NSTitle">Find Next</string>
+ <string key="NSKeyEquiv">g</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">2</int>
+ </object>
+ <object class="NSMenuItem" id="270902937">
+ <reference key="NSMenu" ref="963351320"/>
+ <string key="NSTitle">Find Previous</string>
+ <string key="NSKeyEquiv">G</string>
+ <int key="NSKeyEquivModMask">1179648</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">3</int>
+ </object>
+ <object class="NSMenuItem" id="159080638">
+ <reference key="NSMenu" ref="963351320"/>
+ <string key="NSTitle">Use Selection for Find</string>
+ <string key="NSKeyEquiv">e</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">7</int>
+ </object>
+ <object class="NSMenuItem" id="88285865">
+ <reference key="NSMenu" ref="963351320"/>
+ <string key="NSTitle">Jump to Selection</string>
+ <string key="NSKeyEquiv">j</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="972420730">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Spelling and Grammar</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="769623530">
+ <string key="NSTitle">Spelling and Grammar</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="679648819">
+ <reference key="NSMenu" ref="769623530"/>
+ <string type="base64-UTF8" key="NSTitle">U2hvdyBTcGVsbGluZ+KApg</string>
+ <string key="NSKeyEquiv">:</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="96193923">
+ <reference key="NSMenu" ref="769623530"/>
+ <string key="NSTitle">Check Spelling</string>
+ <string key="NSKeyEquiv">;</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="948374510">
+ <reference key="NSMenu" ref="769623530"/>
+ <string key="NSTitle">Check Spelling While Typing</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="967646866">
+ <reference key="NSMenu" ref="769623530"/>
+ <string key="NSTitle">Check Grammar With Spelling</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="507821607">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Substitutions</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="698887838">
+ <string key="NSTitle">Substitutions</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="605118523">
+ <reference key="NSMenu" ref="698887838"/>
+ <string key="NSTitle">Smart Copy/Paste</string>
+ <string key="NSKeyEquiv">f</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">1</int>
+ </object>
+ <object class="NSMenuItem" id="197661976">
+ <reference key="NSMenu" ref="698887838"/>
+ <string key="NSTitle">Smart Quotes</string>
+ <string key="NSKeyEquiv">g</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">2</int>
+ </object>
+ <object class="NSMenuItem" id="708854459">
+ <reference key="NSMenu" ref="698887838"/>
+ <string key="NSTitle">Smart Links</string>
+ <string key="NSKeyEquiv">G</string>
+ <int key="NSKeyEquivModMask">1179648</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">3</int>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="676164635">
+ <reference key="NSMenu" ref="789758025"/>
+ <string key="NSTitle">Speech</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="785027613">
+ <string key="NSTitle">Speech</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="731782645">
+ <reference key="NSMenu" ref="785027613"/>
+ <string key="NSTitle">Start Speaking</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="680220178">
+ <reference key="NSMenu" ref="785027613"/>
+ <string key="NSTitle">Stop Speaking</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="302598603">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle">Format</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="941447902">
+ <string key="NSTitle">Format</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="792887677">
+ <reference key="NSMenu" ref="941447902"/>
+ <string key="NSTitle">Font</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="786677654">
+ <string key="NSTitle">Font</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="159677712">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Show Fonts</string>
+ <string key="NSKeyEquiv">t</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="305399458">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Bold</string>
+ <string key="NSKeyEquiv">b</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">2</int>
+ </object>
+ <object class="NSMenuItem" id="814362025">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Italic</string>
+ <string key="NSKeyEquiv">i</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">1</int>
+ </object>
+ <object class="NSMenuItem" id="330926929">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Underline</string>
+ <string key="NSKeyEquiv">u</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="533507878">
+ <reference key="NSMenu" ref="786677654"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="158063935">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Bigger</string>
+ <string key="NSKeyEquiv">+</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">3</int>
+ </object>
+ <object class="NSMenuItem" id="885547335">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Smaller</string>
+ <string key="NSKeyEquiv">-</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <int key="NSTag">4</int>
+ </object>
+ <object class="NSMenuItem" id="901062459">
+ <reference key="NSMenu" ref="786677654"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="767671776">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Kern</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="175441468">
+ <string key="NSTitle">Kern</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="252969304">
+ <reference key="NSMenu" ref="175441468"/>
+ <string key="NSTitle">Use Default</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="766922938">
+ <reference key="NSMenu" ref="175441468"/>
+ <string key="NSTitle">Use None</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="677519740">
+ <reference key="NSMenu" ref="175441468"/>
+ <string key="NSTitle">Tighten</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="238351151">
+ <reference key="NSMenu" ref="175441468"/>
+ <string key="NSTitle">Loosen</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="691570813">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Ligature</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="1058217995">
+ <string key="NSTitle">Ligature</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="706297211">
+ <reference key="NSMenu" ref="1058217995"/>
+ <string key="NSTitle">Use Default</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="568384683">
+ <reference key="NSMenu" ref="1058217995"/>
+ <string key="NSTitle">Use None</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="663508465">
+ <reference key="NSMenu" ref="1058217995"/>
+ <string key="NSTitle">Use All</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="769124883">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Baseline</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="18263474">
+ <string key="NSTitle">Baseline</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="257962622">
+ <reference key="NSMenu" ref="18263474"/>
+ <string key="NSTitle">Use Default</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="644725453">
+ <reference key="NSMenu" ref="18263474"/>
+ <string key="NSTitle">Superscript</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1037576581">
+ <reference key="NSMenu" ref="18263474"/>
+ <string key="NSTitle">Subscript</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="941806246">
+ <reference key="NSMenu" ref="18263474"/>
+ <string key="NSTitle">Raise</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1045724900">
+ <reference key="NSMenu" ref="18263474"/>
+ <string key="NSTitle">Lower</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="739652853">
+ <reference key="NSMenu" ref="786677654"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="1012600125">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Show Colors</string>
+ <string key="NSKeyEquiv">C</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="214559597">
+ <reference key="NSMenu" ref="786677654"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="596732606">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Copy Style</string>
+ <string key="NSKeyEquiv">c</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="393423671">
+ <reference key="NSMenu" ref="786677654"/>
+ <string key="NSTitle">Paste Style</string>
+ <string key="NSKeyEquiv">v</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ <string key="NSName">_NSFontMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="15516124">
+ <reference key="NSMenu" ref="941447902"/>
+ <string key="NSTitle">Text</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="23081656">
+ <string key="NSTitle">Text</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="135107054">
+ <reference key="NSMenu" ref="23081656"/>
+ <string key="NSTitle">Align Left</string>
+ <string key="NSKeyEquiv">{</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="310547522">
+ <reference key="NSMenu" ref="23081656"/>
+ <string key="NSTitle">Center</string>
+ <string key="NSKeyEquiv">|</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="436088763">
+ <reference key="NSMenu" ref="23081656"/>
+ <string key="NSTitle">Justify</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="498119243">
+ <reference key="NSMenu" ref="23081656"/>
+ <string key="NSTitle">Align Right</string>
+ <string key="NSKeyEquiv">}</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="607995063">
+ <reference key="NSMenu" ref="23081656"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="420564933">
+ <reference key="NSMenu" ref="23081656"/>
+ <string key="NSTitle">Show Ruler</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="479856769">
+ <reference key="NSMenu" ref="23081656"/>
+ <string key="NSTitle">Copy Ruler</string>
+ <string key="NSKeyEquiv">c</string>
+ <int key="NSKeyEquivModMask">1310720</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="333628178">
+ <reference key="NSMenu" ref="23081656"/>
+ <string key="NSTitle">Paste Ruler</string>
+ <string key="NSKeyEquiv">v</string>
+ <int key="NSKeyEquivModMask">1310720</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="586577488">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle">View</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="466310130">
+ <string key="NSTitle">View</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="102151532">
+ <reference key="NSMenu" ref="466310130"/>
+ <string key="NSTitle">Show Toolbar</string>
+ <string key="NSKeyEquiv">t</string>
+ <int key="NSKeyEquivModMask">1572864</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="237841660">
+ <reference key="NSMenu" ref="466310130"/>
+ <string type="base64-UTF8" key="NSTitle">Q3VzdG9taXplIFRvb2xiYXLigKY</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="713487014">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle">Window</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="835318025">
+ <string key="NSTitle">Window</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="1011231497">
+ <reference key="NSMenu" ref="835318025"/>
+ <string key="NSTitle">Minimize</string>
+ <string key="NSKeyEquiv">m</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="575023229">
+ <reference key="NSMenu" ref="835318025"/>
+ <string key="NSTitle">Zoom</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="299356726">
+ <reference key="NSMenu" ref="835318025"/>
+ <bool key="NSIsDisabled">YES</bool>
+ <bool key="NSIsSeparator">YES</bool>
+ <string key="NSTitle"/>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ <object class="NSMenuItem" id="625202149">
+ <reference key="NSMenu" ref="835318025"/>
+ <string key="NSTitle">Bring All to Front</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ <string key="NSName">_NSWindowsMenu</string>
+ </object>
+ </object>
+ <object class="NSMenuItem" id="391199113">
+ <reference key="NSMenu" ref="649796088"/>
+ <string key="NSTitle">Help</string>
+ <string key="NSKeyEquiv"/>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ <string key="NSAction">submenuAction:</string>
+ <object class="NSMenu" key="NSSubmenu" id="374024848">
+ <string key="NSTitle">Help</string>
+ <object class="NSMutableArray" key="NSMenuItems">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMenuItem" id="238773614">
+ <reference key="NSMenu" ref="374024848"/>
+ <string key="NSTitle">NewApplication Help</string>
+ <string key="NSKeyEquiv">?</string>
+ <int key="NSKeyEquivModMask">1048576</int>
+ <int key="NSMnemonicLoc">2147483647</int>
+ <reference key="NSOnImage" ref="35465992"/>
+ <reference key="NSMixedImage" ref="502551668"/>
+ </object>
+ </object>
+ </object>
+ </object>
+ </object>
+ <string key="NSName">_NSMainMenu</string>
+ </object>
+ <object class="NSWindowTemplate" id="972006081">
+ <int key="NSWindowStyleMask">15</int>
+ <int key="NSWindowBacking">2</int>
+ <string key="NSWindowRect">{{335, 58}, {982, 692}}</string>
+ <int key="NSWTFlags">1946157056</int>
+ <string key="NSWindowTitle">Window</string>
+ <string key="NSWindowClass">NSWindow</string>
+ <nil key="NSViewClass"/>
+ <string key="NSWindowContentMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ <object class="NSView" key="NSWindowView" id="439893737">
+ <reference key="NSNextResponder"/>
+ <int key="NSvFlags">319</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSBox" id="1016473779">
+ <reference key="NSNextResponder" ref="439893737"/>
+ <int key="NSvFlags">18</int>
+ <object class="NSMutableArray" key="NSSubviews">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSView" id="33804839">
+ <reference key="NSNextResponder" ref="1016473779"/>
+ <int key="NSvFlags">256</int>
+ <string key="NSFrame">{{1, 1}, {842, 640}}</string>
+ <reference key="NSSuperview" ref="1016473779"/>
+ </object>
+ </object>
+ <string key="NSFrame">{{17, 16}, {844, 656}}</string>
+ <reference key="NSSuperview" ref="439893737"/>
+ <string key="NSOffsets">{0, 0}</string>
+ <object class="NSTextFieldCell" key="NSTitleCell">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">0</int>
+ <string key="NSContents">Scintilla Editor</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.100000e+01</double>
+ <int key="NSfFlags">3100</int>
+ </object>
+ <object class="NSColor" key="NSBackgroundColor">
+ <int key="NSColorSpace">6</int>
+ <string key="NSCatalogName">System</string>
+ <string key="NSColorName">textBackgroundColor</string>
+ <object class="NSColor" key="NSColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MQA</bytes>
+ </object>
+ </object>
+ <object class="NSColor" key="NSTextColor">
+ <int key="NSColorSpace">3</int>
+ <bytes key="NSWhite">MCAwLjgwMDAwMDAxAA</bytes>
+ </object>
+ </object>
+ <reference key="NSContentView" ref="33804839"/>
+ <int key="NSBorderType">1</int>
+ <int key="NSBoxType">0</int>
+ <int key="NSTitlePosition">2</int>
+ <bool key="NSTransparent">NO</bool>
+ </object>
+ <object class="NSButton" id="610247741">
+ <reference key="NSNextResponder" ref="439893737"/>
+ <int key="NSvFlags">289</int>
+ <string key="NSFrame">{{872, 12}, {96, 32}}</string>
+ <reference key="NSSuperview" ref="439893737"/>
+ <bool key="NSEnabled">YES</bool>
+ <object class="NSButtonCell" key="NSCell" id="1009897894">
+ <int key="NSCellFlags">67239424</int>
+ <int key="NSCellFlags2">134217728</int>
+ <string key="NSContents">Quit</string>
+ <object class="NSFont" key="NSSupport">
+ <string key="NSName">LucidaGrande</string>
+ <double key="NSSize">1.300000e+01</double>
+ <int key="NSfFlags">1044</int>
+ </object>
+ <reference key="NSControlView" ref="610247741"/>
+ <int key="NSButtonFlags">-2038284033</int>
+ <int key="NSButtonFlags2">129</int>
+ <string key="NSAlternateContents"/>
+ <string key="NSKeyEquivalent"/>
+ <int key="NSPeriodicDelay">200</int>
+ <int key="NSPeriodicInterval">25</int>
+ </object>
+ </object>
+ </object>
+ <string key="NSFrameSize">{982, 692}</string>
+ <reference key="NSSuperview"/>
+ </object>
+ <string key="NSScreenRect">{{0, 0}, {1440, 878}}</string>
+ <string key="NSMaxSize">{3.40282e+38, 3.40282e+38}</string>
+ </object>
+ <object class="NSCustomObject" id="755631768">
+ <string key="NSClassName">NSFontManager</string>
+ </object>
+ <object class="NSCustomObject" id="229445039">
+ <string key="NSClassName">AppController</string>
+ </object>
+ </object>
+ <object class="IBObjectContainer" key="IBDocument.Objects">
+ <object class="NSMutableArray" key="connectionRecords">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performMiniaturize:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="1011231497"/>
+ </object>
+ <int key="connectionID">37</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">arrangeInFront:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="625202149"/>
+ </object>
+ <int key="connectionID">39</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">print:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="49223823"/>
+ </object>
+ <int key="connectionID">86</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">runPageLayout:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="294629803"/>
+ </object>
+ <int key="connectionID">87</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">clearRecentDocuments:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="759406840"/>
+ </object>
+ <int key="connectionID">127</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">orderFrontStandardAboutPanel:</string>
+ <reference key="source" ref="1021"/>
+ <reference key="destination" ref="238522557"/>
+ </object>
+ <int key="connectionID">142</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performClose:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="776162233"/>
+ </object>
+ <int key="connectionID">193</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleContinuousSpellChecking:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="948374510"/>
+ </object>
+ <int key="connectionID">222</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">undo:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="1058277027"/>
+ </object>
+ <int key="connectionID">223</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copy:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="860595796"/>
+ </object>
+ <int key="connectionID">224</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">checkSpelling:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="96193923"/>
+ </object>
+ <int key="connectionID">225</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">paste:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="29853731"/>
+ </object>
+ <int key="connectionID">226</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">stopSpeaking:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="680220178"/>
+ </object>
+ <int key="connectionID">227</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">cut:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="296257095"/>
+ </object>
+ <int key="connectionID">228</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showGuessPanel:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="679648819"/>
+ </object>
+ <int key="connectionID">230</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">redo:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="790794224"/>
+ </object>
+ <int key="connectionID">231</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">selectAll:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="583158037"/>
+ </object>
+ <int key="connectionID">232</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">startSpeaking:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="731782645"/>
+ </object>
+ <int key="connectionID">233</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">delete:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="437104165"/>
+ </object>
+ <int key="connectionID">235</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performZoom:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="575023229"/>
+ </object>
+ <int key="connectionID">240</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">performFindPanelAction:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="447796847"/>
+ </object>
+ <int key="connectionID">241</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">centerSelectionInVisibleArea:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="88285865"/>
+ </object>
+ <int key="connectionID">245</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleGrammarChecking:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="967646866"/>
+ </object>
+ <int key="connectionID">347</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleSmartInsertDelete:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="605118523"/>
+ </object>
+ <int key="connectionID">355</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleAutomaticQuoteSubstitution:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="197661976"/>
+ </object>
+ <int key="connectionID">356</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleAutomaticLinkDetection:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="708854459"/>
+ </object>
+ <int key="connectionID">357</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">showHelp:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="238773614"/>
+ </object>
+ <int key="connectionID">360</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">saveDocument:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="1023925487"/>
+ </object>
+ <int key="connectionID">362</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">saveDocumentAs:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="117038363"/>
+ </object>
+ <int key="connectionID">363</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">revertDocumentToSaved:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="579971712"/>
+ </object>
+ <int key="connectionID">364</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">runToolbarCustomizationPalette:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="237841660"/>
+ </object>
+ <int key="connectionID">365</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleToolbarShown:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="102151532"/>
+ </object>
+ <int key="connectionID">366</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hide:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="755159360"/>
+ </object>
+ <int key="connectionID">367</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">hideOtherApplications:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="342932134"/>
+ </object>
+ <int key="connectionID">368</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">unhideAllApplications:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="908899353"/>
+ </object>
+ <int key="connectionID">370</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">newDocument:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="705341025"/>
+ </object>
+ <int key="connectionID">373</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">openDocument:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="722745758"/>
+ </object>
+ <int key="connectionID">374</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addFontTrait:</string>
+ <reference key="source" ref="755631768"/>
+ <reference key="destination" ref="305399458"/>
+ </object>
+ <int key="connectionID">421</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">addFontTrait:</string>
+ <reference key="source" ref="755631768"/>
+ <reference key="destination" ref="814362025"/>
+ </object>
+ <int key="connectionID">422</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">modifyFont:</string>
+ <reference key="source" ref="755631768"/>
+ <reference key="destination" ref="885547335"/>
+ </object>
+ <int key="connectionID">423</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">orderFrontFontPanel:</string>
+ <reference key="source" ref="755631768"/>
+ <reference key="destination" ref="159677712"/>
+ </object>
+ <int key="connectionID">424</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">modifyFont:</string>
+ <reference key="source" ref="755631768"/>
+ <reference key="destination" ref="158063935"/>
+ </object>
+ <int key="connectionID">425</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">raiseBaseline:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="941806246"/>
+ </object>
+ <int key="connectionID">426</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">lowerBaseline:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="1045724900"/>
+ </object>
+ <int key="connectionID">427</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copyFont:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="596732606"/>
+ </object>
+ <int key="connectionID">428</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">subscript:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="1037576581"/>
+ </object>
+ <int key="connectionID">429</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">superscript:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="644725453"/>
+ </object>
+ <int key="connectionID">430</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">tightenKerning:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="677519740"/>
+ </object>
+ <int key="connectionID">431</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">underline:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="330926929"/>
+ </object>
+ <int key="connectionID">432</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">orderFrontColorPanel:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="1012600125"/>
+ </object>
+ <int key="connectionID">433</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">useAllLigatures:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="663508465"/>
+ </object>
+ <int key="connectionID">434</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">loosenKerning:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="238351151"/>
+ </object>
+ <int key="connectionID">435</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">pasteFont:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="393423671"/>
+ </object>
+ <int key="connectionID">436</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">unscript:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="257962622"/>
+ </object>
+ <int key="connectionID">437</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">useStandardKerning:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="252969304"/>
+ </object>
+ <int key="connectionID">438</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">useStandardLigatures:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="706297211"/>
+ </object>
+ <int key="connectionID">439</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">turnOffLigatures:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="568384683"/>
+ </object>
+ <int key="connectionID">440</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">turnOffKerning:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="766922938"/>
+ </object>
+ <int key="connectionID">441</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">alignLeft:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="135107054"/>
+ </object>
+ <int key="connectionID">442</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">alignJustified:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="436088763"/>
+ </object>
+ <int key="connectionID">443</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">copyRuler:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="479856769"/>
+ </object>
+ <int key="connectionID">444</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">alignCenter:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="310547522"/>
+ </object>
+ <int key="connectionID">445</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">toggleRuler:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="420564933"/>
+ </object>
+ <int key="connectionID">446</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">alignRight:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="498119243"/>
+ </object>
+ <int key="connectionID">447</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">pasteRuler:</string>
+ <reference key="source" ref="1014"/>
+ <reference key="destination" ref="333628178"/>
+ </object>
+ <int key="connectionID">448</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">terminate:</string>
+ <reference key="source" ref="1050"/>
+ <reference key="destination" ref="632727374"/>
+ </object>
+ <int key="connectionID">449</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBOutletConnection" key="connection">
+ <string key="label">mEditHost</string>
+ <reference key="source" ref="229445039"/>
+ <reference key="destination" ref="1016473779"/>
+ </object>
+ <int key="connectionID">454</int>
+ </object>
+ <object class="IBConnectionRecord">
+ <object class="IBActionConnection" key="connection">
+ <string key="label">terminate:</string>
+ <reference key="source" ref="1050"/>
+ <reference key="destination" ref="610247741"/>
+ </object>
+ <int key="connectionID">455</int>
+ </object>
+ </object>
+ <object class="IBMutableOrderedSet" key="objectRecords">
+ <object class="NSArray" key="orderedObjects">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBObjectRecord">
+ <int key="objectID">0</int>
+ <object class="NSArray" key="object" id="1049">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <reference key="children" ref="1048"/>
+ <nil key="parent"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-2</int>
+ <reference key="object" ref="1021"/>
+ <reference key="parent" ref="1049"/>
+ <string type="base64-UTF8" key="objectName">RmlsZSdzIE93bmVyA</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-1</int>
+ <reference key="object" ref="1014"/>
+ <reference key="parent" ref="1049"/>
+ <string key="objectName">First Responder</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">-3</int>
+ <reference key="object" ref="1050"/>
+ <reference key="parent" ref="1049"/>
+ <string key="objectName">Application</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">29</int>
+ <reference key="object" ref="649796088"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="713487014"/>
+ <reference ref="694149608"/>
+ <reference ref="391199113"/>
+ <reference ref="952259628"/>
+ <reference ref="379814623"/>
+ <reference ref="586577488"/>
+ <reference ref="302598603"/>
+ </object>
+ <reference key="parent" ref="1049"/>
+ <string key="objectName">MainMenu</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">19</int>
+ <reference key="object" ref="713487014"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="835318025"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">56</int>
+ <reference key="object" ref="694149608"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="110575045"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">103</int>
+ <reference key="object" ref="391199113"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="374024848"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ <string key="objectName">1</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">217</int>
+ <reference key="object" ref="952259628"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="789758025"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">83</int>
+ <reference key="object" ref="379814623"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="720053764"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">81</int>
+ <reference key="object" ref="720053764"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1023925487"/>
+ <reference ref="117038363"/>
+ <reference ref="49223823"/>
+ <reference ref="722745758"/>
+ <reference ref="705341025"/>
+ <reference ref="1025936716"/>
+ <reference ref="294629803"/>
+ <reference ref="776162233"/>
+ <reference ref="425164168"/>
+ <reference ref="579971712"/>
+ <reference ref="1010469920"/>
+ </object>
+ <reference key="parent" ref="379814623"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">75</int>
+ <reference key="object" ref="1023925487"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">3</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">80</int>
+ <reference key="object" ref="117038363"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">8</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">78</int>
+ <reference key="object" ref="49223823"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">6</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">72</int>
+ <reference key="object" ref="722745758"/>
+ <reference key="parent" ref="720053764"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">82</int>
+ <reference key="object" ref="705341025"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">9</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">124</int>
+ <reference key="object" ref="1025936716"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1065607017"/>
+ </object>
+ <reference key="parent" ref="720053764"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">77</int>
+ <reference key="object" ref="294629803"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">5</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">73</int>
+ <reference key="object" ref="776162233"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">1</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">79</int>
+ <reference key="object" ref="425164168"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">7</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">112</int>
+ <reference key="object" ref="579971712"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">10</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">74</int>
+ <reference key="object" ref="1010469920"/>
+ <reference key="parent" ref="720053764"/>
+ <string key="objectName">2</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">125</int>
+ <reference key="object" ref="1065607017"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="759406840"/>
+ </object>
+ <reference key="parent" ref="1025936716"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">126</int>
+ <reference key="object" ref="759406840"/>
+ <reference key="parent" ref="1065607017"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">205</int>
+ <reference key="object" ref="789758025"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="437104165"/>
+ <reference ref="583158037"/>
+ <reference ref="1058277027"/>
+ <reference ref="212016141"/>
+ <reference ref="296257095"/>
+ <reference ref="29853731"/>
+ <reference ref="860595796"/>
+ <reference ref="1040322652"/>
+ <reference ref="790794224"/>
+ <reference ref="892235320"/>
+ <reference ref="972420730"/>
+ <reference ref="676164635"/>
+ <reference ref="507821607"/>
+ </object>
+ <reference key="parent" ref="952259628"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">202</int>
+ <reference key="object" ref="437104165"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">198</int>
+ <reference key="object" ref="583158037"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">207</int>
+ <reference key="object" ref="1058277027"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">214</int>
+ <reference key="object" ref="212016141"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">199</int>
+ <reference key="object" ref="296257095"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">203</int>
+ <reference key="object" ref="29853731"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">197</int>
+ <reference key="object" ref="860595796"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">206</int>
+ <reference key="object" ref="1040322652"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">215</int>
+ <reference key="object" ref="790794224"/>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">218</int>
+ <reference key="object" ref="892235320"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="963351320"/>
+ </object>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">216</int>
+ <reference key="object" ref="972420730"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="769623530"/>
+ </object>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">200</int>
+ <reference key="object" ref="769623530"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="948374510"/>
+ <reference ref="96193923"/>
+ <reference ref="679648819"/>
+ <reference ref="967646866"/>
+ </object>
+ <reference key="parent" ref="972420730"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">219</int>
+ <reference key="object" ref="948374510"/>
+ <reference key="parent" ref="769623530"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">201</int>
+ <reference key="object" ref="96193923"/>
+ <reference key="parent" ref="769623530"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">204</int>
+ <reference key="object" ref="679648819"/>
+ <reference key="parent" ref="769623530"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">220</int>
+ <reference key="object" ref="963351320"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="270902937"/>
+ <reference ref="88285865"/>
+ <reference ref="159080638"/>
+ <reference ref="326711663"/>
+ <reference ref="447796847"/>
+ </object>
+ <reference key="parent" ref="892235320"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">213</int>
+ <reference key="object" ref="270902937"/>
+ <reference key="parent" ref="963351320"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">210</int>
+ <reference key="object" ref="88285865"/>
+ <reference key="parent" ref="963351320"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">221</int>
+ <reference key="object" ref="159080638"/>
+ <reference key="parent" ref="963351320"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">208</int>
+ <reference key="object" ref="326711663"/>
+ <reference key="parent" ref="963351320"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">209</int>
+ <reference key="object" ref="447796847"/>
+ <reference key="parent" ref="963351320"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">106</int>
+ <reference key="object" ref="374024848"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="238773614"/>
+ </object>
+ <reference key="parent" ref="391199113"/>
+ <string key="objectName">2</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">111</int>
+ <reference key="object" ref="238773614"/>
+ <reference key="parent" ref="374024848"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">57</int>
+ <reference key="object" ref="110575045"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="238522557"/>
+ <reference ref="755159360"/>
+ <reference ref="908899353"/>
+ <reference ref="632727374"/>
+ <reference ref="646227648"/>
+ <reference ref="609285721"/>
+ <reference ref="481834944"/>
+ <reference ref="304266470"/>
+ <reference ref="1046388886"/>
+ <reference ref="1056857174"/>
+ <reference ref="342932134"/>
+ </object>
+ <reference key="parent" ref="694149608"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">58</int>
+ <reference key="object" ref="238522557"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">134</int>
+ <reference key="object" ref="755159360"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">150</int>
+ <reference key="object" ref="908899353"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">136</int>
+ <reference key="object" ref="632727374"/>
+ <reference key="parent" ref="110575045"/>
+ <string key="objectName">1111</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">144</int>
+ <reference key="object" ref="646227648"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">129</int>
+ <reference key="object" ref="609285721"/>
+ <reference key="parent" ref="110575045"/>
+ <string key="objectName">121</string>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">143</int>
+ <reference key="object" ref="481834944"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">236</int>
+ <reference key="object" ref="304266470"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">131</int>
+ <reference key="object" ref="1046388886"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="752062318"/>
+ </object>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">149</int>
+ <reference key="object" ref="1056857174"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">145</int>
+ <reference key="object" ref="342932134"/>
+ <reference key="parent" ref="110575045"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">130</int>
+ <reference key="object" ref="752062318"/>
+ <reference key="parent" ref="1046388886"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">24</int>
+ <reference key="object" ref="835318025"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="299356726"/>
+ <reference ref="625202149"/>
+ <reference ref="575023229"/>
+ <reference ref="1011231497"/>
+ </object>
+ <reference key="parent" ref="713487014"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">92</int>
+ <reference key="object" ref="299356726"/>
+ <reference key="parent" ref="835318025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">5</int>
+ <reference key="object" ref="625202149"/>
+ <reference key="parent" ref="835318025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">239</int>
+ <reference key="object" ref="575023229"/>
+ <reference key="parent" ref="835318025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">23</int>
+ <reference key="object" ref="1011231497"/>
+ <reference key="parent" ref="835318025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">295</int>
+ <reference key="object" ref="586577488"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="466310130"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">296</int>
+ <reference key="object" ref="466310130"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="102151532"/>
+ <reference ref="237841660"/>
+ </object>
+ <reference key="parent" ref="586577488"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">297</int>
+ <reference key="object" ref="102151532"/>
+ <reference key="parent" ref="466310130"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">298</int>
+ <reference key="object" ref="237841660"/>
+ <reference key="parent" ref="466310130"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">211</int>
+ <reference key="object" ref="676164635"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="785027613"/>
+ </object>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">212</int>
+ <reference key="object" ref="785027613"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="680220178"/>
+ <reference ref="731782645"/>
+ </object>
+ <reference key="parent" ref="676164635"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">195</int>
+ <reference key="object" ref="680220178"/>
+ <reference key="parent" ref="785027613"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">196</int>
+ <reference key="object" ref="731782645"/>
+ <reference key="parent" ref="785027613"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">346</int>
+ <reference key="object" ref="967646866"/>
+ <reference key="parent" ref="769623530"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">348</int>
+ <reference key="object" ref="507821607"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="698887838"/>
+ </object>
+ <reference key="parent" ref="789758025"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">349</int>
+ <reference key="object" ref="698887838"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="605118523"/>
+ <reference ref="197661976"/>
+ <reference ref="708854459"/>
+ </object>
+ <reference key="parent" ref="507821607"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">350</int>
+ <reference key="object" ref="605118523"/>
+ <reference key="parent" ref="698887838"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">351</int>
+ <reference key="object" ref="197661976"/>
+ <reference key="parent" ref="698887838"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">354</int>
+ <reference key="object" ref="708854459"/>
+ <reference key="parent" ref="698887838"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">371</int>
+ <reference key="object" ref="972006081"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="439893737"/>
+ </object>
+ <reference key="parent" ref="1049"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">372</int>
+ <reference key="object" ref="439893737"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1016473779"/>
+ <reference ref="610247741"/>
+ </object>
+ <reference key="parent" ref="972006081"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">375</int>
+ <reference key="object" ref="302598603"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="941447902"/>
+ </object>
+ <reference key="parent" ref="649796088"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">376</int>
+ <reference key="object" ref="941447902"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="792887677"/>
+ <reference ref="15516124"/>
+ </object>
+ <reference key="parent" ref="302598603"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">377</int>
+ <reference key="object" ref="792887677"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="786677654"/>
+ </object>
+ <reference key="parent" ref="941447902"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">378</int>
+ <reference key="object" ref="15516124"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="23081656"/>
+ </object>
+ <reference key="parent" ref="941447902"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">379</int>
+ <reference key="object" ref="23081656"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="135107054"/>
+ <reference ref="310547522"/>
+ <reference ref="436088763"/>
+ <reference ref="498119243"/>
+ <reference ref="607995063"/>
+ <reference ref="420564933"/>
+ <reference ref="479856769"/>
+ <reference ref="333628178"/>
+ </object>
+ <reference key="parent" ref="15516124"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">380</int>
+ <reference key="object" ref="135107054"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">381</int>
+ <reference key="object" ref="310547522"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">382</int>
+ <reference key="object" ref="436088763"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">383</int>
+ <reference key="object" ref="498119243"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">384</int>
+ <reference key="object" ref="607995063"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">385</int>
+ <reference key="object" ref="420564933"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">386</int>
+ <reference key="object" ref="479856769"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">387</int>
+ <reference key="object" ref="333628178"/>
+ <reference key="parent" ref="23081656"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">388</int>
+ <reference key="object" ref="786677654"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="159677712"/>
+ <reference ref="305399458"/>
+ <reference ref="814362025"/>
+ <reference ref="330926929"/>
+ <reference ref="533507878"/>
+ <reference ref="158063935"/>
+ <reference ref="885547335"/>
+ <reference ref="901062459"/>
+ <reference ref="767671776"/>
+ <reference ref="691570813"/>
+ <reference ref="769124883"/>
+ <reference ref="739652853"/>
+ <reference ref="1012600125"/>
+ <reference ref="214559597"/>
+ <reference ref="596732606"/>
+ <reference ref="393423671"/>
+ </object>
+ <reference key="parent" ref="792887677"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">389</int>
+ <reference key="object" ref="159677712"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">390</int>
+ <reference key="object" ref="305399458"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">391</int>
+ <reference key="object" ref="814362025"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">392</int>
+ <reference key="object" ref="330926929"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">393</int>
+ <reference key="object" ref="533507878"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">394</int>
+ <reference key="object" ref="158063935"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">395</int>
+ <reference key="object" ref="885547335"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">396</int>
+ <reference key="object" ref="901062459"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">397</int>
+ <reference key="object" ref="767671776"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="175441468"/>
+ </object>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">398</int>
+ <reference key="object" ref="691570813"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1058217995"/>
+ </object>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">399</int>
+ <reference key="object" ref="769124883"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="18263474"/>
+ </object>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">400</int>
+ <reference key="object" ref="739652853"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">401</int>
+ <reference key="object" ref="1012600125"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">402</int>
+ <reference key="object" ref="214559597"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">403</int>
+ <reference key="object" ref="596732606"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">404</int>
+ <reference key="object" ref="393423671"/>
+ <reference key="parent" ref="786677654"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">405</int>
+ <reference key="object" ref="18263474"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="257962622"/>
+ <reference ref="644725453"/>
+ <reference ref="1037576581"/>
+ <reference ref="941806246"/>
+ <reference ref="1045724900"/>
+ </object>
+ <reference key="parent" ref="769124883"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">406</int>
+ <reference key="object" ref="257962622"/>
+ <reference key="parent" ref="18263474"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">407</int>
+ <reference key="object" ref="644725453"/>
+ <reference key="parent" ref="18263474"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">408</int>
+ <reference key="object" ref="1037576581"/>
+ <reference key="parent" ref="18263474"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">409</int>
+ <reference key="object" ref="941806246"/>
+ <reference key="parent" ref="18263474"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">410</int>
+ <reference key="object" ref="1045724900"/>
+ <reference key="parent" ref="18263474"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">411</int>
+ <reference key="object" ref="1058217995"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="706297211"/>
+ <reference ref="568384683"/>
+ <reference ref="663508465"/>
+ </object>
+ <reference key="parent" ref="691570813"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">412</int>
+ <reference key="object" ref="706297211"/>
+ <reference key="parent" ref="1058217995"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">413</int>
+ <reference key="object" ref="568384683"/>
+ <reference key="parent" ref="1058217995"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">414</int>
+ <reference key="object" ref="663508465"/>
+ <reference key="parent" ref="1058217995"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">415</int>
+ <reference key="object" ref="175441468"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="252969304"/>
+ <reference ref="766922938"/>
+ <reference ref="677519740"/>
+ <reference ref="238351151"/>
+ </object>
+ <reference key="parent" ref="767671776"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">416</int>
+ <reference key="object" ref="252969304"/>
+ <reference key="parent" ref="175441468"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">417</int>
+ <reference key="object" ref="766922938"/>
+ <reference key="parent" ref="175441468"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">418</int>
+ <reference key="object" ref="677519740"/>
+ <reference key="parent" ref="175441468"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">419</int>
+ <reference key="object" ref="238351151"/>
+ <reference key="parent" ref="175441468"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">420</int>
+ <reference key="object" ref="755631768"/>
+ <reference key="parent" ref="1049"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">450</int>
+ <reference key="object" ref="229445039"/>
+ <reference key="parent" ref="1049"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">451</int>
+ <reference key="object" ref="1016473779"/>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">452</int>
+ <reference key="object" ref="610247741"/>
+ <object class="NSMutableArray" key="children">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <reference ref="1009897894"/>
+ </object>
+ <reference key="parent" ref="439893737"/>
+ </object>
+ <object class="IBObjectRecord">
+ <int key="objectID">453</int>
+ <reference key="object" ref="1009897894"/>
+ <reference key="parent" ref="610247741"/>
+ </object>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="flattenedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSMutableArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>-1.IBPluginDependency</string>
+ <string>-2.IBPluginDependency</string>
+ <string>-3.IBPluginDependency</string>
+ <string>103.IBPluginDependency</string>
+ <string>103.ImportedFromIB2</string>
+ <string>106.IBPluginDependency</string>
+ <string>106.ImportedFromIB2</string>
+ <string>106.editorWindowContentRectSynchronizationRect</string>
+ <string>111.IBPluginDependency</string>
+ <string>111.ImportedFromIB2</string>
+ <string>112.IBPluginDependency</string>
+ <string>112.ImportedFromIB2</string>
+ <string>124.IBPluginDependency</string>
+ <string>124.ImportedFromIB2</string>
+ <string>125.IBPluginDependency</string>
+ <string>125.ImportedFromIB2</string>
+ <string>125.editorWindowContentRectSynchronizationRect</string>
+ <string>126.IBPluginDependency</string>
+ <string>126.ImportedFromIB2</string>
+ <string>129.IBPluginDependency</string>
+ <string>129.ImportedFromIB2</string>
+ <string>130.IBPluginDependency</string>
+ <string>130.ImportedFromIB2</string>
+ <string>130.editorWindowContentRectSynchronizationRect</string>
+ <string>131.IBPluginDependency</string>
+ <string>131.ImportedFromIB2</string>
+ <string>134.IBPluginDependency</string>
+ <string>134.ImportedFromIB2</string>
+ <string>136.IBPluginDependency</string>
+ <string>136.ImportedFromIB2</string>
+ <string>143.IBPluginDependency</string>
+ <string>143.ImportedFromIB2</string>
+ <string>144.IBPluginDependency</string>
+ <string>144.ImportedFromIB2</string>
+ <string>145.IBPluginDependency</string>
+ <string>145.ImportedFromIB2</string>
+ <string>149.IBPluginDependency</string>
+ <string>149.ImportedFromIB2</string>
+ <string>150.IBPluginDependency</string>
+ <string>150.ImportedFromIB2</string>
+ <string>19.IBPluginDependency</string>
+ <string>19.ImportedFromIB2</string>
+ <string>195.IBPluginDependency</string>
+ <string>195.ImportedFromIB2</string>
+ <string>196.IBPluginDependency</string>
+ <string>196.ImportedFromIB2</string>
+ <string>197.IBPluginDependency</string>
+ <string>197.ImportedFromIB2</string>
+ <string>198.IBPluginDependency</string>
+ <string>198.ImportedFromIB2</string>
+ <string>199.IBPluginDependency</string>
+ <string>199.ImportedFromIB2</string>
+ <string>200.IBPluginDependency</string>
+ <string>200.ImportedFromIB2</string>
+ <string>200.editorWindowContentRectSynchronizationRect</string>
+ <string>201.IBPluginDependency</string>
+ <string>201.ImportedFromIB2</string>
+ <string>202.IBPluginDependency</string>
+ <string>202.ImportedFromIB2</string>
+ <string>203.IBPluginDependency</string>
+ <string>203.ImportedFromIB2</string>
+ <string>204.IBPluginDependency</string>
+ <string>204.ImportedFromIB2</string>
+ <string>205.IBPluginDependency</string>
+ <string>205.ImportedFromIB2</string>
+ <string>205.editorWindowContentRectSynchronizationRect</string>
+ <string>206.IBPluginDependency</string>
+ <string>206.ImportedFromIB2</string>
+ <string>207.IBPluginDependency</string>
+ <string>207.ImportedFromIB2</string>
+ <string>208.IBPluginDependency</string>
+ <string>208.ImportedFromIB2</string>
+ <string>209.IBPluginDependency</string>
+ <string>209.ImportedFromIB2</string>
+ <string>210.IBPluginDependency</string>
+ <string>210.ImportedFromIB2</string>
+ <string>211.IBPluginDependency</string>
+ <string>211.ImportedFromIB2</string>
+ <string>212.IBPluginDependency</string>
+ <string>212.ImportedFromIB2</string>
+ <string>212.editorWindowContentRectSynchronizationRect</string>
+ <string>213.IBPluginDependency</string>
+ <string>213.ImportedFromIB2</string>
+ <string>214.IBPluginDependency</string>
+ <string>214.ImportedFromIB2</string>
+ <string>215.IBPluginDependency</string>
+ <string>215.ImportedFromIB2</string>
+ <string>216.IBPluginDependency</string>
+ <string>216.ImportedFromIB2</string>
+ <string>217.IBPluginDependency</string>
+ <string>217.ImportedFromIB2</string>
+ <string>218.IBPluginDependency</string>
+ <string>218.ImportedFromIB2</string>
+ <string>219.IBPluginDependency</string>
+ <string>219.ImportedFromIB2</string>
+ <string>220.IBPluginDependency</string>
+ <string>220.ImportedFromIB2</string>
+ <string>220.editorWindowContentRectSynchronizationRect</string>
+ <string>221.IBPluginDependency</string>
+ <string>221.ImportedFromIB2</string>
+ <string>23.IBPluginDependency</string>
+ <string>23.ImportedFromIB2</string>
+ <string>236.IBPluginDependency</string>
+ <string>236.ImportedFromIB2</string>
+ <string>239.IBPluginDependency</string>
+ <string>239.ImportedFromIB2</string>
+ <string>24.IBPluginDependency</string>
+ <string>24.ImportedFromIB2</string>
+ <string>24.editorWindowContentRectSynchronizationRect</string>
+ <string>29.IBEditorWindowLastContentRect</string>
+ <string>29.IBPluginDependency</string>
+ <string>29.ImportedFromIB2</string>
+ <string>29.WindowOrigin</string>
+ <string>29.editorWindowContentRectSynchronizationRect</string>
+ <string>295.IBPluginDependency</string>
+ <string>296.IBPluginDependency</string>
+ <string>296.editorWindowContentRectSynchronizationRect</string>
+ <string>297.IBPluginDependency</string>
+ <string>298.IBPluginDependency</string>
+ <string>346.IBPluginDependency</string>
+ <string>346.ImportedFromIB2</string>
+ <string>348.IBPluginDependency</string>
+ <string>348.ImportedFromIB2</string>
+ <string>349.IBPluginDependency</string>
+ <string>349.ImportedFromIB2</string>
+ <string>349.editorWindowContentRectSynchronizationRect</string>
+ <string>350.IBPluginDependency</string>
+ <string>350.ImportedFromIB2</string>
+ <string>351.IBPluginDependency</string>
+ <string>351.ImportedFromIB2</string>
+ <string>354.IBPluginDependency</string>
+ <string>354.ImportedFromIB2</string>
+ <string>371.IBEditorWindowLastContentRect</string>
+ <string>371.IBWindowTemplateEditedContentRect</string>
+ <string>371.NSWindowTemplate.visibleAtLaunch</string>
+ <string>371.editorWindowContentRectSynchronizationRect</string>
+ <string>371.windowTemplate.maxSize</string>
+ <string>372.IBPluginDependency</string>
+ <string>375.IBPluginDependency</string>
+ <string>376.IBEditorWindowLastContentRect</string>
+ <string>376.IBPluginDependency</string>
+ <string>377.IBPluginDependency</string>
+ <string>378.IBPluginDependency</string>
+ <string>379.IBPluginDependency</string>
+ <string>380.IBPluginDependency</string>
+ <string>381.IBPluginDependency</string>
+ <string>382.IBPluginDependency</string>
+ <string>383.IBPluginDependency</string>
+ <string>384.IBPluginDependency</string>
+ <string>385.IBPluginDependency</string>
+ <string>386.IBPluginDependency</string>
+ <string>387.IBPluginDependency</string>
+ <string>388.IBEditorWindowLastContentRect</string>
+ <string>388.IBPluginDependency</string>
+ <string>389.IBPluginDependency</string>
+ <string>390.IBPluginDependency</string>
+ <string>391.IBPluginDependency</string>
+ <string>392.IBPluginDependency</string>
+ <string>393.IBPluginDependency</string>
+ <string>394.IBPluginDependency</string>
+ <string>395.IBPluginDependency</string>
+ <string>396.IBPluginDependency</string>
+ <string>397.IBPluginDependency</string>
+ <string>398.IBPluginDependency</string>
+ <string>399.IBPluginDependency</string>
+ <string>400.IBPluginDependency</string>
+ <string>401.IBPluginDependency</string>
+ <string>402.IBPluginDependency</string>
+ <string>403.IBPluginDependency</string>
+ <string>404.IBPluginDependency</string>
+ <string>405.IBPluginDependency</string>
+ <string>406.IBPluginDependency</string>
+ <string>407.IBPluginDependency</string>
+ <string>408.IBPluginDependency</string>
+ <string>409.IBPluginDependency</string>
+ <string>410.IBPluginDependency</string>
+ <string>411.IBPluginDependency</string>
+ <string>412.IBPluginDependency</string>
+ <string>413.IBPluginDependency</string>
+ <string>414.IBPluginDependency</string>
+ <string>415.IBPluginDependency</string>
+ <string>416.IBPluginDependency</string>
+ <string>417.IBPluginDependency</string>
+ <string>418.IBPluginDependency</string>
+ <string>419.IBPluginDependency</string>
+ <string>420.IBPluginDependency</string>
+ <string>450.IBPluginDependency</string>
+ <string>451.IBPluginDependency</string>
+ <string>452.IBPluginDependency</string>
+ <string>453.IBPluginDependency</string>
+ <string>5.IBPluginDependency</string>
+ <string>5.ImportedFromIB2</string>
+ <string>56.IBPluginDependency</string>
+ <string>56.ImportedFromIB2</string>
+ <string>57.IBEditorWindowLastContentRect</string>
+ <string>57.IBPluginDependency</string>
+ <string>57.ImportedFromIB2</string>
+ <string>57.editorWindowContentRectSynchronizationRect</string>
+ <string>58.IBPluginDependency</string>
+ <string>58.ImportedFromIB2</string>
+ <string>72.IBPluginDependency</string>
+ <string>72.ImportedFromIB2</string>
+ <string>73.IBPluginDependency</string>
+ <string>73.ImportedFromIB2</string>
+ <string>74.IBPluginDependency</string>
+ <string>74.ImportedFromIB2</string>
+ <string>75.IBPluginDependency</string>
+ <string>75.ImportedFromIB2</string>
+ <string>77.IBPluginDependency</string>
+ <string>77.ImportedFromIB2</string>
+ <string>78.IBPluginDependency</string>
+ <string>78.ImportedFromIB2</string>
+ <string>79.IBPluginDependency</string>
+ <string>79.ImportedFromIB2</string>
+ <string>80.IBPluginDependency</string>
+ <string>80.ImportedFromIB2</string>
+ <string>81.IBPluginDependency</string>
+ <string>81.ImportedFromIB2</string>
+ <string>81.editorWindowContentRectSynchronizationRect</string>
+ <string>82.IBPluginDependency</string>
+ <string>82.ImportedFromIB2</string>
+ <string>83.IBPluginDependency</string>
+ <string>83.ImportedFromIB2</string>
+ <string>92.IBPluginDependency</string>
+ <string>92.ImportedFromIB2</string>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>com.apple.InterfaceBuilderKit</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <integer value="1" id="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{596, 852}, {216, 23}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{522, 812}, {146, 23}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{436, 809}, {64, 6}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{608, 612}, {275, 83}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{187, 434}, {243, 243}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{608, 612}, {167, 43}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{608, 612}, {241, 103}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{525, 802}, {197, 73}}</string>
+ <string>{{207, 285}, {478, 20}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{74, 862}</string>
+ <string>{{6, 978}, {478, 20}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{475, 832}, {234, 43}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{608, 612}, {215, 63}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{274, 369}, {982, 692}}</string>
+ <string>{{274, 369}, {982, 692}}</string>
+ <reference ref="9"/>
+ <string>{{33, 99}, {480, 360}}</string>
+ <string>{3.40282e+38, 3.40282e+38}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{437, 242}, {86, 43}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>{{523, 2}, {178, 283}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{219, 102}, {245, 183}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{23, 794}, {245, 183}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>{{145, 474}, {199, 203}}</string>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ <string>com.apple.InterfaceBuilder.CocoaPlugin</string>
+ <reference ref="9"/>
+ </object>
+ </object>
+ <object class="NSMutableDictionary" key="unlocalizedProperties">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="activeLocalization"/>
+ <object class="NSMutableDictionary" key="localizations">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="NSArray" key="dict.sortedKeys">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ <object class="NSMutableArray" key="dict.values">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ </object>
+ </object>
+ <nil key="sourceID"/>
+ <int key="maxID">458</int>
+ </object>
+ <object class="IBClassDescriber" key="IBDocument.Classes">
+ <object class="NSMutableArray" key="referencedPartialClassDescriptions">
+ <bool key="EncodedWithXMLCoder">YES</bool>
+ <object class="IBPartialClassDescription">
+ <string key="className">AppController</string>
+ <string key="superclassName">NSObject</string>
+ <object class="NSMutableDictionary" key="outlets">
+ <string key="NS.key.0">mEditHost</string>
+ <string key="NS.object.0">NSBox</string>
+ </object>
+ <object class="IBClassDescriptionSource" key="sourceIdentifier">
+ <string key="majorKey">IBProjectSource</string>
+ <string key="minorKey">AppController.h</string>
+ </object>
+ </object>
+ </object>
+ </object>
+ <int key="IBDocument.localizationMode">0</int>
+ <string key="IBDocument.LastKnownRelativeProjectPath">../ScintillaTest.xcodeproj</string>
+ <int key="IBDocument.defaultPropertyAccessControl">3</int>
+ </data>
+</archive>
diff --git a/scintilla/cocoa/ScintillaTest/Info.plist b/scintilla/cocoa/ScintillaTest/Info.plist new file mode 100644 index 0000000..abf64b2 --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/Info.plist @@ -0,0 +1,28 @@ +<?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>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIconFile</key>
+ <string></string>
+ <key>CFBundleIdentifier</key>
+ <string>com.sun.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundleName</key>
+ <string>${PRODUCT_NAME}</string>
+ <key>CFBundlePackageType</key>
+ <string>APPL</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+ <key>NSMainNibFile</key>
+ <string>MainMenu</string>
+ <key>NSPrincipalClass</key>
+ <string>NSApplication</string>
+</dict>
+</plist>
diff --git a/scintilla/cocoa/ScintillaTest/Scintilla-Info.plist b/scintilla/cocoa/ScintillaTest/Scintilla-Info.plist new file mode 100644 index 0000000..b3f87c0 --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/Scintilla-Info.plist @@ -0,0 +1,20 @@ +<?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>English</string>
+ <key>CFBundleExecutable</key>
+ <string>${EXECUTABLE_NAME}</string>
+ <key>CFBundleIdentifier</key>
+ <string>com.sun.${PRODUCT_NAME:identifier}</string>
+ <key>CFBundleInfoDictionaryVersion</key>
+ <string>6.0</string>
+ <key>CFBundlePackageType</key>
+ <string>FMWK</string>
+ <key>CFBundleSignature</key>
+ <string>????</string>
+ <key>CFBundleVersion</key>
+ <string>1.0</string>
+</dict>
+</plist>
diff --git a/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj b/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj new file mode 100644 index 0000000..43f5b79 --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj @@ -0,0 +1,381 @@ +// !$*UTF8*$!
+{
+ archiveVersion = 1;
+ classes = {
+ };
+ objectVersion = 45;
+ objects = {
+
+/* Begin PBXBuildFile section */
+ 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
+ 271FA52C0F850BE20033D021 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 271FA52B0F850BE20033D021 /* AppController.mm */; };
+ 2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */ = {isa = PBXBuildFile; fileRef = 2791F4480FC1A8E9009DBCF9 /* TestData.sql */; };
+ 27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
+ 27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
+ 8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
+/* End PBXBuildFile section */
+
+/* Begin PBXContainerItemProxy section */
+ 2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
+ proxyType = 2;
+ remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
+ remoteInfo = Scintilla;
+ };
+ 27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */ = {
+ isa = PBXContainerItemProxy;
+ containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
+ proxyType = 1;
+ remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
+ remoteInfo = Scintilla;
+ };
+/* End PBXContainerItemProxy section */
+
+/* Begin PBXCopyFilesBuildPhase section */
+ 272133C20F973596006BE49A /* CopyFiles */ = {
+ isa = PBXCopyFilesBuildPhase;
+ buildActionMask = 2147483647;
+ dstPath = "";
+ dstSubfolderSpec = 10;
+ files = (
+ 27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXCopyFilesBuildPhase section */
+
+/* Begin PBXFileReference section */
+ 089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
+ 1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
+ 271FA52A0F850BE20033D021 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
+ 271FA52B0F850BE20033D021 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = "<group>"; wrapsLines = 0; };
+ 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ScintillaFramework.xcodeproj; path = ../ScintillaFramework/ScintillaFramework.xcodeproj; sourceTree = SOURCE_ROOT; };
+ 2791F4480FC1A8E9009DBCF9 /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = "<group>"; };
+ 29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
+ 32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScintillaTest_Prefix.pch; sourceTree = "<group>"; };
+ 8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
+ 8D1107320486CEB800E47090 /* ScintillaTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScintillaTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
+/* End PBXFileReference section */
+
+/* Begin PBXFrameworksBuildPhase section */
+ 8D11072E0486CEB800E47090 /* Frameworks */ = {
+ isa = PBXFrameworksBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */,
+ 8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXFrameworksBuildPhase section */
+
+/* Begin PBXGroup section */
+ 080E96DDFE201D6D7F000001 /* Classes */ = {
+ isa = PBXGroup;
+ children = (
+ 271FA52A0F850BE20033D021 /* AppController.h */,
+ 271FA52B0F850BE20033D021 /* AppController.mm */,
+ );
+ name = Classes;
+ sourceTree = "<group>";
+ };
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
+ );
+ name = "Linked Frameworks";
+ sourceTree = "<group>";
+ };
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 29B97324FDCFA39411CA2CEA /* AppKit.framework */,
+ 13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
+ 29B97325FDCFA39411CA2CEA /* Foundation.framework */,
+ );
+ name = "Other Frameworks";
+ sourceTree = "<group>";
+ };
+ 19C28FACFE9D520D11CA2CBB /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 8D1107320486CEB800E47090 /* ScintillaTest.app */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 2744E5E30FC16BE200E85C33 /* Products */ = {
+ isa = PBXGroup;
+ children = (
+ 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */,
+ );
+ name = Products;
+ sourceTree = "<group>";
+ };
+ 29B97314FDCFA39411CA2CEA /* ScintillaTest */ = {
+ isa = PBXGroup;
+ children = (
+ 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */,
+ 080E96DDFE201D6D7F000001 /* Classes */,
+ 29B97315FDCFA39411CA2CEA /* Other Sources */,
+ 29B97317FDCFA39411CA2CEA /* Resources */,
+ 29B97323FDCFA39411CA2CEA /* Frameworks */,
+ 19C28FACFE9D520D11CA2CBB /* Products */,
+ );
+ name = ScintillaTest;
+ sourceTree = "<group>";
+ };
+ 29B97315FDCFA39411CA2CEA /* Other Sources */ = {
+ isa = PBXGroup;
+ children = (
+ 32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */,
+ 29B97316FDCFA39411CA2CEA /* main.m */,
+ );
+ name = "Other Sources";
+ sourceTree = "<group>";
+ };
+ 29B97317FDCFA39411CA2CEA /* Resources */ = {
+ isa = PBXGroup;
+ children = (
+ 2791F4480FC1A8E9009DBCF9 /* TestData.sql */,
+ 8D1107310486CEB800E47090 /* Info.plist */,
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
+ );
+ name = Resources;
+ sourceTree = "<group>";
+ };
+ 29B97323FDCFA39411CA2CEA /* Frameworks */ = {
+ isa = PBXGroup;
+ children = (
+ 1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
+ 1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
+ );
+ name = Frameworks;
+ sourceTree = "<group>";
+ };
+/* End PBXGroup section */
+
+/* Begin PBXNativeTarget section */
+ 8D1107260486CEB800E47090 /* ScintillaTest */ = {
+ isa = PBXNativeTarget;
+ buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */;
+ buildPhases = (
+ 8D1107290486CEB800E47090 /* Resources */,
+ 8D11072C0486CEB800E47090 /* Sources */,
+ 8D11072E0486CEB800E47090 /* Frameworks */,
+ 272133C20F973596006BE49A /* CopyFiles */,
+ );
+ buildRules = (
+ );
+ dependencies = (
+ 27AF7EC70FC2C36A007160EF /* PBXTargetDependency */,
+ );
+ name = ScintillaTest;
+ productInstallPath = "$(HOME)/Applications";
+ productName = ScintillaTest;
+ productReference = 8D1107320486CEB800E47090 /* ScintillaTest.app */;
+ productType = "com.apple.product-type.application";
+ };
+/* End PBXNativeTarget section */
+
+/* Begin PBXProject section */
+ 29B97313FDCFA39411CA2CEA /* Project object */ = {
+ isa = PBXProject;
+ buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
+ compatibilityVersion = "Xcode 3.1";
+ hasScannedForEncodings = 1;
+ mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */;
+ projectDirPath = "";
+ projectReferences = (
+ {
+ ProductGroup = 2744E5E30FC16BE200E85C33 /* Products */;
+ ProjectRef = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
+ },
+ );
+ projectRoot = "";
+ targets = (
+ 8D1107260486CEB800E47090 /* ScintillaTest */,
+ );
+ };
+/* End PBXProject section */
+
+/* Begin PBXReferenceProxy section */
+ 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */ = {
+ isa = PBXReferenceProxy;
+ fileType = wrapper.framework;
+ path = Scintilla.framework;
+ remoteRef = 2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */;
+ sourceTree = BUILT_PRODUCTS_DIR;
+ };
+/* End PBXReferenceProxy section */
+
+/* Begin PBXResourcesBuildPhase section */
+ 8D1107290486CEB800E47090 /* Resources */ = {
+ isa = PBXResourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
+ 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
+ 2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXResourcesBuildPhase section */
+
+/* Begin PBXSourcesBuildPhase section */
+ 8D11072C0486CEB800E47090 /* Sources */ = {
+ isa = PBXSourcesBuildPhase;
+ buildActionMask = 2147483647;
+ files = (
+ 8D11072D0486CEB800E47090 /* main.m in Sources */,
+ 271FA52C0F850BE20033D021 /* AppController.mm in Sources */,
+ );
+ runOnlyForDeploymentPostprocessing = 0;
+ };
+/* End PBXSourcesBuildPhase section */
+
+/* Begin PBXTargetDependency section */
+ 27AF7EC70FC2C36A007160EF /* PBXTargetDependency */ = {
+ isa = PBXTargetDependency;
+ name = Scintilla;
+ targetProxy = 27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */;
+ };
+/* End PBXTargetDependency section */
+
+/* Begin PBXVariantGroup section */
+ 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 089C165DFE840E0CC02AAC07 /* English */,
+ );
+ name = InfoPlist.strings;
+ sourceTree = "<group>";
+ };
+ 1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
+ isa = PBXVariantGroup;
+ children = (
+ 1DDD58150DA1D0A300B32029 /* English */,
+ );
+ name = MainMenu.xib;
+ sourceTree = "<group>";
+ };
+/* End PBXVariantGroup section */
+
+/* Begin XCBuildConfiguration section */
+ C01FCF4B08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ COPY_PHASE_STRIP = NO;
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
+ );
+ GCC_DYNAMIC_NO_PIC = NO;
+ GCC_ENABLE_FIX_AND_CONTINUE = YES;
+ GCC_MODEL_TUNING = G5;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ SCI_LEXER,
+ SCI_NAMESPACE,
+ );
+ HEADER_SEARCH_PATHS = "../..//**";
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
+ OTHER_LDFLAGS = "";
+ PRODUCT_NAME = ScintillaTest;
+ USER_HEADER_SEARCH_PATHS = "";
+ };
+ name = Debug;
+ };
+ C01FCF4C08A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ALWAYS_SEARCH_USER_PATHS = NO;
+ DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
+ FRAMEWORK_SEARCH_PATHS = (
+ "$(inherited)",
+ "\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
+ );
+ GCC_MODEL_TUNING = G5;
+ GCC_PRECOMPILE_PREFIX_HEADER = YES;
+ GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
+ GCC_PREPROCESSOR_DEFINITIONS = (
+ SCI_LEXER,
+ SCI_NAMESPACE,
+ );
+ HEADER_SEARCH_PATHS = "../..//**";
+ INFOPLIST_FILE = Info.plist;
+ INSTALL_PATH = "$(HOME)/Applications";
+ LIBRARY_SEARCH_PATHS = "$(inherited)";
+ OTHER_LDFLAGS = "";
+ PRODUCT_NAME = ScintillaTest;
+ USER_HEADER_SEARCH_PATHS = "";
+ };
+ name = Release;
+ };
+ C01FCF4F08A954540054247B /* Debug */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_OPTIMIZATION_LEVEL = 0;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ ONLY_ACTIVE_ARCH = YES;
+ OTHER_LDFLAGS = "";
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Debug;
+ };
+ C01FCF5008A954540054247B /* Release */ = {
+ isa = XCBuildConfiguration;
+ buildSettings = {
+ ARCHS = "$(ARCHS_STANDARD_32_BIT)";
+ GCC_C_LANGUAGE_STANDARD = c99;
+ GCC_WARN_ABOUT_RETURN_TYPE = YES;
+ GCC_WARN_UNUSED_VARIABLE = YES;
+ OTHER_LDFLAGS = "";
+ PREBINDING = NO;
+ SDKROOT = macosx10.5;
+ };
+ name = Release;
+ };
+/* End XCBuildConfiguration section */
+
+/* Begin XCConfigurationList section */
+ C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4B08A954540054247B /* Debug */,
+ C01FCF4C08A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+ C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */ = {
+ isa = XCConfigurationList;
+ buildConfigurations = (
+ C01FCF4F08A954540054247B /* Debug */,
+ C01FCF5008A954540054247B /* Release */,
+ );
+ defaultConfigurationIsVisible = 0;
+ defaultConfigurationName = Release;
+ };
+/* End XCConfigurationList section */
+ };
+ rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
+}
diff --git a/scintilla/cocoa/ScintillaTest/ScintillaTest_Prefix.pch b/scintilla/cocoa/ScintillaTest/ScintillaTest_Prefix.pch new file mode 100644 index 0000000..b3d5ee7 --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/ScintillaTest_Prefix.pch @@ -0,0 +1,7 @@ +//
+// Prefix header for all source files of the 'ScintillaTest' target in the 'ScintillaTest' project
+//
+
+#ifdef __OBJC__
+ #import <Cocoa/Cocoa.h>
+#endif
diff --git a/scintilla/cocoa/ScintillaTest/TestData.sql b/scintilla/cocoa/ScintillaTest/TestData.sql new file mode 100644 index 0000000..4967885 --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/TestData.sql @@ -0,0 +1,215 @@ +-- MySQL Administrator dump 1.4
+--
+-- ------------------------------------------------------
+-- Server version 5.0.45
+
+
+/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
+/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
+/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
+/*!40101 SET NAMES utf8 */;
+
+/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
+/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
+/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI_QUOTES' */;
+
+/**
+ * Foldable multiline comment.
+ */
+
+-- {
+-- Create schema sakila
+-- }
+
+CREATE DATABASE IF NOT EXISTS sakila;
+USE sakila;
+DROP TABLE IF EXISTS "sakila"."actor_info";
+DROP VIEW IF EXISTS "sakila"."actor_info";
+CREATE TABLE "sakila"."actor_info" (
+ "actor_id" smallint(5) unsigned,
+ "first_name" varchar(45),
+ "last_name" varchar(45),
+ "film_info" varchar(341)
+);
+DROP TABLE IF EXISTS "sakila"."actor";
+CREATE TABLE "sakila"."actor" (
+ "actor_id" smallint(5) unsigned NOT NULL auto_increment,
+ "first_name" varchar(45) NOT NULL,
+ "last_name" varchar(45) NOT NULL,
+ "last_update" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
+ PRIMARY KEY ("actor_id"),
+ KEY "idx_actor_last_name" ("last_name")
+) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;
+INSERT INTO "sakila"."actor" VALUES (1,'PENELOPE','GUINESS','2006-02-15 04:34:33'),
+ (2,'NICK','WAHLBERG','2006-02-15 04:34:33'),
+ (3,'ED','CHASE','2006-02-15 04:34:33'),
+ (4,'JENNIFER','DAVIS','2006-02-15 04:34:33'),
+ (149,'RUSSELL','TEMPLE','2006-02-15 04:34:33'),
+ (150,'JAYNE','NOLTE','2006-02-15 04:34:33'),
+ (151,'GEOFFREY','HESTON','2006-02-15 04:34:33'),
+ (152,'BEN','HARRIS','2006-02-15 04:34:33'),
+ (153,'MINNIE','KILMER','2006-02-15 04:34:33'),
+ (154,'MERYL','GIBSON','2006-02-15 04:34:33'),
+ (155,'IAN','TANDY','2006-02-15 04:34:33'),
+ (156,'FAY','WOOD','2006-02-15 04:34:33'),
+ (157,'GRETA','MALDEN','2006-02-15 04:34:33'),
+ (158,'VIVIEN','BASINGER','2006-02-15 04:34:33'),
+ (159,'LAURA','BRODY','2006-02-15 04:34:33'),
+ (160,'CHRIS','DEPP','2006-02-15 04:34:33'),
+ (161,'HARVEY','HOPE','2006-02-15 04:34:33'),
+ (162,'OPRAH','KILMER','2006-02-15 04:34:33'),
+ (163,'CHRISTOPHER','WEST','2006-02-15 04:34:33'),
+ (164,'HUMPHREY','WILLIS','2006-02-15 04:34:33'),
+ (165,'AL','GARLAND','2006-02-15 04:34:33'),
+ (166,'NICK','DEGENERES','2006-02-15 04:34:33'),
+ (167,'LAURENCE','BULLOCK','2006-02-15 04:34:33'),
+ (168,'WILL','WILSON','2006-02-15 04:34:33'),
+ (169,'KENNETH','HOFFMAN','2006-02-15 04:34:33'),
+ (170,'MENA','HOPPER','2006-02-15 04:34:33'),
+ (171,'OLYMPIA','PFEIFFER','2006-02-15 04:34:33'),
+ (190,'AUDREY','BAILEY','2006-02-15 04:34:33'),
+ (191,'GREGORY','GOODING','2006-02-15 04:34:33'),
+ (192,'JOHN','SUVARI','2006-02-15 04:34:33'),
+ (193,'BURT','TEMPLE','2006-02-15 04:34:33'),
+ (194,'MERYL','ALLEN','2006-02-15 04:34:33'),
+ (195,'JAYNE','SILVERSTONE','2006-02-15 04:34:33'),
+ (196,'BELA','WALKEN','2006-02-15 04:34:33'),
+ (197,'REESE','WEST','2006-02-15 04:34:33'),
+ (198,'MARY','KEITEL','2006-02-15 04:34:33'),
+ (199,'JULIA','FAWCETT','2006-02-15 04:34:33'),
+ (200,'THORA','TEMPLE','2006-02-15 04:34:33');
+
+DROP TRIGGER /*!50030 IF EXISTS */ "sakila"."payment_date";
+
+DELIMITER $$
+
+CREATE DEFINER = "root"@"localhost" TRIGGER "sakila"."payment_date" BEFORE INSERT ON "payment" FOR EACH ROW SET NEW.payment_date = NOW() $$
+
+DELIMITER ;
+
+
+DROP TABLE IF EXISTS "sakila"."sales_by_store";
+DROP VIEW IF EXISTS "sakila"."sales_by_store";
+CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW "sakila"."sales_by_store" AS select concat("c"."city",_utf8',',"cy"."country") AS "store",concat("m"."first_name",_utf8' ',"m"."last_name") AS "manager",sum("p"."amount") AS "total_sales" from ((((((("sakila"."payment" "p" join "sakila"."rental" "r" on(("p"."rental_id" = "r"."rental_id"))) join "sakila"."inventory" "i" on(("r"."inventory_id" = "i"."inventory_id"))) join "sakila"."store" "s" on(("i"."store_id" = "s"."store_id"))) join "sakila"."address" "a" on(("s"."address_id" = "a"."address_id"))) join "sakila"."city" "c" on(("a"."city_id" = "c"."city_id"))) join "sakila"."country" "cy" on(("c"."country_id" = "cy"."country_id"))) join "sakila"."staff" "m" on(("s"."manager_staff_id" = "m"."staff_id"))) group by "s"."store_id" order by "cy"."country","c"."city";
+
+--
+-- View structure for view `staff_list`
+--
+
+CREATE VIEW staff_list
+AS
+SELECT s.staff_id AS ID, CONCAT(s.first_name, _utf8' ', s.last_name) AS name, a.address AS address, a.postal_code AS `zip code`, a.phone AS phone,
+ city.city AS city, country.country AS country, s.store_id AS SID
+FROM staff AS s JOIN address AS a ON s.address_id = a.address_id JOIN city ON a.city_id = city.city_id
+ JOIN country ON city.country_id = country.country_id;
+
+--
+-- View structure for view `actor_info`
+--
+
+CREATE DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW actor_info
+AS
+SELECT
+a.actor_id,
+a.first_name,
+a.last_name,
+GROUP_CONCAT(DISTINCT CONCAT(c.name, ': ',
+ (SELECT GROUP_CONCAT(f.title ORDER BY f.title SEPARATOR ', ')
+ FROM sakila.film f
+ INNER JOIN sakila.film_category fc
+ ON f.film_id = fc.film_id
+ INNER JOIN sakila.film_actor fa
+ ON f.film_id = fa.film_id
+ WHERE fc.category_id = c.category_id
+ AND fa.actor_id = a.actor_id
+ )
+ )
+ ORDER BY c.name SEPARATOR '; ')
+AS film_info
+FROM sakila.actor a
+LEFT JOIN sakila.film_actor fa
+ ON a.actor_id = fa.actor_id
+LEFT JOIN sakila.film_category fc
+ ON fa.film_id = fc.film_id
+LEFT JOIN sakila.category c
+ ON fc.category_id = c.category_id
+GROUP BY a.actor_id, a.first_name, a.last_name;
+
+DELIMITER $$
+
+CREATE FUNCTION get_customer_balance(p_customer_id INT, p_effective_date DATETIME) RETURNS DECIMAL(5,2)
+ DETERMINISTIC
+ READS SQL DATA
+BEGIN
+
+ #OK, WE NEED TO CALCULATE THE CURRENT BALANCE GIVEN A CUSTOMER_ID AND A DATE
+ #THAT WE WANT THE BALANCE TO BE EFFECTIVE FOR. THE BALANCE IS:
+ # 1) RENTAL FEES FOR ALL PREVIOUS RENTALS
+ # 2) ONE DOLLAR FOR EVERY DAY THE PREVIOUS RENTALS ARE OVERDUE
+ # 3) IF A FILM IS MORE THAN RENTAL_DURATION * 2 OVERDUE, CHARGE THE REPLACEMENT_COST
+ # 4) SUBTRACT ALL PAYMENTS MADE BEFORE THE DATE SPECIFIED
+
+ DECLARE v_rentfees DECIMAL(5,2); #FEES PAID TO RENT THE VIDEOS INITIALLY
+ DECLARE v_overfees INTEGER; #LATE FEES FOR PRIOR RENTALS
+ DECLARE v_payments DECIMAL(5,2); #SUM OF PAYMENTS MADE PREVIOUSLY
+
+ SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees
+ FROM film, inventory, rental
+ WHERE film.film_id = inventory.film_id
+ AND inventory.inventory_id = rental.inventory_id
+ AND rental.rental_date <= p_effective_date
+ AND rental.customer_id = p_customer_id;
+
+ SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration,
+ ((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees
+ FROM rental, inventory, film
+ WHERE film.film_id = inventory.film_id
+ AND inventory.inventory_id = rental.inventory_id
+ AND rental.rental_date <= p_effective_date
+ AND rental.customer_id = p_customer_id;
+
+
+ SELECT IFNULL(SUM(payment.amount),0) INTO v_payments
+ FROM payment
+
+ WHERE payment.payment_date <= p_effective_date
+ AND payment.customer_id = p_customer_id;
+
+ RETURN v_rentfees + v_overfees - v_payments;
+END $$
+
+DELIMITER ;
+
+DELIMITER $$
+
+CREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN
+READS SQL DATA
+BEGIN
+ DECLARE v_rentals INT;
+ DECLARE v_out INT;
+
+ #AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE
+ #FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED
+
+ SELECT COUNT(*) INTO v_rentals
+ FROM rental
+ WHERE inventory_id = p_inventory_id;
+
+ IF v_rentals = 0 THEN
+ RETURN TRUE;
+ END IF;
+
+ SELECT COUNT(rental_id) INTO v_out
+ FROM inventory LEFT JOIN rental USING(inventory_id)
+ WHERE inventory.inventory_id = p_inventory_id
+ AND rental.return_date IS NULL;
+
+ IF v_out > 0 THEN
+ RETURN FALSE;
+ ELSE
+ RETURN TRUE;
+ END IF;
+END $$
+
+DELIMITER ;
+
diff --git a/scintilla/cocoa/ScintillaTest/main.m b/scintilla/cocoa/ScintillaTest/main.m new file mode 100644 index 0000000..59ff6b2 --- /dev/null +++ b/scintilla/cocoa/ScintillaTest/main.m @@ -0,0 +1,15 @@ +/**
+ * main.m
+ * ScintillaTest
+ *
+ * Created by Mike Lischke on 02.04.09.
+ * Copyright Sun Microsystems, Inc 2009. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import <Cocoa/Cocoa.h>
+
+int main(int argc, char *argv[])
+{
+ return NSApplicationMain(argc, (const char **) argv);
+}
diff --git a/scintilla/cocoa/ScintillaView.h b/scintilla/cocoa/ScintillaView.h new file mode 100644 index 0000000..3e76d3c --- /dev/null +++ b/scintilla/cocoa/ScintillaView.h @@ -0,0 +1,120 @@ +
+/**
+ * Declaration of the native Cocoa View that serves as container for the scintilla parts.
+ *
+ * Created by Mike Lischke.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import <Cocoa/Cocoa.h>
+
+#import "Platform.h"
+#import "Scintilla.h"
+#import "SciLexer.h"
+
+#import "InfoBarCommunicator.h"
+#import "ScintillaCocoa.h"
+
+@class ScintillaView;
+
+extern NSString *SCIUpdateUINotification;
+
+/**
+ * InnerView is the Cocoa interface to the Scintilla backend. It handles text input and
+ * provides a canvas for painting the output.
+ */
+@interface InnerView : NSView <NSTextInput>
+{
+@private
+ ScintillaView* mOwner;
+ NSCursor* mCurrentCursor;
+ NSTrackingRectTag mCurrentTrackingRect;
+
+ // Set when we are in composition mode and partial input is displayed.
+ NSRange mMarkedTextRange;
+
+ // Caret position when a drag operation started.
+ int mLastPosition;
+}
+
+- (void) dealloc;
+- (void) removeMarkedText;
+- (void) setCursor: (Scintilla::Window::Cursor) cursor;
+
+@property (retain) ScintillaView* owner;
+@end
+
+@interface ScintillaView : NSView <InfoBarCommunicator>
+{
+@private
+ // The back end is kind of a controller and model in one.
+ // It uses the content view for display.
+ Scintilla::ScintillaCocoa* mBackend;
+
+ // This is the actual content to which the backend renders itself.
+ InnerView* mContent;
+
+ NSScroller* mHorizontalScroller;
+ NSScroller* mVerticalScroller;
+
+ // Area to display additional controls (e.g. zoom info, caret position, status info).
+ NSView <InfoBarCommunicator>* mInfoBar;
+ BOOL mInfoBarAtTop;
+ int mInitialInfoBarWidth;
+}
+
+- (void) dealloc;
+- (void) layout;
+
+- (void) sendNotification: (NSString*) notificationName;
+- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
+ value: (float) value;
+- (void) setCallback: (id <InfoBarCommunicator>) callback;
+
+// Scroller handling
+- (BOOL) setVerticalScrollRange: (int) range page: (int) page;
+- (void) setVerticalScrollPosition: (float) position;
+- (BOOL) setHorizontalScrollRange: (int) range page: (int) page;
+- (void) setHorizontalScrollPosition: (float) position;
+
+- (void) scrollerAction: (id) sender;
+- (InnerView*) content;
+
+// NSTextView compatibility layer.
+- (NSString*) string;
+- (void) setString: (NSString*) aString;
+- (void) insertText: (NSString*) aString;
+- (void) setEditable: (BOOL) editable;
+- (BOOL) isEditable;
+- (NSRange) selectedRange;
+
+- (NSString*) selectedString;
+
+// Native call through to the backend.
++ (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam
+ lParam: (sptr_t) lParam;
+
+// Back end properties getters and setters.
+- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value;
+- (long) getGeneralProperty: (int) property;
+- (long) getGeneralProperty: (int) property parameter: (long) parameter;
+- (long) getGeneralProperty: (int) property parameter: (long) parameter extra: (long) extra;
+- (long) getGeneralProperty: (int) property ref: (const void*) ref;
+- (void) setColorProperty: (int) property parameter: (long) parameter value: (NSColor*) value;
+- (void) setColorProperty: (int) property parameter: (long) parameter fromHTML: (NSString*) fromHTML;
+- (NSColor*) getColorProperty: (int) property parameter: (long) parameter;
+- (void) setReferenceProperty: (int) property parameter: (long) parameter value: (const void*) value;
+- (const void*) getReferenceProperty: (int) property parameter: (long) parameter;
+- (void) setStringProperty: (int) property parameter: (long) parameter value: (NSString*) value;
+- (NSString*) getStringProperty: (int) property parameter: (long) parameter;
+- (void) setLexerProperty: (NSString*) name value: (NSString*) value;
+- (NSString*) getLexerProperty: (NSString*) name;
+
+- (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top;
+- (void) setStatusText: (NSString*) text;
+
+@property Scintilla::ScintillaCocoa* backend;
+
+@end
diff --git a/scintilla/cocoa/ScintillaView.mm b/scintilla/cocoa/ScintillaView.mm new file mode 100644 index 0000000..1863bd9 --- /dev/null +++ b/scintilla/cocoa/ScintillaView.mm @@ -0,0 +1,1376 @@ +
+/**
+ * Implementation of the native Cocoa View that serves as container for the scintilla parts.
+ *
+ * Created by Mike Lischke.
+ *
+ * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
+ * This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
+ */
+
+#import "ScintillaView.h"
+
+using namespace Scintilla;
+
+// Two additional cursors we need, which aren't provided by Cocoa.
+static NSCursor* reverseArrowCursor;
+static NSCursor* waitCursor;
+
+// The scintilla indicator used for keyboard input.
+#define INPUT_INDICATOR INDIC_MAX - 1
+
+NSString *SCIUpdateUINotification = @"SCIUpdateUI";
+
+@implementation InnerView
+
+@synthesize owner = mOwner;
+
+//--------------------------------------------------------------------------------------------------
+
+- (NSView*) initWithFrame: (NSRect) frame
+{
+ self = [super initWithFrame: frame];
+
+ if (self != nil)
+ {
+ // Some initialization for our view.
+ mCurrentCursor = [[NSCursor arrowCursor] retain];
+ mCurrentTrackingRect = 0;
+ mMarkedTextRange = NSMakeRange(NSNotFound, 0);
+
+ [self registerForDraggedTypes: [NSArray arrayWithObjects:
+ NSStringPboardType, ScintillaRecPboardType, NSFilenamesPboardType, nil]];
+ }
+
+ return self;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * When the view is resized we need to update our tracking rectangle and let the backend know.
+ */
+- (void) setFrame: (NSRect) frame
+{
+ [super setFrame: frame];
+
+ // Make the content also a tracking rectangle for mouse events.
+ if (mCurrentTrackingRect != 0)
+ [self removeTrackingRect: mCurrentTrackingRect];
+ mCurrentTrackingRect = [self addTrackingRect: [self bounds]
+ owner: self
+ userData: nil
+ assumeInside: YES];
+ mOwner.backend->Resize();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by the backend if a new cursor must be set for the view.
+ */
+- (void) setCursor: (Window::Cursor) cursor
+{
+ [mCurrentCursor autorelease];
+ switch (cursor)
+ {
+ case Window::cursorText:
+ mCurrentCursor = [NSCursor IBeamCursor];
+ break;
+ case Window::cursorArrow:
+ mCurrentCursor = [NSCursor arrowCursor];
+ break;
+ case Window::cursorWait:
+ mCurrentCursor = waitCursor;
+ break;
+ case Window::cursorHoriz:
+ mCurrentCursor = [NSCursor resizeLeftRightCursor];
+ break;
+ case Window::cursorVert:
+ mCurrentCursor = [NSCursor resizeUpDownCursor];
+ break;
+ case Window::cursorReverseArrow:
+ mCurrentCursor = reverseArrowCursor;
+ break;
+ case Window::cursorUp:
+ default:
+ mCurrentCursor = [NSCursor arrowCursor];
+ break;
+ }
+
+ [mCurrentCursor retain];
+
+ // Trigger recreation of the cursor rectangle(s).
+ [[self window] invalidateCursorRectsForView: self];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * This method is called to give us the opportunity to define our mouse sensitive rectangle.
+ */
+- (void) resetCursorRects
+{
+ [super resetCursorRects];
+
+ // We only have one cursor rect: our bounds.
+ NSRect bounds = [self bounds];
+ [self addCursorRect: [self bounds] cursor: mCurrentCursor];
+ [mCurrentCursor setOnMouseEntered: YES];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Gets called by the runtime when the view needs repainting.
+ */
+- (void) drawRect: (NSRect) rect
+{
+ CGContextRef context = (CGContextRef) [[NSGraphicsContext currentContext] graphicsPort];
+
+ mOwner.backend->Draw(rect, context);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Windows uses a client coordinate system where the upper left corner is the origin in a window
+ * (and so does Scintilla). We have to adjust for that. However by returning YES here, we are
+ * already done with that.
+ * Note that because of returning YES here most coordinates we use now (e.g. for painting,
+ * invalidating rectangles etc.) are given with +Y pointing down!
+ */
+- (BOOL) isFlipped
+{
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (BOOL) isOpaque
+{
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Implement the "click through" behavior by telling the caller we accept the first mouse event too.
+ */
+- (BOOL) acceptsFirstMouse: (NSEvent *) theEvent
+{
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Make this view accepting events as first responder.
+ */
+- (BOOL) acceptsFirstResponder
+{
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by the framework if it wants to show a context menu for the editor.
+ */
+- (NSMenu*) menuForEvent: (NSEvent*) theEvent
+{
+ return mOwner.backend->CreateContextMenu(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+// Adoption of NSTextInput protocol.
+
+- (NSAttributedString*) attributedSubstringFromRange: (NSRange) range
+{
+ return nil;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (NSUInteger) characterIndexForPoint: (NSPoint) point
+{
+ return NSNotFound;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (NSInteger) conversationIdentifier
+{
+ return (NSInteger) self;
+
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) doCommandBySelector: (SEL) selector
+{
+ if ([self respondsToSelector: @selector(selector)])
+ [self performSelector: selector withObject: nil];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (NSRect) firstRectForCharacterRange: (NSRange) range
+{
+ return NSZeroRect;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (BOOL) hasMarkedText
+{
+ return mMarkedTextRange.length > 0;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * General text input. Used to insert new text at the current input position, replacing the current
+ * selection if there is any.
+ */
+- (void) insertText: (id) aString
+{
+ // Remove any previously marked text first.
+ [self removeMarkedText];
+ mOwner.backend->InsertText((NSString*) aString);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (NSRange) markedRange
+{
+ return mMarkedTextRange;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (NSRange) selectedRange
+{
+ int begin = [mOwner getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0];
+ int end = [mOwner getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];
+ return NSMakeRange(begin, end - begin);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by the input manager to set text which might be combined with further input to form
+ * the final text (e.g. composition of ^ and a to รข).
+ *
+ * @param aString The text to insert, either what has been marked already or what is selected already
+ * or simply added at the current insertion point. Depending on what is available.
+ * @param range The range of the new text to select (given relative to the insertion point of the new text).
+ */
+- (void) setMarkedText: (id) aString selectedRange: (NSRange) range
+{
+ // Since we did not return any valid attribute for marked text (see validAttributesForMarkedText)
+ // we can safely assume the passed in text is an NSString instance.
+ NSString* newText = (NSString*) aString;
+ int currentPosition = [mOwner getGeneralProperty: SCI_GETCURRENTPOS parameter: 0];
+
+ // Replace marked text if there is one.
+ if (mMarkedTextRange.length > 0)
+ {
+ // We have already marked text. Replace that.
+ [mOwner setGeneralProperty: SCI_SETSELECTIONSTART
+ parameter: mMarkedTextRange.location
+ value: 0];
+ [mOwner setGeneralProperty: SCI_SETSELECTIONEND
+ parameter: mMarkedTextRange.location + mMarkedTextRange.length
+ value: 0];
+ currentPosition = mMarkedTextRange.location;
+ }
+
+ mOwner.backend->InsertText(newText);
+
+ mMarkedTextRange.location = currentPosition;
+ mMarkedTextRange.length = [newText length];
+
+ // Mark the just inserted text. Keep the marked range for later reset.
+ [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT parameter: INPUT_INDICATOR value: 0];
+ [mOwner setGeneralProperty: SCI_INDICATORFILLRANGE
+ parameter: mMarkedTextRange.location
+ value: mMarkedTextRange.length];
+
+ // Select the part which is indicated in the given range.
+ if (range.length > 0)
+ {
+ [mOwner setGeneralProperty: SCI_SETSELECTIONSTART
+ parameter: currentPosition + range.location
+ value: 0];
+ [mOwner setGeneralProperty: SCI_SETSELECTIONEND
+ parameter: currentPosition + range.location + range.length
+ value: 0];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) unmarkText
+{
+ if (mMarkedTextRange.length > 0)
+ {
+ [mOwner setGeneralProperty: SCI_SETINDICATORCURRENT parameter: INPUT_INDICATOR value: 0];
+ [mOwner setGeneralProperty: SCI_INDICATORCLEARRANGE
+ parameter: mMarkedTextRange.location
+ value: mMarkedTextRange.length];
+ mMarkedTextRange = NSMakeRange(NSNotFound, 0);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Removes any currently marked text.
+ */
+- (void) removeMarkedText
+{
+ if (mMarkedTextRange.length > 0)
+ {
+ // We have already marked text. Replace that.
+ [mOwner setGeneralProperty: SCI_SETSELECTIONSTART
+ parameter: mMarkedTextRange.location
+ value: 0];
+ [mOwner setGeneralProperty: SCI_SETSELECTIONEND
+ parameter: mMarkedTextRange.location + mMarkedTextRange.length
+ value: 0];
+ mOwner.backend->InsertText(@"");
+ mMarkedTextRange = NSMakeRange(NSNotFound, 0);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (NSArray*) validAttributesForMarkedText
+{
+ return nil;
+}
+
+// End of the NSTextInput protocol adoption.
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Generic input method. It is used to pass on keyboard input to Scintilla. The control itself only
+ * handles shortcuts. The input is then forwarded to the Cocoa text input system, which in turn does
+ * its own input handling (character composition via NSTextInput protocol):
+ */
+- (void) keyDown: (NSEvent *) theEvent
+{
+ mOwner.backend->KeyboardInput(theEvent);
+ NSArray* events = [NSArray arrayWithObject: theEvent];
+ [self interpretKeyEvents: events];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) mouseDown: (NSEvent *) theEvent
+{
+ mOwner.backend->MouseDown(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) mouseDragged: (NSEvent *) theEvent
+{
+ mOwner.backend->MouseMove(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) mouseUp: (NSEvent *) theEvent
+{
+ mOwner.backend->MouseUp(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) mouseMoved: (NSEvent *) theEvent
+{
+ mOwner.backend->MouseMove(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) mouseEntered: (NSEvent *) theEvent
+{
+ mOwner.backend->MouseEntered(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) mouseExited: (NSEvent *) theEvent
+{
+ mOwner.backend->MouseExited(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) scrollWheel: (NSEvent *) theEvent
+{
+ mOwner.backend->MouseWheel(theEvent);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * The editor is getting the foreground control (the one getting the input focus).
+ */
+- (BOOL) becomeFirstResponder
+{
+ mOwner.backend->WndProc(SCI_SETFOCUS, 1, 0);
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * The editor is losing the input focus.
+ */
+- (BOOL) resignFirstResponder
+{
+ mOwner.backend->WndProc(SCI_SETFOCUS, 0, 0);
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called when an external drag operation enters the view.
+ */
+- (NSDragOperation) draggingEntered: (id <NSDraggingInfo>) sender
+{
+ return mOwner.backend->DraggingEntered(sender);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called frequently during an external drag operation if we are the target.
+ */
+- (NSDragOperation) draggingUpdated: (id <NSDraggingInfo>) sender
+{
+ return mOwner.backend->DraggingUpdated(sender);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Drag image left the view. Clean up if necessary.
+ */
+- (void) draggingExited: (id <NSDraggingInfo>) sender
+{
+ mOwner.backend->DraggingExited(sender);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (BOOL) prepareForDragOperation: (id <NSDraggingInfo>) sender
+{
+ return YES;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (BOOL) performDragOperation: (id <NSDraggingInfo>) sender
+{
+ return mOwner.backend->PerformDragOperation(sender);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Returns operations we allow as drag source.
+ */
+- (NSDragOperation) draggingSourceOperationMaskForLocal: (BOOL) flag
+{
+ return NSDragOperationCopy | NSDragOperationMove;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Drag operation is done. Notify editor.
+ */
+- (void) concludeDragOperation: (id <NSDraggingInfo>) sender
+{
+ // Clean up is the same as if we are no longer the drag target.
+ mOwner.backend->DraggingExited(sender);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+// NSResponder actions.
+
+- (void) selectAll: (id) sender
+{
+ mOwner.backend->SelectAll();
+}
+
+- (void) deleteBackward: (id) sender
+{
+ mOwner.backend->DeleteBackward();
+}
+
+- (void) cut: (id) sender
+{
+ mOwner.backend->Cut();
+}
+
+- (void) copy: (id) sender
+{
+ mOwner.backend->Copy();
+}
+
+- (void) paste: (id) sender
+{
+ mOwner.backend->Paste();
+}
+
+- (void) undo: (id) sender
+{
+ mOwner.backend->Undo();
+}
+
+- (void) redo: (id) sender
+{
+ mOwner.backend->Redo();
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) dealloc
+{
+ [mCurrentCursor release];
+ [super dealloc];
+}
+
+@end
+
+//--------------------------------------------------------------------------------------------------
+
+@implementation ScintillaView
+
+@synthesize backend = mBackend;
+
+/**
+ * ScintiallView is a composite control made from an NSView and an embedded NSView that is
+ * used as canvas for the output (by the backend, using its CGContext), plus other elements
+ * (scrollers, info bar).
+ */
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Initialize custom cursor.
+ */
++ (void) initialize
+{
+ if (self == [ScintillaView class])
+ {
+ NSBundle* bundle = [NSBundle bundleForClass: [ScintillaView class]];
+
+ NSString* path = [bundle pathForResource: @"mac_cursor_busy" ofType: @"png" inDirectory: nil];
+ NSImage* image = [[[NSImage alloc] initWithContentsOfFile: path] autorelease];
+ waitCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(2, 2)];
+
+ path = [bundle pathForResource: @"mac_cursor_flipped" ofType: @"png" inDirectory: nil];
+ image = [[[NSImage alloc] initWithContentsOfFile: path] autorelease];
+ reverseArrowCursor = [[NSCursor alloc] initWithImage: image hotSpot: NSMakePoint(12, 2)];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Sends a new notification of the given type to the default notification center.
+ */
+- (void) sendNotification: (NSString*) notificationName
+{
+ NSNotificationCenter* center = [NSNotificationCenter defaultCenter];
+ [center postNotificationName: notificationName object: self];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by a connected compontent (usually the info bar) if something changed there.
+ *
+ * @param type The type of the notification.
+ * @param message Carries the new status message if the type is a status message change.
+ * @param location Carries the new location (e.g. caret) if the type is a caret change or similar type.
+ * @param location Carries the new zoom value if the type is a zoom change.
+ */
+- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
+ value: (float) value
+{
+ switch (type)
+ {
+ case IBNZoomChanged:
+ {
+ // Compute point increase/decrease based on default font size.
+ int fontSize = [self getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT];
+ int zoom = (int) (fontSize * (value - 1));
+ [self setGeneralProperty: SCI_SETZOOM parameter: zoom value: 0];
+ break;
+ }
+ };
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) setCallback: (id <InfoBarCommunicator>) callback
+{
+ // Not used. Only here to satisfy protocol.
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Notification function used by Scintilla to call us back (e.g. for handling clicks on the
+ * folder margin or changes in the editor).
+ */
+static void notification(intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam)
+{
+ // WM_NOTIFY means we got a parent notification with a special notification structure.
+ // Here we don't really differentiate between parent and own notifications and handle both.
+ ScintillaView* editor;
+ switch (iMessage)
+ {
+ case WM_NOTIFY:
+ {
+ // Parent notification. Details are passed as SCNotification structure.
+ SCNotification* scn = reinterpret_cast<SCNotification*>(lParam);
+ editor = reinterpret_cast<InnerView*>(scn->nmhdr.idFrom).owner;
+ switch (scn->nmhdr.code)
+ {
+ case SCN_MARGINCLICK:
+ {
+ if (scn->margin == 2)
+ {
+ // Click on the folder margin. Toggle the current line if possible.
+ int line = [editor getGeneralProperty: SCI_LINEFROMPOSITION parameter: scn->position];
+ [editor setGeneralProperty: SCI_TOGGLEFOLD parameter: line value: 0];
+ }
+ break;
+ };
+ case SCN_MODIFIED:
+ {
+ // Decide depending on the modification type what to do.
+ // There can be more than one modification carried by one notification.
+ if (scn->modificationType & (SC_MOD_INSERTTEXT | SC_MOD_DELETETEXT))
+ [editor sendNotification: NSTextDidChangeNotification];
+ break;
+ }
+ case SCN_ZOOM:
+ {
+ // A zoom change happend. Notify info bar if there is one.
+ float zoom = [editor getGeneralProperty: SCI_GETZOOM parameter: 0];
+ int fontSize = [editor getGeneralProperty: SCI_STYLEGETSIZE parameter: STYLE_DEFAULT];
+ float factor = (zoom / fontSize) + 1;
+ [editor->mInfoBar notify: IBNZoomChanged message: nil location: NSZeroPoint value: factor];
+ break;
+ }
+ case SCN_UPDATEUI:
+ {
+ // Triggered whenever changes in the UI state need to be reflected.
+ // These can be: caret changes, selection changes etc.
+ NSPoint caretPosition = editor->mBackend->GetCaretPosition();
+ [editor->mInfoBar notify: IBNCaretChanged message: nil location: caretPosition value: 0];
+ [editor sendNotification: SCIUpdateUINotification];
+ break;
+ }
+ }
+ break;
+ }
+ case WM_COMMAND:
+ {
+ // Notifications for the editor itself.
+ ScintillaCocoa* backend = reinterpret_cast<ScintillaCocoa*>(lParam);
+ editor = backend->TopContainer();
+ switch (wParam >> 16)
+ {
+ case SCEN_KILLFOCUS:
+ [editor sendNotification: NSTextDidEndEditingNotification];
+ break;
+ case SCEN_SETFOCUS: // Nothing to do for now.
+ break;
+ }
+ break;
+ }
+ };
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Initialization of the view. Used to setup a few other things we need.
+ */
+- (id) initWithFrame: (NSRect) frame
+{
+ self = [super initWithFrame:frame];
+ if (self)
+ {
+ mContent = [[[InnerView alloc] init] autorelease];
+ mBackend = new ScintillaCocoa(mContent);
+ mContent.owner = self;
+ [self addSubview: mContent];
+
+ // Initialize the scrollers but don't show them yet.
+ // Pick an arbitrary size, just to make NSScroller selecting the proper scroller direction
+ // (horizontal or vertical).
+ NSRect scrollerRect = NSMakeRect(0, 0, 100, 10);
+ mHorizontalScroller = [[[NSScroller alloc] initWithFrame: scrollerRect] autorelease];
+ [mHorizontalScroller setHidden: YES];
+ [mHorizontalScroller setTarget: self];
+ [mHorizontalScroller setAction: @selector(scrollerAction:)];
+ [self addSubview: mHorizontalScroller];
+
+ scrollerRect.size = NSMakeSize(10, 100);
+ mVerticalScroller = [[[NSScroller alloc] initWithFrame: scrollerRect] autorelease];
+ [mVerticalScroller setHidden: YES];
+ [mVerticalScroller setTarget: self];
+ [mVerticalScroller setAction: @selector(scrollerAction:)];
+ [self addSubview: mVerticalScroller];
+
+ // Establish a connection from the back end to this container so we can handle situations
+ // which require our attention.
+ mBackend->RegisterNotifyCallback(nil, notification);
+
+ // Setup a special indicator used in the editor to provide visual feedback for
+ // input composition, depending on language, keyboard etc.
+ [self setColorProperty: SCI_INDICSETFORE parameter: INPUT_INDICATOR fromHTML: @"#FF9A00"];
+ [self setGeneralProperty: SCI_INDICSETUNDER parameter: INPUT_INDICATOR value: 1];
+ [self setGeneralProperty: SCI_INDICSETSTYLE parameter: INPUT_INDICATOR value: INDIC_ROUNDBOX];
+ [self setGeneralProperty: SCI_INDICSETALPHA parameter: INPUT_INDICATOR value: 100];
+ }
+ return self;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) dealloc
+{
+ [mInfoBar release];
+ delete mBackend;
+ [super dealloc];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) viewDidMoveToWindow
+{
+ [super viewDidMoveToWindow];
+
+ [self layout];
+
+ // Enable also mouse move events for our window (and so this view).
+ [[self window] setAcceptsMouseMovedEvents: YES];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to position and size the parts of the editor (content, scrollers, info bar).
+ */
+- (void) layout
+{
+ int scrollerWidth = [NSScroller scrollerWidth];
+
+ NSSize size = [self frame].size;
+ NSRect hScrollerRect = {0, 0, size.width, scrollerWidth};
+ NSRect vScrollerRect = {size.width - scrollerWidth, 0, scrollerWidth, size.height};
+ NSRect barFrame = {0, size.height - scrollerWidth, size.width, scrollerWidth};
+ BOOL infoBarVisible = mInfoBar != nil && ![mInfoBar isHidden];
+
+ // Horizontal offset of the content. Almost always 0 unless the vertical scroller
+ // is on the left side.
+ int contentX = 0;
+
+ // Vertical scroller frame calculation.
+ if (![mVerticalScroller isHidden])
+ {
+ // Consider user settings (left vs right vertical scrollbar).
+ BOOL isLeft = [[[NSUserDefaults standardUserDefaults] stringForKey: @"NSScrollerPosition"]
+ isEqualToString: @"left"];
+ if (isLeft)
+ {
+ vScrollerRect.origin.x = 0;
+ hScrollerRect.origin.x = scrollerWidth;
+ contentX = scrollerWidth;
+ };
+
+ size.width -= scrollerWidth;
+ hScrollerRect.size.width -= scrollerWidth;
+ }
+
+ // Same for horizontal scroller.
+ if (![mHorizontalScroller isHidden])
+ {
+ // Make room for the h-scroller.
+ size.height -= scrollerWidth;
+ vScrollerRect.size.height -= scrollerWidth;
+ vScrollerRect.origin.y += scrollerWidth;
+ };
+
+ // Info bar frame.
+ if (infoBarVisible)
+ {
+ // Initial value already is as if the bar is at top.
+ if (mInfoBarAtTop)
+ {
+ vScrollerRect.size.height -= scrollerWidth;
+ size.height -= scrollerWidth;
+ }
+ else
+ {
+ // Layout info bar and h-scroller side by side in a friendly manner.
+ int nativeWidth = mInitialInfoBarWidth;
+ int remainingWidth = barFrame.size.width;
+
+ barFrame.origin.y = 0;
+
+ if ([mHorizontalScroller isHidden])
+ {
+ // H-scroller is not visible, so take the full space.
+ vScrollerRect.origin.y += scrollerWidth;
+ vScrollerRect.size.height -= scrollerWidth;
+ size.height -= scrollerWidth;
+ }
+ else
+ {
+ // If the left offset of the h-scroller is > 0 then the v-scroller is on the left side.
+ // In this case we take the full width, otherwise what has been given to the h-scroller
+ // and content up to now.
+ if (hScrollerRect.origin.x == 0)
+ remainingWidth = size.width;
+
+ // Note: remainingWidth can become < 0, which hides the scroller.
+ remainingWidth -= nativeWidth;
+
+ hScrollerRect.origin.x = nativeWidth;
+ hScrollerRect.size.width = remainingWidth;
+ barFrame.size.width = nativeWidth;
+ }
+ }
+ }
+
+ NSRect contentRect = {contentX, vScrollerRect.origin.y, size.width, size.height};
+ [mContent setFrame: contentRect];
+
+ if (infoBarVisible)
+ [mInfoBar setFrame: barFrame];
+ if (![mHorizontalScroller isHidden])
+ [mHorizontalScroller setFrame: hScrollerRect];
+ if (![mVerticalScroller isHidden])
+ [mVerticalScroller setFrame: vScrollerRect];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by the backend to adjust the vertical scroller (range and page).
+ *
+ * @param range Determines the total size of the scroll area used in the editor.
+ * @param page Determines how many pixels a page is.
+ * @result Returns YES if anything changed, otherwise NO.
+ */
+- (BOOL) setVerticalScrollRange: (int) range page: (int) page
+{
+ BOOL result = NO;
+ BOOL hideScroller = page >= range;
+
+ if ([mVerticalScroller isHidden] != hideScroller)
+ {
+ result = YES;
+ [mVerticalScroller setHidden: hideScroller];
+ if (!hideScroller)
+ [mVerticalScroller setFloatValue: 0];
+ [self layout];
+ }
+
+ if (!hideScroller)
+ {
+ [mVerticalScroller setEnabled: YES];
+
+ CGFloat currentProportion = [mVerticalScroller knobProportion];
+ CGFloat newProportion = page / (CGFloat) range;
+ if (currentProportion != newProportion)
+ {
+ result = YES;
+ [mVerticalScroller setKnobProportion: newProportion];
+ }
+ }
+
+ return result;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to set the position of the vertical scroll thumb.
+ *
+ * @param position The relative position in the rang [0..1];
+ */
+- (void) setVerticalScrollPosition: (float) position
+{
+ [mVerticalScroller setFloatValue: position];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Called by the backend to adjust the horizontal scroller (range and page).
+ *
+ * @param range Determines the total size of the scroll area used in the editor.
+ * @param page Determines how many pixels a page is.
+ * @result Returns YES if anything changed, otherwise NO.
+ */
+- (BOOL) setHorizontalScrollRange: (int) range page: (int) page
+{
+ BOOL result = NO;
+ BOOL hideScroller = page >= range;
+
+ if ([mHorizontalScroller isHidden] != hideScroller)
+ {
+ result = YES;
+ [mHorizontalScroller setHidden: hideScroller];
+ [self layout];
+ }
+
+ if (!hideScroller)
+ {
+ [mHorizontalScroller setEnabled: YES];
+
+ CGFloat currentProportion = [mHorizontalScroller knobProportion];
+ CGFloat newProportion = page / (CGFloat) range;
+ if (currentProportion != newProportion)
+ {
+ result = YES;
+ [mHorizontalScroller setKnobProportion: newProportion];
+ }
+ }
+
+ return result;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to set the position of the vertical scroll thumb.
+ *
+ * @param position The relative position in the rang [0..1];
+ */
+- (void) setHorizontalScrollPosition: (float) position
+{
+ [mHorizontalScroller setFloatValue: position];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Triggered by one of the scrollers when it gets manipulated by the user. Notify the backend
+ * about the change.
+ */
+- (void) scrollerAction: (id) sender
+{
+ float position = [sender floatValue];
+ mBackend->DoScroll(position, [sender hitPart], sender == mHorizontalScroller);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Used to reposition our content depending on the size of the view.
+ */
+- (void) setFrame: (NSRect) newFrame
+{
+ [super setFrame: newFrame];
+ [self layout];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Getter for the currently selected text in raw form (no formatting information included).
+ * If there is no text available an empty string is returned.
+ */
+- (NSString*) selectedString
+{
+ NSString *result = @"";
+
+ char *buffer(0);
+ const int length = mBackend->WndProc(SCI_GETSELTEXT, 0, 0);
+ if (length > 0)
+ {
+ buffer = new char[length + 1];
+ try
+ {
+ mBackend->WndProc(SCI_GETSELTEXT, length + 1, (sptr_t) buffer);
+ mBackend->WndProc(SCI_SETSAVEPOINT, 0, 0);
+
+ result = [NSString stringWithUTF8String: buffer];
+ delete[] buffer;
+ }
+ catch (...)
+ {
+ delete[] buffer;
+ buffer = 0;
+ }
+ }
+
+ return result;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Getter for the current text in raw form (no formatting information included).
+ * If there is no text available an empty string is returned.
+ */
+- (NSString*) string
+{
+ NSString *result = @"";
+
+ char *buffer(0);
+ const int length = mBackend->WndProc(SCI_GETLENGTH, 0, 0);
+ if (length > 0)
+ {
+ buffer = new char[length + 1];
+ try
+ {
+ mBackend->WndProc(SCI_GETTEXT, length + 1, (sptr_t) buffer);
+ mBackend->WndProc(SCI_SETSAVEPOINT, 0, 0);
+
+ result = [NSString stringWithUTF8String: buffer];
+ delete[] buffer;
+ }
+ catch (...)
+ {
+ delete[] buffer;
+ buffer = 0;
+ }
+ }
+
+ return result;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Setter for the current text (no formatting included).
+ */
+- (void) setString: (NSString*) aString
+{
+ const char* text = [aString UTF8String];
+ mBackend->WndProc(SCI_SETTEXT, 0, (long) text);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) insertString: (NSString*) aString atOffset: (int)offset
+{
+ const char* text = [aString UTF8String];
+ mBackend->WndProc(SCI_ADDTEXT, offset, (long) text);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (void) setEditable: (BOOL) editable
+{
+ mBackend->WndProc(SCI_SETREADONLY, editable ? 0 : 1, 0);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (BOOL) isEditable
+{
+ return mBackend->WndProc(SCI_GETREADONLY, 0, 0) != 0;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+- (InnerView*) content
+{
+ return mContent;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Direct call into the backend to allow uninterpreted access to it. The values to be passed in and
+ * the result heavily depend on the message that is used for the call. Refer to the Scintilla
+ * documentation to learn what can be used here.
+ */
++ (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam
+ lParam: (sptr_t) lParam
+{
+ return ScintillaCocoa::DirectFunction(sender->mBackend, message, wParam, lParam);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * This is a helper method to set properties in the backend, with native parameters.
+ *
+ * @param property Main property like SCI_STYLESETFORE for which a value is to be set.
+ * @param parameter Additional info for this property like a parameter or index.
+ * @param value The actual value. It depends on the property what this parameter means.
+ */
+- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value
+{
+ mBackend->WndProc(property, parameter, value);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * This is a helper method to get a property in the backend, with native parameters.
+ *
+ * @param property Main property like SCI_STYLESETFORE for which a value is to get.
+ * @param parameter Additional info for this property like a parameter or index.
+ * @param extra Yet another parameter if needed.
+ * @result A generic value which must be interpreted depending on the property queried.
+ */
+- (long) getGeneralProperty: (int) property parameter: (long) parameter extra: (long) extra
+{
+ return mBackend->WndProc(property, parameter, extra);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Convenience function to avoid unneeded extra parameter.
+ */
+- (long) getGeneralProperty: (int) property parameter: (long) parameter
+{
+ return mBackend->WndProc(property, parameter, 0);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Convenience function to avoid unneeded parameters.
+ */
+- (long) getGeneralProperty: (int) property
+{
+ return mBackend->WndProc(property, 0, 0);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Use this variant if you have to pass in a reference to something (e.g. a text range).
+ */
+- (long) getGeneralProperty: (int) property ref: (const void*) ref
+{
+ return mBackend->WndProc(property, 0, (sptr_t) ref);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property setter for colors.
+ */
+- (void) setColorProperty: (int) property parameter: (long) parameter value: (NSColor*) value
+{
+ if ([value colorSpaceName] != NSDeviceRGBColorSpace)
+ value = [value colorUsingColorSpaceName: NSDeviceRGBColorSpace];
+ long red = [value redComponent] * 255;
+ long green = [value greenComponent] * 255;
+ long blue = [value blueComponent] * 255;
+
+ long color = (blue << 16) + (green << 8) + red;
+ mBackend->WndProc(property, parameter, color);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Another color property setting, which allows to specify the color as string like in HTML
+ * documents (i.e. with leading # and either 3 hex digits or 6).
+ */
+- (void) setColorProperty: (int) property parameter: (long) parameter fromHTML: (NSString*) fromHTML
+{
+ if ([fromHTML length] > 3 && [fromHTML characterAtIndex: 0] == '#')
+ {
+ bool longVersion = [fromHTML length] > 6;
+ int index = 1;
+
+ char value[3] = {0, 0, 0};
+ value[0] = [fromHTML characterAtIndex: index++];
+ if (longVersion)
+ value[1] = [fromHTML characterAtIndex: index++];
+ else
+ value[1] = value[0];
+
+ unsigned rawRed;
+ [[NSScanner scannerWithString: [NSString stringWithUTF8String: value]] scanHexInt: &rawRed];
+
+ value[0] = [fromHTML characterAtIndex: index++];
+ if (longVersion)
+ value[1] = [fromHTML characterAtIndex: index++];
+ else
+ value[1] = value[0];
+
+ unsigned rawGreen;
+ [[NSScanner scannerWithString: [NSString stringWithUTF8String: value]] scanHexInt: &rawGreen];
+
+ value[0] = [fromHTML characterAtIndex: index++];
+ if (longVersion)
+ value[1] = [fromHTML characterAtIndex: index++];
+ else
+ value[1] = value[0];
+
+ unsigned rawBlue;
+ [[NSScanner scannerWithString: [NSString stringWithUTF8String: value]] scanHexInt: &rawBlue];
+
+ long color = (rawBlue << 16) + (rawGreen << 8) + rawRed;
+ mBackend->WndProc(property, parameter, color);
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property getter for colors.
+ */
+- (NSColor*) getColorProperty: (int) property parameter: (long) parameter
+{
+ int color = mBackend->WndProc(property, parameter, 0);
+ float red = (color & 0xFF) / 255.0;
+ float green = ((color >> 8) & 0xFF) / 255.0;
+ float blue = ((color >> 16) & 0xFF) / 255.0;
+ NSColor* result = [NSColor colorWithDeviceRed: red green: green blue: blue alpha: 1];
+ return result;
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property setter for references (pointers, addresses).
+ */
+- (void) setReferenceProperty: (int) property parameter: (long) parameter value: (const void*) value
+{
+ mBackend->WndProc(property, parameter, (sptr_t) value);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property getter for references (pointers, addresses).
+ */
+- (const void*) getReferenceProperty: (int) property parameter: (long) parameter
+{
+ return (const void*) mBackend->WndProc(property, parameter, 0);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property setter for string values.
+ */
+- (void) setStringProperty: (int) property parameter: (long) parameter value: (NSString*) value
+{
+ const char* rawValue = [value UTF8String];
+ mBackend->WndProc(property, parameter, (sptr_t) rawValue);
+}
+
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property getter for string values.
+ */
+- (NSString*) getStringProperty: (int) property parameter: (long) parameter
+{
+ const char* rawValue = (const char*) mBackend->WndProc(property, parameter, 0);
+ return [NSString stringWithUTF8String: rawValue];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property setter for lexer properties, which are commonly passed as strings.
+ */
+- (void) setLexerProperty: (NSString*) name value: (NSString*) value
+{
+ const char* rawName = [name UTF8String];
+ const char* rawValue = [value UTF8String];
+ mBackend->WndProc(SCI_SETPROPERTY, (sptr_t) rawName, (sptr_t) rawValue);
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Specialized property getter for references (pointers, addresses).
+ */
+- (NSString*) getLexerProperty: (NSString*) name
+{
+ const char* rawName = [name UTF8String];
+ const char* result = (const char*) mBackend->WndProc(SCI_SETPROPERTY, (sptr_t) rawName, 0);
+ return [NSString stringWithUTF8String: result];
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Sets the new control which is displayed as info bar at the top or bottom of the editor.
+ * Set newBar to nil if you want to hide the bar again.
+ * When aligned to bottom position then the info bar and the horizontal scroller share the available
+ * space. The info bar will then only get the width it is currently set to less a minimal amount
+ * reserved for the scroller. At the top position it gets the full width of the control.
+ * The info bar's height is set to the height of the scrollbar.
+ */
+- (void) setInfoBar: (NSView <InfoBarCommunicator>*) newBar top: (BOOL) top
+{
+ if (mInfoBar != newBar)
+ {
+ [mInfoBar removeFromSuperview];
+
+ mInfoBar = newBar;
+ mInfoBarAtTop = top;
+ if (mInfoBar != nil)
+ {
+ [self addSubview: mInfoBar];
+ [mInfoBar setCallback: self];
+
+ // Keep the initial width as reference for layout changes.
+ mInitialInfoBarWidth = [mInfoBar frame].size.width;
+ }
+
+ [self layout];
+ }
+}
+
+//--------------------------------------------------------------------------------------------------
+
+/**
+ * Sets the edit's info bar status message. This call only has an effect if there is an info bar.
+ */
+- (void) setStatusText: (NSString*) text
+{
+ if (mInfoBar != nil)
+ [mInfoBar notify: IBNStatusChanged message: text location: NSZeroPoint value: 0];
+}
+
+- (NSRange) selectedRange
+{
+ return [mContent selectedRange];
+}
+
+- (void)insertText: (NSString*)text
+{
+ [mContent insertText: text];
+}
+
+@end
+
+//--------------------------------------------------------------------------------------------------
+
diff --git a/scintilla/cocoa/res/info_bar_bg.png b/scintilla/cocoa/res/info_bar_bg.png Binary files differnew file mode 100644 index 0000000..79010fa --- /dev/null +++ b/scintilla/cocoa/res/info_bar_bg.png diff --git a/scintilla/cocoa/res/mac_cursor_busy.png b/scintilla/cocoa/res/mac_cursor_busy.png Binary files differnew file mode 100644 index 0000000..9ac8276 --- /dev/null +++ b/scintilla/cocoa/res/mac_cursor_busy.png diff --git a/scintilla/cocoa/res/mac_cursor_flipped.png b/scintilla/cocoa/res/mac_cursor_flipped.png Binary files differnew file mode 100644 index 0000000..2c984f2 --- /dev/null +++ b/scintilla/cocoa/res/mac_cursor_flipped.png |