play around with Scintilla and Lexilla

This commit is contained in:
2024-07-02 23:47:26 +08:00
parent d7c71f41b2
commit 727a2ec214
992 changed files with 281111 additions and 195 deletions

View File

@ -0,0 +1,53 @@
/**
* Scintilla source code edit control
* @file InfoBar.h - Implements special info bar with zoom info, caret position etc. to be used with
* ScintillaView.
*
* Mike Lischke <mlischke@sun.com>
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#import <Cocoa/Cocoa.h>
#import "InfoBarCommunicator.h"
/**
* Extended text cell for vertically aligned text.
*/
@interface VerticallyCenteredTextFieldCell : NSTextFieldCell {
BOOL mIsEditingOrSelecting;
}
@end
@interface InfoBar : NSView <InfoBarCommunicator> {
@private
NSImage *mBackground;
IBDisplay mDisplayMask;
float mScaleFactor;
NSPopUpButton *mZoomPopup;
int mCurrentCaretX;
int mCurrentCaretY;
NSTextField *mCaretPositionLabel;
NSTextField *mStatusTextLabel;
id <InfoBarCommunicator> mCallback;
}
- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location
value: (float) value;
- (void) setCallback: (id <InfoBarCommunicator>) callback;
- (void) createItems;
- (void) positionSubViews;
- (void) setDisplay: (IBDisplay) display;
- (void) zoomItemAction: (id) sender;
- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag;
- (void) setCaretPosition: (NSPoint) position;
- (void) sizeToFit;
@end

View File

@ -0,0 +1,410 @@
/**
* Scintilla source code edit control
* @file InfoBar.mm - Implements special info bar with zoom info, caret position etc. to be used with
* ScintillaView.
*
* Mike Lischke <mlischke@sun.com>
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#include <cmath>
#import "InfoBar.h"
//--------------------------------------------------------------------------------------------------
@implementation VerticallyCenteredTextFieldCell
// Inspired by code from Daniel Jalkut, Red Sweater Software.
- (NSRect) drawingRectForBounds: (NSRect) theRect {
// Get the parent's idea of where we should draw
NSRect newRect = [super drawingRectForBounds: theRect];
// When the text field is being edited or selected, we have to turn off the magic because it
// screws up the configuration of the field editor. We sneak around this by intercepting
// selectWithFrame and editWithFrame and sneaking a reduced, centered rect in at the last minute.
if (mIsEditingOrSelecting == NO) {
// Get our ideal size for current text
NSSize textSize = [self cellSizeForBounds: theRect];
// Center that in the proposed rect
CGFloat heightDelta = newRect.size.height - textSize.height;
if (heightDelta > 0) {
newRect.size.height -= heightDelta;
newRect.origin.y += std::ceil(heightDelta / 2);
}
}
return newRect;
}
//--------------------------------------------------------------------------------------------------
- (void) selectWithFrame: (NSRect) aRect inView: (NSView *) controlView editor: (NSText *) textObj
delegate: (id) anObject start: (NSInteger) selStart length: (NSInteger) selLength {
aRect = [self drawingRectForBounds: aRect];
mIsEditingOrSelecting = YES;
[super selectWithFrame: aRect
inView: controlView
editor: textObj
delegate: anObject
start: selStart
length: selLength];
mIsEditingOrSelecting = NO;
}
//--------------------------------------------------------------------------------------------------
- (void) editWithFrame: (NSRect) aRect inView: (NSView *) controlView editor: (NSText *) textObj
delegate: (id) anObject event: (NSEvent *) theEvent {
aRect = [self drawingRectForBounds: aRect];
mIsEditingOrSelecting = YES;
[super editWithFrame: aRect
inView: controlView
editor: textObj
delegate: anObject
event: theEvent];
mIsEditingOrSelecting = NO;
}
@end
//--------------------------------------------------------------------------------------------------
@implementation InfoBar
- (instancetype) initWithFrame: (NSRect) frame {
self = [super initWithFrame: frame];
if (self) {
NSBundle *bundle = [NSBundle bundleForClass: [InfoBar class]];
NSString *path = [bundle pathForResource: @"info_bar_bg" ofType: @"tiff" inDirectory: nil];
// macOS 10.13 introduced bug where pathForResource: fails on SMB share
if (path == nil) {
path = [bundle.bundlePath stringByAppendingPathComponent: @"Resources/info_bar_bg.tiff"];
}
mBackground = [[NSImage alloc] initWithContentsOfFile: path];
if (!mBackground.valid)
NSLog(@"Background image for info bar is invalid.");
mScaleFactor = 1.0;
mCurrentCaretX = 0;
mCurrentCaretY = 0;
[self createItems];
self.clipsToBounds = TRUE;
}
return self;
}
//--------------------------------------------------------------------------------------------------
/**
* Called by a connected component (usually the info bar) if something changed there.
*
* @param type The type of the notification.
* @param message Carries the new status message if the type is a status message change.
* @param location Carries the new location (e.g. caret) if the type is a caret change or similar type.
* @param value Carries the new zoom value if the type is a zoom change.
*/
- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location
value: (float) value {
switch (type) {
case IBNZoomChanged:
[self setScaleFactor: value adjustPopup: YES];
break;
case IBNCaretChanged:
[self setCaretPosition: location];
break;
case IBNStatusChanged:
mStatusTextLabel.stringValue = message;
break;
}
}
//--------------------------------------------------------------------------------------------------
/**
* Used to set a protocol object we can use to send change notifications to.
*/
- (void) setCallback: (id <InfoBarCommunicator>) callback {
mCallback = callback;
}
//--------------------------------------------------------------------------------------------------
static NSString *DefaultScaleMenuLabels[] = {
@"20%", @"30%", @"50%", @"75%", @"100%", @"130%", @"160%", @"200%", @"250%", @"300%"
};
static float DefaultScaleMenuFactors[] = {
0.2f, 0.3f, 0.5f, 0.75f, 1.0f, 1.3f, 1.6f, 2.0f, 2.5f, 3.0f
};
static unsigned DefaultScaleMenuSelectedItemIndex = 4;
static float BarFontSize = 10.0;
- (void) createItems {
// 1) The zoom popup.
unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuLabels) / sizeof(NSString *);
// Create the popup button.
mZoomPopup = [[NSPopUpButton alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0) pullsDown: NO];
// No border or background please.
[mZoomPopup.cell setBordered: NO];
[mZoomPopup.cell setArrowPosition: NSPopUpArrowAtBottom];
// Fill it.
for (unsigned count = 0; count < numberOfDefaultItems; count++) {
[mZoomPopup addItemWithTitle: NSLocalizedStringFromTable(DefaultScaleMenuLabels[count], @"ZoomValues", nil)];
id currentItem = [mZoomPopup itemAtIndex: count];
if (DefaultScaleMenuFactors[count] != 0.0)
[currentItem setRepresentedObject: @(DefaultScaleMenuFactors[count])];
}
[mZoomPopup selectItemAtIndex: DefaultScaleMenuSelectedItemIndex];
// Hook it up.
mZoomPopup.target = self;
mZoomPopup.action = @selector(zoomItemAction:);
// Set a suitable font.
mZoomPopup.font = [NSFont menuBarFontOfSize: BarFontSize];
// Make sure the popup is big enough to fit the cells.
[mZoomPopup sizeToFit];
// Don't let it become first responder
[mZoomPopup setRefusesFirstResponder: YES];
// put it in the scrollview.
[self addSubview: mZoomPopup];
// 2) The caret position label.
Class oldCellClass = [NSTextField cellClass];
[NSTextField setCellClass: [VerticallyCenteredTextFieldCell class]];
mCaretPositionLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 50.0, 1.0)];
[mCaretPositionLabel setBezeled: NO];
[mCaretPositionLabel setBordered: NO];
[mCaretPositionLabel setEditable: NO];
[mCaretPositionLabel setSelectable: NO];
[mCaretPositionLabel setDrawsBackground: NO];
mCaretPositionLabel.font = [NSFont menuBarFontOfSize: BarFontSize];
NSTextFieldCell *cell = mCaretPositionLabel.cell;
cell.placeholderString = @"0:0";
cell.alignment = NSTextAlignmentCenter;
[self addSubview: mCaretPositionLabel];
// 3) The status text.
mStatusTextLabel = [[NSTextField alloc] initWithFrame: NSMakeRect(0.0, 0.0, 1.0, 1.0)];
[mStatusTextLabel setBezeled: NO];
[mStatusTextLabel setBordered: NO];
[mStatusTextLabel setEditable: NO];
[mStatusTextLabel setSelectable: NO];
[mStatusTextLabel setDrawsBackground: NO];
mStatusTextLabel.font = [NSFont menuBarFontOfSize: BarFontSize];
cell = mStatusTextLabel.cell;
cell.placeholderString = @"";
[self addSubview: mStatusTextLabel];
// Restore original cell class so that everything else doesn't get broken
[NSTextField setCellClass: oldCellClass];
}
//--------------------------------------------------------------------------------------------------
//--------------------------------------------------------------------------------------------------
/**
* Fill the background.
*/
- (void) drawRect: (NSRect) rect {
[[NSColor controlBackgroundColor] set];
[NSBezierPath fillRect: rect];
// Since the background is seamless, we don't need to take care for the proper offset.
// Simply tile the background over the invalid rectangle.
if (mBackground.size.width != 0) {
NSPoint target = {rect.origin.x, 0};
while (target.x < rect.origin.x + rect.size.width) {
[mBackground drawAtPoint: target fromRect: NSZeroRect operation: NSCompositingOperationSourceOver fraction: 1];
target.x += mBackground.size.width;
}
}
// Draw separator lines between items.
NSRect verticalLineRect;
CGFloat component = 190.0 / 255.0;
NSColor *lineColor = [NSColor colorWithDeviceRed: component green: component blue: component alpha: 1];
if (mDisplayMask & IBShowZoom) {
verticalLineRect = mZoomPopup.frame;
verticalLineRect.origin.x += verticalLineRect.size.width + 1.0;
verticalLineRect.size.width = 1.0;
if (NSIntersectsRect(rect, verticalLineRect)) {
[lineColor set];
NSRectFill(verticalLineRect);
}
}
if (mDisplayMask & IBShowCaretPosition) {
verticalLineRect = mCaretPositionLabel.frame;
verticalLineRect.origin.x += verticalLineRect.size.width + 1.0;
verticalLineRect.size.width = 1.0;
if (NSIntersectsRect(rect, verticalLineRect)) {
[lineColor set];
NSRectFill(verticalLineRect);
}
}
}
//--------------------------------------------------------------------------------------------------
- (BOOL) isOpaque {
return YES;
}
//--------------------------------------------------------------------------------------------------
/**
* Used to reposition our content depending on the size of the view.
*/
- (void) setFrame: (NSRect) newFrame {
super.frame = newFrame;
[self positionSubViews];
}
//--------------------------------------------------------------------------------------------------
- (void) positionSubViews {
NSRect currentBounds = {{0, 0}, {0, self.frame.size.height}};
if (mDisplayMask & IBShowZoom) {
[mZoomPopup setHidden: NO];
currentBounds.size.width = mZoomPopup.frame.size.width;
mZoomPopup.frame = currentBounds;
currentBounds.origin.x += currentBounds.size.width + 1; // Add 1 for the separator.
} else
[mZoomPopup setHidden: YES];
if (mDisplayMask & IBShowCaretPosition) {
[mCaretPositionLabel setHidden: NO];
currentBounds.size.width = mCaretPositionLabel.frame.size.width;
mCaretPositionLabel.frame = currentBounds;
currentBounds.origin.x += currentBounds.size.width + 1;
} else
[mCaretPositionLabel setHidden: YES];
if (mDisplayMask & IBShowStatusText) {
// The status text always takes the rest of the available space.
[mStatusTextLabel setHidden: NO];
currentBounds.size.width = self.frame.size.width - currentBounds.origin.x;
mStatusTextLabel.frame = currentBounds;
} else
[mStatusTextLabel setHidden: YES];
}
//--------------------------------------------------------------------------------------------------
/**
* Used to switch the visible parts of the info bar.
*
* @param display Bitwise ORed IBDisplay values which determine what to show on the bar.
*/
- (void) setDisplay: (IBDisplay) display {
if (mDisplayMask != display) {
mDisplayMask = display;
[self positionSubViews];
self.needsDisplay = YES;
}
}
//--------------------------------------------------------------------------------------------------
/**
* Handler for selection changes in the zoom menu.
*/
- (void) zoomItemAction: (id) sender {
NSNumber *selectedFactorObject = [[sender selectedCell] representedObject];
if (selectedFactorObject == nil) {
NSLog(@"Scale popup action: setting arbitrary zoom factors is not yet supported.");
return;
} else {
[self setScaleFactor: selectedFactorObject.floatValue adjustPopup: NO];
}
}
//--------------------------------------------------------------------------------------------------
- (void) setScaleFactor: (float) newScaleFactor adjustPopup: (BOOL) flag {
if (mScaleFactor != newScaleFactor) {
mScaleFactor = newScaleFactor;
if (flag) {
unsigned count = 0;
unsigned numberOfDefaultItems = sizeof(DefaultScaleMenuFactors) / sizeof(float);
// We only work with some preset zoom values. If the given value does not correspond
// to one then show no selection.
while (count < numberOfDefaultItems && (std::abs(newScaleFactor - DefaultScaleMenuFactors[count]) > 0.07))
count++;
if (count == numberOfDefaultItems)
[mZoomPopup selectItemAtIndex: -1];
else {
[mZoomPopup selectItemAtIndex: count];
// Set scale factor to found preset value if it comes close.
mScaleFactor = DefaultScaleMenuFactors[count];
}
} else {
// Internally set. Notify owner.
[mCallback notify: IBNZoomChanged message: nil location: NSZeroPoint value: newScaleFactor];
}
}
}
//--------------------------------------------------------------------------------------------------
/**
* Called from the notification method to update the caret position display.
*/
- (void) setCaretPosition: (NSPoint) position {
// Make the position one-based.
int newX = (int) position.x + 1;
int newY = (int) position.y + 1;
if (mCurrentCaretX != newX || mCurrentCaretY != newY) {
mCurrentCaretX = newX;
mCurrentCaretY = newY;
mCaretPositionLabel.stringValue = [NSString stringWithFormat: @"%d:%d", newX, newY];
}
}
//--------------------------------------------------------------------------------------------------
/**
* Makes the bar resize to the smallest width that can accommodate the currently enabled items.
*/
- (void) sizeToFit {
NSRect frame = self.frame;
frame.size.width = 0;
if (mDisplayMask & IBShowZoom)
frame.size.width += mZoomPopup.frame.size.width;
if (mDisplayMask & IBShowCaretPosition)
frame.size.width += mCaretPositionLabel.frame.size.width;
if (mDisplayMask & IBShowStatusText)
frame.size.width += mStatusTextLabel.frame.size.width;
self.frame = frame;
}
@end

View File

@ -0,0 +1,35 @@
/*
* InfoBarCommunicator.h - Definitions of a communication protocol and other data types used for
* the info bar implementation.
*
* Mike Lischke <mlischke@sun.com>
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
typedef NS_OPTIONS(NSUInteger, IBDisplay) {
IBShowZoom = 0x01,
IBShowCaretPosition = 0x02,
IBShowStatusText = 0x04,
IBShowAll = 0xFF
};
/**
* The info bar communicator protocol is used for communication between ScintillaView and its
* information bar component. Using this protocol decouples any potential info target from the main
* ScintillaView implementation. The protocol is used two-way.
*/
typedef NS_ENUM(NSInteger, NotificationType) {
IBNZoomChanged, // The user selected another zoom value.
IBNCaretChanged, // The caret in the editor changed.
IBNStatusChanged, // The application set a new status message.
};
@protocol InfoBarCommunicator
- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location
value: (float) value;
- (void) setCallback: (id <InfoBarCommunicator>) callback;
@end

View File

@ -0,0 +1,141 @@
/**
* 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).
* @file PlatCocoa.h
*/
#ifndef PLATCOCOA_H
#define PLATCOCOA_H
#include <cstdlib>
#include <cassert>
#include <cstring>
#include <cstdio>
#include <Cocoa/Cocoa.h>
#include "ScintillaTypes.h"
#include "ScintillaMessages.h"
#include "Debugging.h"
#include "Geometry.h"
#include "Platform.h"
#include "QuartzTextLayout.h"
NSRect PRectangleToNSRect(const Scintilla::Internal::PRectangle &rc);
Scintilla::Internal::PRectangle NSRectToPRectangle(const NSRect &rc);
CFStringEncoding EncodingFromCharacterSet(bool unicode, Scintilla::CharacterSet characterSet);
@interface ScintillaContextMenu : NSMenu {
Scintilla::Internal::ScintillaCocoa *owner;
}
- (void) handleCommand: (NSMenuItem *) sender;
- (void) setOwner: (Scintilla::Internal::ScintillaCocoa *) newOwner;
@end
namespace Scintilla::Internal {
// A class to do the actual text rendering for us using Quartz 2D.
class SurfaceImpl : public Surface {
private:
SurfaceMode mode;
CGContextRef gc;
/** If the surface is a bitmap context, contains a reference to the bitmap data. */
std::unique_ptr<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 desired colour. */
void FillColour(ColourRGBA fill);
void PenColourAlpha(ColourRGBA fore);
void SetFillStroke(FillStroke fillStroke);
// 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;
bool UnicodeMode() const noexcept;
void Clear();
public:
SurfaceImpl();
SurfaceImpl(const SurfaceImpl *surface, int width, int height);
~SurfaceImpl() override;
void Init(WindowID wid) override;
void Init(SurfaceID sid, WindowID wid) override;
std::unique_ptr<Surface> AllocatePixMap(int width, int height) override;
std::unique_ptr<SurfaceImpl> AllocatePixMapImplementation(int width, int height);
CGContextRef GetContext() { return gc; }
void SetMode(SurfaceMode mode) override;
void Release() noexcept override;
int SupportsFeature(Scintilla::Supports feature) noexcept override;
bool Initialised() override;
/** Returns a CGImageRef that represents the surface. Returns NULL if this is not possible. */
CGImageRef CreateImage();
void CopyImageRectangle(SurfaceImpl *source, PRectangle srcRect, PRectangle dstRect);
int LogPixelsY() override;
int PixelDivisions() override;
int DeviceHeightFont(int points) override;
void LineDraw(Point start, Point end, Stroke stroke) override;
void PolyLine(const Point *pts, size_t npts, Stroke stroke) override;
void Polygon(const Scintilla::Internal::Point *pts, size_t npts, FillStroke fillStroke) override;
void RectangleDraw(PRectangle rc, FillStroke fillStroke) override;
void RectangleFrame(PRectangle rc, Stroke stroke) override;
void FillRectangle(PRectangle rc, Fill fill) override;
void FillRectangleAligned(PRectangle rc, Fill fill) override;
void FillRectangle(PRectangle rc, Surface &surfacePattern) override;
void RoundedRectangle(PRectangle rc, FillStroke fillStroke) override;
void AlphaRectangle(PRectangle rc, XYPOSITION cornerSize, FillStroke fillStroke) override;
void GradientRectangle(PRectangle rc, const std::vector<ColourStop> &stops, GradientOptions options) override;
void DrawRGBAImage(PRectangle rc, int width, int height, const unsigned char *pixelsImage) override;
void Ellipse(PRectangle rc, FillStroke fillStroke) override;
void Stadium(PRectangle rc, FillStroke fillStroke, Ends ends) override;
void Copy(PRectangle rc, Scintilla::Internal::Point from, Surface &surfaceSource) override;
std::unique_ptr<IScreenLineLayout> Layout(const IScreenLine *screenLine) override;
void DrawTextNoClip(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,
ColourRGBA back) override;
void DrawTextClipped(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,
ColourRGBA back) override;
void DrawTextTransparent(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;
void MeasureWidths(const Font *font_, std::string_view text, XYPOSITION *positions) override;
XYPOSITION WidthText(const Font *font_, std::string_view text) override;
void DrawTextNoClipUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,
ColourRGBA back) override;
void DrawTextClippedUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore,
ColourRGBA back) override;
void DrawTextTransparentUTF8(PRectangle rc, const Font *font_, XYPOSITION ybase, std::string_view text, ColourRGBA fore) override;
void MeasureWidthsUTF8(const Font *font_, std::string_view text, XYPOSITION *positions) override;
XYPOSITION WidthTextUTF8(const Font *font_, std::string_view text) override;
XYPOSITION Ascent(const Font *font_) override;
XYPOSITION Descent(const Font *font_) override;
XYPOSITION InternalLeading(const Font *font_) override;
XYPOSITION Height(const Font *font_) override;
XYPOSITION AverageCharWidth(const Font *font_) override;
void SetClip(PRectangle rc) override;
void PopClip() override;
void FlushCachedState() override;
void FlushDrawing() override;
}; // SurfaceImpl class
} // Scintilla namespace
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,101 @@
/*
* QuartzTextLayout.h
*
* Original Code by Evan Jones on Wed Oct 02 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
*/
#ifndef QUARTZTEXTLAYOUT_H
#define QUARTZTEXTLAYOUT_H
#include <Cocoa/Cocoa.h>
#include "QuartzTextStyle.h"
class QuartzTextLayout {
public:
/** Create a text layout for drawing. */
QuartzTextLayout(std::string_view sv, CFStringEncoding encoding, const QuartzTextStyle *r) {
encodingUsed = encoding;
const UInt8 *puiBuffer = reinterpret_cast<const UInt8 *>(sv.data());
CFStringRef str = CFStringCreateWithBytes(NULL, puiBuffer, sv.length(), encodingUsed, false);
if (!str) {
// Failed to decode bytes into string with given encoding so try
// MacRoman which should accept any byte.
encodingUsed = kCFStringEncodingMacRoman;
str = CFStringCreateWithBytes(NULL, puiBuffer, sv.length(), encodingUsed, false);
}
if (!str) {
return;
}
stringLength = CFStringGetLength(str);
CFMutableDictionaryRef stringAttribs = r->getCTStyle();
mString = ::CFAttributedStringCreate(NULL, str, stringAttribs);
mLine = ::CTLineCreateWithAttributedString(mString);
CFRelease(str);
}
~QuartzTextLayout() {
if (mString) {
CFRelease(mString);
mString = NULL;
}
if (mLine) {
CFRelease(mLine);
mLine = NULL;
}
}
/** Draw the text layout into a CGContext at the specified position.
* @param gc The CGContext in which to draw the text.
* @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. */
void draw(CGContextRef gc, double x, double y) {
if (!mLine)
return;
::CGContextSetTextMatrix(gc, CGAffineTransformMakeScale(1.0, -1.0));
// Set the text drawing position.
::CGContextSetTextPosition(gc, x, y);
// And finally, draw!
::CTLineDraw(mLine, gc);
}
float MeasureStringWidth() {
if (mLine == NULL)
return 0.0f;
return static_cast<float>(::CTLineGetTypographicBounds(mLine, NULL, NULL, NULL));
}
CTLineRef getCTLine() {
return mLine;
}
CFIndex getStringLength() {
return stringLength;
}
CFStringEncoding getEncoding() {
return encodingUsed;
}
private:
CFAttributedStringRef mString = NULL;
CTLineRef mLine = NULL;
CFIndex stringLength = 0;
CFStringEncoding encodingUsed = kCFStringEncodingMacRoman;
};
#endif

View File

@ -0,0 +1,95 @@
/*
* QuartzTextStyle.h
*
* Created by Evan Jones on Wed Oct 02 2002.
*
*/
#ifndef QUARTZTEXTSTYLE_H
#define QUARTZTEXTSTYLE_H
#include "QuartzTextStyleAttribute.h"
class QuartzTextStyle {
public:
QuartzTextStyle() {
fontRef = NULL;
styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
characterSet = Scintilla::CharacterSet::Ansi;
}
QuartzTextStyle(const QuartzTextStyle *other) {
// Does not copy font colour attribute
fontRef = static_cast<CTFontRef>(CFRetain(other->fontRef));
styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
CFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);
characterSet = other->characterSet;
}
~QuartzTextStyle() {
if (styleDict != NULL) {
CFRelease(styleDict);
styleDict = NULL;
}
if (fontRef) {
CFRelease(fontRef);
fontRef = NULL;
}
}
CFMutableDictionaryRef getCTStyle() const {
return styleDict;
}
void setCTStyleColour(CGColor *inColour) {
CFDictionarySetValue(styleDict, kCTForegroundColorAttributeName, inColour);
}
float getAscent() const {
return static_cast<float>(::CTFontGetAscent(fontRef));
}
float getDescent() const {
return static_cast<float>(::CTFontGetDescent(fontRef));
}
float getLeading() const {
return static_cast<float>(::CTFontGetLeading(fontRef));
}
void setFontRef(CTFontRef inRef, Scintilla::CharacterSet characterSet_) {
fontRef = inRef;
characterSet = characterSet_;
if (styleDict != NULL)
CFRelease(styleDict);
styleDict = CFDictionaryCreateMutable(kCFAllocatorDefault, 2,
&kCFTypeDictionaryKeyCallBacks,
&kCFTypeDictionaryValueCallBacks);
CFDictionaryAddValue(styleDict, kCTFontAttributeName, fontRef);
}
CTFontRef getFontRef() const noexcept {
return fontRef;
}
Scintilla::CharacterSet getCharacterSet() const noexcept {
return characterSet;
}
private:
CFMutableDictionaryRef styleDict;
CTFontRef fontRef;
Scintilla::CharacterSet characterSet;
};
#endif

View File

@ -0,0 +1,72 @@
/**
* QuartzTextStyleAttribute.h
*
* Original Code by Evan Jones on Wed Oct 02 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
*/
#ifndef QUARTZTEXTSTYLEATTRIBUTE_H
#define QUARTZTEXTSTYLEATTRIBUTE_H
class QuartzFont {
public:
/** Create a font style from a name. */
QuartzFont(const char *name, size_t length, float size, Scintilla::FontWeight weight, bool italic) {
assert(name != NULL && length > 0 && name[length] == '\0');
CFStringRef fontName = CFStringCreateWithCString(kCFAllocatorDefault, name, kCFStringEncodingMacRoman);
assert(fontName != NULL);
bool bold = weight > Scintilla::FontWeight::Normal;
if (bold || italic) {
CTFontSymbolicTraits desiredTrait = 0;
CTFontSymbolicTraits traitMask = 0;
// if bold was specified, add the trait
if (bold) {
desiredTrait |= kCTFontBoldTrait;
traitMask |= kCTFontBoldTrait;
}
// if italic was specified, add the trait
if (italic) {
desiredTrait |= kCTFontItalicTrait;
traitMask |= kCTFontItalicTrait;
}
// create a font and then a copy of it with the sym traits
CTFontRef iFont = ::CTFontCreateWithName(fontName, size, NULL);
fontid = ::CTFontCreateCopyWithSymbolicTraits(iFont, size, NULL, desiredTrait, traitMask);
if (fontid) {
CFRelease(iFont);
} else {
// Traits failed so use base font
fontid = iFont;
}
} else {
// create the font, no traits
fontid = ::CTFontCreateWithName(fontName, size, NULL);
}
if (!fontid) {
// Failed to create requested font so use font always present
fontid = ::CTFontCreateWithName((CFStringRef)@"Monaco", size, NULL);
}
CFRelease(fontName);
}
CTFontRef getFontID() {
return fontid;
}
private:
CTFontRef fontid;
};
#endif

View File

@ -0,0 +1,24 @@
<?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>$(DEVELOPMENT_LANGUAGE)</string>
<key>CFBundleExecutable</key>
<string>$(EXECUTABLE_NAME)</string>
<key>CFBundleIdentifier</key>
<string>$(PRODUCT_BUNDLE_IDENTIFIER)</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>$(PRODUCT_NAME)</string>
<key>CFBundlePackageType</key>
<string>$(PRODUCT_BUNDLE_PACKAGE_TYPE)</string>
<key>CFBundleShortVersionString</key>
<string>5.5.0</string>
<key>CFBundleVersion</key>
<string>$(CURRENT_PROJECT_VERSION)</string>
<key>NSHumanReadableCopyright</key>
<string>Copyright © 2020 Neil Hodgson. All rights reserved.</string>
</dict>
</plist>

View File

@ -0,0 +1,769 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
2807B4EA28964CA40063A31A /* ChangeHistory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2807B4E828964CA40063A31A /* ChangeHistory.cxx */; };
2807B4EB28964CA40063A31A /* ChangeHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 2807B4E928964CA40063A31A /* ChangeHistory.h */; };
282936DF24E2D55D00C84BA2 /* QuartzTextLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */; };
282936E024E2D55D00C84BA2 /* InfoBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936D424E2D55D00C84BA2 /* InfoBar.mm */; };
282936E124E2D55D00C84BA2 /* QuartzTextStyleAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */; };
282936E224E2D55D00C84BA2 /* ScintillaCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */; };
282936E324E2D55D00C84BA2 /* PlatCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936D724E2D55D00C84BA2 /* PlatCocoa.mm */; };
282936E424E2D55D00C84BA2 /* PlatCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D824E2D55D00C84BA2 /* PlatCocoa.h */; };
282936E524E2D55D00C84BA2 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
282936E624E2D55D00C84BA2 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DA24E2D55D00C84BA2 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
282936E724E2D55D00C84BA2 /* QuartzTextStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */; };
282936E824E2D55D00C84BA2 /* ScintillaView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936DC24E2D55D00C84BA2 /* ScintillaView.mm */; };
282936E924E2D55D00C84BA2 /* ScintillaCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */; };
282936EA24E2D55D00C84BA2 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936DE24E2D55D00C84BA2 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
2829372E24E2D58800C84BA2 /* DBCS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936EB24E2D58400C84BA2 /* DBCS.cxx */; };
2829372F24E2D58800C84BA2 /* ElapsedPeriod.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */; };
2829373024E2D58800C84BA2 /* CallTip.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936ED24E2D58400C84BA2 /* CallTip.h */; };
2829373124E2D58800C84BA2 /* PositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EE24E2D58400C84BA2 /* PositionCache.h */; };
2829373224E2D58800C84BA2 /* KeyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936EF24E2D58400C84BA2 /* KeyMap.h */; };
2829373324E2D58800C84BA2 /* LineMarker.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F024E2D58400C84BA2 /* LineMarker.cxx */; };
2829373524E2D58800C84BA2 /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F224E2D58400C84BA2 /* Style.h */; };
2829373624E2D58800C84BA2 /* UniqueString.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F324E2D58400C84BA2 /* UniqueString.cxx */; };
2829373724E2D58800C84BA2 /* RunStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F424E2D58400C84BA2 /* RunStyles.h */; };
2829373824E2D58800C84BA2 /* RESearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F524E2D58400C84BA2 /* RESearch.h */; };
2829373924E2D58800C84BA2 /* Indicator.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F624E2D58400C84BA2 /* Indicator.cxx */; };
2829373A24E2D58800C84BA2 /* MarginView.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F724E2D58400C84BA2 /* MarginView.h */; };
2829373B24E2D58800C84BA2 /* Position.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936F824E2D58400C84BA2 /* Position.h */; };
2829373C24E2D58800C84BA2 /* CaseFolder.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936F924E2D58400C84BA2 /* CaseFolder.cxx */; };
2829373D24E2D58800C84BA2 /* PerLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FA24E2D58400C84BA2 /* PerLine.h */; };
2829373E24E2D58800C84BA2 /* Indicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FB24E2D58400C84BA2 /* Indicator.h */; };
2829373F24E2D58800C84BA2 /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FC24E2D58400C84BA2 /* UniConversion.h */; };
2829374024E2D58800C84BA2 /* XPM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 282936FD24E2D58400C84BA2 /* XPM.cxx */; };
2829374124E2D58800C84BA2 /* CharClassify.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FE24E2D58400C84BA2 /* CharClassify.h */; };
2829374224E2D58800C84BA2 /* Decoration.h in Headers */ = {isa = PBXBuildFile; fileRef = 282936FF24E2D58400C84BA2 /* Decoration.h */; };
2829374524E2D58800C84BA2 /* PositionCache.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370224E2D58500C84BA2 /* PositionCache.cxx */; };
2829374724E2D58800C84BA2 /* Style.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370424E2D58500C84BA2 /* Style.cxx */; };
2829374824E2D58800C84BA2 /* RESearch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370524E2D58500C84BA2 /* RESearch.cxx */; };
2829374924E2D58800C84BA2 /* CallTip.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370624E2D58500C84BA2 /* CallTip.cxx */; };
2829374A24E2D58800C84BA2 /* ContractionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370724E2D58500C84BA2 /* ContractionState.h */; };
2829374B24E2D58800C84BA2 /* Decoration.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370824E2D58500C84BA2 /* Decoration.cxx */; };
2829374C24E2D58800C84BA2 /* DBCS.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370924E2D58500C84BA2 /* DBCS.h */; };
2829374D24E2D58800C84BA2 /* AutoComplete.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370A24E2D58500C84BA2 /* AutoComplete.h */; };
2829374E24E2D58800C84BA2 /* KeyMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370B24E2D58500C84BA2 /* KeyMap.cxx */; };
2829374F24E2D58800C84BA2 /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829370C24E2D58500C84BA2 /* ViewStyle.h */; };
2829375024E2D58800C84BA2 /* Selection.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370D24E2D58500C84BA2 /* Selection.cxx */; };
2829375124E2D58800C84BA2 /* ContractionState.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370E24E2D58500C84BA2 /* ContractionState.cxx */; };
2829375224E2D58800C84BA2 /* UniConversion.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829370F24E2D58500C84BA2 /* UniConversion.cxx */; };
2829375324E2D58800C84BA2 /* PerLine.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371024E2D58500C84BA2 /* PerLine.cxx */; };
2829375424E2D58800C84BA2 /* SparseVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371124E2D58500C84BA2 /* SparseVector.h */; };
2829375524E2D58800C84BA2 /* EditModel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371224E2D58500C84BA2 /* EditModel.cxx */; };
2829375624E2D58800C84BA2 /* EditView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371324E2D58600C84BA2 /* EditView.h */; };
2829375724E2D58800C84BA2 /* CaseConvert.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371424E2D58600C84BA2 /* CaseConvert.cxx */; };
2829375824E2D58800C84BA2 /* CharClassify.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371524E2D58600C84BA2 /* CharClassify.cxx */; };
2829375924E2D58800C84BA2 /* AutoComplete.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371624E2D58600C84BA2 /* AutoComplete.cxx */; };
2829375A24E2D58800C84BA2 /* ViewStyle.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371724E2D58600C84BA2 /* ViewStyle.cxx */; };
2829375B24E2D58800C84BA2 /* MarginView.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371824E2D58600C84BA2 /* MarginView.cxx */; };
2829375C24E2D58800C84BA2 /* CellBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371924E2D58600C84BA2 /* CellBuffer.h */; };
2829375D24E2D58800C84BA2 /* Document.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829371A24E2D58600C84BA2 /* Document.cxx */; };
2829375E24E2D58800C84BA2 /* LineMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371B24E2D58600C84BA2 /* LineMarker.h */; };
2829375F24E2D58800C84BA2 /* Editor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371C24E2D58600C84BA2 /* Editor.h */; };
2829376024E2D58800C84BA2 /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371D24E2D58600C84BA2 /* XPM.h */; };
2829376124E2D58800C84BA2 /* ScintillaBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371E24E2D58600C84BA2 /* ScintillaBase.h */; };
2829376224E2D58800C84BA2 /* Partitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829371F24E2D58700C84BA2 /* Partitioning.h */; };
2829376424E2D58800C84BA2 /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372124E2D58700C84BA2 /* SplitVector.h */; };
2829376524E2D58800C84BA2 /* UniqueString.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372224E2D58700C84BA2 /* UniqueString.h */; };
2829376624E2D58800C84BA2 /* CaseConvert.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372324E2D58700C84BA2 /* CaseConvert.h */; };
2829376724E2D58800C84BA2 /* ScintillaBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372424E2D58700C84BA2 /* ScintillaBase.cxx */; };
2829376824E2D58800C84BA2 /* CaseFolder.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372524E2D58700C84BA2 /* CaseFolder.h */; };
2829376924E2D58800C84BA2 /* CellBuffer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372624E2D58700C84BA2 /* CellBuffer.cxx */; };
2829376A24E2D58800C84BA2 /* EditModel.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372724E2D58700C84BA2 /* EditModel.h */; };
2829376B24E2D58800C84BA2 /* Editor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372824E2D58700C84BA2 /* Editor.cxx */; };
2829376C24E2D58800C84BA2 /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372924E2D58700C84BA2 /* Selection.h */; };
2829376D24E2D58800C84BA2 /* RunStyles.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372A24E2D58800C84BA2 /* RunStyles.cxx */; };
2829376F24E2D58800C84BA2 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 2829372C24E2D58800C84BA2 /* Document.h */; };
2829377024E2D58800C84BA2 /* EditView.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2829372D24E2D58800C84BA2 /* EditView.cxx */; };
282937AA24E2D60E00C84BA2 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 282937A924E2D60E00C84BA2 /* res */; };
2867917C26BB448C007C2905 /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917626BB448C007C2905 /* mac_cursor_busy.png */; };
2867917D26BB448C007C2905 /* mac_cursor_flipped@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917726BB448C007C2905 /* mac_cursor_flipped@2x.png */; };
2867917E26BB448C007C2905 /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917826BB448C007C2905 /* info_bar_bg.png */; };
2867917F26BB448C007C2905 /* mac_cursor_busy@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917926BB448C007C2905 /* mac_cursor_busy@2x.png */; };
2867918026BB448C007C2905 /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917A26BB448C007C2905 /* mac_cursor_flipped.png */; };
2867918126BB448C007C2905 /* info_bar_bg@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 2867917B26BB448C007C2905 /* info_bar_bg@2x.png */; };
286F8E6325F84F7400EC8D60 /* Sci_Position.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E5F25F84F7400EC8D60 /* Sci_Position.h */; settings = {ATTRIBUTES = (Public, ); }; };
286F8E6425F84F7400EC8D60 /* ILexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E6025F84F7400EC8D60 /* ILexer.h */; settings = {ATTRIBUTES = (Public, ); }; };
286F8E6525F84F7400EC8D60 /* ILoader.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E6125F84F7400EC8D60 /* ILoader.h */; settings = {ATTRIBUTES = (Public, ); }; };
286F8E6625F84F7400EC8D60 /* Scintilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8E6225F84F7400EC8D60 /* Scintilla.h */; settings = {ATTRIBUTES = (Public, ); }; };
286F8EDE260448C300EC8D60 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8EDB260448C300EC8D60 /* Platform.h */; };
286F8EDF260448C300EC8D60 /* Geometry.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 286F8EDC260448C300EC8D60 /* Geometry.cxx */; };
286F8EE0260448C300EC8D60 /* Geometry.h in Headers */ = {isa = PBXBuildFile; fileRef = 286F8EDD260448C300EC8D60 /* Geometry.h */; };
287F3C6A246F90240040E76F /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287F3C69246F90240040E76F /* Cocoa.framework */; };
287F3C6C246F90300040E76F /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 287F3C6B246F90300040E76F /* QuartzCore.framework */; };
28B962A52B6AF44F00ACCD96 /* UndoHistory.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28B962A32B6AF44F00ACCD96 /* UndoHistory.cxx */; };
28B962A62B6AF44F00ACCD96 /* UndoHistory.h in Headers */ = {isa = PBXBuildFile; fileRef = 28B962A42B6AF44F00ACCD96 /* UndoHistory.h */; };
28EA9CAE255894B4007710C4 /* CharacterCategoryMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28EA9CAA255894B4007710C4 /* CharacterCategoryMap.cxx */; };
28EA9CAF255894B4007710C4 /* CharacterType.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 28EA9CAB255894B4007710C4 /* CharacterType.cxx */; };
28EA9CB0255894B4007710C4 /* CharacterCategoryMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 28EA9CAC255894B4007710C4 /* CharacterCategoryMap.h */; };
28EA9CB1255894B4007710C4 /* CharacterType.h in Headers */ = {isa = PBXBuildFile; fileRef = 28EA9CAD255894B4007710C4 /* CharacterType.h */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
2807B4E828964CA40063A31A /* ChangeHistory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ChangeHistory.cxx; path = ../../src/ChangeHistory.cxx; sourceTree = "<group>"; };
2807B4E928964CA40063A31A /* ChangeHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ChangeHistory.h; path = ../../src/ChangeHistory.h; sourceTree = "<group>"; };
282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextLayout.h; path = ../QuartzTextLayout.h; sourceTree = "<group>"; };
282936D424E2D55D00C84BA2 /* InfoBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InfoBar.mm; path = ../InfoBar.mm; sourceTree = "<group>"; };
282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyleAttribute.h; path = ../QuartzTextStyleAttribute.h; sourceTree = "<group>"; };
282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaCocoa.h; path = ../ScintillaCocoa.h; sourceTree = "<group>"; };
282936D724E2D55D00C84BA2 /* PlatCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatCocoa.mm; path = ../PlatCocoa.mm; sourceTree = "<group>"; };
282936D824E2D55D00C84BA2 /* PlatCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatCocoa.h; path = ../PlatCocoa.h; sourceTree = "<group>"; };
282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBarCommunicator.h; path = ../InfoBarCommunicator.h; sourceTree = "<group>"; };
282936DA24E2D55D00C84BA2 /* InfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBar.h; path = ../InfoBar.h; sourceTree = "<group>"; };
282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyle.h; path = ../QuartzTextStyle.h; sourceTree = "<group>"; };
282936DC24E2D55D00C84BA2 /* ScintillaView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaView.mm; path = ../ScintillaView.mm; sourceTree = "<group>"; };
282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaCocoa.mm; path = ../ScintillaCocoa.mm; sourceTree = "<group>"; };
282936DE24E2D55D00C84BA2 /* ScintillaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaView.h; path = ../ScintillaView.h; sourceTree = "<group>"; };
282936EB24E2D58400C84BA2 /* DBCS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DBCS.cxx; path = ../../src/DBCS.cxx; sourceTree = "<group>"; };
282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ElapsedPeriod.h; path = ../../src/ElapsedPeriod.h; sourceTree = "<group>"; };
282936ED24E2D58400C84BA2 /* CallTip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallTip.h; path = ../../src/CallTip.h; sourceTree = "<group>"; };
282936EE24E2D58400C84BA2 /* PositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PositionCache.h; path = ../../src/PositionCache.h; sourceTree = "<group>"; };
282936EF24E2D58400C84BA2 /* KeyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyMap.h; path = ../../src/KeyMap.h; sourceTree = "<group>"; };
282936F024E2D58400C84BA2 /* LineMarker.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineMarker.cxx; path = ../../src/LineMarker.cxx; sourceTree = "<group>"; };
282936F224E2D58400C84BA2 /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = "<group>"; };
282936F324E2D58400C84BA2 /* UniqueString.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniqueString.cxx; path = ../../src/UniqueString.cxx; sourceTree = "<group>"; };
282936F424E2D58400C84BA2 /* RunStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunStyles.h; path = ../../src/RunStyles.h; sourceTree = "<group>"; };
282936F524E2D58400C84BA2 /* RESearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RESearch.h; path = ../../src/RESearch.h; sourceTree = "<group>"; };
282936F624E2D58400C84BA2 /* Indicator.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indicator.cxx; path = ../../src/Indicator.cxx; sourceTree = "<group>"; };
282936F724E2D58400C84BA2 /* MarginView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = MarginView.h; path = ../../src/MarginView.h; sourceTree = "<group>"; };
282936F824E2D58400C84BA2 /* Position.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Position.h; path = ../../src/Position.h; sourceTree = "<group>"; };
282936F924E2D58400C84BA2 /* CaseFolder.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseFolder.cxx; path = ../../src/CaseFolder.cxx; sourceTree = "<group>"; };
282936FA24E2D58400C84BA2 /* PerLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PerLine.h; path = ../../src/PerLine.h; sourceTree = "<group>"; };
282936FB24E2D58400C84BA2 /* Indicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indicator.h; path = ../../src/Indicator.h; sourceTree = "<group>"; };
282936FC24E2D58400C84BA2 /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = "<group>"; };
282936FD24E2D58400C84BA2 /* XPM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XPM.cxx; path = ../../src/XPM.cxx; sourceTree = "<group>"; };
282936FE24E2D58400C84BA2 /* CharClassify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharClassify.h; path = ../../src/CharClassify.h; sourceTree = "<group>"; };
282936FF24E2D58400C84BA2 /* Decoration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Decoration.h; path = ../../src/Decoration.h; sourceTree = "<group>"; };
2829370224E2D58500C84BA2 /* PositionCache.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PositionCache.cxx; path = ../../src/PositionCache.cxx; sourceTree = "<group>"; };
2829370424E2D58500C84BA2 /* Style.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Style.cxx; path = ../../src/Style.cxx; sourceTree = "<group>"; };
2829370524E2D58500C84BA2 /* RESearch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RESearch.cxx; path = ../../src/RESearch.cxx; sourceTree = "<group>"; };
2829370624E2D58500C84BA2 /* CallTip.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CallTip.cxx; path = ../../src/CallTip.cxx; sourceTree = "<group>"; };
2829370724E2D58500C84BA2 /* ContractionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContractionState.h; path = ../../src/ContractionState.h; sourceTree = "<group>"; };
2829370824E2D58500C84BA2 /* Decoration.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Decoration.cxx; path = ../../src/Decoration.cxx; sourceTree = "<group>"; };
2829370924E2D58500C84BA2 /* DBCS.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DBCS.h; path = ../../src/DBCS.h; sourceTree = "<group>"; };
2829370A24E2D58500C84BA2 /* AutoComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoComplete.h; path = ../../src/AutoComplete.h; sourceTree = "<group>"; };
2829370B24E2D58500C84BA2 /* KeyMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyMap.cxx; path = ../../src/KeyMap.cxx; sourceTree = "<group>"; };
2829370C24E2D58500C84BA2 /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = "<group>"; };
2829370D24E2D58500C84BA2 /* Selection.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Selection.cxx; path = ../../src/Selection.cxx; sourceTree = "<group>"; };
2829370E24E2D58500C84BA2 /* ContractionState.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContractionState.cxx; path = ../../src/ContractionState.cxx; sourceTree = "<group>"; };
2829370F24E2D58500C84BA2 /* UniConversion.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniConversion.cxx; path = ../../src/UniConversion.cxx; sourceTree = "<group>"; };
2829371024E2D58500C84BA2 /* PerLine.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerLine.cxx; path = ../../src/PerLine.cxx; sourceTree = "<group>"; };
2829371124E2D58500C84BA2 /* SparseVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SparseVector.h; path = ../../src/SparseVector.h; sourceTree = "<group>"; };
2829371224E2D58500C84BA2 /* EditModel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditModel.cxx; path = ../../src/EditModel.cxx; sourceTree = "<group>"; };
2829371324E2D58600C84BA2 /* EditView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditView.h; path = ../../src/EditView.h; sourceTree = "<group>"; };
2829371424E2D58600C84BA2 /* CaseConvert.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CaseConvert.cxx; path = ../../src/CaseConvert.cxx; sourceTree = "<group>"; };
2829371524E2D58600C84BA2 /* CharClassify.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharClassify.cxx; path = ../../src/CharClassify.cxx; sourceTree = "<group>"; };
2829371624E2D58600C84BA2 /* AutoComplete.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoComplete.cxx; path = ../../src/AutoComplete.cxx; sourceTree = "<group>"; };
2829371724E2D58600C84BA2 /* ViewStyle.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStyle.cxx; path = ../../src/ViewStyle.cxx; sourceTree = "<group>"; };
2829371824E2D58600C84BA2 /* MarginView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = MarginView.cxx; path = ../../src/MarginView.cxx; sourceTree = "<group>"; };
2829371924E2D58600C84BA2 /* CellBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CellBuffer.h; path = ../../src/CellBuffer.h; sourceTree = "<group>"; };
2829371A24E2D58600C84BA2 /* Document.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Document.cxx; path = ../../src/Document.cxx; sourceTree = "<group>"; };
2829371B24E2D58600C84BA2 /* LineMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineMarker.h; path = ../../src/LineMarker.h; sourceTree = "<group>"; };
2829371C24E2D58600C84BA2 /* Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editor.h; path = ../../src/Editor.h; sourceTree = "<group>"; };
2829371D24E2D58600C84BA2 /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = "<group>"; };
2829371E24E2D58600C84BA2 /* ScintillaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaBase.h; path = ../../src/ScintillaBase.h; sourceTree = "<group>"; };
2829371F24E2D58700C84BA2 /* Partitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Partitioning.h; path = ../../src/Partitioning.h; sourceTree = "<group>"; };
2829372124E2D58700C84BA2 /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = "<group>"; };
2829372224E2D58700C84BA2 /* UniqueString.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniqueString.h; path = ../../src/UniqueString.h; sourceTree = "<group>"; };
2829372324E2D58700C84BA2 /* CaseConvert.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseConvert.h; path = ../../src/CaseConvert.h; sourceTree = "<group>"; };
2829372424E2D58700C84BA2 /* ScintillaBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScintillaBase.cxx; path = ../../src/ScintillaBase.cxx; sourceTree = "<group>"; };
2829372524E2D58700C84BA2 /* CaseFolder.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CaseFolder.h; path = ../../src/CaseFolder.h; sourceTree = "<group>"; };
2829372624E2D58700C84BA2 /* CellBuffer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CellBuffer.cxx; path = ../../src/CellBuffer.cxx; sourceTree = "<group>"; };
2829372724E2D58700C84BA2 /* EditModel.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = EditModel.h; path = ../../src/EditModel.h; sourceTree = "<group>"; };
2829372824E2D58700C84BA2 /* Editor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Editor.cxx; path = ../../src/Editor.cxx; sourceTree = "<group>"; };
2829372924E2D58700C84BA2 /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = "<group>"; };
2829372A24E2D58800C84BA2 /* RunStyles.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RunStyles.cxx; path = ../../src/RunStyles.cxx; sourceTree = "<group>"; };
2829372C24E2D58800C84BA2 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Document.h; path = ../../src/Document.h; sourceTree = "<group>"; };
2829372D24E2D58800C84BA2 /* EditView.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = EditView.cxx; path = ../../src/EditView.cxx; sourceTree = "<group>"; };
282937A924E2D60E00C84BA2 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../res; sourceTree = "<group>"; };
282937AF24E2D80E00C84BA2 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
2867917626BB448C007C2905 /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mac_cursor_busy.png; path = ../res/mac_cursor_busy.png; sourceTree = "<group>"; };
2867917726BB448C007C2905 /* mac_cursor_flipped@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "mac_cursor_flipped@2x.png"; path = "../res/mac_cursor_flipped@2x.png"; sourceTree = "<group>"; };
2867917826BB448C007C2905 /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = info_bar_bg.png; path = ../res/info_bar_bg.png; sourceTree = "<group>"; };
2867917926BB448C007C2905 /* mac_cursor_busy@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "mac_cursor_busy@2x.png"; path = "../res/mac_cursor_busy@2x.png"; sourceTree = "<group>"; };
2867917A26BB448C007C2905 /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = mac_cursor_flipped.png; path = ../res/mac_cursor_flipped.png; sourceTree = "<group>"; };
2867917B26BB448C007C2905 /* info_bar_bg@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "info_bar_bg@2x.png"; path = "../res/info_bar_bg@2x.png"; sourceTree = "<group>"; };
286F8E5F25F84F7400EC8D60 /* Sci_Position.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Sci_Position.h; path = ../../include/Sci_Position.h; sourceTree = "<group>"; };
286F8E6025F84F7400EC8D60 /* ILexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILexer.h; path = ../../include/ILexer.h; sourceTree = "<group>"; };
286F8E6125F84F7400EC8D60 /* ILoader.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ILoader.h; path = ../../include/ILoader.h; sourceTree = "<group>"; };
286F8E6225F84F7400EC8D60 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = "<group>"; };
286F8EDB260448C300EC8D60 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../src/Platform.h; sourceTree = "<group>"; };
286F8EDC260448C300EC8D60 /* Geometry.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Geometry.cxx; path = ../../src/Geometry.cxx; sourceTree = "<group>"; };
286F8EDD260448C300EC8D60 /* Geometry.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Geometry.h; path = ../../src/Geometry.h; sourceTree = "<group>"; };
287F3C41246F8DC70040E76F /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };
287F3C69246F90240040E76F /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = System/Library/Frameworks/Cocoa.framework; sourceTree = SDKROOT; };
287F3C6B246F90300040E76F /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; };
287F3E0F246F9AE50040E76F /* module.modulemap */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = "sourcecode.module-map"; path = module.modulemap; sourceTree = SOURCE_ROOT; };
28B962A32B6AF44F00ACCD96 /* UndoHistory.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UndoHistory.cxx; path = ../../src/UndoHistory.cxx; sourceTree = "<group>"; };
28B962A42B6AF44F00ACCD96 /* UndoHistory.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UndoHistory.h; path = ../../src/UndoHistory.h; sourceTree = "<group>"; };
28EA9CAA255894B4007710C4 /* CharacterCategoryMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterCategoryMap.cxx; path = ../../src/CharacterCategoryMap.cxx; sourceTree = "<group>"; };
28EA9CAB255894B4007710C4 /* CharacterType.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharacterType.cxx; path = ../../src/CharacterType.cxx; sourceTree = "<group>"; };
28EA9CAC255894B4007710C4 /* CharacterCategoryMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterCategoryMap.h; path = ../../src/CharacterCategoryMap.h; sourceTree = "<group>"; };
28EA9CAD255894B4007710C4 /* CharacterType.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterType.h; path = ../../src/CharacterType.h; sourceTree = "<group>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
287F3C3E246F8DC70040E76F /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
287F3C6C246F90300040E76F /* QuartzCore.framework in Frameworks */,
287F3C6A246F90240040E76F /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
287F3C37246F8DC70040E76F = {
isa = PBXGroup;
children = (
287F3C4D246F8E4A0040E76F /* Backend */,
287F3C4E246F8E560040E76F /* Classes */,
287F3C4F246F8E6E0040E76F /* Resources */,
287F3C42246F8DC70040E76F /* Products */,
287F3C68246F90240040E76F /* Frameworks */,
);
sourceTree = "<group>";
};
287F3C42246F8DC70040E76F /* Products */ = {
isa = PBXGroup;
children = (
287F3C41246F8DC70040E76F /* Scintilla.framework */,
);
name = Products;
sourceTree = "<group>";
};
287F3C4D246F8E4A0040E76F /* Backend */ = {
isa = PBXGroup;
children = (
2829371624E2D58600C84BA2 /* AutoComplete.cxx */,
2829370A24E2D58500C84BA2 /* AutoComplete.h */,
2829370624E2D58500C84BA2 /* CallTip.cxx */,
282936ED24E2D58400C84BA2 /* CallTip.h */,
2829371424E2D58600C84BA2 /* CaseConvert.cxx */,
2829372324E2D58700C84BA2 /* CaseConvert.h */,
282936F924E2D58400C84BA2 /* CaseFolder.cxx */,
2829372524E2D58700C84BA2 /* CaseFolder.h */,
2829372624E2D58700C84BA2 /* CellBuffer.cxx */,
2829371924E2D58600C84BA2 /* CellBuffer.h */,
2807B4E828964CA40063A31A /* ChangeHistory.cxx */,
2807B4E928964CA40063A31A /* ChangeHistory.h */,
28EA9CAA255894B4007710C4 /* CharacterCategoryMap.cxx */,
28EA9CAC255894B4007710C4 /* CharacterCategoryMap.h */,
28EA9CAB255894B4007710C4 /* CharacterType.cxx */,
28EA9CAD255894B4007710C4 /* CharacterType.h */,
2829371524E2D58600C84BA2 /* CharClassify.cxx */,
282936FE24E2D58400C84BA2 /* CharClassify.h */,
2829370E24E2D58500C84BA2 /* ContractionState.cxx */,
2829370724E2D58500C84BA2 /* ContractionState.h */,
282936EB24E2D58400C84BA2 /* DBCS.cxx */,
2829370924E2D58500C84BA2 /* DBCS.h */,
2829370824E2D58500C84BA2 /* Decoration.cxx */,
282936FF24E2D58400C84BA2 /* Decoration.h */,
2829371A24E2D58600C84BA2 /* Document.cxx */,
2829372C24E2D58800C84BA2 /* Document.h */,
2829371224E2D58500C84BA2 /* EditModel.cxx */,
2829372724E2D58700C84BA2 /* EditModel.h */,
2829372824E2D58700C84BA2 /* Editor.cxx */,
2829371C24E2D58600C84BA2 /* Editor.h */,
2829372D24E2D58800C84BA2 /* EditView.cxx */,
2829371324E2D58600C84BA2 /* EditView.h */,
282936EC24E2D58400C84BA2 /* ElapsedPeriod.h */,
286F8EDC260448C300EC8D60 /* Geometry.cxx */,
286F8EDD260448C300EC8D60 /* Geometry.h */,
286F8E6025F84F7400EC8D60 /* ILexer.h */,
286F8E6125F84F7400EC8D60 /* ILoader.h */,
282936F624E2D58400C84BA2 /* Indicator.cxx */,
282936FB24E2D58400C84BA2 /* Indicator.h */,
2829370B24E2D58500C84BA2 /* KeyMap.cxx */,
282936EF24E2D58400C84BA2 /* KeyMap.h */,
282936F024E2D58400C84BA2 /* LineMarker.cxx */,
2829371B24E2D58600C84BA2 /* LineMarker.h */,
2829371824E2D58600C84BA2 /* MarginView.cxx */,
282936F724E2D58400C84BA2 /* MarginView.h */,
2829371F24E2D58700C84BA2 /* Partitioning.h */,
2829371024E2D58500C84BA2 /* PerLine.cxx */,
282936FA24E2D58400C84BA2 /* PerLine.h */,
286F8EDB260448C300EC8D60 /* Platform.h */,
282936F824E2D58400C84BA2 /* Position.h */,
2829370224E2D58500C84BA2 /* PositionCache.cxx */,
282936EE24E2D58400C84BA2 /* PositionCache.h */,
2829370524E2D58500C84BA2 /* RESearch.cxx */,
282936F524E2D58400C84BA2 /* RESearch.h */,
2829372A24E2D58800C84BA2 /* RunStyles.cxx */,
282936F424E2D58400C84BA2 /* RunStyles.h */,
286F8E5F25F84F7400EC8D60 /* Sci_Position.h */,
286F8E6225F84F7400EC8D60 /* Scintilla.h */,
2829372424E2D58700C84BA2 /* ScintillaBase.cxx */,
2829371E24E2D58600C84BA2 /* ScintillaBase.h */,
2829370D24E2D58500C84BA2 /* Selection.cxx */,
2829372924E2D58700C84BA2 /* Selection.h */,
2829371124E2D58500C84BA2 /* SparseVector.h */,
2829372124E2D58700C84BA2 /* SplitVector.h */,
2829370424E2D58500C84BA2 /* Style.cxx */,
282936F224E2D58400C84BA2 /* Style.h */,
28B962A32B6AF44F00ACCD96 /* UndoHistory.cxx */,
28B962A42B6AF44F00ACCD96 /* UndoHistory.h */,
2829370F24E2D58500C84BA2 /* UniConversion.cxx */,
282936FC24E2D58400C84BA2 /* UniConversion.h */,
282936F324E2D58400C84BA2 /* UniqueString.cxx */,
2829372224E2D58700C84BA2 /* UniqueString.h */,
2829371724E2D58600C84BA2 /* ViewStyle.cxx */,
2829370C24E2D58500C84BA2 /* ViewStyle.h */,
282936FD24E2D58400C84BA2 /* XPM.cxx */,
2829371D24E2D58600C84BA2 /* XPM.h */,
);
name = Backend;
sourceTree = "<group>";
};
287F3C4E246F8E560040E76F /* Classes */ = {
isa = PBXGroup;
children = (
282936DA24E2D55D00C84BA2 /* InfoBar.h */,
282936D424E2D55D00C84BA2 /* InfoBar.mm */,
282936D924E2D55D00C84BA2 /* InfoBarCommunicator.h */,
287F3E0F246F9AE50040E76F /* module.modulemap */,
282936D824E2D55D00C84BA2 /* PlatCocoa.h */,
282936D724E2D55D00C84BA2 /* PlatCocoa.mm */,
282936D324E2D55D00C84BA2 /* QuartzTextLayout.h */,
282936DB24E2D55D00C84BA2 /* QuartzTextStyle.h */,
282936D524E2D55D00C84BA2 /* QuartzTextStyleAttribute.h */,
282936D624E2D55D00C84BA2 /* ScintillaCocoa.h */,
282936DD24E2D55D00C84BA2 /* ScintillaCocoa.mm */,
282936DE24E2D55D00C84BA2 /* ScintillaView.h */,
282936DC24E2D55D00C84BA2 /* ScintillaView.mm */,
);
name = Classes;
sourceTree = "<group>";
};
287F3C4F246F8E6E0040E76F /* Resources */ = {
isa = PBXGroup;
children = (
282937AF24E2D80E00C84BA2 /* Info.plist */,
2867917826BB448C007C2905 /* info_bar_bg.png */,
2867917B26BB448C007C2905 /* info_bar_bg@2x.png */,
2867917626BB448C007C2905 /* mac_cursor_busy.png */,
2867917926BB448C007C2905 /* mac_cursor_busy@2x.png */,
2867917A26BB448C007C2905 /* mac_cursor_flipped.png */,
2867917726BB448C007C2905 /* mac_cursor_flipped@2x.png */,
282937A924E2D60E00C84BA2 /* res */,
);
name = Resources;
sourceTree = "<group>";
};
287F3C68246F90240040E76F /* Frameworks */ = {
isa = PBXGroup;
children = (
287F3C6B246F90300040E76F /* QuartzCore.framework */,
287F3C69246F90240040E76F /* Cocoa.framework */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
287F3C3C246F8DC70040E76F /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
2829374C24E2D58800C84BA2 /* DBCS.h in Headers */,
2829373024E2D58800C84BA2 /* CallTip.h in Headers */,
2829374224E2D58800C84BA2 /* Decoration.h in Headers */,
2829375624E2D58800C84BA2 /* EditView.h in Headers */,
2829375424E2D58800C84BA2 /* SparseVector.h in Headers */,
286F8E6325F84F7400EC8D60 /* Sci_Position.h in Headers */,
2829373224E2D58800C84BA2 /* KeyMap.h in Headers */,
2829373E24E2D58800C84BA2 /* Indicator.h in Headers */,
286F8EDE260448C300EC8D60 /* Platform.h in Headers */,
2829375C24E2D58800C84BA2 /* CellBuffer.h in Headers */,
2829373F24E2D58800C84BA2 /* UniConversion.h in Headers */,
2829373D24E2D58800C84BA2 /* PerLine.h in Headers */,
2829373724E2D58800C84BA2 /* RunStyles.h in Headers */,
28EA9CB0255894B4007710C4 /* CharacterCategoryMap.h in Headers */,
282936E624E2D55D00C84BA2 /* InfoBar.h in Headers */,
2829375E24E2D58800C84BA2 /* LineMarker.h in Headers */,
2829376824E2D58800C84BA2 /* CaseFolder.h in Headers */,
286F8E6425F84F7400EC8D60 /* ILexer.h in Headers */,
2829376524E2D58800C84BA2 /* UniqueString.h in Headers */,
2829375F24E2D58800C84BA2 /* Editor.h in Headers */,
2829376624E2D58800C84BA2 /* CaseConvert.h in Headers */,
2829374F24E2D58800C84BA2 /* ViewStyle.h in Headers */,
282936DF24E2D55D00C84BA2 /* QuartzTextLayout.h in Headers */,
2829376A24E2D58800C84BA2 /* EditModel.h in Headers */,
282936E724E2D55D00C84BA2 /* QuartzTextStyle.h in Headers */,
2829376F24E2D58800C84BA2 /* Document.h in Headers */,
2829374A24E2D58800C84BA2 /* ContractionState.h in Headers */,
2829376024E2D58800C84BA2 /* XPM.h in Headers */,
28B962A62B6AF44F00ACCD96 /* UndoHistory.h in Headers */,
2829372F24E2D58800C84BA2 /* ElapsedPeriod.h in Headers */,
28EA9CB1255894B4007710C4 /* CharacterType.h in Headers */,
2829373A24E2D58800C84BA2 /* MarginView.h in Headers */,
286F8E6525F84F7400EC8D60 /* ILoader.h in Headers */,
282936EA24E2D55D00C84BA2 /* ScintillaView.h in Headers */,
282936E124E2D55D00C84BA2 /* QuartzTextStyleAttribute.h in Headers */,
2829376224E2D58800C84BA2 /* Partitioning.h in Headers */,
286F8E6625F84F7400EC8D60 /* Scintilla.h in Headers */,
2829376424E2D58800C84BA2 /* SplitVector.h in Headers */,
2829373B24E2D58800C84BA2 /* Position.h in Headers */,
282936E224E2D55D00C84BA2 /* ScintillaCocoa.h in Headers */,
2829373524E2D58800C84BA2 /* Style.h in Headers */,
282936E424E2D55D00C84BA2 /* PlatCocoa.h in Headers */,
2807B4EB28964CA40063A31A /* ChangeHistory.h in Headers */,
2829376C24E2D58800C84BA2 /* Selection.h in Headers */,
2829376124E2D58800C84BA2 /* ScintillaBase.h in Headers */,
2829373824E2D58800C84BA2 /* RESearch.h in Headers */,
282936E524E2D55D00C84BA2 /* InfoBarCommunicator.h in Headers */,
2829374D24E2D58800C84BA2 /* AutoComplete.h in Headers */,
2829374124E2D58800C84BA2 /* CharClassify.h in Headers */,
2829373124E2D58800C84BA2 /* PositionCache.h in Headers */,
286F8EE0260448C300EC8D60 /* Geometry.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
287F3C40246F8DC70040E76F /* Scintilla */ = {
isa = PBXNativeTarget;
buildConfigurationList = 287F3C49246F8DC70040E76F /* Build configuration list for PBXNativeTarget "Scintilla" */;
buildPhases = (
287F3C3C246F8DC70040E76F /* Headers */,
287F3C3F246F8DC70040E76F /* Resources */,
287F3C3D246F8DC70040E76F /* Sources */,
287F3C3E246F8DC70040E76F /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Scintilla;
productName = Scintilla;
productReference = 287F3C41246F8DC70040E76F /* Scintilla.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
287F3C38246F8DC70040E76F /* Project object */ = {
isa = PBXProject;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1500;
ORGANIZATIONNAME = "Neil Hodgson";
TargetAttributes = {
287F3C40246F8DC70040E76F = {
CreatedOnToolsVersion = 11.4.1;
};
};
};
buildConfigurationList = 287F3C3B246F8DC70040E76F /* Build configuration list for PBXProject "Scintilla" */;
compatibilityVersion = "Xcode 9.3";
developmentRegion = en;
hasScannedForEncodings = 0;
knownRegions = (
en,
Base,
);
mainGroup = 287F3C37246F8DC70040E76F;
productRefGroup = 287F3C42246F8DC70040E76F /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
287F3C40246F8DC70040E76F /* Scintilla */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
287F3C3F246F8DC70040E76F /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2867917C26BB448C007C2905 /* mac_cursor_busy.png in Resources */,
2867918126BB448C007C2905 /* info_bar_bg@2x.png in Resources */,
282937AA24E2D60E00C84BA2 /* res in Resources */,
2867917F26BB448C007C2905 /* mac_cursor_busy@2x.png in Resources */,
2867917E26BB448C007C2905 /* info_bar_bg.png in Resources */,
2867918026BB448C007C2905 /* mac_cursor_flipped.png in Resources */,
2867917D26BB448C007C2905 /* mac_cursor_flipped@2x.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
287F3C3D246F8DC70040E76F /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2829375024E2D58800C84BA2 /* Selection.cxx in Sources */,
2829375224E2D58800C84BA2 /* UniConversion.cxx in Sources */,
282936E324E2D55D00C84BA2 /* PlatCocoa.mm in Sources */,
282936E924E2D55D00C84BA2 /* ScintillaCocoa.mm in Sources */,
2829372E24E2D58800C84BA2 /* DBCS.cxx in Sources */,
2829375924E2D58800C84BA2 /* AutoComplete.cxx in Sources */,
2829375724E2D58800C84BA2 /* CaseConvert.cxx in Sources */,
2829374524E2D58800C84BA2 /* PositionCache.cxx in Sources */,
2829375B24E2D58800C84BA2 /* MarginView.cxx in Sources */,
2829373924E2D58800C84BA2 /* Indicator.cxx in Sources */,
2829375D24E2D58800C84BA2 /* Document.cxx in Sources */,
2829375524E2D58800C84BA2 /* EditModel.cxx in Sources */,
2829375124E2D58800C84BA2 /* ContractionState.cxx in Sources */,
2829374924E2D58800C84BA2 /* CallTip.cxx in Sources */,
2807B4EA28964CA40063A31A /* ChangeHistory.cxx in Sources */,
2829375824E2D58800C84BA2 /* CharClassify.cxx in Sources */,
2829373324E2D58800C84BA2 /* LineMarker.cxx in Sources */,
2829374E24E2D58800C84BA2 /* KeyMap.cxx in Sources */,
2829376D24E2D58800C84BA2 /* RunStyles.cxx in Sources */,
28EA9CAF255894B4007710C4 /* CharacterType.cxx in Sources */,
2829376B24E2D58800C84BA2 /* Editor.cxx in Sources */,
2829373C24E2D58800C84BA2 /* CaseFolder.cxx in Sources */,
2829374824E2D58800C84BA2 /* RESearch.cxx in Sources */,
2829377024E2D58800C84BA2 /* EditView.cxx in Sources */,
28B962A52B6AF44F00ACCD96 /* UndoHistory.cxx in Sources */,
2829376724E2D58800C84BA2 /* ScintillaBase.cxx in Sources */,
2829374724E2D58800C84BA2 /* Style.cxx in Sources */,
2829375A24E2D58800C84BA2 /* ViewStyle.cxx in Sources */,
282936E024E2D55D00C84BA2 /* InfoBar.mm in Sources */,
28EA9CAE255894B4007710C4 /* CharacterCategoryMap.cxx in Sources */,
2829374024E2D58800C84BA2 /* XPM.cxx in Sources */,
2829374B24E2D58800C84BA2 /* Decoration.cxx in Sources */,
286F8EDF260448C300EC8D60 /* Geometry.cxx in Sources */,
2829373624E2D58800C84BA2 /* UniqueString.cxx in Sources */,
282936E824E2D55D00C84BA2 /* ScintillaView.mm in Sources */,
2829376924E2D58800C84BA2 /* CellBuffer.cxx in Sources */,
2829375324E2D58800C84BA2 /* PerLine.cxx in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin XCBuildConfiguration section */
287F3C47246F8DC70040E76F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 5.5.0;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = dwarf;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_DYNAMIC_NO_PIC = NO;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PREPROCESSOR_DEFINITIONS = (
DEBUG,
"$(inherited)",
);
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = INCLUDE_SOURCE;
MTL_FAST_MATH = YES;
ONLY_ACTIVE_ARCH = YES;
"OTHER_LDFLAGS[arch=*]" = "-Wl,-ld_classic";
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Debug;
};
287F3C48246F8DC70040E76F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ANALYZER_NONNULL = YES;
CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE;
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_CXX_LIBRARY = "libc++";
CLANG_ENABLE_MODULES = YES;
CLANG_ENABLE_OBJC_ARC = YES;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_DIRECT_OBJC_ISA_USAGE = YES_ERROR;
CLANG_WARN_DOCUMENTATION_COMMENTS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_OBJC_ROOT_CLASS = YES_ERROR;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNGUARDED_AVAILABILITY = YES_AGGRESSIVE;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
COPY_PHASE_STRIP = NO;
CURRENT_PROJECT_VERSION = 5.5.0;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
ENABLE_NS_ASSERTIONS = NO;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = gnu11;
GCC_NO_COMMON_BLOCKS = YES;
GCC_PREPROCESSOR_DEFINITIONS = NDEBUG;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES_ERROR;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES_AGGRESSIVE;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
MTL_ENABLE_DEBUG_INFO = NO;
MTL_FAST_MATH = YES;
"OTHER_LDFLAGS[arch=*]" = "-Wl,-ld_classic";
SDKROOT = macosx;
VERSIONING_SYSTEM = "apple-generic";
VERSION_INFO_PREFIX = "";
};
name = Release;
};
287F3C4A246F8DC70040E76F /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_WARN_UNGUARDED_AVAILABILITY = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 5.5.0;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREPROCESSOR_DEFINITIONS = DEBUG;
HEADER_SEARCH_PATHS = (
../../include,
../../src,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Scintilla;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Debug;
};
287F3C4B246F8DC70040E76F /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_CXX_LANGUAGE_STANDARD = "c++17";
CLANG_WARN_UNGUARDED_AVAILABILITY = YES;
CODE_SIGN_IDENTITY = "-";
CODE_SIGN_STYLE = Manual;
COMBINE_HIDPI_IMAGES = YES;
CURRENT_PROJECT_VERSION = 5.5.0;
DEAD_CODE_STRIPPING = YES;
DEFINES_MODULE = YES;
DEVELOPMENT_TEAM = "";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
DYLIB_INSTALL_NAME_BASE = "@rpath";
GCC_PREPROCESSOR_DEFINITIONS = NDEBUG;
HEADER_SEARCH_PATHS = (
../../include,
../../src,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks";
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/../Frameworks",
"@loader_path/Frameworks",
);
MACOSX_DEPLOYMENT_TARGET = 10.13;
PRODUCT_BUNDLE_IDENTIFIER = org.scintilla.Scintilla;
PRODUCT_NAME = "$(TARGET_NAME:c99extidentifier)";
PROVISIONING_PROFILE_SPECIFIER = "";
SKIP_INSTALL = YES;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
287F3C3B246F8DC70040E76F /* Build configuration list for PBXProject "Scintilla" */ = {
isa = XCConfigurationList;
buildConfigurations = (
287F3C47246F8DC70040E76F /* Debug */,
287F3C48246F8DC70040E76F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
287F3C49246F8DC70040E76F /* Build configuration list for PBXNativeTarget "Scintilla" */ = {
isa = XCConfigurationList;
buildConfigurations = (
287F3C4A246F8DC70040E76F /* Debug */,
287F3C4B246F8DC70040E76F /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 287F3C38246F8DC70040E76F /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:Scintilla.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,10 @@
framework module Scintilla {
umbrella header "ScintillaView.h"
module InfoBar {
header "InfoBar.h"
}
// ILexer.h is not included as Swift doesn't yet interoperate with C++
exclude header "ILexer.h"
export *
module * { export * }
}

View File

@ -0,0 +1,270 @@
/*
* ScintillaCocoa.h
*
* Mike Lischke <mlischke@sun.com>
*
* Based on ScintillaMacOSX.h
* Original code by Evan Jones on Sun Sep 01 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#include <cstddef>
#include <cstdlib>
#include <cstdint>
#include <cstdio>
#include <ctime>
#include <stdexcept>
#include <string>
#include <vector>
#include <map>
#include <set>
#include <memory>
#include "ILoader.h"
#include "ILexer.h"
#include "CharacterCategoryMap.h"
#include "Position.h"
#include "UniqueString.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 "LineMarker.h"
#include "Style.h"
#include "ViewStyle.h"
#include "CharClassify.h"
#include "Decoration.h"
#include "CaseFolder.h"
#include "Document.h"
#include "CaseConvert.h"
#include "UniConversion.h"
#include "DBCS.h"
#include "Selection.h"
#include "PositionCache.h"
#include "EditModel.h"
#include "MarginView.h"
#include "EditView.h"
#include "Editor.h"
#include "AutoComplete.h"
#include "ScintillaBase.h"
extern "C" NSString *ScintillaRecPboardType;
@class SCIContentView;
@class SCIMarginView;
@class ScintillaView;
@class FindHighlightLayer;
/**
* 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::Internal {
CGContextRef CGContextCurrent();
/**
* Main scintilla class, implemented for macOS (Cocoa).
*/
class ScintillaCocoa : public ScintillaBase {
private:
__weak ScintillaView *sciView;
TimerTarget *timerTarget;
NSEvent *lastMouseEvent;
__weak id<ScintillaNotificationProtocol> delegate;
SciNotifyFunc notifyProc;
intptr_t notifyObj;
bool capturedMouse;
bool isFirstResponder;
bool isActive;
Point sizeClient;
bool enteredSetScrollingSize;
bool GetPasteboardData(NSPasteboard *board, SelectionText *selectedText);
void SetPasteboardData(NSPasteboard *board, const SelectionText &selectedText);
Sci::Position TargetAsUTF8(char *text) const;
Sci::Position EncodedFromUTF8(const char *utf8, char *encoded) const;
int scrollSpeed;
int scrollTicks;
CFRunLoopObserverRef observer;
FindHighlightLayer *layerFindIndicator;
protected:
Point GetVisibleOriginInMain() const override;
Point ClientSize() const override;
PRectangle GetClientRectangle() const override;
PRectangle GetClientDrawingRectangle() override;
Point ConvertPoint(NSPoint point);
void RedrawRect(PRectangle rc) override;
void DiscardOverdraw() override;
void Redraw() override;
void Init();
std::unique_ptr<CaseFolder> CaseFolderForEncoding() override;
std::string CaseMapString(const std::string &s, CaseMapping caseMapping) override;
void CancelModes() override;
public:
ScintillaCocoa(ScintillaView *sciView_, SCIContentView *viewContent, SCIMarginView *viewMargin);
// Deleted so ScintillaCocoa objects can not be copied.
ScintillaCocoa(const ScintillaCocoa &) = delete;
ScintillaCocoa &operator=(const ScintillaCocoa &) = delete;
~ScintillaCocoa() override;
void Finalise() override;
void SetDelegate(id<ScintillaNotificationProtocol> delegate_);
void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
sptr_t WndProc(Scintilla::Message iMessage, uptr_t wParam, sptr_t lParam) override;
NSScrollView *ScrollContainer() const;
SCIContentView *ContentView();
bool SyncPaint(void *gc, PRectangle rc);
bool Draw(NSRect rect, CGContextRef gc);
void PaintMargin(NSRect aRect);
sptr_t DefWndProc(Scintilla::Message iMessage, uptr_t wParam, sptr_t lParam) override;
void TickFor(TickReason reason) override;
bool FineTickerRunning(TickReason reason) override;
void FineTickerStart(TickReason reason, int millis, int tolerance) override;
void FineTickerCancel(TickReason reason) override;
bool SetIdle(bool on) override;
void SetMouseCapture(bool on) override;
bool HaveMouseCapture() override;
void WillDraw(NSRect rect);
void ScrollText(Sci::Line linesToMove) override;
void SetVerticalScrollPos() override;
void SetHorizontalScrollPos() override;
bool ModifyScrollBars(Sci::Line nMax, Sci::Line nPage) override;
bool SetScrollingSize();
void Resize();
void UpdateForScroll();
// Notifications for the owner.
void NotifyChange() override;
void NotifyFocus(bool focus) override;
void NotifyParent(Scintilla::NotificationData scn) override;
void NotifyURIDropped(const char *uri);
bool HasSelection();
bool CanUndo();
bool CanRedo();
void CopyToClipboard(const SelectionText &selectedText) override;
void Copy() override;
bool CanPaste() override;
void Paste() override;
void Paste(bool rectangular);
void CTPaint(void *gc, NSRect rc);
void CallTipMouseDown(NSPoint pt);
void CreateCallTipWindow(PRectangle rc) override;
void AddToPopUp(const char *label, int cmd = 0, bool enabled = true) override;
void ClaimSelection() override;
NSPoint GetCaretPosition();
std::string UTF8FromEncoded(std::string_view encoded) const override;
std::string EncodedFromUTF8(std::string_view utf8) const override;
static sptr_t DirectFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
static sptr_t DirectStatusFunction(sptr_t ptr, unsigned int iMessage, uptr_t wParam, sptr_t lParam, int *pStatus);
NSTimer *timers[static_cast<size_t>(TickReason::platform)+1];
void TimerFired(NSTimer *timer);
void IdleTimerFired();
static void UpdateObserver(CFRunLoopObserverRef observer, CFRunLoopActivity activity, void *sci);
void ObserverAdd();
void ObserverRemove();
void IdleWork() override;
void QueueIdleWork(WorkItems items, Sci::Position upTo) override;
ptrdiff_t InsertText(NSString *input, Scintilla::CharacterSource charSource);
NSRange PositionsFromCharacters(NSRange rangeCharacters) const;
NSRange CharactersFromPositions(NSRange rangePositions) const;
NSString *RangeTextAsString(NSRange rangePositions) const;
NSInteger VisibleLineForIndex(NSInteger index);
NSRange RangeForVisibleLine(NSInteger lineVisible);
NSRect FrameForRange(NSRange rangeCharacters);
NSRect GetBounds() const;
void SelectOnlyMainSelection();
void ConvertSelectionVirtualSpace();
bool ClearAllSelections();
void CompositionStart();
void CompositionCommit();
void CompositionUndo();
void SetDocPointer(Document *document) override;
bool KeyboardInput(NSEvent *event);
void MouseDown(NSEvent *event);
void RightMouseDown(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() override;
bool GetDragData(id <NSDraggingInfo> info, NSPasteboard &pasteBoard, SelectionText *selectedText);
NSDragOperation DraggingEntered(id <NSDraggingInfo> info);
NSDragOperation DraggingUpdated(id <NSDraggingInfo> info);
void DraggingExited(id <NSDraggingInfo> info);
bool PerformDragOperation(id <NSDraggingInfo> info);
void DragScroll();
// Promote some methods needed for NSResponder actions.
void SelectAll() override;
void DeleteBackward();
void Cut() override;
void Undo() override;
void Redo() override;
bool ShouldDisplayPopupOnMargin();
bool ShouldDisplayPopupOnText();
NSMenu *CreateContextMenu(NSEvent *event);
void HandleCommand(NSInteger command);
void SetFirstResponder(bool isFirstResponder_);
void ActiveStateChanged(bool isActive_);
void SetFocusActiveState();
void UpdateBaseElements() override;
void WindowWillMove();
// Find indicator
void ShowFindIndicatorForRange(NSRange charRange, BOOL retaining);
void MoveFindIndicatorWithBounce(BOOL bounce);
void HideFindIndicator();
};
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
/**
* 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>
#include <dlfcn.h>
#import "Scintilla/ILexer.h"
#import "Scintilla/ScintillaView.h"
#import "Scintilla/InfoBar.h"
#include <SciLexer.h>
#include <Lexilla.h>
@interface AppController : NSObject {
IBOutlet NSBox *mEditHost;
ScintillaView* mEditor;
ScintillaView* sciExtra; // For testing Scintilla tear-down
}
- (void) awakeFromNib;
- (void) setupEditor;
- (IBAction) searchText: (id) sender;
- (IBAction) addRemoveExtra: (id) sender;
@end

View File

@ -0,0 +1,321 @@
/**
* AppController.mm
* ScintillaTest
*
* Created by Mike Lischke on 01.04.09.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#import "AppController.h"
const char major_keywords[] =
"accessible add all alter analyze and as asc asensitive "
"before between bigint binary blob both by "
"call cascade case change char character check collate column condition connection constraint "
"continue convert create cross current_date current_time current_timestamp current_user cursor "
"database databases day_hour day_microsecond day_minute day_second dec decimal declare default "
"delayed delete desc describe deterministic distinct distinctrow div double drop dual "
"each else elseif enclosed escaped exists exit explain "
"false fetch float float4 float8 for force foreign from fulltext "
"goto grant group "
"having high_priority hour_microsecond hour_minute hour_second "
"if ignore in index infile inner inout insensitive insert int int1 int2 int3 int4 int8 integer "
"interval into is iterate "
"join "
"key keys kill "
"label leading leave left like limit linear lines load localtime localtimestamp lock long "
"longblob longtext loop low_priority "
"master_ssl_verify_server_cert match mediumblob mediumint mediumtext middleint minute_microsecond "
"minute_second mod modifies "
"natural not no_write_to_binlog null numeric "
"on optimize option optionally or order out outer outfile "
"precision primary procedure purge "
"range read reads read_only read_write real references regexp release rename repeat replace "
"require restrict return revoke right rlike "
"schema schemas second_microsecond select sensitive separator set show smallint spatial specific "
"sql sqlexception sqlstate sqlwarning sql_big_result sql_calc_found_rows sql_small_result ssl "
"starting straight_join "
"table terminated then tinyblob tinyint tinytext to trailing trigger true "
"undo union unique unlock unsigned update upgrade usage use using utc_date utc_time utc_timestamp "
"values varbinary varchar varcharacter varying "
"when where while with write "
"xor "
"year_month "
"zerofill";
const char procedure_keywords[] = // Not reserved words but intrinsic part of procedure definitions.
"begin comment end";
const char client_keywords[] = // Definition of keywords only used by clients, not the server itself.
"delimiter";
const char user_keywords[] = // Definition of own keywords, not used by MySQL.
"edit";
//--------------------------------------------------------------------------------------------------
@implementation AppController
- (void) awakeFromNib
{
// Manually set up the scintilla editor. Create an instance and dock it to our edit host.
// Leave some free space around the new view to avoid overlapping with the box borders.
NSRect newFrame = mEditHost.frame;
newFrame.size.width -= 2 * newFrame.origin.x;
newFrame.size.height -= 3 * newFrame.origin.y;
mEditor = [[[ScintillaView alloc] initWithFrame: newFrame] autorelease];
[mEditHost.contentView addSubview: mEditor];
[mEditor setAutoresizesSubviews: YES];
[mEditor setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
// Let's load some text for the editor, as initial content.
NSString *sql = [self exampleText];
[mEditor setString: sql];
[self setupEditor];
sciExtra = nil;
}
- (NSString *) exampleText
{
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);
return sql;
}
//--------------------------------------------------------------------------------------------------
/**
* Initialize scintilla editor (styles, colors, markers, folding etc.].
*/
- (void) setupEditor
{
// Lexer type is MySQL.
void *lexillaDL = dlopen(LEXILLA_LIB LEXILLA_EXTENSION, RTLD_LAZY);
if (lexillaDL) {
Lexilla::CreateLexerFn createLexer =
reinterpret_cast<Lexilla::CreateLexerFn>(dlsym(lexillaDL, LEXILLA_CREATELEXER));
if (createLexer) {
Scintilla::ILexer5 *pLexer = createLexer("mysql");
[mEditor setReferenceProperty: SCI_SETILEXER parameter: nil value: pLexer];
}
}
[mEditor suspendDrawing: TRUE];
// 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: @"Helvetica"];
// [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 setGeneralProperty: SCI_STYLECLEARALL parameter: 0 value: 0];
[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]];
[mEditor setGeneralProperty: SCI_SETMULTIPLESELECTION parameter: 1 value: 0];
// Uncomment if you wanna see auto wrapping in action.
//[mEditor setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 0];
[mEditor suspendDrawing: FALSE];
InfoBar* infoBar = [[[InfoBar alloc] initWithFrame: NSMakeRect(0, 0, 400, 0)] autorelease];
[infoBar setDisplay: IBShowAll];
[mEditor setInfoBar: infoBar top: NO];
[mEditor setStatusText: @"Operation complete"];
}
//--------------------------------------------------------------------------------------------------
/* XPM */
static const char * box_xpm[] = {
"12 12 2 1",
" c None",
". c #800000",
" .........",
" . . ..",
" . . . .",
"......... .",
". . . .",
". . . ..",
". . .. .",
"......... .",
". . . .",
". . . . ",
". . .. ",
"......... "};
- (void) showAutocompletion
{
const char *words = "Babylon-5?1 Battlestar-Galactica Millennium-Falcon?2 Moya?2 Serenity Voyager";
[mEditor setGeneralProperty: SCI_AUTOCSETIGNORECASE parameter: 1 value:0];
[mEditor setGeneralProperty: SCI_REGISTERIMAGE parameter: 1 value:(sptr_t)box_xpm];
const int imSize = 12;
[mEditor setGeneralProperty: SCI_RGBAIMAGESETWIDTH parameter: imSize value:0];
[mEditor setGeneralProperty: SCI_RGBAIMAGESETHEIGHT parameter: imSize value:0];
char image[imSize * imSize * 4];
for (size_t y = 0; y < imSize; y++) {
for (size_t x = 0; x < imSize; x++) {
char *p = image + (y * imSize + x) * 4;
p[0] = 0xFF;
p[1] = 0xA0;
p[2] = 0;
p[3] = x * 23;
}
}
[mEditor setGeneralProperty: SCI_REGISTERRGBAIMAGE parameter: 2 value:(sptr_t)image];
[mEditor setGeneralProperty: SCI_AUTOCSHOW parameter: 0 value:(sptr_t)words];
}
- (IBAction) searchText: (id) sender
{
NSSearchField* searchField = (NSSearchField*) sender;
[mEditor findAndHighlightText: [searchField stringValue]
matchCase: NO
wholeWord: NO
scrollTo: YES
wrap: YES];
long matchStart = [mEditor getGeneralProperty: SCI_GETSELECTIONSTART parameter: 0];
long matchEnd = [mEditor getGeneralProperty: SCI_GETSELECTIONEND parameter: 0];
[mEditor setGeneralProperty: SCI_FINDINDICATORFLASH parameter: matchStart value:matchEnd];
if ([[searchField stringValue] isEqualToString: @"XX"])
[self showAutocompletion];
}
- (IBAction) addRemoveExtra: (id) sender
{
if (sciExtra) {
[sciExtra removeFromSuperview];
sciExtra = nil;
} else {
NSRect newFrame = mEditHost.frame;
newFrame.origin.x += newFrame.size.width + 5;
newFrame.origin.y += 46;
newFrame.size.width = 96;
newFrame.size.height -= 60;
sciExtra = [[[ScintillaView alloc] initWithFrame: newFrame] autorelease];
[[[mEditHost window]contentView] addSubview: sciExtra];
[sciExtra setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 1];
NSString *sql = [self exampleText];
[sciExtra setString: sql];
}
}
-(IBAction) setFontQuality: (id) sender
{
[ScintillaView directCall:mEditor message:SCI_SETFONTQUALITY wParam:[sender tag] lParam:0];
}
@end
//--------------------------------------------------------------------------------------------------

View File

@ -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>$(PRODUCT_BUNDLE_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>

View File

@ -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>

View File

@ -0,0 +1,474 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 54;
objects = {
/* Begin PBXBuildFile section */
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
271FA52C0F850BE20033D021 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 271FA52B0F850BE20033D021 /* AppController.mm */; };
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */ = {isa = PBXBuildFile; fileRef = 2791F4480FC1A8E9009DBCF9 /* TestData.sql */; };
286F8E5125F8474400EC8D60 /* Scintilla.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 286F8E4E25F845B000EC8D60 /* Scintilla.framework */; };
286F8E5225F8474400EC8D60 /* Scintilla.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 286F8E4E25F845B000EC8D60 /* Scintilla.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; };
286F8E7525F8506B00EC8D60 /* liblexilla.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 286F8E7325F8504800EC8D60 /* liblexilla.dylib */; };
286F8E7625F8506B00EC8D60 /* liblexilla.dylib in CopyFiles */ = {isa = PBXBuildFile; fileRef = 286F8E7325F8504800EC8D60 /* liblexilla.dylib */; settings = {ATTRIBUTES = (CodeSignOnCopy, ); }; };
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 */
286F8E4D25F845B000EC8D60 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 287F3C41246F8DC70040E76F;
remoteInfo = Scintilla;
};
286F8E7225F8504800EC8D60 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 280262A5246DF655000DF3B8;
remoteInfo = lexilla;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
272133C20F973596006BE49A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
286F8E7625F8506B00EC8D60 /* liblexilla.dylib in CopyFiles */,
286F8E5225F8474400EC8D60 /* Scintilla.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
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>"; };
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; };
2791F4480FC1A8E9009DBCF9 /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = "<group>"; };
286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Scintilla.xcodeproj; path = ../Scintilla/Scintilla.xcodeproj; sourceTree = "<group>"; };
286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = Lexilla.xcodeproj; path = ../../../lexilla/src/Lexilla/Lexilla.xcodeproj; sourceTree = "<group>"; };
28E78A40224C33FE00456881 /* en */ = {isa = PBXFileReference; lastKnownFileType = text.plist.strings; name = en; path = en.lproj/InfoPlist.strings; sourceTree = "<group>"; };
28E78A41224C33FE00456881 /* en */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = en; path = en.lproj/MainMenu.xib; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScintillaTest_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* ScintillaTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScintillaTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
286F8E5125F8474400EC8D60 /* Scintilla.framework in Frameworks */,
286F8E7525F8506B00EC8D60 /* liblexilla.dylib in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
271FA52A0F850BE20033D021 /* AppController.h */,
271FA52B0F850BE20033D021 /* AppController.mm */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* ScintillaTest.app */,
);
name = Products;
sourceTree = "<group>";
};
286F8E4A25F845B000EC8D60 /* Products */ = {
isa = PBXGroup;
children = (
286F8E4E25F845B000EC8D60 /* Scintilla.framework */,
);
name = Products;
sourceTree = "<group>";
};
286F8E6F25F8504800EC8D60 /* Products */ = {
isa = PBXGroup;
children = (
286F8E7325F8504800EC8D60 /* liblexilla.dylib */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* ScintillaTest */ = {
isa = PBXGroup;
children = (
286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */,
286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = ScintillaTest;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
2791F4480FC1A8E9009DBCF9 /* TestData.sql */,
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* ScintillaTest */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */;
buildPhases = (
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
272133C20F973596006BE49A /* CopyFiles */,
);
buildRules = (
);
dependencies = (
);
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;
attributes = {
BuildIndependentTargetsInParallel = YES;
LastUpgradeCheck = 1500;
};
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
compatibilityVersion = "Xcode 3.2";
developmentRegion = en;
hasScannedForEncodings = 1;
knownRegions = (
Base,
en,
);
mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 286F8E6F25F8504800EC8D60 /* Products */;
ProjectRef = 286F8E6E25F8504800EC8D60 /* Lexilla.xcodeproj */;
},
{
ProductGroup = 286F8E4A25F845B000EC8D60 /* Products */;
ProjectRef = 286F8E4925F845B000EC8D60 /* Scintilla.xcodeproj */;
},
);
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* ScintillaTest */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
286F8E4E25F845B000EC8D60 /* Scintilla.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Scintilla.framework;
remoteRef = 286F8E4D25F845B000EC8D60 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
286F8E7325F8504800EC8D60 /* liblexilla.dylib */ = {
isa = PBXReferenceProxy;
fileType = "compiled.mach-o.dylib";
path = liblexilla.dylib;
remoteRef = 286F8E7225F8504800EC8D60 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
271FA52C0F850BE20033D021 /* AppController.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
28E78A40224C33FE00456881 /* en */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
28E78A41224C33FE00456881 /* en */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
COPY_PHASE_STRIP = NO;
DEAD_CODE_STRIPPING = YES;
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_DYNAMIC_NO_PIC = NO;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = SCI_LEXER;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LD_RUNPATH_SEARCH_PATHS = (
"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST))",
"@executable_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.sun.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = ScintillaTest;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "";
};
name = Debug;
};
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
CLANG_ENABLE_OBJC_WEAK = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CODE_SIGN_IDENTITY = "-";
COMBINE_HIDPI_IMAGES = YES;
DEAD_CODE_STRIPPING = YES;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = "$(inherited)";
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = SCI_LEXER;
HEADER_SEARCH_PATHS = "";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LD_RUNPATH_SEARCH_PATHS = (
"$(LD_RUNPATH_SEARCH_PATHS_$(IS_MACCATALYST))",
"@executable_path/../Frameworks",
);
LIBRARY_SEARCH_PATHS = "$(inherited)";
MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_LDFLAGS = "";
PRODUCT_BUNDLE_IDENTIFIER = "com.sun.${PRODUCT_NAME:identifier}";
PRODUCT_NAME = ScintillaTest;
SDKROOT = macosx;
USER_HEADER_SEARCH_PATHS = "";
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_TESTABILITY = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
SDKROOT = macosx;
SYSTEM_HEADER_SEARCH_PATHS = "../../../lexilla/**";
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
CLANG_ANALYZER_LOCALIZABILITY_NONLOCALIZED = YES;
CLANG_WARN_BLOCK_CAPTURE_AUTORELEASING = YES;
CLANG_WARN_BOOL_CONVERSION = YES;
CLANG_WARN_COMMA = YES;
CLANG_WARN_CONSTANT_CONVERSION = YES;
CLANG_WARN_DEPRECATED_OBJC_IMPLEMENTATIONS = YES;
CLANG_WARN_EMPTY_BODY = YES;
CLANG_WARN_ENUM_CONVERSION = YES;
CLANG_WARN_INFINITE_RECURSION = YES;
CLANG_WARN_INT_CONVERSION = YES;
CLANG_WARN_NON_LITERAL_NULL_CONVERSION = YES;
CLANG_WARN_OBJC_IMPLICIT_RETAIN_SELF = YES;
CLANG_WARN_OBJC_LITERAL_CONVERSION = YES;
CLANG_WARN_QUOTED_INCLUDE_IN_FRAMEWORK_HEADER = NO;
CLANG_WARN_RANGE_LOOP_ANALYSIS = YES;
CLANG_WARN_STRICT_PROTOTYPES = YES;
CLANG_WARN_SUSPICIOUS_MOVE = YES;
CLANG_WARN_UNREACHABLE_CODE = YES;
CLANG_WARN__DUPLICATE_METHOD_MATCH = YES;
DEAD_CODE_STRIPPING = YES;
ENABLE_STRICT_OBJC_MSGSEND = YES;
ENABLE_USER_SCRIPT_SANDBOXING = YES;
GCC_C_LANGUAGE_STANDARD = c99;
GCC_NO_COMMON_BLOCKS = YES;
GCC_VERSION = com.apple.compilers.llvm.clang.1_0;
GCC_WARN_64_TO_32_BIT_CONVERSION = YES;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNDECLARED_SELECTOR = YES;
GCC_WARN_UNINITIALIZED_AUTOS = YES;
GCC_WARN_UNUSED_FUNCTION = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
MACOSX_DEPLOYMENT_TARGET = 10.13;
OTHER_LDFLAGS = "";
SDKROOT = macosx;
SYSTEM_HEADER_SEARCH_PATHS = "../../../lexilla/**";
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,
C01FCF4C08A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

View File

@ -0,0 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<Workspace
version = "1.0">
<FileRef
location = "self:ScintillaTest.xcodeproj">
</FileRef>
</Workspace>

View File

@ -0,0 +1,8 @@
<?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>IDEDidComputeMac32BitWarning</key>
<true/>
</dict>
</plist>

View File

@ -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

View File

@ -0,0 +1,215 @@
-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version 5.0.45
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO,ANSI_QUOTES' */;
/**
* Foldable multiline comment.
*/
-- {
-- Create schema sakila
-- }
CREATE DATABASE IF NOT EXISTS sakila;
USE sakila;
DROP TABLE IF EXISTS "sakila"."actor_info";
DROP VIEW IF EXISTS "sakila"."actor_info";
CREATE TABLE "sakila"."actor_info" (
"actor_id" smallint(5) unsigned,
"first_name" varchar(45),
"last_name" varchar(45),
"film_info" varchar(341)
);
DROP TABLE IF EXISTS "sakila"."actor";
CREATE TABLE "sakila"."actor" (
"actor_id" smallint(5) unsigned NOT NULL auto_increment,
"first_name" varchar(45) NOT NULL,
"last_name" varchar(45) NOT NULL,
"last_update" timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY ("actor_id"),
KEY "idx_actor_last_name" ("last_name")
) ENGINE=InnoDB AUTO_INCREMENT=201 DEFAULT CHARSET=utf8;
INSERT INTO "sakila"."actor" VALUES (1,'PENELOPE','GUINESS','2006-02-15 04:34:33'),
(2,'NICK','WAHLBERG','2006-02-15 04:34:33'),
(3,'ED','CHASE','2006-02-15 04:34:33'),
(4,'JENNIFER','DAVIS','2006-02-15 04:34:33'),
(149,'RUSSELL','TEMPLE','2006-02-15 04:34:33'),
(150,'JAYNE','NOLTE','2006-02-15 04:34:33'),
(151,'GEOFFREY','HESTON','2006-02-15 04:34:33'),
(152,'BEN','HARRIS','2006-02-15 04:34:33'),
(153,'MINNIE','KILMER','2006-02-15 04:34:33'),
(154,'MERYL','GIBSON','2006-02-15 04:34:33'),
(155,'IAN','TANDY','2006-02-15 04:34:33'),
(156,'FAY','WOOD','2006-02-15 04:34:33'),
(157,'GRETA','MALDEN','2006-02-15 04:34:33'),
(158,'VIVIEN','BASINGER','2006-02-15 04:34:33'),
(159,'LAURA','BRODY','2006-02-15 04:34:33'),
(160,'CHRIS','DEPP','2006-02-15 04:34:33'),
(161,'HARVEY','HOPE','2006-02-15 04:34:33'),
(162,'OPRAH','KILMER','2006-02-15 04:34:33'),
(163,'CHRISTOPHER','WEST','2006-02-15 04:34:33'),
(164,'HUMPHREY','WILLIS','2006-02-15 04:34:33'),
(165,'AL','GARLAND','2006-02-15 04:34:33'),
(166,'NICK','DEGENERES','2006-02-15 04:34:33'),
(167,'LAURENCE','BULLOCK','2006-02-15 04:34:33'),
(168,'WILL','WILSON','2006-02-15 04:34:33'),
(169,'KENNETH','HOFFMAN','2006-02-15 04:34:33'),
(170,'MENA','HOPPER','2006-02-15 04:34:33'),
(171,'OLYMPIA','PFEIFFER','2006-02-15 04:34:33'),
(190,'AUDREY','BAILEY','2006-02-15 04:34:33'),
(191,'GREGORY','GOODING','2006-02-15 04:34:33'),
(192,'JOHN','SUVARI','2006-02-15 04:34:33'),
(193,'BURT','TEMPLE','2006-02-15 04:34:33'),
(194,'MERYL','ALLEN','2006-02-15 04:34:33'),
(195,'JAYNE','SILVERSTONE','2006-02-15 04:34:33'),
(196,'BELA','WALKEN','2006-02-15 04:34:33'),
(197,'REESE','WEST','2006-02-15 04:34:33'),
(198,'MARY','KEITEL','2006-02-15 04:34:33'),
(199,'JULIA','FAWCETT','2006-02-15 04:34:33'),
(200,'THORA','TEMPLE','2006-02-15 04:34:33');
DROP TRIGGER /*!50030 IF EXISTS */ "sakila"."payment_date";
DELIMITER $$
CREATE DEFINER = "root"@"localhost" TRIGGER "sakila"."payment_date" BEFORE INSERT ON "payment" FOR EACH ROW SET NEW.payment_date = NOW() $$
DELIMITER ;
DROP TABLE IF EXISTS "sakila"."sales_by_store";
DROP VIEW IF EXISTS "sakila"."sales_by_store";
CREATE ALGORITHM=UNDEFINED DEFINER="root"@"localhost" SQL SECURITY DEFINER VIEW "sakila"."sales_by_store" AS select concat("c"."city",_utf8',',"cy"."country") AS "store",concat("m"."first_name",_utf8' ',"m"."last_name") AS "manager",sum("p"."amount") AS "total_sales" from ((((((("sakila"."payment" "p" join "sakila"."rental" "r" on(("p"."rental_id" = "r"."rental_id"))) join "sakila"."inventory" "i" on(("r"."inventory_id" = "i"."inventory_id"))) join "sakila"."store" "s" on(("i"."store_id" = "s"."store_id"))) join "sakila"."address" "a" on(("s"."address_id" = "a"."address_id"))) join "sakila"."city" "c" on(("a"."city_id" = "c"."city_id"))) join "sakila"."country" "cy" on(("c"."country_id" = "cy"."country_id"))) join "sakila"."staff" "m" on(("s"."manager_staff_id" = "m"."staff_id"))) group by "s"."store_id" order by "cy"."country","c"."city";
--
-- View structure for view `staff_list`
--
CREATE VIEW staff_list
AS
SELECT s.staff_id AS ID, CONCAT(s.first_name, _utf8' ', s.last_name) AS name, a.address AS address, a.postal_code AS `zip code`, a.phone AS phone,
city.city AS city, country.country AS country, s.store_id AS SID
FROM staff AS s JOIN address AS a ON s.address_id = a.address_id JOIN city ON a.city_id = city.city_id
JOIN country ON city.country_id = country.country_id;
--
-- View structure for view `actor_info`
--
CREATE DEFINER=CURRENT_USER SQL SECURITY INVOKER VIEW actor_info
AS
SELECT
a.actor_id,
a.first_name,
a.last_name,
GROUP_CONCAT(DISTINCT CONCAT(c.name, ': ',
(SELECT GROUP_CONCAT(f.title ORDER BY f.title SEPARATOR ', ')
FROM sakila.film f
INNER JOIN sakila.film_category fc
ON f.film_id = fc.film_id
INNER JOIN sakila.film_actor fa
ON f.film_id = fa.film_id
WHERE fc.category_id = c.category_id
AND fa.actor_id = a.actor_id
)
)
ORDER BY c.name SEPARATOR '; ')
AS film_info
FROM sakila.actor a
LEFT JOIN sakila.film_actor fa
ON a.actor_id = fa.actor_id
LEFT JOIN sakila.film_category fc
ON fa.film_id = fc.film_id
LEFT JOIN sakila.category c
ON fc.category_id = c.category_id
GROUP BY a.actor_id, a.first_name, a.last_name;
DELIMITER $$
CREATE FUNCTION get_customer_balance(p_customer_id INT, p_effective_date DATETIME) RETURNS DECIMAL(5,2)
DETERMINISTIC
READS SQL DATA
BEGIN
#OK, WE NEED TO CALCULATE THE CURRENT BALANCE GIVEN A CUSTOMER_ID AND A DATE
#THAT WE WANT THE BALANCE TO BE EFFECTIVE FOR. THE BALANCE IS:
# 1) RENTAL FEES FOR ALL PREVIOUS RENTALS
# 2) ONE DOLLAR FOR EVERY DAY THE PREVIOUS RENTALS ARE OVERDUE
# 3) IF A FILM IS MORE THAN RENTAL_DURATION * 2 OVERDUE, CHARGE THE REPLACEMENT_COST
# 4) SUBTRACT ALL PAYMENTS MADE BEFORE THE DATE SPECIFIED
DECLARE v_rentfees DECIMAL(5,2); #FEES PAID TO RENT THE VIDEOS INITIALLY
DECLARE v_overfees INTEGER; #LATE FEES FOR PRIOR RENTALS
DECLARE v_payments DECIMAL(5,2); #SUM OF PAYMENTS MADE PREVIOUSLY
SELECT IFNULL(SUM(film.rental_rate),0) INTO v_rentfees
FROM film, inventory, rental
WHERE film.film_id = inventory.film_id
AND inventory.inventory_id = rental.inventory_id
AND rental.rental_date <= p_effective_date
AND rental.customer_id = p_customer_id;
SELECT IFNULL(SUM(IF((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) > film.rental_duration,
((TO_DAYS(rental.return_date) - TO_DAYS(rental.rental_date)) - film.rental_duration),0)),0) INTO v_overfees
FROM rental, inventory, film
WHERE film.film_id = inventory.film_id
AND inventory.inventory_id = rental.inventory_id
AND rental.rental_date <= p_effective_date
AND rental.customer_id = p_customer_id;
SELECT IFNULL(SUM(payment.amount),0) INTO v_payments
FROM payment
WHERE payment.payment_date <= p_effective_date
AND payment.customer_id = p_customer_id;
RETURN v_rentfees + v_overfees - v_payments;
END $$
DELIMITER ;
DELIMITER $$
CREATE FUNCTION inventory_in_stock(p_inventory_id INT) RETURNS BOOLEAN
READS SQL DATA
BEGIN
DECLARE v_rentals INT;
DECLARE v_out INT;
#AN ITEM IS IN-STOCK IF THERE ARE EITHER NO ROWS IN THE rental TABLE
#FOR THE ITEM OR ALL ROWS HAVE return_date POPULATED
SELECT COUNT(*) INTO v_rentals
FROM rental
WHERE inventory_id = p_inventory_id;
IF v_rentals = 0 THEN
RETURN TRUE;
END IF;
SELECT COUNT(rental_id) INTO v_out
FROM inventory LEFT JOIN rental USING(inventory_id)
WHERE inventory.inventory_id = p_inventory_id
AND rental.return_date IS NULL;
IF v_out > 0 THEN
RETURN FALSE;
ELSE
RETURN TRUE;
END IF;
END $$
DELIMITER ;

View File

@ -0,0 +1,609 @@
<?xml version="1.0" encoding="UTF-8"?>
<document type="com.apple.InterfaceBuilder3.Cocoa.XIB" version="3.0" toolsVersion="12120" systemVersion="16E195" targetRuntime="MacOSX.Cocoa" propertyAccessControl="none">
<dependencies>
<deployment identifier="macosx"/>
<plugIn identifier="com.apple.InterfaceBuilder.CocoaPlugin" version="12120"/>
<capability name="box content view" minToolsVersion="7.0"/>
<capability name="documents saved in the Xcode 8 format" minToolsVersion="8.0"/>
</dependencies>
<objects>
<customObject id="-2" userLabel="File's Owner" customClass="NSApplication"/>
<customObject id="-1" userLabel="First Responder" customClass="FirstResponder"/>
<customObject id="-3" userLabel="Application" customClass="NSObject"/>
<menu title="AMainMenu" systemMenu="main" id="29" userLabel="MainMenu">
<items>
<menuItem title="NewApplication" id="56">
<menu key="submenu" title="NewApplication" systemMenu="apple" id="57">
<items>
<menuItem title="About NewApplication" id="58">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="orderFrontStandardAboutPanel:" target="-2" id="142"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="236">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Preferences…" keyEquivalent="," id="129" userLabel="121"/>
<menuItem isSeparatorItem="YES" id="143">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Services" id="131">
<menu key="submenu" title="Services" systemMenu="services" id="130"/>
</menuItem>
<menuItem isSeparatorItem="YES" id="144">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Hide NewApplication" keyEquivalent="h" id="134">
<connections>
<action selector="hide:" target="-1" id="367"/>
</connections>
</menuItem>
<menuItem title="Hide Others" keyEquivalent="h" id="145">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="hideOtherApplications:" target="-1" id="368"/>
</connections>
</menuItem>
<menuItem title="Show All" id="150">
<connections>
<action selector="unhideAllApplications:" target="-1" id="370"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="149">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Quit NewApplication" keyEquivalent="q" id="136" userLabel="1111">
<connections>
<action selector="terminate:" target="-3" id="449"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="File" id="83">
<menu key="submenu" title="File" id="81">
<items>
<menuItem title="New" keyEquivalent="n" id="82" userLabel="9">
<connections>
<action selector="newDocument:" target="-1" id="373"/>
</connections>
</menuItem>
<menuItem title="Open…" keyEquivalent="o" id="72">
<connections>
<action selector="openDocument:" target="-1" id="374"/>
</connections>
</menuItem>
<menuItem title="Open Recent" id="124">
<menu key="submenu" title="Open Recent" systemMenu="recentDocuments" id="125">
<items>
<menuItem title="Clear Menu" id="126">
<connections>
<action selector="clearRecentDocuments:" target="-1" id="127"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="79" userLabel="7">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Close" keyEquivalent="w" id="73" userLabel="1">
<connections>
<action selector="performClose:" target="-1" id="193"/>
</connections>
</menuItem>
<menuItem title="Save" keyEquivalent="s" id="75" userLabel="3">
<connections>
<action selector="saveDocument:" target="-1" id="362"/>
</connections>
</menuItem>
<menuItem title="Save As…" keyEquivalent="S" id="80" userLabel="8">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="saveDocumentAs:" target="-1" id="363"/>
</connections>
</menuItem>
<menuItem title="Revert to Saved" id="112" userLabel="10">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="revertDocumentToSaved:" target="-1" id="364"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="74" userLabel="2">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Page Setup..." keyEquivalent="P" id="77" userLabel="5">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="runPageLayout:" target="-1" id="87"/>
</connections>
</menuItem>
<menuItem title="Print…" keyEquivalent="p" id="78" userLabel="6">
<connections>
<action selector="print:" target="-1" id="86"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Edit" id="217">
<menu key="submenu" title="Edit" id="205">
<items>
<menuItem title="Undo" keyEquivalent="z" id="207">
<connections>
<action selector="undo:" target="-1" id="223"/>
</connections>
</menuItem>
<menuItem title="Redo" keyEquivalent="Z" id="215">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="redo:" target="-1" id="231"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="206">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Cut" keyEquivalent="x" id="199">
<connections>
<action selector="cut:" target="-1" id="228"/>
</connections>
</menuItem>
<menuItem title="Copy" keyEquivalent="c" id="197">
<connections>
<action selector="copy:" target="-1" id="224"/>
</connections>
</menuItem>
<menuItem title="Paste" keyEquivalent="v" id="203">
<connections>
<action selector="paste:" target="-1" id="226"/>
</connections>
</menuItem>
<menuItem title="Delete" id="202">
<connections>
<action selector="delete:" target="-1" id="235"/>
</connections>
</menuItem>
<menuItem title="Select All" keyEquivalent="a" id="198">
<connections>
<action selector="selectAll:" target="-1" id="232"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="214">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Find" id="218">
<menu key="submenu" title="Find" id="220">
<items>
<menuItem title="Find…" tag="1" keyEquivalent="f" id="209">
<connections>
<action selector="performFindPanelAction:" target="-1" id="241"/>
</connections>
</menuItem>
<menuItem title="Find Next" tag="2" keyEquivalent="g" id="208"/>
<menuItem title="Find Previous" tag="3" keyEquivalent="G" id="213">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
</menuItem>
<menuItem title="Use Selection for Find" tag="7" keyEquivalent="e" id="221"/>
<menuItem title="Jump to Selection" keyEquivalent="j" id="210">
<connections>
<action selector="centerSelectionInVisibleArea:" target="-1" id="245"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Spelling and Grammar" id="216">
<menu key="submenu" title="Spelling and Grammar" id="200">
<items>
<menuItem title="Show Spelling…" keyEquivalent=":" id="204">
<connections>
<action selector="showGuessPanel:" target="-1" id="230"/>
</connections>
</menuItem>
<menuItem title="Check Spelling" keyEquivalent=";" id="201">
<connections>
<action selector="checkSpelling:" target="-1" id="225"/>
</connections>
</menuItem>
<menuItem title="Check Spelling While Typing" id="219">
<connections>
<action selector="toggleContinuousSpellChecking:" target="-1" id="222"/>
</connections>
</menuItem>
<menuItem title="Check Grammar With Spelling" id="346">
<connections>
<action selector="toggleGrammarChecking:" target="-1" id="347"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Substitutions" id="348">
<menu key="submenu" title="Substitutions" id="349">
<items>
<menuItem title="Smart Copy/Paste" tag="1" keyEquivalent="f" id="350">
<connections>
<action selector="toggleSmartInsertDelete:" target="-1" id="355"/>
</connections>
</menuItem>
<menuItem title="Smart Quotes" tag="2" keyEquivalent="g" id="351">
<connections>
<action selector="toggleAutomaticQuoteSubstitution:" target="-1" id="356"/>
</connections>
</menuItem>
<menuItem title="Smart Links" tag="3" keyEquivalent="G" id="354">
<modifierMask key="keyEquivalentModifierMask" shift="YES" command="YES"/>
<connections>
<action selector="toggleAutomaticLinkDetection:" target="-1" id="357"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Speech" id="211">
<menu key="submenu" title="Speech" id="212">
<items>
<menuItem title="Start Speaking" id="196">
<connections>
<action selector="startSpeaking:" target="-1" id="233"/>
</connections>
</menuItem>
<menuItem title="Stop Speaking" id="195">
<connections>
<action selector="stopSpeaking:" target="-1" id="227"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Format" id="375">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Format" id="376">
<items>
<menuItem title="Font" id="377">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font" systemMenu="font" id="388">
<items>
<menuItem title="Show Fonts" keyEquivalent="t" id="389">
<connections>
<action selector="orderFrontFontPanel:" target="420" id="424"/>
</connections>
</menuItem>
<menuItem title="Bold" tag="2" keyEquivalent="b" id="390">
<connections>
<action selector="addFontTrait:" target="420" id="421"/>
</connections>
</menuItem>
<menuItem title="Italic" tag="1" keyEquivalent="i" id="391">
<connections>
<action selector="addFontTrait:" target="420" id="422"/>
</connections>
</menuItem>
<menuItem title="Underline" keyEquivalent="u" id="392">
<connections>
<action selector="underline:" target="-1" id="432"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="393"/>
<menuItem title="Bigger" tag="3" keyEquivalent="+" id="394">
<connections>
<action selector="modifyFont:" target="420" id="425"/>
</connections>
</menuItem>
<menuItem title="Smaller" tag="4" keyEquivalent="-" id="395">
<connections>
<action selector="modifyFont:" target="420" id="423"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="396"/>
<menuItem title="Kern" id="397">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Kern" id="415">
<items>
<menuItem title="Use Default" id="416">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardKerning:" target="-1" id="438"/>
</connections>
</menuItem>
<menuItem title="Use None" id="417">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffKerning:" target="-1" id="441"/>
</connections>
</menuItem>
<menuItem title="Tighten" id="418">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="tightenKerning:" target="-1" id="431"/>
</connections>
</menuItem>
<menuItem title="Loosen" id="419">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="loosenKerning:" target="-1" id="435"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Ligature" id="398">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Ligature" id="411">
<items>
<menuItem title="Use Default" id="412">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useStandardLigatures:" target="-1" id="439"/>
</connections>
</menuItem>
<menuItem title="Use None" id="413">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="turnOffLigatures:" target="-1" id="440"/>
</connections>
</menuItem>
<menuItem title="Use All" id="414">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="useAllLigatures:" target="-1" id="434"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Baseline" id="399">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Baseline" id="405">
<items>
<menuItem title="Use Default" id="406">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="unscript:" target="-1" id="437"/>
</connections>
</menuItem>
<menuItem title="Superscript" id="407">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="superscript:" target="-1" id="430"/>
</connections>
</menuItem>
<menuItem title="Subscript" id="408">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="subscript:" target="-1" id="429"/>
</connections>
</menuItem>
<menuItem title="Raise" id="409">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="raiseBaseline:" target="-1" id="426"/>
</connections>
</menuItem>
<menuItem title="Lower" id="410">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="lowerBaseline:" target="-1" id="427"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Font Quality" id="469">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Font Quality" id="470">
<items>
<menuItem title="Default" id="471">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="475"/>
</connections>
</menuItem>
<menuItem title="Non-antialiased" tag="1" id="472">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="476"/>
</connections>
</menuItem>
<menuItem title="Antialiased" tag="2" id="473">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="477"/>
</connections>
</menuItem>
<menuItem title="LCD Optimized" tag="3" id="474">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="setFontQuality:" target="450" id="478"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem isSeparatorItem="YES" id="400"/>
<menuItem title="Show Colors" keyEquivalent="C" id="401">
<connections>
<action selector="orderFrontColorPanel:" target="-1" id="433"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="402"/>
<menuItem title="Copy Style" keyEquivalent="c" id="403">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="copyFont:" target="-1" id="428"/>
</connections>
</menuItem>
<menuItem title="Paste Style" keyEquivalent="v" id="404">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="pasteFont:" target="-1" id="436"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Text" id="378">
<modifierMask key="keyEquivalentModifierMask"/>
<menu key="submenu" title="Text" id="379">
<items>
<menuItem title="Align Left" keyEquivalent="{" id="380">
<connections>
<action selector="alignLeft:" target="-1" id="442"/>
</connections>
</menuItem>
<menuItem title="Center" keyEquivalent="|" id="381">
<connections>
<action selector="alignCenter:" target="-1" id="445"/>
</connections>
</menuItem>
<menuItem title="Justify" id="382">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="alignJustified:" target="-1" id="443"/>
</connections>
</menuItem>
<menuItem title="Align Right" keyEquivalent="}" id="383">
<connections>
<action selector="alignRight:" target="-1" id="447"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="384"/>
<menuItem title="Show Ruler" id="385">
<modifierMask key="keyEquivalentModifierMask"/>
<connections>
<action selector="toggleRuler:" target="-1" id="446"/>
</connections>
</menuItem>
<menuItem title="Copy Ruler" keyEquivalent="c" id="386">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="copyRuler:" target="-1" id="444"/>
</connections>
</menuItem>
<menuItem title="Paste Ruler" keyEquivalent="v" id="387">
<modifierMask key="keyEquivalentModifierMask" control="YES" command="YES"/>
<connections>
<action selector="pasteRuler:" target="-1" id="448"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="View" id="295">
<menu key="submenu" title="View" id="296">
<items>
<menuItem title="Show Toolbar" keyEquivalent="t" id="297">
<modifierMask key="keyEquivalentModifierMask" option="YES" command="YES"/>
<connections>
<action selector="toggleToolbarShown:" target="-1" id="366"/>
</connections>
</menuItem>
<menuItem title="Customize Toolbar…" id="298">
<connections>
<action selector="runToolbarCustomizationPalette:" target="-1" id="365"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="K3d-cY-vZn"/>
<menuItem title="Add or Remove Extra Scintilla" keyEquivalent="d" id="zQU-z1-l5t">
<connections>
<action selector="addRemoveExtra:" target="450" id="9HG-Le-GbA"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Window" id="19">
<menu key="submenu" title="Window" systemMenu="window" id="24">
<items>
<menuItem title="Minimize" keyEquivalent="m" id="23">
<connections>
<action selector="performMiniaturize:" target="-1" id="37"/>
</connections>
</menuItem>
<menuItem title="Zoom" id="239">
<connections>
<action selector="performZoom:" target="-1" id="240"/>
</connections>
</menuItem>
<menuItem isSeparatorItem="YES" id="92">
<modifierMask key="keyEquivalentModifierMask" command="YES"/>
</menuItem>
<menuItem title="Bring All to Front" id="5">
<connections>
<action selector="arrangeInFront:" target="-1" id="39"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
<menuItem title="Help" id="103" userLabel="1">
<menu key="submenu" title="Help" id="106" userLabel="2">
<items>
<menuItem title="NewApplication Help" keyEquivalent="?" id="111">
<connections>
<action selector="showHelp:" target="-1" id="360"/>
</connections>
</menuItem>
</items>
</menu>
</menuItem>
</items>
</menu>
<window title="Window" allowsToolTipsWhenApplicationIsInactive="NO" autorecalculatesKeyViewLoop="NO" releasedWhenClosed="NO" animationBehavior="default" id="371">
<windowStyleMask key="styleMask" titled="YES" closable="YES" miniaturizable="YES" resizable="YES"/>
<windowPositionMask key="initialPositionMask" leftStrut="YES" bottomStrut="YES"/>
<rect key="contentRect" x="335" y="58" width="982" height="692"/>
<rect key="screenRect" x="0.0" y="0.0" width="1440" height="878"/>
<view key="contentView" id="372">
<rect key="frame" x="0.0" y="0.0" width="982" height="692"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" widthSizable="YES" flexibleMaxX="YES" flexibleMinY="YES" heightSizable="YES" flexibleMaxY="YES"/>
<subviews>
<box autoresizesSubviews="NO" borderType="line" title="Scintilla Editor" id="451">
<rect key="frame" x="17" y="16" width="844" height="606"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
<view key="contentView" id="e8h-ir-tqU">
<rect key="frame" x="1" y="1" width="842" height="590"/>
<autoresizingMask key="autoresizingMask" widthSizable="YES" heightSizable="YES"/>
</view>
</box>
<button verticalHuggingPriority="750" id="452">
<rect key="frame" x="872" y="12" width="96" height="32"/>
<autoresizingMask key="autoresizingMask" flexibleMinX="YES" flexibleMaxY="YES"/>
<buttonCell key="cell" type="push" title="Quit" bezelStyle="rounded" alignment="center" borderStyle="border" imageScaling="proportionallyDown" inset="2" id="453">
<behavior key="behavior" pushIn="YES" lightByBackground="YES" lightByGray="YES"/>
<font key="font" metaFont="system"/>
</buttonCell>
<connections>
<action selector="terminate:" target="-3" id="455"/>
</connections>
</button>
<searchField wantsLayer="YES" verticalHuggingPriority="750" allowsCharacterPickerTouchBarItem="NO" id="466">
<rect key="frame" x="20" y="630" width="287" height="22"/>
<autoresizingMask key="autoresizingMask" flexibleMaxX="YES" flexibleMinY="YES"/>
<searchFieldCell key="cell" scrollable="YES" lineBreakMode="clipping" selectable="YES" editable="YES" borderStyle="bezel" bezelStyle="round" id="467">
<font key="font" metaFont="system"/>
<color key="textColor" name="controlTextColor" catalog="System" colorSpace="catalog"/>
<color key="backgroundColor" name="textBackgroundColor" catalog="System" colorSpace="catalog"/>
</searchFieldCell>
<connections>
<action selector="searchText:" target="450" id="468"/>
</connections>
</searchField>
</subviews>
</view>
</window>
<customObject id="420" customClass="NSFontManager"/>
<customObject id="450" customClass="AppController">
<connections>
<outlet property="mEditHost" destination="451" id="454"/>
</connections>
</customObject>
</objects>
</document>

View File

@ -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);
}

View File

@ -0,0 +1,168 @@
/**
* Declaration of the native Cocoa View that serves as container for the scintilla parts.
* @file ScintillaView.h
*
* Created by Mike Lischke.
*
* Copyright 2011, 2013, Oracle and/or its affiliates. All rights reserved.
* Copyright 2009, 2011 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 "Scintilla.h"
#import "InfoBarCommunicator.h"
/**
* Scintilla sends these two messages to the notify handler. Please refer
* to the Windows API doc for details about the message format.
*/
#define WM_COMMAND 1001
#define WM_NOTIFY 1002
/**
* 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
* ScintillaView registerNotifyCallback() to register such a handler.
* Message format is:
* <br>
* WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = control ID, lParam = ScintillaCocoa*
* <br>
* WM_NOTIFY: wParam = 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);
extern NSString *const SCIUpdateUINotification;
@protocol ScintillaNotificationProtocol
- (void) notification: (SCNotification *) notification;
@end
/**
* SCIScrollView provides pre-macOS 10.14 tiling behavior.
*/
@interface SCIScrollView : NSScrollView;
@end
/**
* SCIMarginView draws line numbers and other margins next to the text view.
*/
@interface SCIMarginView : NSRulerView;
@end
/**
* SCIContentView is the Cocoa interface to the Scintilla backend. It handles text input and
* provides a canvas for painting the output.
*/
@interface SCIContentView : NSView <
NSTextInputClient,
NSUserInterfaceValidations,
NSDraggingSource,
NSDraggingDestination,
NSAccessibilityStaticText>;
- (void) setCursor: (int) cursor; // Needed by ScintillaCocoa
@end
/**
* ScintillaView is the class instantiated by client code.
* It contains an NSScrollView which contains a SCIMarginView and a SCIContentView.
* It is responsible for providing an API and communicating to a delegate.
*/
@interface ScintillaView : NSView <InfoBarCommunicator, ScintillaNotificationProtocol>;
@property(nonatomic, unsafe_unretained) id<ScintillaNotificationProtocol> delegate;
@property(nonatomic, readonly) NSScrollView *scrollView;
+ (Class) contentViewClass;
- (void) notify: (NotificationType) type message: (NSString *) message location: (NSPoint) location
value: (float) value;
- (void) setCallback: (id <InfoBarCommunicator>) callback;
- (void) suspendDrawing: (BOOL) suspend;
- (void) notification: (SCNotification *) notification;
- (void) updateIndicatorIME;
// Scroller handling
- (void) setMarginWidth: (int) width;
- (SCIContentView *) content;
- (void) updateMarginCursors;
// NSTextView compatibility layer.
- (NSString *) string;
- (void) setString: (NSString *) aString;
- (void) insertText: (id) aString;
- (void) setEditable: (BOOL) editable;
- (BOOL) isEditable;
- (NSRange) selectedRange;
- (NSRange) selectedRangePositions;
- (NSString *) selectedString;
- (void) deleteRange: (NSRange) range;
- (void) setFontName: (NSString *) font
size: (int) size
bold: (BOOL) bold
italic: (BOOL) italic;
// Native call through to the backend.
+ (sptr_t) directCall: (ScintillaView *) sender message: (unsigned int) message wParam: (uptr_t) wParam
lParam: (sptr_t) lParam;
- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam lParam: (sptr_t) lParam;
- (sptr_t) message: (unsigned int) message wParam: (uptr_t) wParam;
- (sptr_t) message: (unsigned int) message;
// Back end properties getters and setters.
- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value;
- (void) setGeneralProperty: (int) property value: (long) value;
- (long) getGeneralProperty: (int) property;
- (long) getGeneralProperty: (int) property parameter: (long) parameter;
- (long) getGeneralProperty: (int) property parameter: (long) parameter extra: (long) extra;
- (long) getGeneralProperty: (int) property ref: (const void *) ref;
- (void) setColorProperty: (int) property parameter: (long) parameter value: (NSColor *) value;
- (void) setColorProperty: (int) property parameter: (long) parameter fromHTML: (NSString *) fromHTML;
- (NSColor *) getColorProperty: (int) property parameter: (long) parameter;
- (void) setReferenceProperty: (int) property parameter: (long) parameter value: (const void *) value;
- (const void *) getReferenceProperty: (int) property parameter: (long) parameter;
- (void) setStringProperty: (int) property parameter: (long) parameter value: (NSString *) value;
- (NSString *) getStringProperty: (int) property parameter: (long) parameter;
- (void) setLexerProperty: (NSString *) name value: (NSString *) value;
- (NSString *) getLexerProperty: (NSString *) name;
// The delegate property should be used instead of registerNotifyCallback which is deprecated.
- (void) registerNotifyCallback: (intptr_t) windowid value: (SciNotifyFunc) callback __attribute__ ( (deprecated)) ;
- (void) setInfoBar: (NSView <InfoBarCommunicator> *) aView top: (BOOL) top;
- (void) setStatusText: (NSString *) text;
- (BOOL) findAndHighlightText: (NSString *) searchText
matchCase: (BOOL) matchCase
wholeWord: (BOOL) wholeWord
scrollTo: (BOOL) scrollTo
wrap: (BOOL) wrap;
- (BOOL) findAndHighlightText: (NSString *) searchText
matchCase: (BOOL) matchCase
wholeWord: (BOOL) wholeWord
scrollTo: (BOOL) scrollTo
wrap: (BOOL) wrap
backwards: (BOOL) backwards;
- (int) findAndReplaceText: (NSString *) searchText
byText: (NSString *) newText
matchCase: (BOOL) matchCase
wholeWord: (BOOL) wholeWord
doAll: (BOOL) doAll;
@end

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,66 @@
# Script to build Scintilla for macOS with most supported build files.
# Current directory should be scintilla/cocoa before running.
cd ../..
# ************************************************************
# Target 1: Unit tests
echo Unit tests
cd scintilla/test/unit
make clean
make test
cd ../../..
# ************************************************************
# Target 2: build framework and test app with Xcode targeting macOS 10.n with n from 9 to 5
# Only SDK versions that are installed will be built
# Clean both then build both -- if perform clean in ScintillaTest, also cleans ScintillaFramework
# which can cause double build
echo Building Cocoa-native ScintillaFramework and ScintillaTest
for sdk in macosx10.15 macosx10.14
do
xcodebuild -showsdks | grep $sdk
if [ "$(xcodebuild -showsdks | grep $sdk)" != "" ]
then
echo Building with $sdk
cd scintilla/cocoa/ScintillaFramework
xcodebuild clean
cd ../ScintillaTest
xcodebuild clean
cd ../ScintillaFramework
xcodebuild -sdk $sdk
cd ../ScintillaTest
xcodebuild -sdk $sdk
cd ../../..
else
echo Warning $sdk not available
fi
done
# ************************************************************
# Target 3: Qt builds
# Requires Qt development libraries and qmake to be installed
echo Building Qt and PySide
cd scintilla/qt
cd ScintillaEditBase
qmake -spec macx-xcode
xcodebuild clean
xcodebuild
cd ..
cd ScintillaEdit
python3 WidgetGen.py
qmake -spec macx-xcode
xcodebuild clean
xcodebuild
cd ..
cd ScintillaEditPy
python2 sepbuild.py
cd ..
cd ../..

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 8.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.6 KiB