diff options
author | nyamatongwe <unknown> | 2009-05-14 12:10:06 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2009-05-14 12:10:06 +0000 |
commit | 805e109be2f52c0ea446511fc33efb3746a3bc18 (patch) | |
tree | 3b57cf166d494a0dba47befcea94deba3da0fbda | |
parent | 8e12be32e9d14363f1e2f0fe6fc305b68a64ceb5 (diff) | |
download | scintilla-mirror-805e109be2f52c0ea446511fc33efb3746a3bc18.tar.gz |
First upload of Cocoa platform from Mike Lischke at Sun.
24 files changed, 10273 insertions, 0 deletions
diff --git a/cocoa/PlatCocoa.h b/cocoa/PlatCocoa.h new file mode 100644 index 000000000..a650c653e --- /dev/null +++ b/cocoa/PlatCocoa.h @@ -0,0 +1,110 @@ + +/** + * 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); + +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/cocoa/PlatCocoa.mm b/cocoa/PlatCocoa.mm new file mode 100644 index 000000000..ca24c4b47 --- /dev/null +++ b/cocoa/PlatCocoa.mm @@ -0,0 +1,2130 @@ +/** + * 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). + */ + +#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 <ScintillaView.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, + bool 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; + //inited = false; +} + +//-------------------------------------------------------------------------------------------------- + +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] != NULL && (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(); +} + +//----------------- Menu --------------------------------------------------------------------------- + +Menu::Menu() + : mid(0) +{ +} + +//-------------------------------------------------------------------------------------------------- + +void Menu::CreatePopUp() { + // TODO: Could I just feed a constant menu ID parameter, or does + // it really need to be unique? + static int nextMenuID = 1; + Destroy(); + OSStatus err; + // err = CreateNewMenu( nextMenuID++, 0, reinterpret_cast<MenuRef*>( &id ) ); +} + +void Menu::Destroy() { +} + +void Menu::Show(Point pt, Window &) { + /* + UInt32 userSelection = 0; + SInt16 menuId = 0; + MenuItemIndex menuItem = 0; + ::Point globalPoint; + globalPoint.h = pt.x; + globalPoint.v = pt.y; + OSStatus err; + err = ContextualMenuSelect( reinterpret_cast<MenuRef>( id ), globalPoint, + false, kCMHelpItemRemoveHelp, NULL, + NULL, &userSelection, + &menuId, + &menuItem + ); + */ +} + +//----------------- 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"]; + return static_cast<unsigned int>(threshold / kEventDurationMillisecond); +} + +//-------------------------------------------------------------------------------------------------- + +bool Platform::MouseButtonBounce() +{ + return false; +} + +//-------------------------------------------------------------------------------------------------- + +bool Platform::IsKeyDown(int keyCode) +{ + return false; + // TODO: Map Scintilla/Windows key codes to Mac OS X key codes + // TODO: Do I need this? + /* + // Inspired by code at: http://www.sover.net/~jams/Morgan/docs/GameInputMethods.txt + + // Get the keys + KeyMap keys; + GetKeys( keys ); + + // Calculate the key map index + long keyMapIndex = keys[keyCode/8]; + // Calculate the individual bit to check + short bitToCheck = keyCode % 8; + // Check the status of the key + return ( keyMapIndex >> bitToCheck ) & 0x01; + */ +} + +//-------------------------------------------------------------------------------------------------- + +/** + * 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/cocoa/QuartzTextLayout.h b/cocoa/QuartzTextLayout.h new file mode 100644 index 000000000..64bf492d4 --- /dev/null +++ b/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/cocoa/QuartzTextStyle.h b/cocoa/QuartzTextStyle.h new file mode 100644 index 000000000..36729b77b --- /dev/null +++ b/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/cocoa/QuartzTextStyleAttribute.h b/cocoa/QuartzTextStyleAttribute.h new file mode 100644 index 000000000..cf227e47f --- /dev/null +++ b/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/cocoa/ScintillaCallTip.h b/cocoa/ScintillaCallTip.h new file mode 100644 index 000000000..1d9766a6a --- /dev/null +++ b/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/cocoa/ScintillaCallTip.mm b/cocoa/ScintillaCallTip.mm new file mode 100644 index 000000000..ee9d2dfb7 --- /dev/null +++ b/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/cocoa/ScintillaCocoa.h b/cocoa/ScintillaCocoa.h new file mode 100644 index 000000000..2fa2f1bfe --- /dev/null +++ b/cocoa/ScintillaCocoa.h @@ -0,0 +1,203 @@ +/* + * ScintillaCocoa.h + * + * Mike Lischke <mlischke@sun.com> + * + * Based on ScintillaCocoa.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 "Platform.h" +#include "Scintilla.h" +#include "PlatCocoa.h" + +#ifdef SCI_LEXER +#include "SciLexer.h" +#include "PropSet.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 "PositionCache.h" +#include "Editor.h" +#include "SString.h" +#include "ScintillaBase.h" +//#include "ScintillaCallTip.h" + +#import <Cocoa/Cocoa.h> + +#import <Carbon/Carbon.h> // Temporary + +@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. + * Messgae 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(); +// virtual void ScrollText(int linesToMove); + void SetVerticalScrollPos(); + void SetHorizontalScrollPos(); + bool ModifyScrollBars(int nMax, int nPage); + void Resize(); + void DoScroll(float position, NSScrollerPart part, bool horizontal); + + // Notifications. + 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(); + + 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(); + + // virtual OSStatus ContextualMenuClick( HIPoint& location ); +// +// virtual OSStatus ActiveStateChanged(); +// +// virtual void CallTipClick(); + +}; + + +} + + diff --git a/cocoa/ScintillaCocoa.mm b/cocoa/ScintillaCocoa.mm new file mode 100644 index 000000000..b0456a53d --- /dev/null +++ b/cocoa/ScintillaCocoa.mm @@ -0,0 +1,1430 @@ + +/** + * Scintilla source code edit control + * ScintillaCocoa.mm - Cocoa subclass of ScintillaBase + * + * 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 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 "ScintillaCocoa.h" +#include "ScintillaView.h" + +#include <Carbon/Carbon.h> // Temporary + +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_CHARLEFTRECTEXTEND}, + {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_CHARRIGHTRECTEXTEND}, + {'/', 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}, + {'y', SCI_CMD, 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; +} + +//-------------------------------------------------------------------------------------------------- + +/** + * 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 (currentPos != anchor) + { + SelectionText selectedText; + CopySelectionRange(&selectedText); + CopyToClipboard(selectedText); + } +} + +//-------------------------------------------------------------------------------------------------- + +bool ScintillaCocoa::CanPaste() +{ + if (!Editor::CanPaste()) + return false; + + bool ok = GetPasteboardData([NSPasteboard generalPasteboard], NULL); + return ok; +} + +//-------------------------------------------------------------------------------------------------- + +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) + { + int selStart = SelectionStart(); + PasteRectangular(selStart, selectedText.s, selectedText.len); + } + else + if (pdoc->InsertString(currentPos, selectedText.s, selectedText.len)) + SetEmptySelection(currentPos + selectedText.len); + + pdoc->EndUndoAction(); + + Redraw(); + EnsureCaretVisible(); +} + +//-------------------------------------------------------------------------------------------------- + +void ScintillaCocoa::CreateCallTipWindow(PRectangle rc) +{ +#if 0 + // 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); + + } +#endif +} + + +void ScintillaCocoa::AddToPopUp(const char *label, int cmd, bool enabled) +{ + // Translate stuff into menu item attributes + MenuItemAttributes attributes = 0; + if (label[0] == '\0') + attributes |= kMenuItemAttrSeparator; + if (!enabled) + attributes |= kMenuItemAttrDisabled; + + // Translate Scintilla commands into Mac OS commands + // TODO: If I create an AEDesc, OS X may insert these standard + // text editing commands into the menu for me. + MenuCommand macCommand; + switch (cmd) + { + case idcmdUndo: + macCommand = kHICommandUndo; + break; + case idcmdRedo: + macCommand = kHICommandRedo; + break; + case idcmdCut: + macCommand = kHICommandCut; + break; + case idcmdCopy: + macCommand = kHICommandCopy; + break; + case idcmdPaste: + macCommand = kHICommandPaste; + break; + case idcmdDelete: + macCommand = kHICommandClear; + break; + case idcmdSelectAll: + macCommand = kHICommandSelectAll; + break; + case 0: + macCommand = 0; + break; + default: + assert( false ); + return; + } + +// NSMenu *menu= reinterpret_cast<NSMenu*>(popup.GetID()); + + //XXX TODO:XXX +// [menu addItemWithTitle:[NSString stringWithUTF8String:label] +// action:@selector() +// keyEquivalent:@""]; +} + +// ------------------------------------------------------------------------------------------------- + +void ScintillaCocoa::ClaimSelection() +{ + // Mac OS X does not have a primary selection. +} + +// ------------------------------------------------------------------------------------------------- + +#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 == invalidPosition) + { + scrollSpeed = 1; + scrollTicks = 2000; + return; + } + + // TODO: does not work for wrapped lines, fix it. + int line = pdoc->LineFromPosition(posDrag); + 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 (currentPos == anchor) + 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(SelectionStart(), SelectionEnd()); + 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(PositionFromLocation(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(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, 0, 0, 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 visibile 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 visibile 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); + NSView* container = ContentView(); + NSRect bounds = [container frame]; + ScintillaView* topContainer = TopContainer(); + + int scrollRange = lineHeight * (nMax + 1); // +1 because the caller subtracted one. + int pageSize = bounds.size.height; + bool verticalChange = [topContainer setVerticalScrollRange: scrollRange page: pageSize]; + + scrollRange = scrollWidth; + pageSize = bounds.size.width; + 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 (SelectionEnd() - SelectionStart()) > 0; +} + +//-------------------------------------------------------------------------------------------------- + +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 lineHeight = WndProc(SCI_TEXTHEIGHT, 0, 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 line 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); +} + +//-------------------------------------------------------------------------------------------------- + +//OSStatus ScintillaCocoa::ContextualMenuClick( HIPoint& location ) +//{ +// // convert screen coords to window relative +// Rect bounds; +// OSStatus err; +// err = GetWindowBounds( this->GetOwner(), kWindowContentRgn, &bounds ); +// assert( err == noErr ); +// location.x += bounds.left; +// location.y += bounds.top; +// ContextMenu( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ) ); +// return noErr; +//} +// +//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/cocoa/ScintillaListBox.h b/cocoa/ScintillaListBox.h new file mode 100644 index 000000000..c42576e6d --- /dev/null +++ b/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/cocoa/ScintillaListBox.mm b/cocoa/ScintillaListBox.mm new file mode 100644 index 000000000..b0c8a2ec3 --- /dev/null +++ b/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/cocoa/ScintillaTest/AppController.h b/cocoa/ScintillaTest/AppController.h new file mode 100644 index 000000000..034755fd6 --- /dev/null +++ b/cocoa/ScintillaTest/AppController.h @@ -0,0 +1,21 @@ +/** + * 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" + +@interface AppController : NSObject { + IBOutlet NSBox *mEditHost; + ScintillaView* mEditor; +} + +- (void) awakeFromNib; +- (void) setupEditor; + +@end diff --git a/cocoa/ScintillaTest/AppController.mm b/cocoa/ScintillaTest/AppController.mm new file mode 100644 index 000000000..37192163b --- /dev/null +++ b/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" +#import "ScintillaView.h" + +#include "Scintilla.h" + +using namespace Scintilla; + +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]; +} + +@end + +//-------------------------------------------------------------------------------------------------- + diff --git a/cocoa/ScintillaTest/English.lproj/InfoPlist.strings b/cocoa/ScintillaTest/English.lproj/InfoPlist.strings Binary files differnew file mode 100644 index 000000000..5e45963c3 --- /dev/null +++ b/cocoa/ScintillaTest/English.lproj/InfoPlist.strings diff --git a/cocoa/ScintillaTest/English.lproj/MainMenu.xib b/cocoa/ScintillaTest/English.lproj/MainMenu.xib new file mode 100644 index 000000000..e795086ed --- /dev/null +++ b/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/cocoa/ScintillaTest/Info.plist b/cocoa/ScintillaTest/Info.plist new file mode 100644 index 000000000..6364d76a9 --- /dev/null +++ b/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/cocoa/ScintillaTest/Scintilla-Info.plist b/cocoa/ScintillaTest/Scintilla-Info.plist new file mode 100644 index 000000000..2c67ffbf2 --- /dev/null +++ b/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/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj b/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj new file mode 100644 index 000000000..a7665e81f --- /dev/null +++ b/cocoa/ScintillaTest/ScintillaTest.xcodeproj/project.pbxproj @@ -0,0 +1,1011 @@ +// !$*UTF8*$! +{ + archiveVersion = 1; + classes = { + }; + objectVersion = 45; + objects = { + +/* Begin PBXBuildFile section */ + 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; }; + 271D1F9D0FA7236900FD601F /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F580FA7236900FD601F /* LexAbaqus.cxx */; }; + 271D1F9E0FA7236900FD601F /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F590FA7236900FD601F /* LexAda.cxx */; }; + 271D1F9F0FA7236900FD601F /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F5A0FA7236900FD601F /* LexAPDL.cxx */; }; + 271D1FA00FA7236900FD601F /* LexAsm.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F5B0FA7236900FD601F /* LexAsm.cxx */; }; + 271D1FA10FA7236900FD601F /* LexAsn1.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F5C0FA7236900FD601F /* LexAsn1.cxx */; }; + 271D1FA20FA7236900FD601F /* LexASY.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F5D0FA7236900FD601F /* LexASY.cxx */; }; + 271D1FA30FA7236900FD601F /* LexAU3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F5E0FA7236900FD601F /* LexAU3.cxx */; }; + 271D1FA40FA7236900FD601F /* LexAVE.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F5F0FA7236900FD601F /* LexAVE.cxx */; }; + 271D1FA50FA7236900FD601F /* LexBaan.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F600FA7236900FD601F /* LexBaan.cxx */; }; + 271D1FA60FA7236900FD601F /* LexBasic.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F610FA7236900FD601F /* LexBasic.cxx */; }; + 271D1FA70FA7236900FD601F /* LexBullant.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F620FA7236900FD601F /* LexBullant.cxx */; }; + 271D1FA80FA7236900FD601F /* LexCaml.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F630FA7236900FD601F /* LexCaml.cxx */; }; + 271D1FA90FA7236900FD601F /* LexCLW.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F640FA7236900FD601F /* LexCLW.cxx */; }; + 271D1FAA0FA7236900FD601F /* LexCmake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F650FA7236900FD601F /* LexCmake.cxx */; }; + 271D1FAB0FA7236900FD601F /* LexCOBOL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F660FA7236900FD601F /* LexCOBOL.cxx */; }; + 271D1FAC0FA7236900FD601F /* LexConf.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F670FA7236900FD601F /* LexConf.cxx */; }; + 271D1FAD0FA7236900FD601F /* LexCrontab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F680FA7236900FD601F /* LexCrontab.cxx */; }; + 271D1FAE0FA7236900FD601F /* LexCsound.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F690FA7236900FD601F /* LexCsound.cxx */; }; + 271D1FAF0FA7236900FD601F /* LexD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F6A0FA7236900FD601F /* LexD.cxx */; }; + 271D1FB00FA7236900FD601F /* LexEiffel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F6B0FA7236900FD601F /* LexEiffel.cxx */; }; + 271D1FB10FA7236900FD601F /* LexErlang.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F6C0FA7236900FD601F /* LexErlang.cxx */; }; + 271D1FB20FA7236900FD601F /* LexEScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F6D0FA7236900FD601F /* LexEScript.cxx */; }; + 271D1FB30FA7236900FD601F /* LexFlagship.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F6E0FA7236900FD601F /* LexFlagship.cxx */; }; + 271D1FB40FA7236900FD601F /* LexForth.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F6F0FA7236900FD601F /* LexForth.cxx */; }; + 271D1FB50FA7236900FD601F /* LexFortran.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F700FA7236900FD601F /* LexFortran.cxx */; }; + 271D1FB60FA7236900FD601F /* LexGAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F710FA7236900FD601F /* LexGAP.cxx */; }; + 271D1FB80FA7236900FD601F /* LexGui4Cli.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F730FA7236900FD601F /* LexGui4Cli.cxx */; }; + 271D1FB90FA7236900FD601F /* LexHaskell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F740FA7236900FD601F /* LexHaskell.cxx */; }; + 271D1FBA0FA7236900FD601F /* LexInno.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F750FA7236900FD601F /* LexInno.cxx */; }; + 271D1FBB0FA7236900FD601F /* LexKix.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F760FA7236900FD601F /* LexKix.cxx */; }; + 271D1FBC0FA7236900FD601F /* LexLisp.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F770FA7236900FD601F /* LexLisp.cxx */; }; + 271D1FBD0FA7236900FD601F /* LexLout.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F780FA7236900FD601F /* LexLout.cxx */; }; + 271D1FBE0FA7236900FD601F /* LexMagik.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F790FA7236900FD601F /* LexMagik.cxx */; }; + 271D1FBF0FA7236900FD601F /* LexMatlab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F7A0FA7236900FD601F /* LexMatlab.cxx */; }; + 271D1FC00FA7236900FD601F /* LexMetapost.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F7B0FA7236900FD601F /* LexMetapost.cxx */; }; + 271D1FC10FA7236900FD601F /* LexMMIXAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F7C0FA7236900FD601F /* LexMMIXAL.cxx */; }; + 271D1FC20FA7236900FD601F /* LexMPT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F7D0FA7236900FD601F /* LexMPT.cxx */; }; + 271D1FC30FA7236900FD601F /* LexNimrod.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F7E0FA7236900FD601F /* LexNimrod.cxx */; }; + 271D1FC40FA7236900FD601F /* LexNsis.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F7F0FA7236900FD601F /* LexNsis.cxx */; }; + 271D1FC50FA7236900FD601F /* LexOpal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F800FA7236900FD601F /* LexOpal.cxx */; }; + 271D1FC60FA7236900FD601F /* LexOthers.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F810FA7236900FD601F /* LexOthers.cxx */; }; + 271D1FC70FA7236900FD601F /* LexPascal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F820FA7236900FD601F /* LexPascal.cxx */; }; + 271D1FC80FA7236900FD601F /* LexPB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F830FA7236900FD601F /* LexPB.cxx */; }; + 271D1FC90FA7236900FD601F /* LexPLM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F840FA7236900FD601F /* LexPLM.cxx */; }; + 271D1FCA0FA7236900FD601F /* LexPOV.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F850FA7236900FD601F /* LexPOV.cxx */; }; + 271D1FCB0FA7236900FD601F /* LexPowerPro.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F860FA7236900FD601F /* LexPowerPro.cxx */; }; + 271D1FCC0FA7236900FD601F /* LexPowerShell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F870FA7236900FD601F /* LexPowerShell.cxx */; }; + 271D1FCD0FA7236900FD601F /* LexProgress.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F880FA7236900FD601F /* LexProgress.cxx */; }; + 271D1FCE0FA7236900FD601F /* LexPS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F890FA7236900FD601F /* LexPS.cxx */; }; + 271D1FCF0FA7236900FD601F /* LexR.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F8A0FA7236900FD601F /* LexR.cxx */; }; + 271D1FD00FA7236900FD601F /* LexRebol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F8B0FA7236900FD601F /* LexRebol.cxx */; }; + 271D1FD10FA7236900FD601F /* LexRuby.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F8C0FA7236900FD601F /* LexRuby.cxx */; }; + 271D1FD20FA7236900FD601F /* LexScriptol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F8D0FA7236900FD601F /* LexScriptol.cxx */; }; + 271D1FD30FA7236900FD601F /* LexSmalltalk.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F8E0FA7236900FD601F /* LexSmalltalk.cxx */; }; + 271D1FD40FA7236900FD601F /* LexSML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F8F0FA7236900FD601F /* LexSML.cxx */; }; + 271D1FD50FA7236900FD601F /* LexSorcus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F900FA7236900FD601F /* LexSorcus.cxx */; }; + 271D1FD60FA7236900FD601F /* LexSpecman.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F910FA7236900FD601F /* LexSpecman.cxx */; }; + 271D1FD70FA7236900FD601F /* LexSpice.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F920FA7236900FD601F /* LexSpice.cxx */; }; + 271D1FD80FA7236900FD601F /* LexTACL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F930FA7236900FD601F /* LexTACL.cxx */; }; + 271D1FD90FA7236900FD601F /* LexTADS3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F940FA7236900FD601F /* LexTADS3.cxx */; }; + 271D1FDA0FA7236900FD601F /* LexTAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F950FA7236900FD601F /* LexTAL.cxx */; }; + 271D1FDB0FA7236900FD601F /* LexTCL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F960FA7236900FD601F /* LexTCL.cxx */; }; + 271D1FDC0FA7236900FD601F /* LexTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F970FA7236900FD601F /* LexTeX.cxx */; }; + 271D1FDD0FA7236900FD601F /* LexVB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F980FA7236900FD601F /* LexVB.cxx */; }; + 271D1FDE0FA7236900FD601F /* LexVerilog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F990FA7236900FD601F /* LexVerilog.cxx */; }; + 271D1FDF0FA7236900FD601F /* LexVHDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F9A0FA7236900FD601F /* LexVHDL.cxx */; }; + 271D1FE00FA7236900FD601F /* LexYAML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F9B0FA7236900FD601F /* LexYAML.cxx */; }; + 271D1FE10FA7236900FD601F /* PerLine.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 271D1F9C0FA7236900FD601F /* PerLine.cxx */; }; + 271FA52C0F850BE20033D021 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 271FA52B0F850BE20033D021 /* AppController.mm */; }; + 272133530F9732D2006BE49A /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 274A05980F85FB2600B2D3B7 /* ScintillaView.h */; }; + 272133590F973324006BE49A /* ScintillaCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC1C0F85E96F00638A46 /* ScintillaCocoa.mm */; }; + 2721335A0F973324006BE49A /* AutoComplete.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC1E0F85E9C000638A46 /* AutoComplete.cxx */; }; + 2721335B0F973324006BE49A /* CallTip.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC1F0F85E9C000638A46 /* CallTip.cxx */; }; + 2721335C0F973324006BE49A /* CellBuffer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC200F85E9C000638A46 /* CellBuffer.cxx */; }; + 2721335D0F973324006BE49A /* CharClassify.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC210F85E9C000638A46 /* CharClassify.cxx */; }; + 2721335E0F973324006BE49A /* ContractionState.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC220F85E9C000638A46 /* ContractionState.cxx */; }; + 2721335F0F973324006BE49A /* Decoration.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC230F85E9C000638A46 /* Decoration.cxx */; }; + 272133600F973324006BE49A /* Document.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC240F85E9C000638A46 /* Document.cxx */; }; + 272133610F973324006BE49A /* DocumentAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC250F85E9C000638A46 /* DocumentAccessor.cxx */; }; + 272133620F973324006BE49A /* Editor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC260F85E9C000638A46 /* Editor.cxx */; }; + 272133630F973324006BE49A /* ExternalLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC270F85E9C000638A46 /* ExternalLexer.cxx */; }; + 272133640F973324006BE49A /* Indicator.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC280F85E9C000638A46 /* Indicator.cxx */; }; + 272133650F973324006BE49A /* KeyMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC290F85E9C000638A46 /* KeyMap.cxx */; }; + 272133660F973324006BE49A /* KeyWords.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC2A0F85E9C000638A46 /* KeyWords.cxx */; }; + 272133670F973324006BE49A /* LexCPP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC2B0F85E9C000638A46 /* LexCPP.cxx */; }; + 272133680F973324006BE49A /* LexCSS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC2C0F85E9C000638A46 /* LexCSS.cxx */; }; + 272133690F973324006BE49A /* LexHTML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC2D0F85E9C000638A46 /* LexHTML.cxx */; }; + 2721336A0F973324006BE49A /* LexLua.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC2E0F85E9C000638A46 /* LexLua.cxx */; }; + 2721336B0F973324006BE49A /* LexMSSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC2F0F85E9C000638A46 /* LexMSSQL.cxx */; }; + 2721336C0F973324006BE49A /* LexMySQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC300F85E9C000638A46 /* LexMySQL.cxx */; }; + 2721336D0F973324006BE49A /* LexPerl.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC310F85E9C000638A46 /* LexPerl.cxx */; }; + 2721336E0F973324006BE49A /* LexPython.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC320F85E9C000638A46 /* LexPython.cxx */; }; + 2721336F0F973324006BE49A /* LexSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC330F85E9C000638A46 /* LexSQL.cxx */; }; + 272133700F973324006BE49A /* LineMarker.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC340F85E9C000638A46 /* LineMarker.cxx */; }; + 272133710F973324006BE49A /* PositionCache.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC350F85E9C000638A46 /* PositionCache.cxx */; }; + 272133720F973324006BE49A /* PropSet.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC360F85E9C000638A46 /* PropSet.cxx */; }; + 272133730F973324006BE49A /* RESearch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC370F85E9C000638A46 /* RESearch.cxx */; }; + 272133740F973324006BE49A /* RunStyles.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC380F85E9C000638A46 /* RunStyles.cxx */; }; + 272133750F973324006BE49A /* ScintillaBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC390F85E9C000638A46 /* ScintillaBase.cxx */; }; + 272133760F973324006BE49A /* Style.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC3A0F85E9C000638A46 /* Style.cxx */; }; + 272133770F973324006BE49A /* StyleContext.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC3B0F85E9C000638A46 /* StyleContext.cxx */; }; + 272133780F973324006BE49A /* UniConversion.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC3C0F85E9C000638A46 /* UniConversion.cxx */; }; + 272133790F973324006BE49A /* ViewStyle.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC3D0F85E9C000638A46 /* ViewStyle.cxx */; }; + 2721337A0F973324006BE49A /* WindowAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC3E0F85E9C000638A46 /* WindowAccessor.cxx */; }; + 2721337B0F973324006BE49A /* XPM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFC3F0F85E9C000638A46 /* XPM.cxx */; }; + 2721337C0F973324006BE49A /* LexBash.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 27EDFCA60F85EA0F00638A46 /* LexBash.cxx */; }; + 2721337D0F973324006BE49A /* PlatCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 274A05630F85F18900B2D3B7 /* PlatCocoa.mm */; }; + 2721337E0F973324006BE49A /* ScintillaView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 274A05990F85FB2600B2D3B7 /* ScintillaView.mm */; }; + 272133BE0F97354B006BE49A /* Scintilla.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 272133480F9731CB006BE49A /* Scintilla.framework */; }; + 272133C10F973581006BE49A /* Scintilla.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 272133480F9731CB006BE49A /* Scintilla.framework */; }; + 2721342E0F974971006BE49A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 2721342C0F974971006BE49A /* mac_cursor_busy.png */; }; + 2721342F0F974971006BE49A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 2721342D0F974971006BE49A /* mac_cursor_flipped.png */; }; + 274CDFE60F9DBA4E00B64ADC /* TestData.sql in Resources */ = {isa = PBXBuildFile; fileRef = 274CDFE50F9DBA4E00B64ADC /* TestData.sql */; }; + 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 */ + 272133C30F97361C006BE49A /* PBXContainerItemProxy */ = { + isa = PBXContainerItemProxy; + containerPortal = 29B97313FDCFA39411CA2CEA /* Project object */; + proxyType = 1; + remoteGlobalIDString = 272133470F9731CB006BE49A; + remoteInfo = Scintilla; + }; +/* End PBXContainerItemProxy section */ + +/* Begin PBXCopyFilesBuildPhase section */ + 272133C20F973596006BE49A /* CopyFiles */ = { + isa = PBXCopyFilesBuildPhase; + buildActionMask = 2147483647; + dstPath = ""; + dstSubfolderSpec = 10; + files = ( + 272133C10F973581006BE49A /* 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>"; }; + 271D1F580FA7236900FD601F /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../src/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F590FA7236900FD601F /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../src/LexAda.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F5A0FA7236900FD601F /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../src/LexAPDL.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F5B0FA7236900FD601F /* LexAsm.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsm.cxx; path = ../../src/LexAsm.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F5C0FA7236900FD601F /* LexAsn1.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsn1.cxx; path = ../../src/LexAsn1.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F5D0FA7236900FD601F /* LexASY.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexASY.cxx; path = ../../src/LexASY.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F5E0FA7236900FD601F /* LexAU3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAU3.cxx; path = ../../src/LexAU3.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F5F0FA7236900FD601F /* LexAVE.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVE.cxx; path = ../../src/LexAVE.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F600FA7236900FD601F /* LexBaan.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBaan.cxx; path = ../../src/LexBaan.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F610FA7236900FD601F /* LexBasic.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBasic.cxx; path = ../../src/LexBasic.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F620FA7236900FD601F /* LexBullant.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBullant.cxx; path = ../../src/LexBullant.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F630FA7236900FD601F /* LexCaml.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCaml.cxx; path = ../../src/LexCaml.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F640FA7236900FD601F /* LexCLW.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCLW.cxx; path = ../../src/LexCLW.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F650FA7236900FD601F /* LexCmake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCmake.cxx; path = ../../src/LexCmake.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F660FA7236900FD601F /* LexCOBOL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCOBOL.cxx; path = ../../src/LexCOBOL.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F670FA7236900FD601F /* LexConf.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexConf.cxx; path = ../../src/LexConf.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F680FA7236900FD601F /* LexCrontab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCrontab.cxx; path = ../../src/LexCrontab.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F690FA7236900FD601F /* LexCsound.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCsound.cxx; path = ../../src/LexCsound.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F6A0FA7236900FD601F /* LexD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexD.cxx; path = ../../src/LexD.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F6B0FA7236900FD601F /* LexEiffel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEiffel.cxx; path = ../../src/LexEiffel.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F6C0FA7236900FD601F /* LexErlang.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexErlang.cxx; path = ../../src/LexErlang.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F6D0FA7236900FD601F /* LexEScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEScript.cxx; path = ../../src/LexEScript.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F6E0FA7236900FD601F /* LexFlagship.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFlagship.cxx; path = ../../src/LexFlagship.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F6F0FA7236900FD601F /* LexForth.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexForth.cxx; path = ../../src/LexForth.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F700FA7236900FD601F /* LexFortran.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFortran.cxx; path = ../../src/LexFortran.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F710FA7236900FD601F /* LexGAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGAP.cxx; path = ../../src/LexGAP.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F730FA7236900FD601F /* LexGui4Cli.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGui4Cli.cxx; path = ../../src/LexGui4Cli.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F740FA7236900FD601F /* LexHaskell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHaskell.cxx; path = ../../src/LexHaskell.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F750FA7236900FD601F /* LexInno.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexInno.cxx; path = ../../src/LexInno.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F760FA7236900FD601F /* LexKix.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKix.cxx; path = ../../src/LexKix.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F770FA7236900FD601F /* LexLisp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLisp.cxx; path = ../../src/LexLisp.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F780FA7236900FD601F /* LexLout.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLout.cxx; path = ../../src/LexLout.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F790FA7236900FD601F /* LexMagik.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMagik.cxx; path = ../../src/LexMagik.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F7A0FA7236900FD601F /* LexMatlab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMatlab.cxx; path = ../../src/LexMatlab.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F7B0FA7236900FD601F /* LexMetapost.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMetapost.cxx; path = ../../src/LexMetapost.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F7C0FA7236900FD601F /* LexMMIXAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMMIXAL.cxx; path = ../../src/LexMMIXAL.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F7D0FA7236900FD601F /* LexMPT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMPT.cxx; path = ../../src/LexMPT.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F7E0FA7236900FD601F /* LexNimrod.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNimrod.cxx; path = ../../src/LexNimrod.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F7F0FA7236900FD601F /* LexNsis.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNsis.cxx; path = ../../src/LexNsis.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F800FA7236900FD601F /* LexOpal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOpal.cxx; path = ../../src/LexOpal.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F810FA7236900FD601F /* LexOthers.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOthers.cxx; path = ../../src/LexOthers.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F820FA7236900FD601F /* LexPascal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPascal.cxx; path = ../../src/LexPascal.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F830FA7236900FD601F /* LexPB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPB.cxx; path = ../../src/LexPB.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F840FA7236900FD601F /* LexPLM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPLM.cxx; path = ../../src/LexPLM.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F850FA7236900FD601F /* LexPOV.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPOV.cxx; path = ../../src/LexPOV.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F860FA7236900FD601F /* LexPowerPro.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerPro.cxx; path = ../../src/LexPowerPro.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F870FA7236900FD601F /* LexPowerShell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerShell.cxx; path = ../../src/LexPowerShell.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F880FA7236900FD601F /* LexProgress.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProgress.cxx; path = ../../src/LexProgress.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F890FA7236900FD601F /* LexPS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPS.cxx; path = ../../src/LexPS.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F8A0FA7236900FD601F /* LexR.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexR.cxx; path = ../../src/LexR.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F8B0FA7236900FD601F /* LexRebol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRebol.cxx; path = ../../src/LexRebol.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F8C0FA7236900FD601F /* LexRuby.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRuby.cxx; path = ../../src/LexRuby.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F8D0FA7236900FD601F /* LexScriptol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexScriptol.cxx; path = ../../src/LexScriptol.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F8E0FA7236900FD601F /* LexSmalltalk.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSmalltalk.cxx; path = ../../src/LexSmalltalk.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F8F0FA7236900FD601F /* LexSML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSML.cxx; path = ../../src/LexSML.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F900FA7236900FD601F /* LexSorcus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSorcus.cxx; path = ../../src/LexSorcus.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F910FA7236900FD601F /* LexSpecman.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpecman.cxx; path = ../../src/LexSpecman.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F920FA7236900FD601F /* LexSpice.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpice.cxx; path = ../../src/LexSpice.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F930FA7236900FD601F /* LexTACL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTACL.cxx; path = ../../src/LexTACL.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F940FA7236900FD601F /* LexTADS3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../src/LexTADS3.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F950FA7236900FD601F /* LexTAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTAL.cxx; path = ../../src/LexTAL.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F960FA7236900FD601F /* LexTCL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCL.cxx; path = ../../src/LexTCL.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F970FA7236900FD601F /* LexTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTeX.cxx; path = ../../src/LexTeX.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F980FA7236900FD601F /* LexVB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVB.cxx; path = ../../src/LexVB.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F990FA7236900FD601F /* LexVerilog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVerilog.cxx; path = ../../src/LexVerilog.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F9A0FA7236900FD601F /* LexVHDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVHDL.cxx; path = ../../src/LexVHDL.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F9B0FA7236900FD601F /* LexYAML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexYAML.cxx; path = ../../src/LexYAML.cxx; sourceTree = SOURCE_ROOT; }; + 271D1F9C0FA7236900FD601F /* PerLine.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerLine.cxx; path = ../../src/PerLine.cxx; sourceTree = SOURCE_ROOT; }; + 271D1FE20FA7238400FD601F /* PerLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PerLine.h; path = ../../src/PerLine.h; sourceTree = SOURCE_ROOT; }; + 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; }; + 272133480F9731CB006BE49A /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; }; + 272133490F9731CB006BE49A /* Scintilla-Info.plist */ = {isa = PBXFileReference; lastKnownFileType = text.plist.xml; path = "Scintilla-Info.plist"; sourceTree = "<group>"; }; + 2721342C0F974971006BE49A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mac_cursor_busy.png; path = ../res/mac_cursor_busy.png; sourceTree = SOURCE_ROOT; }; + 2721342D0F974971006BE49A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mac_cursor_flipped.png; path = ../res/mac_cursor_flipped.png; sourceTree = SOURCE_ROOT; }; + 274A05630F85F18900B2D3B7 /* PlatCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatCocoa.mm; path = ../PlatCocoa.mm; sourceTree = SOURCE_ROOT; }; + 274A05980F85FB2600B2D3B7 /* ScintillaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaView.h; path = ../ScintillaView.h; sourceTree = SOURCE_ROOT; }; + 274A05990F85FB2600B2D3B7 /* ScintillaView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaView.mm; path = ../ScintillaView.mm; sourceTree = SOURCE_ROOT; }; + 274CDFE50F9DBA4E00B64ADC /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = SOURCE_ROOT; }; + 27EDFC100F85E95000638A46 /* PlatCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatCocoa.h; path = ../PlatCocoa.h; sourceTree = SOURCE_ROOT; }; + 27EDFC110F85E95000638A46 /* QuartzTextLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextLayout.h; path = ../QuartzTextLayout.h; sourceTree = SOURCE_ROOT; }; + 27EDFC120F85E95000638A46 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = SOURCE_ROOT; }; + 27EDFC130F85E95000638A46 /* QuartzTextStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyleAttribute.h; path = ../QuartzTextStyleAttribute.h; sourceTree = SOURCE_ROOT; }; + 27EDFC140F85E95000638A46 /* ScintillaCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaCocoa.h; path = ../ScintillaCocoa.h; sourceTree = SOURCE_ROOT; }; + 27EDFC1C0F85E96F00638A46 /* ScintillaCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; indentWidth = 2; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaCocoa.mm; path = ../ScintillaCocoa.mm; sourceTree = SOURCE_ROOT; tabWidth = 2; usesTabs = 0; wrapsLines = 0; }; + 27EDFC1E0F85E9C000638A46 /* AutoComplete.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoComplete.cxx; path = ../../src/AutoComplete.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC1F0F85E9C000638A46 /* CallTip.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CallTip.cxx; path = ../../src/CallTip.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC200F85E9C000638A46 /* CellBuffer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CellBuffer.cxx; path = ../../src/CellBuffer.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC210F85E9C000638A46 /* CharClassify.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharClassify.cxx; path = ../../src/CharClassify.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC220F85E9C000638A46 /* ContractionState.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContractionState.cxx; path = ../../src/ContractionState.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC230F85E9C000638A46 /* Decoration.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Decoration.cxx; path = ../../src/Decoration.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC240F85E9C000638A46 /* Document.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Document.cxx; path = ../../src/Document.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC250F85E9C000638A46 /* DocumentAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocumentAccessor.cxx; path = ../../src/DocumentAccessor.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC260F85E9C000638A46 /* Editor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Editor.cxx; path = ../../src/Editor.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC270F85E9C000638A46 /* ExternalLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExternalLexer.cxx; path = ../../src/ExternalLexer.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC280F85E9C000638A46 /* Indicator.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indicator.cxx; path = ../../src/Indicator.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC290F85E9C000638A46 /* KeyMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyMap.cxx; path = ../../src/KeyMap.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC2A0F85E9C000638A46 /* KeyWords.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyWords.cxx; path = ../../src/KeyWords.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC2B0F85E9C000638A46 /* LexCPP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCPP.cxx; path = ../../src/LexCPP.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC2C0F85E9C000638A46 /* LexCSS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCSS.cxx; path = ../../src/LexCSS.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC2D0F85E9C000638A46 /* LexHTML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHTML.cxx; path = ../../src/LexHTML.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC2E0F85E9C000638A46 /* LexLua.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLua.cxx; path = ../../src/LexLua.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC2F0F85E9C000638A46 /* LexMSSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMSSQL.cxx; path = ../../src/LexMSSQL.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC300F85E9C000638A46 /* LexMySQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMySQL.cxx; path = ../../src/LexMySQL.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC310F85E9C000638A46 /* LexPerl.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPerl.cxx; path = ../../src/LexPerl.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC320F85E9C000638A46 /* LexPython.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPython.cxx; path = ../../src/LexPython.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC330F85E9C000638A46 /* LexSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSQL.cxx; path = ../../src/LexSQL.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC340F85E9C000638A46 /* LineMarker.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineMarker.cxx; path = ../../src/LineMarker.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC350F85E9C000638A46 /* PositionCache.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PositionCache.cxx; path = ../../src/PositionCache.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC360F85E9C000638A46 /* PropSet.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PropSet.cxx; path = ../../src/PropSet.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC370F85E9C000638A46 /* RESearch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RESearch.cxx; path = ../../src/RESearch.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC380F85E9C000638A46 /* RunStyles.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RunStyles.cxx; path = ../../src/RunStyles.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC390F85E9C000638A46 /* ScintillaBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScintillaBase.cxx; path = ../../src/ScintillaBase.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC3A0F85E9C000638A46 /* Style.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Style.cxx; path = ../../src/Style.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC3B0F85E9C000638A46 /* StyleContext.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleContext.cxx; path = ../../src/StyleContext.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC3C0F85E9C000638A46 /* UniConversion.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniConversion.cxx; path = ../../src/UniConversion.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC3D0F85E9C000638A46 /* ViewStyle.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStyle.cxx; path = ../../src/ViewStyle.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC3E0F85E9C000638A46 /* WindowAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WindowAccessor.cxx; path = ../../src/WindowAccessor.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC3F0F85E9C000638A46 /* XPM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XPM.cxx; path = ../../src/XPM.cxx; sourceTree = SOURCE_ROOT; }; + 27EDFC620F85E9DA00638A46 /* Accessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Accessor.h; path = ../../include/Accessor.h; sourceTree = SOURCE_ROOT; }; + 27EDFC630F85E9DA00638A46 /* KeyWords.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyWords.h; path = ../../include/KeyWords.h; sourceTree = SOURCE_ROOT; }; + 27EDFC640F85E9DA00638A46 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; }; + 27EDFC650F85E9DA00638A46 /* PropSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSet.h; path = ../../include/PropSet.h; sourceTree = SOURCE_ROOT; }; + 27EDFC660F85E9DA00638A46 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; }; + 27EDFC670F85E9DA00638A46 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; }; + 27EDFC680F85E9DA00638A46 /* SString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SString.h; path = ../../include/SString.h; sourceTree = SOURCE_ROOT; }; + 27EDFC690F85E9DA00638A46 /* WindowAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WindowAccessor.h; path = ../../include/WindowAccessor.h; sourceTree = SOURCE_ROOT; }; + 27EDFC720F85E9FF00638A46 /* AutoComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoComplete.h; path = ../../src/AutoComplete.h; sourceTree = SOURCE_ROOT; }; + 27EDFC730F85E9FF00638A46 /* CallTip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallTip.h; path = ../../src/CallTip.h; sourceTree = SOURCE_ROOT; }; + 27EDFC740F85E9FF00638A46 /* CellBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CellBuffer.h; path = ../../src/CellBuffer.h; sourceTree = SOURCE_ROOT; }; + 27EDFC750F85E9FF00638A46 /* CharacterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterSet.h; path = ../../src/CharacterSet.h; sourceTree = SOURCE_ROOT; }; + 27EDFC760F85E9FF00638A46 /* CharClassify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharClassify.h; path = ../../src/CharClassify.h; sourceTree = SOURCE_ROOT; }; + 27EDFC770F85E9FF00638A46 /* ContractionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContractionState.h; path = ../../src/ContractionState.h; sourceTree = SOURCE_ROOT; }; + 27EDFC780F85E9FF00638A46 /* Decoration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Decoration.h; path = ../../src/Decoration.h; sourceTree = SOURCE_ROOT; }; + 27EDFC790F85E9FF00638A46 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Document.h; path = ../../src/Document.h; sourceTree = SOURCE_ROOT; }; + 27EDFC7A0F85E9FF00638A46 /* DocumentAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocumentAccessor.h; path = ../../src/DocumentAccessor.h; sourceTree = SOURCE_ROOT; }; + 27EDFC7B0F85E9FF00638A46 /* Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editor.h; path = ../../src/Editor.h; sourceTree = SOURCE_ROOT; }; + 27EDFC7C0F85E9FF00638A46 /* ExternalLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalLexer.h; path = ../../src/ExternalLexer.h; sourceTree = SOURCE_ROOT; }; + 27EDFC7D0F85E9FF00638A46 /* Indicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indicator.h; path = ../../src/Indicator.h; sourceTree = SOURCE_ROOT; }; + 27EDFC7E0F85E9FF00638A46 /* KeyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyMap.h; path = ../../src/KeyMap.h; sourceTree = SOURCE_ROOT; }; + 27EDFC7F0F85E9FF00638A46 /* LineMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineMarker.h; path = ../../src/LineMarker.h; sourceTree = SOURCE_ROOT; }; + 27EDFC800F85E9FF00638A46 /* Partitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Partitioning.h; path = ../../src/Partitioning.h; sourceTree = SOURCE_ROOT; }; + 27EDFC810F85E9FF00638A46 /* PositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PositionCache.h; path = ../../src/PositionCache.h; sourceTree = SOURCE_ROOT; }; + 27EDFC820F85E9FF00638A46 /* RESearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RESearch.h; path = ../../src/RESearch.h; sourceTree = SOURCE_ROOT; }; + 27EDFC830F85E9FF00638A46 /* RunStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunStyles.h; path = ../../src/RunStyles.h; sourceTree = SOURCE_ROOT; }; + 27EDFC840F85E9FF00638A46 /* ScintillaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaBase.h; path = ../../src/ScintillaBase.h; sourceTree = SOURCE_ROOT; }; + 27EDFC850F85E9FF00638A46 /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; }; + 27EDFC860F85E9FF00638A46 /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; }; + 27EDFC870F85E9FF00638A46 /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../src/StyleContext.h; sourceTree = SOURCE_ROOT; }; + 27EDFC880F85E9FF00638A46 /* SVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVector.h; path = ../../src/SVector.h; sourceTree = SOURCE_ROOT; }; + 27EDFC890F85E9FF00638A46 /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; }; + 27EDFC8A0F85E9FF00638A46 /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; }; + 27EDFC8B0F85E9FF00638A46 /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = SOURCE_ROOT; }; + 27EDFCA60F85EA0F00638A46 /* LexBash.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBash.cxx; path = ../../src/LexBash.cxx; sourceTree = SOURCE_ROOT; }; + 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 */ + 272133460F9731CB006BE49A /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8D11072E0486CEB800E47090 /* Frameworks */ = { + isa = PBXFrameworksBuildPhase; + buildActionMask = 2147483647; + files = ( + 272133BE0F97354B006BE49A /* 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 */, + 272133480F9731CB006BE49A /* Scintilla.framework */, + ); + name = Products; + sourceTree = "<group>"; + }; + 274A05B40F85FE3900B2D3B7 /* Cocoa */ = { + isa = PBXGroup; + children = ( + 27EDFC100F85E95000638A46 /* PlatCocoa.h */, + 27EDFC110F85E95000638A46 /* QuartzTextLayout.h */, + 27EDFC120F85E95000638A46 /* QuartzTextStyle.h */, + 27EDFC130F85E95000638A46 /* QuartzTextStyleAttribute.h */, + 27EDFC140F85E95000638A46 /* ScintillaCocoa.h */, + 27EDFC1C0F85E96F00638A46 /* ScintillaCocoa.mm */, + 274A05980F85FB2600B2D3B7 /* ScintillaView.h */, + 274A05990F85FB2600B2D3B7 /* ScintillaView.mm */, + 274A05630F85F18900B2D3B7 /* PlatCocoa.mm */, + ); + name = Cocoa; + sourceTree = "<group>"; + }; + 27EDFCA80F85EA1800638A46 /* Scintilla */ = { + isa = PBXGroup; + children = ( + 274A05B40F85FE3900B2D3B7 /* Cocoa */, + 27EDFCAA0F85EA3C00638A46 /* Source Files */, + 27EDFCA90F85EA1F00638A46 /* Header Files */, + ); + name = Scintilla; + sourceTree = "<group>"; + }; + 27EDFCA90F85EA1F00638A46 /* Header Files */ = { + isa = PBXGroup; + children = ( + 271D1FE20FA7238400FD601F /* PerLine.h */, + 27EDFC690F85E9DA00638A46 /* WindowAccessor.h */, + 27EDFC720F85E9FF00638A46 /* AutoComplete.h */, + 27EDFC730F85E9FF00638A46 /* CallTip.h */, + 27EDFC740F85E9FF00638A46 /* CellBuffer.h */, + 27EDFC750F85E9FF00638A46 /* CharacterSet.h */, + 27EDFC760F85E9FF00638A46 /* CharClassify.h */, + 27EDFC770F85E9FF00638A46 /* ContractionState.h */, + 27EDFC780F85E9FF00638A46 /* Decoration.h */, + 27EDFC790F85E9FF00638A46 /* Document.h */, + 27EDFC7A0F85E9FF00638A46 /* DocumentAccessor.h */, + 27EDFC7B0F85E9FF00638A46 /* Editor.h */, + 27EDFC7C0F85E9FF00638A46 /* ExternalLexer.h */, + 27EDFC7D0F85E9FF00638A46 /* Indicator.h */, + 27EDFC7E0F85E9FF00638A46 /* KeyMap.h */, + 27EDFC7F0F85E9FF00638A46 /* LineMarker.h */, + 27EDFC800F85E9FF00638A46 /* Partitioning.h */, + 27EDFC810F85E9FF00638A46 /* PositionCache.h */, + 27EDFC820F85E9FF00638A46 /* RESearch.h */, + 27EDFC830F85E9FF00638A46 /* RunStyles.h */, + 27EDFC840F85E9FF00638A46 /* ScintillaBase.h */, + 27EDFC850F85E9FF00638A46 /* SplitVector.h */, + 27EDFC860F85E9FF00638A46 /* Style.h */, + 27EDFC870F85E9FF00638A46 /* StyleContext.h */, + 27EDFC880F85E9FF00638A46 /* SVector.h */, + 27EDFC890F85E9FF00638A46 /* UniConversion.h */, + 27EDFC8A0F85E9FF00638A46 /* ViewStyle.h */, + 27EDFC8B0F85E9FF00638A46 /* XPM.h */, + 27EDFC620F85E9DA00638A46 /* Accessor.h */, + 27EDFC630F85E9DA00638A46 /* KeyWords.h */, + 27EDFC640F85E9DA00638A46 /* Platform.h */, + 27EDFC650F85E9DA00638A46 /* PropSet.h */, + 27EDFC660F85E9DA00638A46 /* SciLexer.h */, + 27EDFC670F85E9DA00638A46 /* Scintilla.h */, + 27EDFC680F85E9DA00638A46 /* SString.h */, + ); + name = "Header Files"; + sourceTree = "<group>"; + }; + 27EDFCAA0F85EA3C00638A46 /* Source Files */ = { + isa = PBXGroup; + children = ( + 271D1F580FA7236900FD601F /* LexAbaqus.cxx */, + 271D1F590FA7236900FD601F /* LexAda.cxx */, + 271D1F5A0FA7236900FD601F /* LexAPDL.cxx */, + 271D1F5B0FA7236900FD601F /* LexAsm.cxx */, + 271D1F5C0FA7236900FD601F /* LexAsn1.cxx */, + 271D1F5D0FA7236900FD601F /* LexASY.cxx */, + 271D1F5E0FA7236900FD601F /* LexAU3.cxx */, + 271D1F5F0FA7236900FD601F /* LexAVE.cxx */, + 271D1F600FA7236900FD601F /* LexBaan.cxx */, + 271D1F610FA7236900FD601F /* LexBasic.cxx */, + 271D1F620FA7236900FD601F /* LexBullant.cxx */, + 271D1F630FA7236900FD601F /* LexCaml.cxx */, + 271D1F640FA7236900FD601F /* LexCLW.cxx */, + 271D1F650FA7236900FD601F /* LexCmake.cxx */, + 271D1F660FA7236900FD601F /* LexCOBOL.cxx */, + 271D1F670FA7236900FD601F /* LexConf.cxx */, + 271D1F680FA7236900FD601F /* LexCrontab.cxx */, + 271D1F690FA7236900FD601F /* LexCsound.cxx */, + 271D1F6A0FA7236900FD601F /* LexD.cxx */, + 271D1F6B0FA7236900FD601F /* LexEiffel.cxx */, + 271D1F6C0FA7236900FD601F /* LexErlang.cxx */, + 271D1F6D0FA7236900FD601F /* LexEScript.cxx */, + 271D1F6E0FA7236900FD601F /* LexFlagship.cxx */, + 271D1F6F0FA7236900FD601F /* LexForth.cxx */, + 271D1F700FA7236900FD601F /* LexFortran.cxx */, + 271D1F710FA7236900FD601F /* LexGAP.cxx */, + 271D1F730FA7236900FD601F /* LexGui4Cli.cxx */, + 271D1F740FA7236900FD601F /* LexHaskell.cxx */, + 271D1F750FA7236900FD601F /* LexInno.cxx */, + 271D1F760FA7236900FD601F /* LexKix.cxx */, + 271D1F770FA7236900FD601F /* LexLisp.cxx */, + 271D1F780FA7236900FD601F /* LexLout.cxx */, + 271D1F790FA7236900FD601F /* LexMagik.cxx */, + 271D1F7A0FA7236900FD601F /* LexMatlab.cxx */, + 271D1F7B0FA7236900FD601F /* LexMetapost.cxx */, + 271D1F7C0FA7236900FD601F /* LexMMIXAL.cxx */, + 271D1F7D0FA7236900FD601F /* LexMPT.cxx */, + 271D1F7E0FA7236900FD601F /* LexNimrod.cxx */, + 271D1F7F0FA7236900FD601F /* LexNsis.cxx */, + 271D1F800FA7236900FD601F /* LexOpal.cxx */, + 271D1F810FA7236900FD601F /* LexOthers.cxx */, + 271D1F820FA7236900FD601F /* LexPascal.cxx */, + 271D1F830FA7236900FD601F /* LexPB.cxx */, + 271D1F840FA7236900FD601F /* LexPLM.cxx */, + 271D1F850FA7236900FD601F /* LexPOV.cxx */, + 271D1F860FA7236900FD601F /* LexPowerPro.cxx */, + 271D1F870FA7236900FD601F /* LexPowerShell.cxx */, + 271D1F880FA7236900FD601F /* LexProgress.cxx */, + 271D1F890FA7236900FD601F /* LexPS.cxx */, + 271D1F8A0FA7236900FD601F /* LexR.cxx */, + 271D1F8B0FA7236900FD601F /* LexRebol.cxx */, + 271D1F8C0FA7236900FD601F /* LexRuby.cxx */, + 271D1F8D0FA7236900FD601F /* LexScriptol.cxx */, + 271D1F8E0FA7236900FD601F /* LexSmalltalk.cxx */, + 271D1F8F0FA7236900FD601F /* LexSML.cxx */, + 271D1F900FA7236900FD601F /* LexSorcus.cxx */, + 271D1F910FA7236900FD601F /* LexSpecman.cxx */, + 271D1F920FA7236900FD601F /* LexSpice.cxx */, + 271D1F930FA7236900FD601F /* LexTACL.cxx */, + 271D1F940FA7236900FD601F /* LexTADS3.cxx */, + 271D1F950FA7236900FD601F /* LexTAL.cxx */, + 271D1F960FA7236900FD601F /* LexTCL.cxx */, + 271D1F970FA7236900FD601F /* LexTeX.cxx */, + 271D1F980FA7236900FD601F /* LexVB.cxx */, + 271D1F990FA7236900FD601F /* LexVerilog.cxx */, + 271D1F9A0FA7236900FD601F /* LexVHDL.cxx */, + 271D1F9B0FA7236900FD601F /* LexYAML.cxx */, + 271D1F9C0FA7236900FD601F /* PerLine.cxx */, + 27EDFC1E0F85E9C000638A46 /* AutoComplete.cxx */, + 27EDFC1F0F85E9C000638A46 /* CallTip.cxx */, + 27EDFC200F85E9C000638A46 /* CellBuffer.cxx */, + 27EDFC210F85E9C000638A46 /* CharClassify.cxx */, + 27EDFC220F85E9C000638A46 /* ContractionState.cxx */, + 27EDFC230F85E9C000638A46 /* Decoration.cxx */, + 27EDFC240F85E9C000638A46 /* Document.cxx */, + 27EDFC250F85E9C000638A46 /* DocumentAccessor.cxx */, + 27EDFC260F85E9C000638A46 /* Editor.cxx */, + 27EDFC270F85E9C000638A46 /* ExternalLexer.cxx */, + 27EDFC280F85E9C000638A46 /* Indicator.cxx */, + 27EDFC290F85E9C000638A46 /* KeyMap.cxx */, + 27EDFC2A0F85E9C000638A46 /* KeyWords.cxx */, + 27EDFC2B0F85E9C000638A46 /* LexCPP.cxx */, + 27EDFC2C0F85E9C000638A46 /* LexCSS.cxx */, + 27EDFC2D0F85E9C000638A46 /* LexHTML.cxx */, + 27EDFC2E0F85E9C000638A46 /* LexLua.cxx */, + 27EDFC2F0F85E9C000638A46 /* LexMSSQL.cxx */, + 27EDFC300F85E9C000638A46 /* LexMySQL.cxx */, + 27EDFC310F85E9C000638A46 /* LexPerl.cxx */, + 27EDFC320F85E9C000638A46 /* LexPython.cxx */, + 27EDFC330F85E9C000638A46 /* LexSQL.cxx */, + 27EDFC340F85E9C000638A46 /* LineMarker.cxx */, + 27EDFC350F85E9C000638A46 /* PositionCache.cxx */, + 27EDFC360F85E9C000638A46 /* PropSet.cxx */, + 27EDFC370F85E9C000638A46 /* RESearch.cxx */, + 27EDFC380F85E9C000638A46 /* RunStyles.cxx */, + 27EDFC390F85E9C000638A46 /* ScintillaBase.cxx */, + 27EDFC3A0F85E9C000638A46 /* Style.cxx */, + 27EDFC3B0F85E9C000638A46 /* StyleContext.cxx */, + 27EDFC3C0F85E9C000638A46 /* UniConversion.cxx */, + 27EDFC3D0F85E9C000638A46 /* ViewStyle.cxx */, + 27EDFC3E0F85E9C000638A46 /* WindowAccessor.cxx */, + 27EDFC3F0F85E9C000638A46 /* XPM.cxx */, + 27EDFCA60F85EA0F00638A46 /* LexBash.cxx */, + ); + name = "Source Files"; + sourceTree = "<group>"; + }; + 29B97314FDCFA39411CA2CEA /* ScintillaTest */ = { + isa = PBXGroup; + children = ( + 27EDFCA80F85EA1800638A46 /* Scintilla */, + 080E96DDFE201D6D7F000001 /* Classes */, + 29B97315FDCFA39411CA2CEA /* Other Sources */, + 29B97317FDCFA39411CA2CEA /* Resources */, + 29B97323FDCFA39411CA2CEA /* Frameworks */, + 19C28FACFE9D520D11CA2CBB /* Products */, + 272133490F9731CB006BE49A /* Scintilla-Info.plist */, + ); + 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 = ( + 274CDFE50F9DBA4E00B64ADC /* TestData.sql */, + 2721342C0F974971006BE49A /* mac_cursor_busy.png */, + 2721342D0F974971006BE49A /* mac_cursor_flipped.png */, + 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 PBXHeadersBuildPhase section */ + 272133430F9731CB006BE49A /* Headers */ = { + isa = PBXHeadersBuildPhase; + buildActionMask = 2147483647; + files = ( + 272133530F9732D2006BE49A /* ScintillaView.h in Headers */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXHeadersBuildPhase section */ + +/* Begin PBXNativeTarget section */ + 272133470F9731CB006BE49A /* Scintilla */ = { + isa = PBXNativeTarget; + buildConfigurationList = 2721334C0F9731CC006BE49A /* Build configuration list for PBXNativeTarget "Scintilla" */; + buildPhases = ( + 272133430F9731CB006BE49A /* Headers */, + 272133440F9731CB006BE49A /* Resources */, + 272133450F9731CB006BE49A /* Sources */, + 272133460F9731CB006BE49A /* Frameworks */, + ); + buildRules = ( + ); + dependencies = ( + ); + name = Scintilla; + productName = Scintilla; + productReference = 272133480F9731CB006BE49A /* Scintilla.framework */; + productType = "com.apple.product-type.framework"; + }; + 8D1107260486CEB800E47090 /* ScintillaTest */ = { + isa = PBXNativeTarget; + buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */; + buildPhases = ( + 8D1107290486CEB800E47090 /* Resources */, + 8D11072C0486CEB800E47090 /* Sources */, + 8D11072E0486CEB800E47090 /* Frameworks */, + 272133C20F973596006BE49A /* CopyFiles */, + ); + buildRules = ( + ); + dependencies = ( + 272133C40F97361C006BE49A /* 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 = ""; + projectRoot = ""; + targets = ( + 8D1107260486CEB800E47090 /* ScintillaTest */, + 272133470F9731CB006BE49A /* Scintilla */, + ); + }; +/* End PBXProject section */ + +/* Begin PBXResourcesBuildPhase section */ + 272133440F9731CB006BE49A /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 2721342E0F974971006BE49A /* mac_cursor_busy.png in Resources */, + 2721342F0F974971006BE49A /* mac_cursor_flipped.png in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 8D1107290486CEB800E47090 /* Resources */ = { + isa = PBXResourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */, + 1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */, + 274CDFE60F9DBA4E00B64ADC /* TestData.sql in Resources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; +/* End PBXResourcesBuildPhase section */ + +/* Begin PBXSourcesBuildPhase section */ + 272133450F9731CB006BE49A /* Sources */ = { + isa = PBXSourcesBuildPhase; + buildActionMask = 2147483647; + files = ( + 272133590F973324006BE49A /* ScintillaCocoa.mm in Sources */, + 2721335A0F973324006BE49A /* AutoComplete.cxx in Sources */, + 2721335B0F973324006BE49A /* CallTip.cxx in Sources */, + 2721335C0F973324006BE49A /* CellBuffer.cxx in Sources */, + 2721335D0F973324006BE49A /* CharClassify.cxx in Sources */, + 2721335E0F973324006BE49A /* ContractionState.cxx in Sources */, + 2721335F0F973324006BE49A /* Decoration.cxx in Sources */, + 272133600F973324006BE49A /* Document.cxx in Sources */, + 272133610F973324006BE49A /* DocumentAccessor.cxx in Sources */, + 272133620F973324006BE49A /* Editor.cxx in Sources */, + 272133630F973324006BE49A /* ExternalLexer.cxx in Sources */, + 272133640F973324006BE49A /* Indicator.cxx in Sources */, + 272133650F973324006BE49A /* KeyMap.cxx in Sources */, + 272133660F973324006BE49A /* KeyWords.cxx in Sources */, + 272133670F973324006BE49A /* LexCPP.cxx in Sources */, + 272133680F973324006BE49A /* LexCSS.cxx in Sources */, + 272133690F973324006BE49A /* LexHTML.cxx in Sources */, + 2721336A0F973324006BE49A /* LexLua.cxx in Sources */, + 2721336B0F973324006BE49A /* LexMSSQL.cxx in Sources */, + 2721336C0F973324006BE49A /* LexMySQL.cxx in Sources */, + 2721336D0F973324006BE49A /* LexPerl.cxx in Sources */, + 2721336E0F973324006BE49A /* LexPython.cxx in Sources */, + 2721336F0F973324006BE49A /* LexSQL.cxx in Sources */, + 272133700F973324006BE49A /* LineMarker.cxx in Sources */, + 272133710F973324006BE49A /* PositionCache.cxx in Sources */, + 272133720F973324006BE49A /* PropSet.cxx in Sources */, + 272133730F973324006BE49A /* RESearch.cxx in Sources */, + 272133740F973324006BE49A /* RunStyles.cxx in Sources */, + 272133750F973324006BE49A /* ScintillaBase.cxx in Sources */, + 272133760F973324006BE49A /* Style.cxx in Sources */, + 272133770F973324006BE49A /* StyleContext.cxx in Sources */, + 272133780F973324006BE49A /* UniConversion.cxx in Sources */, + 272133790F973324006BE49A /* ViewStyle.cxx in Sources */, + 2721337A0F973324006BE49A /* WindowAccessor.cxx in Sources */, + 2721337B0F973324006BE49A /* XPM.cxx in Sources */, + 2721337C0F973324006BE49A /* LexBash.cxx in Sources */, + 2721337D0F973324006BE49A /* PlatCocoa.mm in Sources */, + 2721337E0F973324006BE49A /* ScintillaView.mm in Sources */, + 271D1F9D0FA7236900FD601F /* LexAbaqus.cxx in Sources */, + 271D1F9E0FA7236900FD601F /* LexAda.cxx in Sources */, + 271D1F9F0FA7236900FD601F /* LexAPDL.cxx in Sources */, + 271D1FA00FA7236900FD601F /* LexAsm.cxx in Sources */, + 271D1FA10FA7236900FD601F /* LexAsn1.cxx in Sources */, + 271D1FA20FA7236900FD601F /* LexASY.cxx in Sources */, + 271D1FA30FA7236900FD601F /* LexAU3.cxx in Sources */, + 271D1FA40FA7236900FD601F /* LexAVE.cxx in Sources */, + 271D1FA50FA7236900FD601F /* LexBaan.cxx in Sources */, + 271D1FA60FA7236900FD601F /* LexBasic.cxx in Sources */, + 271D1FA70FA7236900FD601F /* LexBullant.cxx in Sources */, + 271D1FA80FA7236900FD601F /* LexCaml.cxx in Sources */, + 271D1FA90FA7236900FD601F /* LexCLW.cxx in Sources */, + 271D1FAA0FA7236900FD601F /* LexCmake.cxx in Sources */, + 271D1FAB0FA7236900FD601F /* LexCOBOL.cxx in Sources */, + 271D1FAC0FA7236900FD601F /* LexConf.cxx in Sources */, + 271D1FAD0FA7236900FD601F /* LexCrontab.cxx in Sources */, + 271D1FAE0FA7236900FD601F /* LexCsound.cxx in Sources */, + 271D1FAF0FA7236900FD601F /* LexD.cxx in Sources */, + 271D1FB00FA7236900FD601F /* LexEiffel.cxx in Sources */, + 271D1FB10FA7236900FD601F /* LexErlang.cxx in Sources */, + 271D1FB20FA7236900FD601F /* LexEScript.cxx in Sources */, + 271D1FB30FA7236900FD601F /* LexFlagship.cxx in Sources */, + 271D1FB40FA7236900FD601F /* LexForth.cxx in Sources */, + 271D1FB50FA7236900FD601F /* LexFortran.cxx in Sources */, + 271D1FB60FA7236900FD601F /* LexGAP.cxx in Sources */, + 271D1FB80FA7236900FD601F /* LexGui4Cli.cxx in Sources */, + 271D1FB90FA7236900FD601F /* LexHaskell.cxx in Sources */, + 271D1FBA0FA7236900FD601F /* LexInno.cxx in Sources */, + 271D1FBB0FA7236900FD601F /* LexKix.cxx in Sources */, + 271D1FBC0FA7236900FD601F /* LexLisp.cxx in Sources */, + 271D1FBD0FA7236900FD601F /* LexLout.cxx in Sources */, + 271D1FBE0FA7236900FD601F /* LexMagik.cxx in Sources */, + 271D1FBF0FA7236900FD601F /* LexMatlab.cxx in Sources */, + 271D1FC00FA7236900FD601F /* LexMetapost.cxx in Sources */, + 271D1FC10FA7236900FD601F /* LexMMIXAL.cxx in Sources */, + 271D1FC20FA7236900FD601F /* LexMPT.cxx in Sources */, + 271D1FC30FA7236900FD601F /* LexNimrod.cxx in Sources */, + 271D1FC40FA7236900FD601F /* LexNsis.cxx in Sources */, + 271D1FC50FA7236900FD601F /* LexOpal.cxx in Sources */, + 271D1FC60FA7236900FD601F /* LexOthers.cxx in Sources */, + 271D1FC70FA7236900FD601F /* LexPascal.cxx in Sources */, + 271D1FC80FA7236900FD601F /* LexPB.cxx in Sources */, + 271D1FC90FA7236900FD601F /* LexPLM.cxx in Sources */, + 271D1FCA0FA7236900FD601F /* LexPOV.cxx in Sources */, + 271D1FCB0FA7236900FD601F /* LexPowerPro.cxx in Sources */, + 271D1FCC0FA7236900FD601F /* LexPowerShell.cxx in Sources */, + 271D1FCD0FA7236900FD601F /* LexProgress.cxx in Sources */, + 271D1FCE0FA7236900FD601F /* LexPS.cxx in Sources */, + 271D1FCF0FA7236900FD601F /* LexR.cxx in Sources */, + 271D1FD00FA7236900FD601F /* LexRebol.cxx in Sources */, + 271D1FD10FA7236900FD601F /* LexRuby.cxx in Sources */, + 271D1FD20FA7236900FD601F /* LexScriptol.cxx in Sources */, + 271D1FD30FA7236900FD601F /* LexSmalltalk.cxx in Sources */, + 271D1FD40FA7236900FD601F /* LexSML.cxx in Sources */, + 271D1FD50FA7236900FD601F /* LexSorcus.cxx in Sources */, + 271D1FD60FA7236900FD601F /* LexSpecman.cxx in Sources */, + 271D1FD70FA7236900FD601F /* LexSpice.cxx in Sources */, + 271D1FD80FA7236900FD601F /* LexTACL.cxx in Sources */, + 271D1FD90FA7236900FD601F /* LexTADS3.cxx in Sources */, + 271D1FDA0FA7236900FD601F /* LexTAL.cxx in Sources */, + 271D1FDB0FA7236900FD601F /* LexTCL.cxx in Sources */, + 271D1FDC0FA7236900FD601F /* LexTeX.cxx in Sources */, + 271D1FDD0FA7236900FD601F /* LexVB.cxx in Sources */, + 271D1FDE0FA7236900FD601F /* LexVerilog.cxx in Sources */, + 271D1FDF0FA7236900FD601F /* LexVHDL.cxx in Sources */, + 271D1FE00FA7236900FD601F /* LexYAML.cxx in Sources */, + 271D1FE10FA7236900FD601F /* PerLine.cxx in Sources */, + ); + runOnlyForDeploymentPostprocessing = 0; + }; + 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 */ + 272133C40F97361C006BE49A /* PBXTargetDependency */ = { + isa = PBXTargetDependency; + target = 272133470F9731CB006BE49A /* Scintilla */; + targetProxy = 272133C30F97361C006BE49A /* 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 */ + 2721334A0F9731CB006BE49A /* 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 = NO; + GCC_PREFIX_HEADER = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCI_NAMESPACE, + SCI_LEXER, + ); + INFOPLIST_FILE = "Scintilla-Info.plist"; + INSTALL_PATH = "@executable_path/../Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Scintilla; + }; + name = Debug; + }; + 2721334B0F9731CB006BE49A /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = YES; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + DYLIB_COMPATIBILITY_VERSION = 1; + DYLIB_CURRENT_VERSION = 1; + FRAMEWORK_VERSION = A; + GCC_ENABLE_FIX_AND_CONTINUE = NO; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = NO; + GCC_PREFIX_HEADER = ""; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCI_NAMESPACE, + SCI_LEXER, + ); + INFOPLIST_FILE = "Scintilla-Info.plist"; + INSTALL_PATH = "@executable_path/../Frameworks"; + OTHER_LDFLAGS = ( + "-framework", + Foundation, + "-framework", + AppKit, + ); + PREBINDING = NO; + PRODUCT_NAME = Scintilla; + ZERO_LINK = NO; + }; + name = Release; + }; + C01FCF4B08A954540054247B /* Debug */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + COPY_PHASE_STRIP = NO; + 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_NAMESPACE, + SCI_LEXER, + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../SciTest/build/Development\"", + ); + PRODUCT_NAME = ScintillaTest; + }; + name = Debug; + }; + C01FCF4C08A954540054247B /* Release */ = { + isa = XCBuildConfiguration; + buildSettings = { + ALWAYS_SEARCH_USER_PATHS = NO; + DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym"; + GCC_MODEL_TUNING = G5; + GCC_PRECOMPILE_PREFIX_HEADER = YES; + GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch; + GCC_PREPROCESSOR_DEFINITIONS = ( + SCI_NAMESPACE, + SCI_LEXER, + ); + INFOPLIST_FILE = Info.plist; + INSTALL_PATH = "$(HOME)/Applications"; + LIBRARY_SEARCH_PATHS = ( + "$(inherited)", + "\"$(SRCROOT)/../../SciTest/build/Development\"", + ); + PRODUCT_NAME = ScintillaTest; + }; + 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; + 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; + PREBINDING = NO; + SDKROOT = macosx10.5; + }; + name = Release; + }; +/* End XCBuildConfiguration section */ + +/* Begin XCConfigurationList section */ + 2721334C0F9731CC006BE49A /* Build configuration list for PBXNativeTarget "Scintilla" */ = { + isa = XCConfigurationList; + buildConfigurations = ( + 2721334A0F9731CB006BE49A /* Debug */, + 2721334B0F9731CB006BE49A /* Release */, + ); + defaultConfigurationIsVisible = 0; + defaultConfigurationName = Release; + }; + 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/cocoa/ScintillaTest/ScintillaTest_Prefix.pch b/cocoa/ScintillaTest/ScintillaTest_Prefix.pch new file mode 100644 index 000000000..6c74b5256 --- /dev/null +++ b/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/cocoa/ScintillaTest/main.m b/cocoa/ScintillaTest/main.m new file mode 100644 index 000000000..9b0c58580 --- /dev/null +++ b/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/cocoa/ScintillaView.h b/cocoa/ScintillaView.h new file mode 100644 index 000000000..b341dd225 --- /dev/null +++ b/cocoa/ScintillaView.h @@ -0,0 +1,89 @@ + +/** + * 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 "ScintillaCocoa.h" + +@class ScintillaView; + +/** + * 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 + Scintilla::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) removeMarkedText; +- (void) setCursor: (Scintilla::Window::Cursor) cursor; + +@property (retain) ScintillaView* owner; +@end + +@interface ScintillaView : NSView +{ +@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; +} + +- (void) dealloc; +- (void) layout; + +- (void) sendNotification: (NSString*) notificationName; + +// 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) setEditable: (BOOL) editable; + +// Back end properties getters and setters. +- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value; +- (long) getGeneralProperty: (int) property parameter: (long) parameter; +- (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; + +@property Scintilla::ScintillaCocoa* backend; + +@end diff --git a/cocoa/ScintillaView.mm b/cocoa/ScintillaView.mm new file mode 100644 index 000000000..d6b353256 --- /dev/null +++ b/cocoa/ScintillaView.mm @@ -0,0 +1,1082 @@ + +/** + * 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 + +@implementation InnerView + +@synthesize owner = mOwner; + +//-------------------------------------------------------------------------------------------------- + +- (NSView*) initWithFrame: (NSRect) frame +{ + self = [super initWithFrame: frame]; + + if (self != nil) + { + // Some initialization for our view. + mCurrentCursor = [NSCursor arrowCursor]; + mCurrentTrackingRect = 0; + mMarkedTextRange = NSMakeRange(NSNotFound, 0); + + [self registerForDraggedTypes:[NSArray arrayWithObjects: + NSStringPboardType, NSHTMLPboardType, 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 +{ + 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; + } + + // 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. + * 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; +} + +//-------------------------------------------------------------------------------------------------- + +// 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); +} + +@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 two scrollers. + */ + +//-------------------------------------------------------------------------------------------------- + +/** + * 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)] retain]; + + 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)] retain]; + } +} + +//-------------------------------------------------------------------------------------------------- + +/** + * 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]; +} + +//-------------------------------------------------------------------------------------------------- + +/** + * 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; + } + 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; +} + +//-------------------------------------------------------------------------------------------------- + +/** + * Release the backend. + */ +- (void) dealloc +{ + 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). + */ +- (void) layout +{ + int scrollerWidth = [NSScroller scrollerWidth]; + + NSSize size = [self frame].size; + NSPoint hScrollerOrigin = {0, 0}; + NSPoint vScrollerOrigin = {size.width - scrollerWidth, 0}; + + if (![mVerticalScroller isHidden]) + { + // Consider user settings (left vs right vertical scrollbar). + BOOL isLeft = [[[NSUserDefaults standardUserDefaults] stringForKey: @"NSScrollerPosition"] + isEqualToString: @"left"]; + if (isLeft) + { + vScrollerOrigin.x = 0; + hScrollerOrigin.x = scrollerWidth; + }; + + size.width -= scrollerWidth; + } + if (![mHorizontalScroller isHidden]) + { + size.height -= scrollerWidth; + vScrollerOrigin.y += scrollerWidth; + }; + + NSRect contentRect = {hScrollerOrigin.x, vScrollerOrigin.y, size.width, size.height}; + [mContent setFrame: contentRect]; + + if (![mHorizontalScroller isHidden]) + [mHorizontalScroller setFrame: NSMakeRect(hScrollerOrigin.x, hScrollerOrigin.y, size.width, + scrollerWidth)]; + if (![mVerticalScroller isHidden]) + [mVerticalScroller setFrame: NSMakeRect(vScrollerOrigin.x, vScrollerOrigin.y, scrollerWidth, + size.height)]; +} + +//-------------------------------------------------------------------------------------------------- + +/** + * 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 current text in raw form (no formatting information included). + */ +- (NSString*) string +{ + NSString *result = nil; + + 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; +} + +//-------------------------------------------------------------------------------------------------- + +- (void) setEditable: (BOOL) editable +{ + mBackend->WndProc(SCI_SETREADONLY, editable ? 0 : 1, 0); +} + +//-------------------------------------------------------------------------------------------------- + +/** + * Setter for the current text (no formatting included). + */ +- (void) setString: (NSString*) aString +{ + const char* text = [aString UTF8String]; + mBackend->WndProc(SCI_SETTEXT, 0, (long) text); +} + +//-------------------------------------------------------------------------------------------------- + +- (InnerView*) content +{ + return mContent; +} + +- (void) setEditorProperty: (int) property wParam: (long) parameter lParam: (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. + * @result A generic value which must be interpreted depending on the property queried. + */ +- (long) getEditorProperty: (int) property wParam: (long) parameter +{ + return mBackend->WndProc(property, parameter, 0); +} + + +//-------------------------------------------------------------------------------------------------- + +/** + * 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. + * @result A generic value which must be interpreted depending on the property queried. + */ +- (long) getGeneralProperty: (int) property parameter: (long) parameter +{ + return mBackend->WndProc(property, parameter, 0); +} + +//-------------------------------------------------------------------------------------------------- + +/** + * 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]; +} + +@end + +//-------------------------------------------------------------------------------------------------- + diff --git a/cocoa/res/mac_cursor_busy.png b/cocoa/res/mac_cursor_busy.png Binary files differnew file mode 100644 index 000000000..9ac82769e --- /dev/null +++ b/cocoa/res/mac_cursor_busy.png diff --git a/cocoa/res/mac_cursor_flipped.png b/cocoa/res/mac_cursor_flipped.png Binary files differnew file mode 100644 index 000000000..2c984f248 --- /dev/null +++ b/cocoa/res/mac_cursor_flipped.png |