[UPDATE] Complete Scintilla source files.

git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@641 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
Don Ho 2010-07-14 09:47:17 +00:00
parent a2dd828443
commit 52e19bbb88
70 changed files with 22511 additions and 900 deletions

View File

@ -0,0 +1,85 @@
### start defines ###
ARCH=-arch i386
CC=gcc -x c++ $(ARCH)
CO=gcc -x objective-c++ $(ARCH)
INST_NAME=-install_name @executable_path/../Frameworks/Sci.framework/Versions/A/Sci
LD=gcc $(ARCH) -dynamiclib -framework Cocoa $(INST_NAME)
gDEFs=-DSCI_NAMESPACE -DSCI_LEXER
INCS=-I../src/ -I../include/ -I.
CCX=$(CC) $(gDEFs) $(INCS)
CCO=$(CO) $(gDEFs) $(INCS)
BLD=build/framebuild
SCI_LEXERS=LexAPDL.o LexASY.o LexAU3.o LexAVE.o LexAbaqus.o LexAda.o LexAsm.o LexAsn1.o \
LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCLW.o LexCOBOL.o LexCPP.o LexCSS.o \
LexCaml.o LexCmake.o LexConf.o LexCrontab.o LexCsound.o LexD.o LexEScript.o LexEiffel.o \
LexErlang.o LexFlagship.o LexForth.o LexFortran.o LexGAP.o LexGui4Cli.o LexHTML.o \
LexHaskell.o LexInno.o LexKix.o LexLisp.o LexLout.o LexLua.o LexMMIXAL.o LexMPT.o \
LexMSSQL.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o LexMySQL.o LexNimrod.o \
LexNsis.o LexOpal.o LexOthers.o LexPB.o LexPLM.o LexPOV.o LexPS.o LexPascal.o LexPerl.o \
LexPowerPro.o LexPowerShell.o LexProgress.o LexPython.o LexR.o LexRebol.o LexRuby.o \
LexSML.o LexSQL.o LexScriptol.o LexSmalltalk.o LexSorcus.o LexSpecman.o LexSpice.o \
LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVHDL.o LexVerilog.o LexYAML.o
SCI_OBJ=AutoComplete.o CallTip.o CellBuffer.o CharClassify.o ContractionState.o Decoration.o \
Document.o DocumentAccessor.o Editor.o ExternalLexer.o Indicator.o KeyMap.o KeyWords.o \
LineMarker.o PerLine.o PositionCache.o PropSet.o RESearch.o RunStyles.o ScintillaBase.o \
Style.o StyleContext.o UniConversion.o ViewStyle.o WindowAccessor.o XPM.o Selection.o $(SCI_LEXERS)
COC_OBJ=PlatCocoa.o ScintillaCocoa.o ScintillaView.o InfoBar.o
OBJ=$(SCI_OBJ) $(COC_OBJ)
OBJS=$(addprefix $(BLD)/,$(OBJ))
TARG=$(APP)/Versions/A/Sci
APP=$(BLD)/Sci.framework
### end defines ###
### start targets ###
all: $(BLD) $(TARG)
$(APP): $(BLD)
-rm -rf $(APP)
-mkdir $(APP)
-mkdir $(APP)/Versions
-mkdir $(APP)/Versions/A
-mkdir $(APP)/Versions/A/Headers
-mkdir $(APP)/Versions/A/Resources
-ln -sf `pwd`/$(APP)/Versions/A `pwd`/$(APP)/Versions/Current
-ln -sf `pwd`/$(APP)/Versions/A/Headers `pwd`/$(APP)/Headers
-ln -sf `pwd`/$(APP)/Versions/A/Resources `pwd`/$(APP)/Resources
-cp *.h $(APP)/Headers/
-cp ../src/*.h $(APP)/Headers/
-cp ../include/*.h $(APP)/Headers/
-cp -R ScintillaFramework/English.lproj $(APP)/Resources
-cp res/*.png $(APP)/Resources
-cp ScintillaFramework/Info.plist $(APP)/Resources
$(TARG) : $(OBJS) $(APP)
$(LD) $(OBJS) $(gDEFs) -o $(TARG) -lstdc++
-ln `pwd`/$(TARG) `pwd`/$(APP)/Sci
$(BLD):
-mkdir build
-mkdir $(BLD)
clean:
-rm -rf $(BLD)
$(BLD)/%.o : ../src/%.cxx
$(CCX) -c ../src/$< -o $@
$(BLD)/%.o : %.mm
$(CCO) -c $< -o $@
### get around to filling out the real dependencies later ###
$(BLD)/AutoComplete.o : ../src/AutoComplete.cxx ../src/AutoComplete.h ../include/Platform.h
$(BLD)/CallTip.o : ../src/CallTip.cxx ../src/CallTip.h ../include/Platform.h
### end targets ###

55
scintilla/cocoa/InfoBar.h Normal file
View File

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

448
scintilla/cocoa/InfoBar.mm Normal file
View File

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

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).
*/
enum IBDisplay {
IBShowZoom = 0x01,
IBShowCaretPosition = 0x02,
IBShowStatusText = 0x04,
IBShowAll = 0xFF
};
/**
* The info bar communicator protocol is used for communication between ScintillaView and its
* information bar component. Using this protocol decouples any potential info target from the main
* ScintillaView implementation. The protocol is used two-way.
*/
enum NotificationType {
IBNZoomChanged, // The user selected another zoom value.
IBNCaretChanged, // The caret in the editor changed.
IBNStatusChanged, // The application set a new status message.
};
@protocol InfoBarCommunicator
- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
value: (float) value;
- (void) setCallback: (id <InfoBarCommunicator>) callback;
@end

119
scintilla/cocoa/PlatCocoa.h Normal file
View File

@ -0,0 +1,119 @@
/**
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#ifndef PLATCOCOA_H
#define PLATCOCOA_H
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <assert.h>
#include <sys/time.h>
#include <Cocoa/Cocoa.h>
#include "QuartzTextLayout.h"
#include "Platform.h"
#include "Scintilla.h"
NSRect PRectangleToNSRect(Scintilla::PRectangle& rc);
Scintilla::PRectangle NSRectToPRectangle(NSRect& rc);
@interface ScintillaContextMenu : NSMenu
{
Scintilla::ScintillaCocoa* owner;
}
- (void) handleCommand: (NSMenuItem*) sender;
- (void) setOwner: (Scintilla::ScintillaCocoa*) newOwner;
@end
namespace Scintilla {
// A class to do the actual text rendering for us using Quartz 2D.
class SurfaceImpl : public Surface
{
private:
bool unicodeMode;
float x;
float y;
CGContextRef gc;
/** The text layout instance */
QuartzTextLayout* textLayout;
/** If the surface is a bitmap context, contains a reference to the bitmap data. */
uint8_t* bitmapData;
/** If the surface is a bitmap context, stores the dimensions of the bitmap. */
int bitmapWidth;
int bitmapHeight;
/** Set the CGContext's fill colour to the specified allocated colour. */
void FillColour( const ColourAllocated& back );
// 24-bit RGB+A bitmap data constants
static const int BITS_PER_COMPONENT = 8;
static const int BITS_PER_PIXEL = BITS_PER_COMPONENT * 4;
static const int BYTES_PER_PIXEL = BITS_PER_PIXEL / 8;
public:
SurfaceImpl();
~SurfaceImpl();
void Init(WindowID wid);
void Init(SurfaceID sid, WindowID wid);
void InitPixMap(int width, int height, Surface *surface_, WindowID wid);
CGContextRef GetContext() { return gc; }
void Release();
bool Initialised();
void PenColour(ColourAllocated fore);
/** Returns a CGImageRef that represents the surface. Returns NULL if this is not possible. */
CGImageRef GetImage();
void CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect);
int LogPixelsY();
int DeviceHeightFont(int points);
void MoveTo(int x_, int y_);
void LineTo(int x_, int y_);
void Polygon(Scintilla::Point *pts, int npts, ColourAllocated fore, ColourAllocated back);
void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back);
void FillRectangle(PRectangle rc, ColourAllocated back);
void FillRectangle(PRectangle rc, Surface &surfacePattern);
void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back);
void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill,
ColourAllocated outline, int alphaOutline, int flags);
void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back);
void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource);
void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore,
ColourAllocated back);
void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore,
ColourAllocated back);
void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore);
void MeasureWidths(Font &font_, const char *s, int len, int *positions);
int WidthText(Font &font_, const char *s, int len);
int WidthChar(Font &font_, char ch);
int Ascent(Font &font_);
int Descent(Font &font_);
int InternalLeading(Font &font_);
int ExternalLeading(Font &font_);
int Height(Font &font_);
int AverageCharWidth(Font &font_);
int SetPalette(Scintilla::Palette *pal, bool inBackGround);
void SetClip(PRectangle rc);
void FlushCachedState();
void SetUnicodeMode(bool unicodeMode_);
void SetDBCSMode(int codePage);
}; // SurfaceImpl class
} // Scintilla namespace
#endif

2124
scintilla/cocoa/PlatCocoa.mm Normal file

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,141 @@
/*
* QuartzTextLayout.h
*
* Original Code by Evan Jones on Wed Oct 02 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
*/
#ifndef _QUARTZ_TEXT_LAYOUT_H
#define _QUARTZ_TEXT_LAYOUT_H
#include <Cocoa/Cocoa.h>
#include "QuartzTextStyle.h"
class QuartzTextLayout
{
public:
/** Create a text layout for drawing on the specified context. */
QuartzTextLayout( CGContextRef context ) : layout( NULL ), unicode_string( NULL ), unicode_length( 0 )
{
OSStatus err = ATSUCreateTextLayout( &layout );
if (0 != err)
layout = NULL;
setContext(context);
ATSUAttributeTag tag = kATSULineLayoutOptionsTag;
ByteCount size = sizeof( ATSLineLayoutOptions );
ATSLineLayoutOptions rendering = kATSLineUseDeviceMetrics; //| kATSLineFractDisable | kATSLineUseQDRendering
ATSUAttributeValuePtr valuePtr = &rendering;
err = ATSUSetLayoutControls( layout, 1, &tag, &size, &valuePtr );
}
~QuartzTextLayout()
{
if (NULL != layout)
ATSUDisposeTextLayout( layout );
layout = NULL;
if ( unicode_string != NULL )
{
delete[] unicode_string;
unicode_string = NULL;
unicode_length = 0;
}
}
/** Assign a string to the text layout object. */
// TODO: Create a UTF8 version
// TODO: Optimise the ASCII version by not copying so much
OSStatus setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding )
{
if (NULL == layout)
return -1;
CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );
if (!str)
return -1;
unicode_length = CFStringGetLength( str );
if (unicode_string)
delete[] unicode_string;
unicode_string = new UniChar[ unicode_length ];
CFStringGetCharacters( str, CFRangeMake( 0, unicode_length ), unicode_string );
CFRelease( str );
str = NULL;
OSStatus err;
err = ATSUSetTextPointerLocation( layout, unicode_string, kATSUFromTextBeginning, kATSUToTextEnd, unicode_length );
if( err != noErr ) return err;
// Turn on the default font fallbacks
return ATSUSetTransientFontMatching( layout, true );
}
inline void setText( const UInt8* buffer, size_t byteLength, const QuartzTextStyle& r )
{
this->setText( buffer, byteLength, kCFStringEncodingUTF8 );
ATSUSetRunStyle( layout, r.getATSUStyle(), 0, unicode_length );
}
/** Apply the specified text style on the entire range of text. */
void setStyle( const QuartzTextStyle& style )
{
ATSUSetRunStyle( layout, style.getATSUStyle(), kATSUFromTextBeginning, kATSUToTextEnd );
}
/** Draw the text layout into the current CGContext at the specified position, flipping the CGContext's Y axis if required.
* @param x The x axis position to draw the baseline in the current CGContext.
* @param y The y axis position to draw the baseline in the current CGContext.
* @param flipTextYAxis If true, the CGContext's Y axis will be flipped before drawing the text, and restored afterwards. Use this when drawing in an HIView's CGContext, where the origin is the top left corner. */
void draw( float x, float y, bool flipTextYAxis = false )
{
if (NULL == layout || 0 == unicode_length)
return;
if ( flipTextYAxis )
{
CGContextSaveGState( gc );
CGContextScaleCTM( gc, 1.0, -1.0 );
y = -y;
}
OSStatus err;
err = ATSUDrawText( layout, kATSUFromTextBeginning, kATSUToTextEnd, X2Fix( x ), X2Fix( y ) );
if ( flipTextYAxis ) CGContextRestoreGState( gc );
}
/** Sets a single text layout control on the ATSUTextLayout object.
* @param tag The control to set.
* @param size The size of the parameter pointed to by value.
* @param value A pointer to the new value for the control.
*/
void setControl( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value )
{
ATSUSetLayoutControls( layout, 1, &tag, &size, &value );
}
ATSUTextLayout getLayout() {
return layout;
}
inline CFIndex getLength() const { return unicode_length; }
inline void setContext (CGContextRef context)
{
gc = context;
if (NULL != layout)
setControl( kATSUCGContextTag, sizeof( gc ), &gc );
}
private:
ATSUTextLayout layout;
UniChar* unicode_string;
int unicode_length;
CGContextRef gc;
};
#endif

View File

@ -0,0 +1,90 @@
/*
* QuartzTextStyle.h
*
* Created by Evan Jones on Wed Oct 02 2002.
*
*/
#ifndef _QUARTZ_TEXT_STYLE_H
#define _QUARTZ_TEXT_STYLE_H
#include "QuartzTextStyleAttribute.h"
class QuartzTextStyle
{
public:
QuartzTextStyle()
{
ATSUCreateStyle( &style );
}
~QuartzTextStyle()
{
if ( style != NULL )
ATSUDisposeStyle( style );
style = NULL;
}
void setAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value )
{
ATSUSetAttributes( style, 1, &tag, &size, &value );
}
void setAttribute( QuartzTextStyleAttribute& attribute )
{
setAttribute( attribute.getTag(), attribute.getSize(), attribute.getValuePtr() );
}
void getAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value, ByteCount* actualSize )
{
ATSUGetAttribute( style, tag, size, value, actualSize );
}
template <class T>
T getAttribute( ATSUAttributeTag tag )
{
T value;
ByteCount actualSize;
ATSUGetAttribute( style, tag, sizeof( T ), &value, &actualSize );
return value;
}
// TODO: Is calling this actually faster than calling setAttribute multiple times?
void setAttributes( QuartzTextStyleAttribute* attributes[], int number )
{
// Create the parallel arrays and initialize them properly
ATSUAttributeTag* tags = new ATSUAttributeTag[ number ];
ByteCount* sizes = new ByteCount[ number ];
ATSUAttributeValuePtr* values = new ATSUAttributeValuePtr[ number ];
for ( int i = 0; i < number; ++ i )
{
tags[i] = attributes[i]->getTag();
sizes[i] = attributes[i]->getSize();
values[i] = attributes[i]->getValuePtr();
}
ATSUSetAttributes( style, number, tags, sizes, values );
// Free the arrays that were allocated
delete[] tags;
delete[] sizes;
delete[] values;
}
void setFontFeature( ATSUFontFeatureType featureType, ATSUFontFeatureSelector selector )
{
ATSUSetFontFeatures( style, 1, &featureType, &selector );
}
const ATSUStyle& getATSUStyle() const
{
return style;
}
private:
ATSUStyle style;
};
#endif

View File

@ -0,0 +1,142 @@
/**
* QuartzTextStyleAttribute.h
*
* Original Code by Evan Jones on Wed Oct 02 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
*/
#ifndef _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
#define _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
class QuartzTextStyleAttribute
{
public:
QuartzTextStyleAttribute() {}
virtual ~QuartzTextStyleAttribute() {}
virtual ByteCount getSize() const = 0;
virtual ATSUAttributeValuePtr getValuePtr() = 0;
virtual ATSUAttributeTag getTag() const = 0;
};
class QuartzTextSize : public QuartzTextStyleAttribute
{
public:
QuartzTextSize( float points )
{
size = X2Fix( points );
}
ByteCount getSize() const
{
return sizeof( size );
}
ATSUAttributeValuePtr getValuePtr()
{
return &size;
}
ATSUAttributeTag getTag() const
{
return kATSUSizeTag;
}
private:
Fixed size;
};
class QuartzTextStyleAttributeBoolean : public QuartzTextStyleAttribute
{
public:
QuartzTextStyleAttributeBoolean( bool newVal ) : value( newVal ) {}
ByteCount getSize() const
{
return sizeof( value );
}
ATSUAttributeValuePtr getValuePtr()
{
return &value;
}
virtual ATSUAttributeTag getTag() const = 0;
private:
Boolean value;
};
class QuartzTextBold : public QuartzTextStyleAttributeBoolean
{
public:
QuartzTextBold( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
ATSUAttributeTag getTag() const
{
return kATSUQDBoldfaceTag;
}
};
class QuartzTextItalic : public QuartzTextStyleAttributeBoolean
{
public:
QuartzTextItalic( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
ATSUAttributeTag getTag() const
{
return kATSUQDItalicTag;
}
};
class QuartzTextUnderline : public QuartzTextStyleAttributeBoolean
{
public:
QuartzTextUnderline( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
ATSUAttributeTag getTag() const {
return kATSUQDUnderlineTag;
}
};
class QuartzFont : public QuartzTextStyleAttribute
{
public:
/** Create a font style from a name. */
QuartzFont( const char* name, int length )
{
assert( name != NULL && length > 0 && name[length] == '\0' );
// try to create font
OSStatus err = ATSUFindFontFromName( const_cast<char*>( name ), length, kFontFullName, (unsigned) kFontNoPlatform, kFontRomanScript, (unsigned) kFontNoLanguage, &fontid );
// need a fallback if font isn't installed
if( err != noErr || fontid == kATSUInvalidFontID )
::ATSUFindFontFromName( "Lucida Grande", 13, kFontFullName, (unsigned) kFontNoPlatform, kFontRomanScript, (unsigned) kFontNoLanguage, &fontid );
}
ByteCount getSize() const
{
return sizeof( fontid );
}
ATSUAttributeValuePtr getValuePtr()
{
return &fontid;
}
ATSUAttributeTag getTag() const
{
return kATSUFontTag;
}
ATSUFontID getFontID() const
{
return fontid;
}
private:
ATSUFontID fontid;
};
#endif

View File

@ -0,0 +1,54 @@
### start defines ###
NAME=Editor
ARCH=-arch i386
CC=gcc -x c++ $(ARCH)
CO=gcc -x objective-c++ $(ARCH)
LD=gcc $(ARCH) -framework Cocoa
gDEFs=-DSCI_NAMESPACE -DSCI_LEXER
INCS=-I../src/ -I../include/ -I.
CCX=$(CC) $(gDEFs) $(INCS)
CCO=$(CO) $(gDEFs) $(INCS)
BLD=build/SciAppBuild
TARG=$(APP)/Contents/MacOS/$(NAME)
APP=$(BLD)/$(NAME).app
all: $(BLD) $(TARG)
clean:
-rm -rf $(BLD)
$(APP):
-rm -rf $(APP)
-mkdir $(APP)
-mkdir $(APP)/Contents/
-mkdir $(APP)/Contents/Frameworks/
-mkdir $(APP)/Contents/MacOS/
-mkdir $(APP)/Contents/Resources/
-cp ScintillaTest/Info.plist $(APP)/Contents/Info.plist.bak
-sed "s/\$${EXECUTABLE_NAME}/$(NAME)/g" < $(APP)/Contents/Info.plist.bak > $(APP)/Contents/Info.plist.bak2
-sed "s/\$${PRODUCT_NAME}/$(NAME)/g" < $(APP)/Contents/Info.plist.bak2 > $(APP)/Contents/Info.plist
-rm $(APP)/Contents/Info.plist.bak $(APP)/Contents/Info.plist.bak2
-cp -r ScintillaTest/English.lproj $(APP)/Contents/Resources/
/Developer/usr/bin/ibtool --errors --warnings --notices --output-format human-readable-text \
--compile $(APP)/Contents/Resources/English.lproj/MainMenu.nib ScintillaTest/English.lproj/MainMenu.xib
-cp ScintillaTest/TestData.sql $(APP)/Contents/Resources/
-make -f Framework.mk all
$(TARG) : $(BLD)/main.o $(BLD)/AppController.o $(APP)
-cp -R build/framebuild/Sci.framework $(APP)/Contents/Frameworks/
$(LD) $(BLD)/main.o $(BLD)/AppController.o $(APP)/Contents/Frameworks/Sci.framework/Sci -o $(TARG) -lstdc++
$(BLD) :
-mkdir build
-mkdir $(BLD)
$(BLD)/%.o : ScintillaTest/%.mm
$(CCO) -c $< -o $@
$(BLD)/%.o : ScintillaTest/%.m
$(CCO) -c $< -o $@

View File

@ -0,0 +1,63 @@
/*
* ScintillaMacOSX.h
* tutorial
*
* Created by Evan Jones on Sun Sep 01 2002.
*
*/
#ifndef SCINTILLA_CALLTIP_H
#define SCINTILLA_CALLTIP_H
#include "TView.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include "Platform.h"
#include "Scintilla.h"
static const OSType scintillaCallTipType = 'Scct';
namespace Scintilla {
class ScintillaCallTip : public TView
{
public:
// Private so ScintillaCallTip objects can not be copied
ScintillaCallTip(const ScintillaCallTip &) : TView( NULL ) {}
ScintillaCallTip &operator=(const ScintillaCallTip &) { return * this; }
~ScintillaCallTip() {};
public:
/** This is the class ID that we've assigned to Scintilla. */
static const CFStringRef kScintillaCallTipClassID;
static const ControlKind kScintillaCallTipKind;
ScintillaCallTip( void* windowid );
/** Returns the HIView object kind, needed to subclass TView. */
virtual ControlKind GetKind() { return kScintillaCallTipKind; }
private:
virtual ControlPartCode HitTest( const HIPoint& where );
virtual void Draw( RgnHandle rgn, CGContextRef gc );
virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseDragged( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
public:
static HIViewRef Create();
private:
static OSStatus Construct( HIViewRef inControl, TView** outView );
};
}
#endif

View File

@ -0,0 +1,117 @@
#include "ScintillaCocoa.h"
#include "ScintillaCallTip.h"
#include "CallTip.h"
using namespace Scintilla;
const CFStringRef ScintillaCallTip::kScintillaCallTipClassID = CFSTR( "org.scintilla.calltip" );
const ControlKind ScintillaCallTip::kScintillaCallTipKind = { 'ejon', 'Scct' };
ScintillaCallTip::ScintillaCallTip( void* windowid ) :
TView( reinterpret_cast<HIViewRef>( windowid ) )
{
ActivateInterface( kMouse );
// debugPrint = true;
}
void ScintillaCallTip::Draw(
RgnHandle /*inLimitRgn*/,
CGContextRef inContext )
{
// Get a reference to the Scintilla C++ object
CallTip* ctip = NULL;
OSStatus err;
err = GetControlProperty( GetViewRef(), scintillaCallTipType, 0, sizeof( ctip ), NULL, &ctip );
assert(err == noErr);
if (ctip == NULL) return;
Rect contentBounds;
GetControlBounds(GetViewRef(), &contentBounds);
HIRect controlFrame;
HIViewGetFrame( GetViewRef(), &controlFrame );
// what is the global pos?
Surface *surfaceWindow = Surface::Allocate();
if (surfaceWindow) {
surfaceWindow->Init(inContext, GetViewRef());
ctip->PaintCT(surfaceWindow);
surfaceWindow->Release();
delete surfaceWindow;
}
}
ControlPartCode ScintillaCallTip::HitTest( const HIPoint& where )
{
if ( CGRectContainsPoint( Bounds(), where ) )
return 1;
else
return kControlNoPart;
}
OSStatus ScintillaCallTip::MouseDown(HIPoint& location, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
CallTip* ctip = NULL;
ScintillaCocoa *sciThis = NULL;
OSStatus err = GetControlProperty( GetViewRef(), scintillaCallTipType, 0, sizeof( ctip ), NULL, &ctip );
err = GetControlProperty( GetViewRef(), scintillaMacOSType, 0, sizeof( sciThis ), NULL, &sciThis );
ctip->MouseClick( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ));
sciThis->CallTipClick();
return noErr;
}
OSStatus ScintillaCallTip::MouseUp(HIPoint& /*inMouseLocation*/, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
return noErr;
}
OSStatus ScintillaCallTip::MouseDragged( HIPoint& location, UInt32 /*modifiers*/, EventMouseButton /*button*/, UInt32 /*clickCount*/ )
{
SetThemeCursor( kThemeArrowCursor );
return noErr;
}
HIViewRef ScintillaCallTip::Create()
{
// Register the HIView, if needed
static bool registered = false;
if ( not registered )
{
TView::RegisterSubclass( kScintillaCallTipClassID, Construct );
registered = true;
}
OSStatus err = noErr;
EventRef event = CreateInitializationEvent();
assert( event != NULL );
HIViewRef control = NULL;
err = HIObjectCreate( kScintillaCallTipClassID, event, reinterpret_cast<HIObjectRef*>( &control ) );
ReleaseEvent( event );
if ( err == noErr ) {
Platform::DebugPrintf("ScintillaCallTip::Create control %08X\n",control);
return control;
}
return NULL;
}
OSStatus ScintillaCallTip::Construct( HIViewRef inControl, TView** outView )
{
*outView = new ScintillaCallTip( inControl );
Platform::DebugPrintf("ScintillaCallTip::Construct scintilla %08X\n",*outView);
if ( *outView != NULL )
return noErr;
else
return memFullErr;
}
extern "C" {
HIViewRef scintilla_calltip_new() {
return ScintillaCallTip::Create();
}
}

View File

@ -0,0 +1,211 @@
/*
* ScintillaCocoa.h
*
* Mike Lischke <mlischke@sun.com>
*
* Based on ScintillaMacOSX.h
* Original code by Evan Jones on Sun Sep 01 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include <vector>
#ifdef SCI_LEXER
#include "SciLexer.h"
#include "PropSet.h"
#include "PropSetSimple.h"
#include "Accessor.h"
#include "KeyWords.h"
#endif
#include "SVector.h"
#include "SplitVector.h"
#include "Partitioning.h"
#include "RunStyles.h"
#include "ContractionState.h"
#include "CellBuffer.h"
#include "CallTip.h"
#include "KeyMap.h"
#include "Indicator.h"
#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "AutoComplete.h"
#include "ViewStyle.h"
#include "CharClassify.h"
#include "Decoration.h"
#include "Document.h"
#include "Selection.h"
#include "PositionCache.h"
#include "Editor.h"
//#include "ScintillaCallTip.h"
#include "ScintillaBase.h"
extern "C" NSString* ScintillaRecPboardType;
@class ScintillaView;
/**
* Helper class to be used as timer target (NSTimer).
*/
@interface TimerTarget : NSObject
{
void* mTarget;
NSNotificationQueue* notificationQueue;
}
- (id) init: (void*) target;
- (void) timerFired: (NSTimer*) timer;
- (void) idleTimerFired: (NSTimer*) timer;
- (void) idleTriggered: (NSNotification*) notification;
@end
namespace Scintilla {
/**
* On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
* back to the parent. Therefore, there must be a callback handler that acts
* like a Windows WndProc, where Scintilla can send notifications to. Use
* ScintillaCocoa::RegisterNotifyHandler() to register such a handler.
* Message format is:
* <br>
* WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = 0 (no control ID), lParam = ScintillaCocoa*
* <br>
* WM_NOTIFY: wParam = 0 (no control ID), lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaCocoa*
*/
typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
/**
* Scintilla sends these two messages to the nofity handler. Please refer
* to the Windows API doc for details about the message format.
*/
#define WM_COMMAND 1001
#define WM_NOTIFY 1002
/**
* Main scintilla class, implemented for OS X (Cocoa).
*/
class ScintillaCocoa : public ScintillaBase
{
private:
TimerTarget* timerTarget;
NSEvent* lastMouseEvent;
SciNotifyFunc notifyProc;
intptr_t notifyObj;
bool capturedMouse;
// Private so ScintillaCocoa objects can not be copied
ScintillaCocoa(const ScintillaCocoa &) : ScintillaBase() {}
ScintillaCocoa &operator=(const ScintillaCocoa &) { return * this; }
bool GetPasteboardData(NSPasteboard* board, SelectionText* selectedText);
void SetPasteboardData(NSPasteboard* board, const SelectionText& selectedText);
int scrollSpeed;
int scrollTicks;
protected:
NSView* ContentView();
PRectangle GetClientRectangle();
Point ConvertPoint(NSPoint point);
virtual void Initialise();
virtual void Finalise();
public:
ScintillaCocoa(NSView* view);
virtual ~ScintillaCocoa();
void RegisterNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
ScintillaView* TopContainer();
void SyncPaint(void* gc, PRectangle rc);
void Draw(NSRect rect, CGContextRef gc);
virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void SetTicking(bool on);
bool SetIdle(bool on);
void SetMouseCapture(bool on);
bool HaveMouseCapture();
void SetVerticalScrollPos();
void SetHorizontalScrollPos();
bool ModifyScrollBars(int nMax, int nPage);
void Resize();
void DoScroll(float position, NSScrollerPart part, bool horizontal);
// Notifications for the owner.
void NotifyChange();
void NotifyFocus(bool focus);
void NotifyParent(SCNotification scn);
void NotifyURIDropped(const char *uri);
bool HasSelection();
bool CanUndo();
bool CanRedo();
virtual void CopyToClipboard(const SelectionText &selectedText);
virtual void Copy();
virtual bool CanPaste();
virtual void Paste();
virtual void Paste(bool rectangular);
virtual void CreateCallTipWindow(PRectangle rc);
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
virtual void ClaimSelection();
NSPoint GetCaretPosition();
static sptr_t DirectFunction(ScintillaCocoa *sciThis, unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void TimerFired(NSTimer* timer);
void IdleTimerFired();
int InsertText(NSString* input);
bool KeyboardInput(NSEvent* event);
void MouseDown(NSEvent* event);
void MouseMove(NSEvent* event);
void MouseUp(NSEvent* event);
void MouseEntered(NSEvent* event);
void MouseExited(NSEvent* event);
void MouseWheel(NSEvent* event);
// Drag and drop
void StartDrag();
bool GetDragData(id <NSDraggingInfo> info, NSPasteboard &pasteBoard, SelectionText* selectedText);
NSDragOperation DraggingEntered(id <NSDraggingInfo> info);
NSDragOperation DraggingUpdated(id <NSDraggingInfo> info);
void DraggingExited(id <NSDraggingInfo> info);
bool PerformDragOperation(id <NSDraggingInfo> info);
void DragScroll();
// Promote some methods needed for NSResponder actions.
virtual void SelectAll();
void DeleteBackward();
virtual void Cut();
virtual void Undo();
virtual void Redo();
virtual NSMenu* CreateContextMenu(NSEvent* event);
void HandleCommand(NSInteger command);
// virtual OSStatus ActiveStateChanged();
//
// virtual void CallTipClick();
};
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,26 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>CFBundleDevelopmentRegion</key>
<string>English</string>
<key>CFBundleExecutable</key>
<string>${EXECUTABLE_NAME}</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.sun.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>FMWK</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSPrincipalClass</key>
<string></string>
</dict>
</plist>

View File

@ -0,0 +1,969 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
11374AAA10514AA900651FE9 /* LexMarkdown.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 11374AA910514AA900651FE9 /* LexMarkdown.cxx */; };
2744E4DC0FC1682C00E85C33 /* AutoComplete.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4CF0FC1682C00E85C33 /* AutoComplete.cxx */; };
2744E4DD0FC1682C00E85C33 /* CallTip.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D00FC1682C00E85C33 /* CallTip.cxx */; };
2744E4DE0FC1682C00E85C33 /* CellBuffer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D10FC1682C00E85C33 /* CellBuffer.cxx */; };
2744E4DF0FC1682C00E85C33 /* CharClassify.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D20FC1682C00E85C33 /* CharClassify.cxx */; };
2744E4E00FC1682C00E85C33 /* ContractionState.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D30FC1682C00E85C33 /* ContractionState.cxx */; };
2744E4E10FC1682C00E85C33 /* Decoration.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D40FC1682C00E85C33 /* Decoration.cxx */; };
2744E4E20FC1682C00E85C33 /* Document.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D50FC1682C00E85C33 /* Document.cxx */; };
2744E4E30FC1682C00E85C33 /* DocumentAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D60FC1682C00E85C33 /* DocumentAccessor.cxx */; };
2744E4E40FC1682C00E85C33 /* Editor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D70FC1682C00E85C33 /* Editor.cxx */; };
2744E4E50FC1682C00E85C33 /* ExternalLexer.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D80FC1682C00E85C33 /* ExternalLexer.cxx */; };
2744E4E60FC1682C00E85C33 /* Indicator.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4D90FC1682C00E85C33 /* Indicator.cxx */; };
2744E4E70FC1682C00E85C33 /* KeyMap.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4DA0FC1682C00E85C33 /* KeyMap.cxx */; };
2744E4E80FC1682C00E85C33 /* KeyWords.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4DB0FC1682C00E85C33 /* KeyWords.cxx */; };
2744E5360FC1684700E85C33 /* LexAbaqus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4E90FC1684700E85C33 /* LexAbaqus.cxx */; };
2744E5370FC1684700E85C33 /* LexAda.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EA0FC1684700E85C33 /* LexAda.cxx */; };
2744E5380FC1684700E85C33 /* LexAPDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EB0FC1684700E85C33 /* LexAPDL.cxx */; };
2744E5390FC1684700E85C33 /* LexAsm.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EC0FC1684700E85C33 /* LexAsm.cxx */; };
2744E53A0FC1684700E85C33 /* LexAsn1.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4ED0FC1684700E85C33 /* LexAsn1.cxx */; };
2744E53B0FC1684700E85C33 /* LexASY.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EE0FC1684700E85C33 /* LexASY.cxx */; };
2744E53C0FC1684700E85C33 /* LexAU3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4EF0FC1684700E85C33 /* LexAU3.cxx */; };
2744E53D0FC1684700E85C33 /* LexAVE.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F00FC1684700E85C33 /* LexAVE.cxx */; };
2744E53E0FC1684700E85C33 /* LexBaan.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F10FC1684700E85C33 /* LexBaan.cxx */; };
2744E53F0FC1684700E85C33 /* LexBash.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F20FC1684700E85C33 /* LexBash.cxx */; };
2744E5400FC1684700E85C33 /* LexBasic.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F30FC1684700E85C33 /* LexBasic.cxx */; };
2744E5410FC1684700E85C33 /* LexBullant.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F40FC1684700E85C33 /* LexBullant.cxx */; };
2744E5420FC1684700E85C33 /* LexCaml.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F50FC1684700E85C33 /* LexCaml.cxx */; };
2744E5430FC1684700E85C33 /* LexCLW.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F60FC1684700E85C33 /* LexCLW.cxx */; };
2744E5440FC1684700E85C33 /* LexCmake.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F70FC1684700E85C33 /* LexCmake.cxx */; };
2744E5450FC1684700E85C33 /* LexCOBOL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F80FC1684700E85C33 /* LexCOBOL.cxx */; };
2744E5460FC1684700E85C33 /* LexConf.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4F90FC1684700E85C33 /* LexConf.cxx */; };
2744E5470FC1684700E85C33 /* LexCPP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FA0FC1684700E85C33 /* LexCPP.cxx */; };
2744E5480FC1684700E85C33 /* LexCrontab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FB0FC1684700E85C33 /* LexCrontab.cxx */; };
2744E5490FC1684700E85C33 /* LexCsound.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FC0FC1684700E85C33 /* LexCsound.cxx */; };
2744E54A0FC1684700E85C33 /* LexCSS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FD0FC1684700E85C33 /* LexCSS.cxx */; };
2744E54B0FC1684700E85C33 /* LexD.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FE0FC1684700E85C33 /* LexD.cxx */; };
2744E54C0FC1684700E85C33 /* LexEiffel.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E4FF0FC1684700E85C33 /* LexEiffel.cxx */; };
2744E54D0FC1684700E85C33 /* LexErlang.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5000FC1684700E85C33 /* LexErlang.cxx */; };
2744E54E0FC1684700E85C33 /* LexEScript.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5010FC1684700E85C33 /* LexEScript.cxx */; };
2744E54F0FC1684700E85C33 /* LexFlagship.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5020FC1684700E85C33 /* LexFlagship.cxx */; };
2744E5500FC1684700E85C33 /* LexForth.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5030FC1684700E85C33 /* LexForth.cxx */; };
2744E5510FC1684700E85C33 /* LexFortran.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5040FC1684700E85C33 /* LexFortran.cxx */; };
2744E5520FC1684700E85C33 /* LexGAP.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5050FC1684700E85C33 /* LexGAP.cxx */; };
2744E5530FC1684700E85C33 /* LexGui4Cli.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5060FC1684700E85C33 /* LexGui4Cli.cxx */; };
2744E5540FC1684700E85C33 /* LexHaskell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5070FC1684700E85C33 /* LexHaskell.cxx */; };
2744E5550FC1684700E85C33 /* LexHTML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5080FC1684700E85C33 /* LexHTML.cxx */; };
2744E5560FC1684700E85C33 /* LexInno.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5090FC1684700E85C33 /* LexInno.cxx */; };
2744E5570FC1684700E85C33 /* LexKix.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50A0FC1684700E85C33 /* LexKix.cxx */; };
2744E5580FC1684700E85C33 /* LexLisp.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50B0FC1684700E85C33 /* LexLisp.cxx */; };
2744E5590FC1684700E85C33 /* LexLout.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50C0FC1684700E85C33 /* LexLout.cxx */; };
2744E55A0FC1684700E85C33 /* LexLua.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50D0FC1684700E85C33 /* LexLua.cxx */; };
2744E55B0FC1684700E85C33 /* LexMagik.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50E0FC1684700E85C33 /* LexMagik.cxx */; };
2744E55C0FC1684700E85C33 /* LexMatlab.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E50F0FC1684700E85C33 /* LexMatlab.cxx */; };
2744E55D0FC1684700E85C33 /* LexMetapost.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5100FC1684700E85C33 /* LexMetapost.cxx */; };
2744E55E0FC1684700E85C33 /* LexMMIXAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5110FC1684700E85C33 /* LexMMIXAL.cxx */; };
2744E55F0FC1684700E85C33 /* LexMPT.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5120FC1684700E85C33 /* LexMPT.cxx */; };
2744E5600FC1684700E85C33 /* LexMSSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5130FC1684700E85C33 /* LexMSSQL.cxx */; };
2744E5610FC1684700E85C33 /* LexMySQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5140FC1684700E85C33 /* LexMySQL.cxx */; };
2744E5620FC1684700E85C33 /* LexNimrod.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5150FC1684700E85C33 /* LexNimrod.cxx */; };
2744E5630FC1684700E85C33 /* LexNsis.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5160FC1684700E85C33 /* LexNsis.cxx */; };
2744E5640FC1684700E85C33 /* LexOpal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5170FC1684700E85C33 /* LexOpal.cxx */; };
2744E5650FC1684700E85C33 /* LexOthers.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5180FC1684700E85C33 /* LexOthers.cxx */; };
2744E5660FC1684700E85C33 /* LexPascal.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5190FC1684700E85C33 /* LexPascal.cxx */; };
2744E5670FC1684700E85C33 /* LexPB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51A0FC1684700E85C33 /* LexPB.cxx */; };
2744E5680FC1684700E85C33 /* LexPerl.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51B0FC1684700E85C33 /* LexPerl.cxx */; };
2744E5690FC1684700E85C33 /* LexPLM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51C0FC1684700E85C33 /* LexPLM.cxx */; };
2744E56A0FC1684700E85C33 /* LexPOV.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51D0FC1684700E85C33 /* LexPOV.cxx */; };
2744E56B0FC1684700E85C33 /* LexPowerPro.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51E0FC1684700E85C33 /* LexPowerPro.cxx */; };
2744E56C0FC1684700E85C33 /* LexPowerShell.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E51F0FC1684700E85C33 /* LexPowerShell.cxx */; };
2744E56D0FC1684700E85C33 /* LexProgress.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5200FC1684700E85C33 /* LexProgress.cxx */; };
2744E56E0FC1684700E85C33 /* LexPS.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5210FC1684700E85C33 /* LexPS.cxx */; };
2744E56F0FC1684700E85C33 /* LexPython.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5220FC1684700E85C33 /* LexPython.cxx */; };
2744E5700FC1684700E85C33 /* LexR.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5230FC1684700E85C33 /* LexR.cxx */; };
2744E5710FC1684700E85C33 /* LexRebol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5240FC1684700E85C33 /* LexRebol.cxx */; };
2744E5720FC1684700E85C33 /* LexRuby.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5250FC1684700E85C33 /* LexRuby.cxx */; };
2744E5730FC1684700E85C33 /* LexScriptol.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5260FC1684700E85C33 /* LexScriptol.cxx */; };
2744E5740FC1684700E85C33 /* LexSmalltalk.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5270FC1684700E85C33 /* LexSmalltalk.cxx */; };
2744E5750FC1684700E85C33 /* LexSML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5280FC1684700E85C33 /* LexSML.cxx */; };
2744E5760FC1684700E85C33 /* LexSorcus.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5290FC1684700E85C33 /* LexSorcus.cxx */; };
2744E5770FC1684700E85C33 /* LexSpecman.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52A0FC1684700E85C33 /* LexSpecman.cxx */; };
2744E5780FC1684700E85C33 /* LexSpice.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52B0FC1684700E85C33 /* LexSpice.cxx */; };
2744E5790FC1684700E85C33 /* LexSQL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52C0FC1684700E85C33 /* LexSQL.cxx */; };
2744E57A0FC1684700E85C33 /* LexTACL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52D0FC1684700E85C33 /* LexTACL.cxx */; };
2744E57B0FC1684700E85C33 /* LexTADS3.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52E0FC1684700E85C33 /* LexTADS3.cxx */; };
2744E57C0FC1684700E85C33 /* LexTAL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E52F0FC1684700E85C33 /* LexTAL.cxx */; };
2744E57D0FC1684700E85C33 /* LexTCL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5300FC1684700E85C33 /* LexTCL.cxx */; };
2744E57E0FC1684700E85C33 /* LexTeX.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5310FC1684700E85C33 /* LexTeX.cxx */; };
2744E57F0FC1684700E85C33 /* LexVB.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5320FC1684700E85C33 /* LexVB.cxx */; };
2744E5800FC1684700E85C33 /* LexVerilog.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5330FC1684700E85C33 /* LexVerilog.cxx */; };
2744E5810FC1684700E85C33 /* LexVHDL.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5340FC1684700E85C33 /* LexVHDL.cxx */; };
2744E5820FC1684700E85C33 /* LexYAML.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5350FC1684700E85C33 /* LexYAML.cxx */; };
2744E5900FC1685C00E85C33 /* LineMarker.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5830FC1685C00E85C33 /* LineMarker.cxx */; };
2744E5910FC1685C00E85C33 /* PerLine.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5840FC1685C00E85C33 /* PerLine.cxx */; };
2744E5920FC1685C00E85C33 /* PositionCache.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5850FC1685C00E85C33 /* PositionCache.cxx */; };
2744E5930FC1685C00E85C33 /* PropSet.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5860FC1685C00E85C33 /* PropSet.cxx */; };
2744E5940FC1685C00E85C33 /* RESearch.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5870FC1685C00E85C33 /* RESearch.cxx */; };
2744E5950FC1685C00E85C33 /* RunStyles.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5880FC1685C00E85C33 /* RunStyles.cxx */; };
2744E5960FC1685C00E85C33 /* ScintillaBase.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5890FC1685C00E85C33 /* ScintillaBase.cxx */; };
2744E5970FC1685C00E85C33 /* Style.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58A0FC1685C00E85C33 /* Style.cxx */; };
2744E5980FC1685C00E85C33 /* StyleContext.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58B0FC1685C00E85C33 /* StyleContext.cxx */; };
2744E5990FC1685C00E85C33 /* UniConversion.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58C0FC1685C00E85C33 /* UniConversion.cxx */; };
2744E59A0FC1685C00E85C33 /* ViewStyle.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58D0FC1685C00E85C33 /* ViewStyle.cxx */; };
2744E59B0FC1685C00E85C33 /* WindowAccessor.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58E0FC1685C00E85C33 /* WindowAccessor.cxx */; };
2744E59C0FC1685C00E85C33 /* XPM.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 2744E58F0FC1685C00E85C33 /* XPM.cxx */; };
2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59D0FC168A100E85C33 /* InfoBar.h */; settings = {ATTRIBUTES = (Public, ); }; };
2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A30FC168A100E85C33 /* ScintillaView.h */; settings = {ATTRIBUTES = (Public, ); }; };
2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
2744E5B20FC168C500E85C33 /* InfoBar.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5AD0FC168C500E85C33 /* InfoBar.mm */; };
2744E5B30FC168C500E85C33 /* PlatCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5AE0FC168C500E85C33 /* PlatCocoa.mm */; };
2744E5B50FC168C500E85C33 /* ScintillaCocoa.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5B00FC168C500E85C33 /* ScintillaCocoa.mm */; };
2744E5B60FC168C500E85C33 /* ScintillaView.mm in Sources */ = {isa = PBXBuildFile; fileRef = 2744E5B10FC168C500E85C33 /* ScintillaView.mm */; };
277B5BDA104EE6B900F40CE4 /* Selection.cxx in Sources */ = {isa = PBXBuildFile; fileRef = 277B5BD9104EE6B900F40CE4 /* Selection.cxx */; };
277B5BDD104EE6CF00F40CE4 /* PropSetSimple.h in Headers */ = {isa = PBXBuildFile; fileRef = 277B5BDB104EE6CF00F40CE4 /* PropSetSimple.h */; };
277B5BDE104EE6CF00F40CE4 /* Selection.h in Headers */ = {isa = PBXBuildFile; fileRef = 277B5BDC104EE6CF00F40CE4 /* Selection.h */; };
2791F3C60FC19F71009DBCF9 /* PlatCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59E0FC168A100E85C33 /* PlatCocoa.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4850FC1678600E85C33 /* Platform.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4870FC1678600E85C33 /* SciLexer.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4880FC1678600E85C33 /* Scintilla.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A20FC168A100E85C33 /* ScintillaCocoa.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3E30FC1A3AE009DBCF9 /* QuartzTextLayout.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E59F0FC168A100E85C33 /* QuartzTextLayout.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3E40FC1A3AE009DBCF9 /* QuartzTextStyleAttribute.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E5A00FC168A100E85C33 /* QuartzTextStyleAttribute.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3E50FC1A3AE009DBCF9 /* Accessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4830FC1678600E85C33 /* Accessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3E60FC1A3AE009DBCF9 /* KeyWords.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4840FC1678600E85C33 /* KeyWords.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3E70FC1A3AE009DBCF9 /* PropSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4860FC1678600E85C33 /* PropSet.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3E80FC1A3AE009DBCF9 /* ScintillaWidget.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E48A0FC1678600E85C33 /* ScintillaWidget.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3EA0FC1A3AE009DBCF9 /* WindowAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E48C0FC1678600E85C33 /* WindowAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3EB0FC1A3BD009DBCF9 /* AutoComplete.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4990FC1681200E85C33 /* AutoComplete.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3EC0FC1A3BD009DBCF9 /* CallTip.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49A0FC1681200E85C33 /* CallTip.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3ED0FC1A3BD009DBCF9 /* CellBuffer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49B0FC1681200E85C33 /* CellBuffer.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3EE0FC1A3BD009DBCF9 /* CharacterSet.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49C0FC1681200E85C33 /* CharacterSet.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3EF0FC1A3BD009DBCF9 /* CharClassify.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49D0FC1681200E85C33 /* CharClassify.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F00FC1A3BD009DBCF9 /* ContractionState.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49E0FC1681200E85C33 /* ContractionState.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F10FC1A3BD009DBCF9 /* Decoration.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E49F0FC1681200E85C33 /* Decoration.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F20FC1A3BD009DBCF9 /* Document.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A00FC1681200E85C33 /* Document.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F30FC1A3BD009DBCF9 /* DocumentAccessor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A10FC1681200E85C33 /* DocumentAccessor.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F40FC1A3BD009DBCF9 /* Editor.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A20FC1681200E85C33 /* Editor.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F50FC1A3BD009DBCF9 /* ExternalLexer.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A30FC1681200E85C33 /* ExternalLexer.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F60FC1A3BD009DBCF9 /* Indicator.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A40FC1681200E85C33 /* Indicator.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F70FC1A3BD009DBCF9 /* KeyMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A50FC1681200E85C33 /* KeyMap.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F80FC1A3BD009DBCF9 /* LineMarker.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A60FC1681200E85C33 /* LineMarker.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3F90FC1A3BD009DBCF9 /* Partitioning.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A70FC1681200E85C33 /* Partitioning.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3FA0FC1A3BD009DBCF9 /* PerLine.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A80FC1681200E85C33 /* PerLine.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3FB0FC1A3BD009DBCF9 /* PositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4A90FC1681200E85C33 /* PositionCache.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3FC0FC1A3BD009DBCF9 /* RESearch.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AA0FC1681200E85C33 /* RESearch.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3FD0FC1A3BD009DBCF9 /* RunStyles.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AB0FC1681200E85C33 /* RunStyles.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3FE0FC1A3BD009DBCF9 /* ScintillaBase.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AC0FC1681200E85C33 /* ScintillaBase.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F3FF0FC1A3BD009DBCF9 /* SplitVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AD0FC1681200E85C33 /* SplitVector.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F4000FC1A3BD009DBCF9 /* Style.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AE0FC1681200E85C33 /* Style.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F4010FC1A3BD009DBCF9 /* StyleContext.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4AF0FC1681200E85C33 /* StyleContext.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F4020FC1A3BD009DBCF9 /* SVector.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B00FC1681200E85C33 /* SVector.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F4030FC1A3BD009DBCF9 /* UniConversion.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B10FC1681200E85C33 /* UniConversion.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F4040FC1A3BD009DBCF9 /* ViewStyle.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B20FC1681200E85C33 /* ViewStyle.h */; settings = {ATTRIBUTES = (Public, ); }; };
2791F4050FC1A3BD009DBCF9 /* XPM.h in Headers */ = {isa = PBXBuildFile; fileRef = 2744E4B30FC1681200E85C33 /* XPM.h */; settings = {ATTRIBUTES = (Public, ); }; };
27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4510FC1B413005E115A /* info_bar_bg.png */; };
27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4520FC1B413005E115A /* mac_cursor_busy.png */; };
27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */ = {isa = PBXBuildFile; fileRef = 27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */; };
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C1666FE841158C02AAC07 /* InfoPlist.strings */; };
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0867D69BFE84028FC02AAC07 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
0867D6A5FE840307C02AAC07 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
089C1667FE841158C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
11374AA910514AA900651FE9 /* LexMarkdown.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMarkdown.cxx; path = ../../src/LexMarkdown.cxx; sourceTree = SOURCE_ROOT; };
2744E4830FC1678600E85C33 /* Accessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Accessor.h; path = ../../include/Accessor.h; sourceTree = SOURCE_ROOT; };
2744E4840FC1678600E85C33 /* KeyWords.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyWords.h; path = ../../include/KeyWords.h; sourceTree = SOURCE_ROOT; };
2744E4850FC1678600E85C33 /* Platform.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Platform.h; path = ../../include/Platform.h; sourceTree = SOURCE_ROOT; };
2744E4860FC1678600E85C33 /* PropSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSet.h; path = ../../include/PropSet.h; sourceTree = SOURCE_ROOT; };
2744E4870FC1678600E85C33 /* SciLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SciLexer.h; path = ../../include/SciLexer.h; sourceTree = SOURCE_ROOT; };
2744E4880FC1678600E85C33 /* Scintilla.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Scintilla.h; path = ../../include/Scintilla.h; sourceTree = SOURCE_ROOT; };
2744E48A0FC1678600E85C33 /* ScintillaWidget.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaWidget.h; path = ../../include/ScintillaWidget.h; sourceTree = SOURCE_ROOT; };
2744E48C0FC1678600E85C33 /* WindowAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = WindowAccessor.h; path = ../../include/WindowAccessor.h; sourceTree = SOURCE_ROOT; };
2744E4990FC1681200E85C33 /* AutoComplete.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AutoComplete.h; path = ../../src/AutoComplete.h; sourceTree = SOURCE_ROOT; };
2744E49A0FC1681200E85C33 /* CallTip.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CallTip.h; path = ../../src/CallTip.h; sourceTree = SOURCE_ROOT; };
2744E49B0FC1681200E85C33 /* CellBuffer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CellBuffer.h; path = ../../src/CellBuffer.h; sourceTree = SOURCE_ROOT; };
2744E49C0FC1681200E85C33 /* CharacterSet.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharacterSet.h; path = ../../src/CharacterSet.h; sourceTree = SOURCE_ROOT; };
2744E49D0FC1681200E85C33 /* CharClassify.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = CharClassify.h; path = ../../src/CharClassify.h; sourceTree = SOURCE_ROOT; };
2744E49E0FC1681200E85C33 /* ContractionState.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ContractionState.h; path = ../../src/ContractionState.h; sourceTree = SOURCE_ROOT; };
2744E49F0FC1681200E85C33 /* Decoration.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Decoration.h; path = ../../src/Decoration.h; sourceTree = SOURCE_ROOT; };
2744E4A00FC1681200E85C33 /* Document.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Document.h; path = ../../src/Document.h; sourceTree = SOURCE_ROOT; };
2744E4A10FC1681200E85C33 /* DocumentAccessor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = DocumentAccessor.h; path = ../../src/DocumentAccessor.h; sourceTree = SOURCE_ROOT; };
2744E4A20FC1681200E85C33 /* Editor.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Editor.h; path = ../../src/Editor.h; sourceTree = SOURCE_ROOT; };
2744E4A30FC1681200E85C33 /* ExternalLexer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ExternalLexer.h; path = ../../src/ExternalLexer.h; sourceTree = SOURCE_ROOT; };
2744E4A40FC1681200E85C33 /* Indicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Indicator.h; path = ../../src/Indicator.h; sourceTree = SOURCE_ROOT; };
2744E4A50FC1681200E85C33 /* KeyMap.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = KeyMap.h; path = ../../src/KeyMap.h; sourceTree = SOURCE_ROOT; };
2744E4A60FC1681200E85C33 /* LineMarker.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = LineMarker.h; path = ../../src/LineMarker.h; sourceTree = SOURCE_ROOT; };
2744E4A70FC1681200E85C33 /* Partitioning.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Partitioning.h; path = ../../src/Partitioning.h; sourceTree = SOURCE_ROOT; };
2744E4A80FC1681200E85C33 /* PerLine.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PerLine.h; path = ../../src/PerLine.h; sourceTree = SOURCE_ROOT; };
2744E4A90FC1681200E85C33 /* PositionCache.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PositionCache.h; path = ../../src/PositionCache.h; sourceTree = SOURCE_ROOT; };
2744E4AA0FC1681200E85C33 /* RESearch.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RESearch.h; path = ../../src/RESearch.h; sourceTree = SOURCE_ROOT; };
2744E4AB0FC1681200E85C33 /* RunStyles.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RunStyles.h; path = ../../src/RunStyles.h; sourceTree = SOURCE_ROOT; };
2744E4AC0FC1681200E85C33 /* ScintillaBase.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaBase.h; path = ../../src/ScintillaBase.h; sourceTree = SOURCE_ROOT; };
2744E4AD0FC1681200E85C33 /* SplitVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SplitVector.h; path = ../../src/SplitVector.h; sourceTree = SOURCE_ROOT; };
2744E4AE0FC1681200E85C33 /* Style.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Style.h; path = ../../src/Style.h; sourceTree = SOURCE_ROOT; };
2744E4AF0FC1681200E85C33 /* StyleContext.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = StyleContext.h; path = ../../src/StyleContext.h; sourceTree = SOURCE_ROOT; };
2744E4B00FC1681200E85C33 /* SVector.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = SVector.h; path = ../../src/SVector.h; sourceTree = SOURCE_ROOT; };
2744E4B10FC1681200E85C33 /* UniConversion.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = UniConversion.h; path = ../../src/UniConversion.h; sourceTree = SOURCE_ROOT; };
2744E4B20FC1681200E85C33 /* ViewStyle.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ViewStyle.h; path = ../../src/ViewStyle.h; sourceTree = SOURCE_ROOT; };
2744E4B30FC1681200E85C33 /* XPM.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = XPM.h; path = ../../src/XPM.h; sourceTree = SOURCE_ROOT; };
2744E4CF0FC1682C00E85C33 /* AutoComplete.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AutoComplete.cxx; path = ../../src/AutoComplete.cxx; sourceTree = SOURCE_ROOT; };
2744E4D00FC1682C00E85C33 /* CallTip.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CallTip.cxx; path = ../../src/CallTip.cxx; sourceTree = SOURCE_ROOT; };
2744E4D10FC1682C00E85C33 /* CellBuffer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CellBuffer.cxx; path = ../../src/CellBuffer.cxx; sourceTree = SOURCE_ROOT; };
2744E4D20FC1682C00E85C33 /* CharClassify.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = CharClassify.cxx; path = ../../src/CharClassify.cxx; sourceTree = SOURCE_ROOT; };
2744E4D30FC1682C00E85C33 /* ContractionState.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ContractionState.cxx; path = ../../src/ContractionState.cxx; sourceTree = SOURCE_ROOT; };
2744E4D40FC1682C00E85C33 /* Decoration.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Decoration.cxx; path = ../../src/Decoration.cxx; sourceTree = SOURCE_ROOT; };
2744E4D50FC1682C00E85C33 /* Document.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Document.cxx; path = ../../src/Document.cxx; sourceTree = SOURCE_ROOT; };
2744E4D60FC1682C00E85C33 /* DocumentAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = DocumentAccessor.cxx; path = ../../src/DocumentAccessor.cxx; sourceTree = SOURCE_ROOT; };
2744E4D70FC1682C00E85C33 /* Editor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Editor.cxx; path = ../../src/Editor.cxx; sourceTree = SOURCE_ROOT; };
2744E4D80FC1682C00E85C33 /* ExternalLexer.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ExternalLexer.cxx; path = ../../src/ExternalLexer.cxx; sourceTree = SOURCE_ROOT; };
2744E4D90FC1682C00E85C33 /* Indicator.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Indicator.cxx; path = ../../src/Indicator.cxx; sourceTree = SOURCE_ROOT; };
2744E4DA0FC1682C00E85C33 /* KeyMap.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyMap.cxx; path = ../../src/KeyMap.cxx; sourceTree = SOURCE_ROOT; };
2744E4DB0FC1682C00E85C33 /* KeyWords.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = KeyWords.cxx; path = ../../src/KeyWords.cxx; sourceTree = SOURCE_ROOT; };
2744E4E90FC1684700E85C33 /* LexAbaqus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAbaqus.cxx; path = ../../src/LexAbaqus.cxx; sourceTree = SOURCE_ROOT; };
2744E4EA0FC1684700E85C33 /* LexAda.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAda.cxx; path = ../../src/LexAda.cxx; sourceTree = SOURCE_ROOT; };
2744E4EB0FC1684700E85C33 /* LexAPDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAPDL.cxx; path = ../../src/LexAPDL.cxx; sourceTree = SOURCE_ROOT; };
2744E4EC0FC1684700E85C33 /* LexAsm.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsm.cxx; path = ../../src/LexAsm.cxx; sourceTree = SOURCE_ROOT; };
2744E4ED0FC1684700E85C33 /* LexAsn1.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAsn1.cxx; path = ../../src/LexAsn1.cxx; sourceTree = SOURCE_ROOT; };
2744E4EE0FC1684700E85C33 /* LexASY.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexASY.cxx; path = ../../src/LexASY.cxx; sourceTree = SOURCE_ROOT; };
2744E4EF0FC1684700E85C33 /* LexAU3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAU3.cxx; path = ../../src/LexAU3.cxx; sourceTree = SOURCE_ROOT; };
2744E4F00FC1684700E85C33 /* LexAVE.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexAVE.cxx; path = ../../src/LexAVE.cxx; sourceTree = SOURCE_ROOT; };
2744E4F10FC1684700E85C33 /* LexBaan.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBaan.cxx; path = ../../src/LexBaan.cxx; sourceTree = SOURCE_ROOT; };
2744E4F20FC1684700E85C33 /* LexBash.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBash.cxx; path = ../../src/LexBash.cxx; sourceTree = SOURCE_ROOT; };
2744E4F30FC1684700E85C33 /* LexBasic.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBasic.cxx; path = ../../src/LexBasic.cxx; sourceTree = SOURCE_ROOT; };
2744E4F40FC1684700E85C33 /* LexBullant.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexBullant.cxx; path = ../../src/LexBullant.cxx; sourceTree = SOURCE_ROOT; };
2744E4F50FC1684700E85C33 /* LexCaml.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCaml.cxx; path = ../../src/LexCaml.cxx; sourceTree = SOURCE_ROOT; };
2744E4F60FC1684700E85C33 /* LexCLW.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCLW.cxx; path = ../../src/LexCLW.cxx; sourceTree = SOURCE_ROOT; };
2744E4F70FC1684700E85C33 /* LexCmake.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCmake.cxx; path = ../../src/LexCmake.cxx; sourceTree = SOURCE_ROOT; };
2744E4F80FC1684700E85C33 /* LexCOBOL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCOBOL.cxx; path = ../../src/LexCOBOL.cxx; sourceTree = SOURCE_ROOT; };
2744E4F90FC1684700E85C33 /* LexConf.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexConf.cxx; path = ../../src/LexConf.cxx; sourceTree = SOURCE_ROOT; };
2744E4FA0FC1684700E85C33 /* LexCPP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCPP.cxx; path = ../../src/LexCPP.cxx; sourceTree = SOURCE_ROOT; };
2744E4FB0FC1684700E85C33 /* LexCrontab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCrontab.cxx; path = ../../src/LexCrontab.cxx; sourceTree = SOURCE_ROOT; };
2744E4FC0FC1684700E85C33 /* LexCsound.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCsound.cxx; path = ../../src/LexCsound.cxx; sourceTree = SOURCE_ROOT; };
2744E4FD0FC1684700E85C33 /* LexCSS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexCSS.cxx; path = ../../src/LexCSS.cxx; sourceTree = SOURCE_ROOT; };
2744E4FE0FC1684700E85C33 /* LexD.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexD.cxx; path = ../../src/LexD.cxx; sourceTree = SOURCE_ROOT; };
2744E4FF0FC1684700E85C33 /* LexEiffel.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEiffel.cxx; path = ../../src/LexEiffel.cxx; sourceTree = SOURCE_ROOT; };
2744E5000FC1684700E85C33 /* LexErlang.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexErlang.cxx; path = ../../src/LexErlang.cxx; sourceTree = SOURCE_ROOT; };
2744E5010FC1684700E85C33 /* LexEScript.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexEScript.cxx; path = ../../src/LexEScript.cxx; sourceTree = SOURCE_ROOT; };
2744E5020FC1684700E85C33 /* LexFlagship.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFlagship.cxx; path = ../../src/LexFlagship.cxx; sourceTree = SOURCE_ROOT; };
2744E5030FC1684700E85C33 /* LexForth.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexForth.cxx; path = ../../src/LexForth.cxx; sourceTree = SOURCE_ROOT; };
2744E5040FC1684700E85C33 /* LexFortran.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexFortran.cxx; path = ../../src/LexFortran.cxx; sourceTree = SOURCE_ROOT; };
2744E5050FC1684700E85C33 /* LexGAP.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGAP.cxx; path = ../../src/LexGAP.cxx; sourceTree = SOURCE_ROOT; };
2744E5060FC1684700E85C33 /* LexGui4Cli.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexGui4Cli.cxx; path = ../../src/LexGui4Cli.cxx; sourceTree = SOURCE_ROOT; };
2744E5070FC1684700E85C33 /* LexHaskell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHaskell.cxx; path = ../../src/LexHaskell.cxx; sourceTree = SOURCE_ROOT; };
2744E5080FC1684700E85C33 /* LexHTML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexHTML.cxx; path = ../../src/LexHTML.cxx; sourceTree = SOURCE_ROOT; };
2744E5090FC1684700E85C33 /* LexInno.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexInno.cxx; path = ../../src/LexInno.cxx; sourceTree = SOURCE_ROOT; };
2744E50A0FC1684700E85C33 /* LexKix.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexKix.cxx; path = ../../src/LexKix.cxx; sourceTree = SOURCE_ROOT; };
2744E50B0FC1684700E85C33 /* LexLisp.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLisp.cxx; path = ../../src/LexLisp.cxx; sourceTree = SOURCE_ROOT; };
2744E50C0FC1684700E85C33 /* LexLout.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLout.cxx; path = ../../src/LexLout.cxx; sourceTree = SOURCE_ROOT; };
2744E50D0FC1684700E85C33 /* LexLua.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexLua.cxx; path = ../../src/LexLua.cxx; sourceTree = SOURCE_ROOT; };
2744E50E0FC1684700E85C33 /* LexMagik.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMagik.cxx; path = ../../src/LexMagik.cxx; sourceTree = SOURCE_ROOT; };
2744E50F0FC1684700E85C33 /* LexMatlab.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMatlab.cxx; path = ../../src/LexMatlab.cxx; sourceTree = SOURCE_ROOT; };
2744E5100FC1684700E85C33 /* LexMetapost.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMetapost.cxx; path = ../../src/LexMetapost.cxx; sourceTree = SOURCE_ROOT; };
2744E5110FC1684700E85C33 /* LexMMIXAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMMIXAL.cxx; path = ../../src/LexMMIXAL.cxx; sourceTree = SOURCE_ROOT; };
2744E5120FC1684700E85C33 /* LexMPT.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMPT.cxx; path = ../../src/LexMPT.cxx; sourceTree = SOURCE_ROOT; };
2744E5130FC1684700E85C33 /* LexMSSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMSSQL.cxx; path = ../../src/LexMSSQL.cxx; sourceTree = SOURCE_ROOT; };
2744E5140FC1684700E85C33 /* LexMySQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexMySQL.cxx; path = ../../src/LexMySQL.cxx; sourceTree = SOURCE_ROOT; };
2744E5150FC1684700E85C33 /* LexNimrod.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNimrod.cxx; path = ../../src/LexNimrod.cxx; sourceTree = SOURCE_ROOT; };
2744E5160FC1684700E85C33 /* LexNsis.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexNsis.cxx; path = ../../src/LexNsis.cxx; sourceTree = SOURCE_ROOT; };
2744E5170FC1684700E85C33 /* LexOpal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOpal.cxx; path = ../../src/LexOpal.cxx; sourceTree = SOURCE_ROOT; };
2744E5180FC1684700E85C33 /* LexOthers.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexOthers.cxx; path = ../../src/LexOthers.cxx; sourceTree = SOURCE_ROOT; };
2744E5190FC1684700E85C33 /* LexPascal.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPascal.cxx; path = ../../src/LexPascal.cxx; sourceTree = SOURCE_ROOT; };
2744E51A0FC1684700E85C33 /* LexPB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPB.cxx; path = ../../src/LexPB.cxx; sourceTree = SOURCE_ROOT; };
2744E51B0FC1684700E85C33 /* LexPerl.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPerl.cxx; path = ../../src/LexPerl.cxx; sourceTree = SOURCE_ROOT; };
2744E51C0FC1684700E85C33 /* LexPLM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPLM.cxx; path = ../../src/LexPLM.cxx; sourceTree = SOURCE_ROOT; };
2744E51D0FC1684700E85C33 /* LexPOV.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPOV.cxx; path = ../../src/LexPOV.cxx; sourceTree = SOURCE_ROOT; };
2744E51E0FC1684700E85C33 /* LexPowerPro.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerPro.cxx; path = ../../src/LexPowerPro.cxx; sourceTree = SOURCE_ROOT; };
2744E51F0FC1684700E85C33 /* LexPowerShell.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPowerShell.cxx; path = ../../src/LexPowerShell.cxx; sourceTree = SOURCE_ROOT; };
2744E5200FC1684700E85C33 /* LexProgress.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexProgress.cxx; path = ../../src/LexProgress.cxx; sourceTree = SOURCE_ROOT; };
2744E5210FC1684700E85C33 /* LexPS.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPS.cxx; path = ../../src/LexPS.cxx; sourceTree = SOURCE_ROOT; };
2744E5220FC1684700E85C33 /* LexPython.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexPython.cxx; path = ../../src/LexPython.cxx; sourceTree = SOURCE_ROOT; };
2744E5230FC1684700E85C33 /* LexR.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexR.cxx; path = ../../src/LexR.cxx; sourceTree = SOURCE_ROOT; };
2744E5240FC1684700E85C33 /* LexRebol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRebol.cxx; path = ../../src/LexRebol.cxx; sourceTree = SOURCE_ROOT; };
2744E5250FC1684700E85C33 /* LexRuby.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexRuby.cxx; path = ../../src/LexRuby.cxx; sourceTree = SOURCE_ROOT; };
2744E5260FC1684700E85C33 /* LexScriptol.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexScriptol.cxx; path = ../../src/LexScriptol.cxx; sourceTree = SOURCE_ROOT; };
2744E5270FC1684700E85C33 /* LexSmalltalk.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSmalltalk.cxx; path = ../../src/LexSmalltalk.cxx; sourceTree = SOURCE_ROOT; };
2744E5280FC1684700E85C33 /* LexSML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSML.cxx; path = ../../src/LexSML.cxx; sourceTree = SOURCE_ROOT; };
2744E5290FC1684700E85C33 /* LexSorcus.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSorcus.cxx; path = ../../src/LexSorcus.cxx; sourceTree = SOURCE_ROOT; };
2744E52A0FC1684700E85C33 /* LexSpecman.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpecman.cxx; path = ../../src/LexSpecman.cxx; sourceTree = SOURCE_ROOT; };
2744E52B0FC1684700E85C33 /* LexSpice.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSpice.cxx; path = ../../src/LexSpice.cxx; sourceTree = SOURCE_ROOT; };
2744E52C0FC1684700E85C33 /* LexSQL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexSQL.cxx; path = ../../src/LexSQL.cxx; sourceTree = SOURCE_ROOT; };
2744E52D0FC1684700E85C33 /* LexTACL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTACL.cxx; path = ../../src/LexTACL.cxx; sourceTree = SOURCE_ROOT; };
2744E52E0FC1684700E85C33 /* LexTADS3.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTADS3.cxx; path = ../../src/LexTADS3.cxx; sourceTree = SOURCE_ROOT; };
2744E52F0FC1684700E85C33 /* LexTAL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTAL.cxx; path = ../../src/LexTAL.cxx; sourceTree = SOURCE_ROOT; };
2744E5300FC1684700E85C33 /* LexTCL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTCL.cxx; path = ../../src/LexTCL.cxx; sourceTree = SOURCE_ROOT; };
2744E5310FC1684700E85C33 /* LexTeX.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexTeX.cxx; path = ../../src/LexTeX.cxx; sourceTree = SOURCE_ROOT; };
2744E5320FC1684700E85C33 /* LexVB.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVB.cxx; path = ../../src/LexVB.cxx; sourceTree = SOURCE_ROOT; };
2744E5330FC1684700E85C33 /* LexVerilog.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVerilog.cxx; path = ../../src/LexVerilog.cxx; sourceTree = SOURCE_ROOT; };
2744E5340FC1684700E85C33 /* LexVHDL.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexVHDL.cxx; path = ../../src/LexVHDL.cxx; sourceTree = SOURCE_ROOT; };
2744E5350FC1684700E85C33 /* LexYAML.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LexYAML.cxx; path = ../../src/LexYAML.cxx; sourceTree = SOURCE_ROOT; };
2744E5830FC1685C00E85C33 /* LineMarker.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = LineMarker.cxx; path = ../../src/LineMarker.cxx; sourceTree = SOURCE_ROOT; };
2744E5840FC1685C00E85C33 /* PerLine.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PerLine.cxx; path = ../../src/PerLine.cxx; sourceTree = SOURCE_ROOT; };
2744E5850FC1685C00E85C33 /* PositionCache.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PositionCache.cxx; path = ../../src/PositionCache.cxx; sourceTree = SOURCE_ROOT; };
2744E5860FC1685C00E85C33 /* PropSet.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = PropSet.cxx; path = ../../src/PropSet.cxx; sourceTree = SOURCE_ROOT; };
2744E5870FC1685C00E85C33 /* RESearch.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RESearch.cxx; path = ../../src/RESearch.cxx; sourceTree = SOURCE_ROOT; };
2744E5880FC1685C00E85C33 /* RunStyles.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = RunStyles.cxx; path = ../../src/RunStyles.cxx; sourceTree = SOURCE_ROOT; };
2744E5890FC1685C00E85C33 /* ScintillaBase.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ScintillaBase.cxx; path = ../../src/ScintillaBase.cxx; sourceTree = SOURCE_ROOT; };
2744E58A0FC1685C00E85C33 /* Style.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Style.cxx; path = ../../src/Style.cxx; sourceTree = SOURCE_ROOT; };
2744E58B0FC1685C00E85C33 /* StyleContext.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = StyleContext.cxx; path = ../../src/StyleContext.cxx; sourceTree = SOURCE_ROOT; };
2744E58C0FC1685C00E85C33 /* UniConversion.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = UniConversion.cxx; path = ../../src/UniConversion.cxx; sourceTree = SOURCE_ROOT; };
2744E58D0FC1685C00E85C33 /* ViewStyle.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = ViewStyle.cxx; path = ../../src/ViewStyle.cxx; sourceTree = SOURCE_ROOT; };
2744E58E0FC1685C00E85C33 /* WindowAccessor.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = WindowAccessor.cxx; path = ../../src/WindowAccessor.cxx; sourceTree = SOURCE_ROOT; };
2744E58F0FC1685C00E85C33 /* XPM.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = XPM.cxx; path = ../../src/XPM.cxx; sourceTree = SOURCE_ROOT; };
2744E59D0FC168A100E85C33 /* InfoBar.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBar.h; path = ../InfoBar.h; sourceTree = SOURCE_ROOT; };
2744E59E0FC168A100E85C33 /* PlatCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PlatCocoa.h; path = ../PlatCocoa.h; sourceTree = SOURCE_ROOT; };
2744E59F0FC168A100E85C33 /* QuartzTextLayout.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextLayout.h; path = ../QuartzTextLayout.h; sourceTree = SOURCE_ROOT; };
2744E5A00FC168A100E85C33 /* QuartzTextStyleAttribute.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = QuartzTextStyleAttribute.h; path = ../QuartzTextStyleAttribute.h; sourceTree = SOURCE_ROOT; };
2744E5A20FC168A100E85C33 /* ScintillaCocoa.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaCocoa.h; path = ../ScintillaCocoa.h; sourceTree = "<group>"; };
2744E5A30FC168A100E85C33 /* ScintillaView.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = ScintillaView.h; path = ../ScintillaView.h; sourceTree = "<group>"; };
2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = InfoBarCommunicator.h; path = ../InfoBarCommunicator.h; sourceTree = SOURCE_ROOT; };
2744E5AD0FC168C500E85C33 /* InfoBar.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = InfoBar.mm; path = ../InfoBar.mm; sourceTree = SOURCE_ROOT; };
2744E5AE0FC168C500E85C33 /* PlatCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = PlatCocoa.mm; path = ../PlatCocoa.mm; sourceTree = SOURCE_ROOT; };
2744E5B00FC168C500E85C33 /* ScintillaCocoa.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaCocoa.mm; path = ../ScintillaCocoa.mm; sourceTree = "<group>"; };
2744E5B10FC168C500E85C33 /* ScintillaView.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = ScintillaView.mm; path = ../ScintillaView.mm; sourceTree = "<group>"; };
277B5BD9104EE6B900F40CE4 /* Selection.cxx */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = Selection.cxx; path = ../../src/Selection.cxx; sourceTree = SOURCE_ROOT; };
277B5BDB104EE6CF00F40CE4 /* PropSetSimple.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = PropSetSimple.h; path = ../../src/PropSetSimple.h; sourceTree = SOURCE_ROOT; };
277B5BDC104EE6CF00F40CE4 /* Selection.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Selection.h; path = ../../src/Selection.h; sourceTree = SOURCE_ROOT; };
27FEF4510FC1B413005E115A /* info_bar_bg.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = info_bar_bg.png; sourceTree = "<group>"; };
27FEF4520FC1B413005E115A /* mac_cursor_busy.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_busy.png; sourceTree = "<group>"; };
27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = mac_cursor_flipped.png; sourceTree = "<group>"; };
32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Scintilla_Prefix.pch; sourceTree = "<group>"; };
8DC2EF5A0486A6940098B216 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8DC2EF5B0486A6940098B216 /* Scintilla.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = Scintilla.framework; sourceTree = BUILT_PRODUCTS_DIR; };
D2F7E79907B2D74100F64583 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8DC2EF560486A6940098B216 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8DC2EF570486A6940098B216 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
034768DFFF38A50411DB9C8B /* Products */ = {
isa = PBXGroup;
children = (
8DC2EF5B0486A6940098B216 /* Scintilla.framework */,
);
name = Products;
sourceTree = "<group>";
};
0867D691FE84028FC02AAC07 /* Scintilla */ = {
isa = PBXGroup;
children = (
2744E47D0FC1674E00E85C33 /* Lexers */,
2744E47C0FC1674100E85C33 /* Backend */,
08FB77AEFE84172EC02AAC07 /* Classes */,
32C88DFF0371C24200C91783 /* Other Sources */,
089C1665FE841158C02AAC07 /* Resources */,
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */,
034768DFFF38A50411DB9C8B /* Products */,
);
name = Scintilla;
sourceTree = "<group>";
};
0867D69AFE84028FC02AAC07 /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */,
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
089C1665FE841158C02AAC07 /* Resources */ = {
isa = PBXGroup;
children = (
27FEF4500FC1B413005E115A /* res */,
8DC2EF5A0486A6940098B216 /* Info.plist */,
089C1666FE841158C02AAC07 /* InfoPlist.strings */,
);
name = Resources;
sourceTree = "<group>";
};
08FB77AEFE84172EC02AAC07 /* Classes */ = {
isa = PBXGroup;
children = (
2744E4980FC167ED00E85C33 /* Source Files */,
2744E4970FC167E400E85C33 /* Header Files */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7B0FEA5585E11CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7B1FEA5585E11CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7B2FEA5585E11CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
0867D6A5FE840307C02AAC07 /* AppKit.framework */,
D2F7E79907B2D74100F64583 /* CoreData.framework */,
0867D69BFE84028FC02AAC07 /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
2744E47C0FC1674100E85C33 /* Backend */ = {
isa = PBXGroup;
children = (
2744E47F0FC1676400E85C33 /* Source Files */,
2744E47E0FC1675800E85C33 /* Header Files */,
);
name = Backend;
sourceTree = "<group>";
};
2744E47D0FC1674E00E85C33 /* Lexers */ = {
isa = PBXGroup;
children = (
11374AA910514AA900651FE9 /* LexMarkdown.cxx */,
2744E4E90FC1684700E85C33 /* LexAbaqus.cxx */,
2744E4EA0FC1684700E85C33 /* LexAda.cxx */,
2744E4EB0FC1684700E85C33 /* LexAPDL.cxx */,
2744E4EC0FC1684700E85C33 /* LexAsm.cxx */,
2744E4ED0FC1684700E85C33 /* LexAsn1.cxx */,
2744E4EE0FC1684700E85C33 /* LexASY.cxx */,
2744E4EF0FC1684700E85C33 /* LexAU3.cxx */,
2744E4F00FC1684700E85C33 /* LexAVE.cxx */,
2744E4F10FC1684700E85C33 /* LexBaan.cxx */,
2744E4F20FC1684700E85C33 /* LexBash.cxx */,
2744E4F30FC1684700E85C33 /* LexBasic.cxx */,
2744E4F40FC1684700E85C33 /* LexBullant.cxx */,
2744E4F50FC1684700E85C33 /* LexCaml.cxx */,
2744E4F60FC1684700E85C33 /* LexCLW.cxx */,
2744E4F70FC1684700E85C33 /* LexCmake.cxx */,
2744E4F80FC1684700E85C33 /* LexCOBOL.cxx */,
2744E4F90FC1684700E85C33 /* LexConf.cxx */,
2744E4FA0FC1684700E85C33 /* LexCPP.cxx */,
2744E4FB0FC1684700E85C33 /* LexCrontab.cxx */,
2744E4FC0FC1684700E85C33 /* LexCsound.cxx */,
2744E4FD0FC1684700E85C33 /* LexCSS.cxx */,
2744E4FE0FC1684700E85C33 /* LexD.cxx */,
2744E4FF0FC1684700E85C33 /* LexEiffel.cxx */,
2744E5000FC1684700E85C33 /* LexErlang.cxx */,
2744E5010FC1684700E85C33 /* LexEScript.cxx */,
2744E5020FC1684700E85C33 /* LexFlagship.cxx */,
2744E5030FC1684700E85C33 /* LexForth.cxx */,
2744E5040FC1684700E85C33 /* LexFortran.cxx */,
2744E5050FC1684700E85C33 /* LexGAP.cxx */,
2744E5060FC1684700E85C33 /* LexGui4Cli.cxx */,
2744E5070FC1684700E85C33 /* LexHaskell.cxx */,
2744E5080FC1684700E85C33 /* LexHTML.cxx */,
2744E5090FC1684700E85C33 /* LexInno.cxx */,
2744E50A0FC1684700E85C33 /* LexKix.cxx */,
2744E50B0FC1684700E85C33 /* LexLisp.cxx */,
2744E50C0FC1684700E85C33 /* LexLout.cxx */,
2744E50D0FC1684700E85C33 /* LexLua.cxx */,
2744E50E0FC1684700E85C33 /* LexMagik.cxx */,
2744E50F0FC1684700E85C33 /* LexMatlab.cxx */,
2744E5100FC1684700E85C33 /* LexMetapost.cxx */,
2744E5110FC1684700E85C33 /* LexMMIXAL.cxx */,
2744E5120FC1684700E85C33 /* LexMPT.cxx */,
2744E5130FC1684700E85C33 /* LexMSSQL.cxx */,
2744E5140FC1684700E85C33 /* LexMySQL.cxx */,
2744E5150FC1684700E85C33 /* LexNimrod.cxx */,
2744E5160FC1684700E85C33 /* LexNsis.cxx */,
2744E5170FC1684700E85C33 /* LexOpal.cxx */,
2744E5180FC1684700E85C33 /* LexOthers.cxx */,
2744E5190FC1684700E85C33 /* LexPascal.cxx */,
2744E51A0FC1684700E85C33 /* LexPB.cxx */,
2744E51B0FC1684700E85C33 /* LexPerl.cxx */,
2744E51C0FC1684700E85C33 /* LexPLM.cxx */,
2744E51D0FC1684700E85C33 /* LexPOV.cxx */,
2744E51E0FC1684700E85C33 /* LexPowerPro.cxx */,
2744E51F0FC1684700E85C33 /* LexPowerShell.cxx */,
2744E5200FC1684700E85C33 /* LexProgress.cxx */,
2744E5210FC1684700E85C33 /* LexPS.cxx */,
2744E5220FC1684700E85C33 /* LexPython.cxx */,
2744E5230FC1684700E85C33 /* LexR.cxx */,
2744E5240FC1684700E85C33 /* LexRebol.cxx */,
2744E5250FC1684700E85C33 /* LexRuby.cxx */,
2744E5260FC1684700E85C33 /* LexScriptol.cxx */,
2744E5270FC1684700E85C33 /* LexSmalltalk.cxx */,
2744E5280FC1684700E85C33 /* LexSML.cxx */,
2744E5290FC1684700E85C33 /* LexSorcus.cxx */,
2744E52A0FC1684700E85C33 /* LexSpecman.cxx */,
2744E52B0FC1684700E85C33 /* LexSpice.cxx */,
2744E52C0FC1684700E85C33 /* LexSQL.cxx */,
2744E52D0FC1684700E85C33 /* LexTACL.cxx */,
2744E52E0FC1684700E85C33 /* LexTADS3.cxx */,
2744E52F0FC1684700E85C33 /* LexTAL.cxx */,
2744E5300FC1684700E85C33 /* LexTCL.cxx */,
2744E5310FC1684700E85C33 /* LexTeX.cxx */,
2744E5320FC1684700E85C33 /* LexVB.cxx */,
2744E5330FC1684700E85C33 /* LexVerilog.cxx */,
2744E5340FC1684700E85C33 /* LexVHDL.cxx */,
2744E5350FC1684700E85C33 /* LexYAML.cxx */,
);
name = Lexers;
sourceTree = "<group>";
};
2744E47E0FC1675800E85C33 /* Header Files */ = {
isa = PBXGroup;
children = (
277B5BDB104EE6CF00F40CE4 /* PropSetSimple.h */,
277B5BDC104EE6CF00F40CE4 /* Selection.h */,
2744E4990FC1681200E85C33 /* AutoComplete.h */,
2744E49A0FC1681200E85C33 /* CallTip.h */,
2744E49B0FC1681200E85C33 /* CellBuffer.h */,
2744E49C0FC1681200E85C33 /* CharacterSet.h */,
2744E49D0FC1681200E85C33 /* CharClassify.h */,
2744E49E0FC1681200E85C33 /* ContractionState.h */,
2744E49F0FC1681200E85C33 /* Decoration.h */,
2744E4A00FC1681200E85C33 /* Document.h */,
2744E4A10FC1681200E85C33 /* DocumentAccessor.h */,
2744E4A20FC1681200E85C33 /* Editor.h */,
2744E4A30FC1681200E85C33 /* ExternalLexer.h */,
2744E4A40FC1681200E85C33 /* Indicator.h */,
2744E4A50FC1681200E85C33 /* KeyMap.h */,
2744E4A60FC1681200E85C33 /* LineMarker.h */,
2744E4A70FC1681200E85C33 /* Partitioning.h */,
2744E4A80FC1681200E85C33 /* PerLine.h */,
2744E4A90FC1681200E85C33 /* PositionCache.h */,
2744E4AA0FC1681200E85C33 /* RESearch.h */,
2744E4AB0FC1681200E85C33 /* RunStyles.h */,
2744E4AC0FC1681200E85C33 /* ScintillaBase.h */,
2744E4AD0FC1681200E85C33 /* SplitVector.h */,
2744E4AE0FC1681200E85C33 /* Style.h */,
2744E4AF0FC1681200E85C33 /* StyleContext.h */,
2744E4B00FC1681200E85C33 /* SVector.h */,
2744E4B10FC1681200E85C33 /* UniConversion.h */,
2744E4B20FC1681200E85C33 /* ViewStyle.h */,
2744E4B30FC1681200E85C33 /* XPM.h */,
);
name = "Header Files";
sourceTree = "<group>";
};
2744E47F0FC1676400E85C33 /* Source Files */ = {
isa = PBXGroup;
children = (
277B5BD9104EE6B900F40CE4 /* Selection.cxx */,
2744E4CF0FC1682C00E85C33 /* AutoComplete.cxx */,
2744E4D00FC1682C00E85C33 /* CallTip.cxx */,
2744E4D10FC1682C00E85C33 /* CellBuffer.cxx */,
2744E4D20FC1682C00E85C33 /* CharClassify.cxx */,
2744E4D30FC1682C00E85C33 /* ContractionState.cxx */,
2744E4D40FC1682C00E85C33 /* Decoration.cxx */,
2744E4D50FC1682C00E85C33 /* Document.cxx */,
2744E4D60FC1682C00E85C33 /* DocumentAccessor.cxx */,
2744E4D70FC1682C00E85C33 /* Editor.cxx */,
2744E4D80FC1682C00E85C33 /* ExternalLexer.cxx */,
2744E4D90FC1682C00E85C33 /* Indicator.cxx */,
2744E4DA0FC1682C00E85C33 /* KeyMap.cxx */,
2744E4DB0FC1682C00E85C33 /* KeyWords.cxx */,
2744E5830FC1685C00E85C33 /* LineMarker.cxx */,
2744E5840FC1685C00E85C33 /* PerLine.cxx */,
2744E5850FC1685C00E85C33 /* PositionCache.cxx */,
2744E5860FC1685C00E85C33 /* PropSet.cxx */,
2744E5870FC1685C00E85C33 /* RESearch.cxx */,
2744E5880FC1685C00E85C33 /* RunStyles.cxx */,
2744E5890FC1685C00E85C33 /* ScintillaBase.cxx */,
2744E58A0FC1685C00E85C33 /* Style.cxx */,
2744E58B0FC1685C00E85C33 /* StyleContext.cxx */,
2744E58C0FC1685C00E85C33 /* UniConversion.cxx */,
2744E58D0FC1685C00E85C33 /* ViewStyle.cxx */,
2744E58E0FC1685C00E85C33 /* WindowAccessor.cxx */,
2744E58F0FC1685C00E85C33 /* XPM.cxx */,
);
name = "Source Files";
sourceTree = "<group>";
};
2744E4970FC167E400E85C33 /* Header Files */ = {
isa = PBXGroup;
children = (
2744E59D0FC168A100E85C33 /* InfoBar.h */,
2744E5AB0FC168B200E85C33 /* InfoBarCommunicator.h */,
2744E59E0FC168A100E85C33 /* PlatCocoa.h */,
2744E59F0FC168A100E85C33 /* QuartzTextLayout.h */,
2744E5A00FC168A100E85C33 /* QuartzTextStyleAttribute.h */,
2744E5A20FC168A100E85C33 /* ScintillaCocoa.h */,
2744E5A30FC168A100E85C33 /* ScintillaView.h */,
2744E4830FC1678600E85C33 /* Accessor.h */,
2744E4840FC1678600E85C33 /* KeyWords.h */,
2744E4850FC1678600E85C33 /* Platform.h */,
2744E4860FC1678600E85C33 /* PropSet.h */,
2744E4870FC1678600E85C33 /* SciLexer.h */,
2744E4880FC1678600E85C33 /* Scintilla.h */,
2744E48A0FC1678600E85C33 /* ScintillaWidget.h */,
2744E48C0FC1678600E85C33 /* WindowAccessor.h */,
);
name = "Header Files";
sourceTree = "<group>";
};
2744E4980FC167ED00E85C33 /* Source Files */ = {
isa = PBXGroup;
children = (
2744E5AD0FC168C500E85C33 /* InfoBar.mm */,
2744E5AE0FC168C500E85C33 /* PlatCocoa.mm */,
2744E5B00FC168C500E85C33 /* ScintillaCocoa.mm */,
2744E5B10FC168C500E85C33 /* ScintillaView.mm */,
);
name = "Source Files";
sourceTree = "<group>";
};
27FEF4500FC1B413005E115A /* res */ = {
isa = PBXGroup;
children = (
27FEF4510FC1B413005E115A /* info_bar_bg.png */,
27FEF4520FC1B413005E115A /* mac_cursor_busy.png */,
27FEF4530FC1B413005E115A /* mac_cursor_flipped.png */,
);
name = res;
path = ../res;
sourceTree = SOURCE_ROOT;
};
32C88DFF0371C24200C91783 /* Other Sources */ = {
isa = PBXGroup;
children = (
32DBCF5E0370ADEE00C91783 /* Scintilla_Prefix.pch */,
);
name = "Other Sources";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXHeadersBuildPhase section */
8DC2EF500486A6940098B216 /* Headers */ = {
isa = PBXHeadersBuildPhase;
buildActionMask = 2147483647;
files = (
2791F3EB0FC1A3BD009DBCF9 /* AutoComplete.h in Headers */,
2791F3EC0FC1A3BD009DBCF9 /* CallTip.h in Headers */,
2791F3ED0FC1A3BD009DBCF9 /* CellBuffer.h in Headers */,
2791F3EE0FC1A3BD009DBCF9 /* CharacterSet.h in Headers */,
2791F3EF0FC1A3BD009DBCF9 /* CharClassify.h in Headers */,
2791F3F00FC1A3BD009DBCF9 /* ContractionState.h in Headers */,
2791F3F10FC1A3BD009DBCF9 /* Decoration.h in Headers */,
2791F3F20FC1A3BD009DBCF9 /* Document.h in Headers */,
2791F3F30FC1A3BD009DBCF9 /* DocumentAccessor.h in Headers */,
2791F3F40FC1A3BD009DBCF9 /* Editor.h in Headers */,
2791F3F50FC1A3BD009DBCF9 /* ExternalLexer.h in Headers */,
2791F3F60FC1A3BD009DBCF9 /* Indicator.h in Headers */,
2791F3F70FC1A3BD009DBCF9 /* KeyMap.h in Headers */,
2791F3F80FC1A3BD009DBCF9 /* LineMarker.h in Headers */,
2791F3F90FC1A3BD009DBCF9 /* Partitioning.h in Headers */,
2791F3FA0FC1A3BD009DBCF9 /* PerLine.h in Headers */,
2791F3FB0FC1A3BD009DBCF9 /* PositionCache.h in Headers */,
2791F3FC0FC1A3BD009DBCF9 /* RESearch.h in Headers */,
2791F3FD0FC1A3BD009DBCF9 /* RunStyles.h in Headers */,
2791F3FE0FC1A3BD009DBCF9 /* ScintillaBase.h in Headers */,
2791F3FF0FC1A3BD009DBCF9 /* SplitVector.h in Headers */,
2791F4000FC1A3BD009DBCF9 /* Style.h in Headers */,
2791F4010FC1A3BD009DBCF9 /* StyleContext.h in Headers */,
2791F4020FC1A3BD009DBCF9 /* SVector.h in Headers */,
2791F4030FC1A3BD009DBCF9 /* UniConversion.h in Headers */,
2791F4040FC1A3BD009DBCF9 /* ViewStyle.h in Headers */,
2791F4050FC1A3BD009DBCF9 /* XPM.h in Headers */,
2744E5A40FC168A100E85C33 /* InfoBar.h in Headers */,
2744E5AC0FC168B200E85C33 /* InfoBarCommunicator.h in Headers */,
2791F3C60FC19F71009DBCF9 /* PlatCocoa.h in Headers */,
2791F3E30FC1A3AE009DBCF9 /* QuartzTextLayout.h in Headers */,
2791F3E40FC1A3AE009DBCF9 /* QuartzTextStyleAttribute.h in Headers */,
2791F3E00FC1A390009DBCF9 /* ScintillaCocoa.h in Headers */,
2744E5AA0FC168A100E85C33 /* ScintillaView.h in Headers */,
2791F3E50FC1A3AE009DBCF9 /* Accessor.h in Headers */,
2791F3E60FC1A3AE009DBCF9 /* KeyWords.h in Headers */,
2791F3C70FC19F71009DBCF9 /* Platform.h in Headers */,
2791F3E70FC1A3AE009DBCF9 /* PropSet.h in Headers */,
2791F3C80FC19F71009DBCF9 /* SciLexer.h in Headers */,
2791F3C90FC19F71009DBCF9 /* Scintilla.h in Headers */,
2791F3E80FC1A3AE009DBCF9 /* ScintillaWidget.h in Headers */,
2791F3EA0FC1A3AE009DBCF9 /* WindowAccessor.h in Headers */,
277B5BDD104EE6CF00F40CE4 /* PropSetSimple.h in Headers */,
277B5BDE104EE6CF00F40CE4 /* Selection.h in Headers */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXHeadersBuildPhase section */
/* Begin PBXNativeTarget section */
8DC2EF4F0486A6940098B216 /* Scintilla */ = {
isa = PBXNativeTarget;
buildConfigurationList = 1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "Scintilla" */;
buildPhases = (
8DC2EF500486A6940098B216 /* Headers */,
8DC2EF520486A6940098B216 /* Resources */,
8DC2EF540486A6940098B216 /* Sources */,
8DC2EF560486A6940098B216 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = Scintilla;
productInstallPath = "$(HOME)/Library/Frameworks";
productName = Scintilla;
productReference = 8DC2EF5B0486A6940098B216 /* Scintilla.framework */;
productType = "com.apple.product-type.framework";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
0867D690FE84028FC02AAC07 /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 0867D691FE84028FC02AAC07 /* Scintilla */;
productRefGroup = 034768DFFF38A50411DB9C8B /* Products */;
projectDirPath = "";
projectRoot = "";
targets = (
8DC2EF4F0486A6940098B216 /* Scintilla */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8DC2EF520486A6940098B216 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8DC2EF530486A6940098B216 /* InfoPlist.strings in Resources */,
27FEF4540FC1B413005E115A /* info_bar_bg.png in Resources */,
27FEF4550FC1B413005E115A /* mac_cursor_busy.png in Resources */,
27FEF4560FC1B413005E115A /* mac_cursor_flipped.png in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8DC2EF540486A6940098B216 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
2744E4DC0FC1682C00E85C33 /* AutoComplete.cxx in Sources */,
2744E4DD0FC1682C00E85C33 /* CallTip.cxx in Sources */,
2744E4DE0FC1682C00E85C33 /* CellBuffer.cxx in Sources */,
2744E4DF0FC1682C00E85C33 /* CharClassify.cxx in Sources */,
2744E4E00FC1682C00E85C33 /* ContractionState.cxx in Sources */,
2744E4E10FC1682C00E85C33 /* Decoration.cxx in Sources */,
2744E4E20FC1682C00E85C33 /* Document.cxx in Sources */,
2744E4E30FC1682C00E85C33 /* DocumentAccessor.cxx in Sources */,
2744E4E40FC1682C00E85C33 /* Editor.cxx in Sources */,
2744E4E50FC1682C00E85C33 /* ExternalLexer.cxx in Sources */,
2744E4E60FC1682C00E85C33 /* Indicator.cxx in Sources */,
2744E4E70FC1682C00E85C33 /* KeyMap.cxx in Sources */,
2744E4E80FC1682C00E85C33 /* KeyWords.cxx in Sources */,
2744E5360FC1684700E85C33 /* LexAbaqus.cxx in Sources */,
2744E5370FC1684700E85C33 /* LexAda.cxx in Sources */,
2744E5380FC1684700E85C33 /* LexAPDL.cxx in Sources */,
2744E5390FC1684700E85C33 /* LexAsm.cxx in Sources */,
2744E53A0FC1684700E85C33 /* LexAsn1.cxx in Sources */,
2744E53B0FC1684700E85C33 /* LexASY.cxx in Sources */,
2744E53C0FC1684700E85C33 /* LexAU3.cxx in Sources */,
2744E53D0FC1684700E85C33 /* LexAVE.cxx in Sources */,
2744E53E0FC1684700E85C33 /* LexBaan.cxx in Sources */,
2744E53F0FC1684700E85C33 /* LexBash.cxx in Sources */,
2744E5400FC1684700E85C33 /* LexBasic.cxx in Sources */,
2744E5410FC1684700E85C33 /* LexBullant.cxx in Sources */,
2744E5420FC1684700E85C33 /* LexCaml.cxx in Sources */,
2744E5430FC1684700E85C33 /* LexCLW.cxx in Sources */,
2744E5440FC1684700E85C33 /* LexCmake.cxx in Sources */,
2744E5450FC1684700E85C33 /* LexCOBOL.cxx in Sources */,
2744E5460FC1684700E85C33 /* LexConf.cxx in Sources */,
2744E5470FC1684700E85C33 /* LexCPP.cxx in Sources */,
2744E5480FC1684700E85C33 /* LexCrontab.cxx in Sources */,
2744E5490FC1684700E85C33 /* LexCsound.cxx in Sources */,
2744E54A0FC1684700E85C33 /* LexCSS.cxx in Sources */,
2744E54B0FC1684700E85C33 /* LexD.cxx in Sources */,
2744E54C0FC1684700E85C33 /* LexEiffel.cxx in Sources */,
2744E54D0FC1684700E85C33 /* LexErlang.cxx in Sources */,
2744E54E0FC1684700E85C33 /* LexEScript.cxx in Sources */,
2744E54F0FC1684700E85C33 /* LexFlagship.cxx in Sources */,
2744E5500FC1684700E85C33 /* LexForth.cxx in Sources */,
2744E5510FC1684700E85C33 /* LexFortran.cxx in Sources */,
2744E5520FC1684700E85C33 /* LexGAP.cxx in Sources */,
2744E5530FC1684700E85C33 /* LexGui4Cli.cxx in Sources */,
2744E5540FC1684700E85C33 /* LexHaskell.cxx in Sources */,
2744E5550FC1684700E85C33 /* LexHTML.cxx in Sources */,
2744E5560FC1684700E85C33 /* LexInno.cxx in Sources */,
2744E5570FC1684700E85C33 /* LexKix.cxx in Sources */,
2744E5580FC1684700E85C33 /* LexLisp.cxx in Sources */,
2744E5590FC1684700E85C33 /* LexLout.cxx in Sources */,
2744E55A0FC1684700E85C33 /* LexLua.cxx in Sources */,
2744E55B0FC1684700E85C33 /* LexMagik.cxx in Sources */,
2744E55C0FC1684700E85C33 /* LexMatlab.cxx in Sources */,
2744E55D0FC1684700E85C33 /* LexMetapost.cxx in Sources */,
2744E55E0FC1684700E85C33 /* LexMMIXAL.cxx in Sources */,
2744E55F0FC1684700E85C33 /* LexMPT.cxx in Sources */,
2744E5600FC1684700E85C33 /* LexMSSQL.cxx in Sources */,
2744E5610FC1684700E85C33 /* LexMySQL.cxx in Sources */,
2744E5620FC1684700E85C33 /* LexNimrod.cxx in Sources */,
2744E5630FC1684700E85C33 /* LexNsis.cxx in Sources */,
2744E5640FC1684700E85C33 /* LexOpal.cxx in Sources */,
2744E5650FC1684700E85C33 /* LexOthers.cxx in Sources */,
2744E5660FC1684700E85C33 /* LexPascal.cxx in Sources */,
2744E5670FC1684700E85C33 /* LexPB.cxx in Sources */,
2744E5680FC1684700E85C33 /* LexPerl.cxx in Sources */,
2744E5690FC1684700E85C33 /* LexPLM.cxx in Sources */,
2744E56A0FC1684700E85C33 /* LexPOV.cxx in Sources */,
2744E56B0FC1684700E85C33 /* LexPowerPro.cxx in Sources */,
2744E56C0FC1684700E85C33 /* LexPowerShell.cxx in Sources */,
2744E56D0FC1684700E85C33 /* LexProgress.cxx in Sources */,
2744E56E0FC1684700E85C33 /* LexPS.cxx in Sources */,
2744E56F0FC1684700E85C33 /* LexPython.cxx in Sources */,
2744E5700FC1684700E85C33 /* LexR.cxx in Sources */,
2744E5710FC1684700E85C33 /* LexRebol.cxx in Sources */,
2744E5720FC1684700E85C33 /* LexRuby.cxx in Sources */,
2744E5730FC1684700E85C33 /* LexScriptol.cxx in Sources */,
2744E5740FC1684700E85C33 /* LexSmalltalk.cxx in Sources */,
2744E5750FC1684700E85C33 /* LexSML.cxx in Sources */,
2744E5760FC1684700E85C33 /* LexSorcus.cxx in Sources */,
2744E5770FC1684700E85C33 /* LexSpecman.cxx in Sources */,
2744E5780FC1684700E85C33 /* LexSpice.cxx in Sources */,
2744E5790FC1684700E85C33 /* LexSQL.cxx in Sources */,
2744E57A0FC1684700E85C33 /* LexTACL.cxx in Sources */,
2744E57B0FC1684700E85C33 /* LexTADS3.cxx in Sources */,
2744E57C0FC1684700E85C33 /* LexTAL.cxx in Sources */,
2744E57D0FC1684700E85C33 /* LexTCL.cxx in Sources */,
2744E57E0FC1684700E85C33 /* LexTeX.cxx in Sources */,
2744E57F0FC1684700E85C33 /* LexVB.cxx in Sources */,
2744E5800FC1684700E85C33 /* LexVerilog.cxx in Sources */,
2744E5810FC1684700E85C33 /* LexVHDL.cxx in Sources */,
2744E5820FC1684700E85C33 /* LexYAML.cxx in Sources */,
2744E5900FC1685C00E85C33 /* LineMarker.cxx in Sources */,
2744E5910FC1685C00E85C33 /* PerLine.cxx in Sources */,
2744E5920FC1685C00E85C33 /* PositionCache.cxx in Sources */,
2744E5930FC1685C00E85C33 /* PropSet.cxx in Sources */,
2744E5940FC1685C00E85C33 /* RESearch.cxx in Sources */,
2744E5950FC1685C00E85C33 /* RunStyles.cxx in Sources */,
2744E5960FC1685C00E85C33 /* ScintillaBase.cxx in Sources */,
2744E5970FC1685C00E85C33 /* Style.cxx in Sources */,
2744E5980FC1685C00E85C33 /* StyleContext.cxx in Sources */,
2744E5990FC1685C00E85C33 /* UniConversion.cxx in Sources */,
2744E59A0FC1685C00E85C33 /* ViewStyle.cxx in Sources */,
2744E59B0FC1685C00E85C33 /* WindowAccessor.cxx in Sources */,
2744E59C0FC1685C00E85C33 /* XPM.cxx in Sources */,
2744E5B20FC168C500E85C33 /* InfoBar.mm in Sources */,
2744E5B30FC168C500E85C33 /* PlatCocoa.mm in Sources */,
2744E5B50FC168C500E85C33 /* ScintillaCocoa.mm in Sources */,
2744E5B60FC168C500E85C33 /* ScintillaView.mm in Sources */,
277B5BDA104EE6B900F40CE4 /* Selection.cxx in Sources */,
11374AAA10514AA900651FE9 /* LexMarkdown.cxx in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
089C1666FE841158C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C1667FE841158C02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
1DEB91AE08733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Scintilla_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_NAMESPACE,
SCI_LEXER,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
PRODUCT_NAME = Scintilla;
WRAPPER_EXTENSION = framework;
};
name = Debug;
};
1DEB91AF08733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
DYLIB_COMPATIBILITY_VERSION = 1;
DYLIB_CURRENT_VERSION = 1;
FRAMEWORK_VERSION = A;
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = Scintilla_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_NAMESPACE,
SCI_LEXER,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "@executable_path/../Frameworks";
PRODUCT_NAME = Scintilla;
WRAPPER_EXTENSION = framework;
};
name = Release;
};
1DEB91B208733DA50010E9CD /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
PREBINDING = NO;
SDKROOT = macosx10.5;
};
name = Debug;
};
1DEB91B308733DA50010E9CD /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
PREBINDING = NO;
SDKROOT = macosx10.5;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
1DEB91AD08733DA50010E9CD /* Build configuration list for PBXNativeTarget "Scintilla" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91AE08733DA50010E9CD /* Debug */,
1DEB91AF08733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
1DEB91B108733DA50010E9CD /* Build configuration list for PBXProject "ScintillaFramework" */ = {
isa = XCConfigurationList;
buildConfigurations = (
1DEB91B208733DA50010E9CD /* Debug */,
1DEB91B308733DA50010E9CD /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 0867D690FE84028FC02AAC07 /* Project object */;
}

View File

@ -0,0 +1,7 @@
//
// Prefix header for all source files of the 'Scintilla' target in the 'Scintilla' project.
//
#ifdef __OBJC__
#import <Cocoa/Cocoa.h>
#endif

View File

@ -0,0 +1,64 @@
/*
* ScintillaMacOSX.h
* tutorial
*
* Created by Evan Jones on Sun Sep 01 2002.
*
*/
#ifndef SCINTILLA_LISTBOX_H
#define SCINTILLA_LISTBOX_H
#include "TView.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include "Platform.h"
#include "Scintilla.h"
static const OSType scintillaListBoxType = 'sclb';
namespace Scintilla {
class ScintillaListBox : public TView
{
public:
// Private so ScintillaListBox objects can not be copied
ScintillaListBox(const ScintillaListBox &) : TView( NULL ) {}
ScintillaListBox &operator=(const ScintillaListBox &) { return * this; }
~ScintillaListBox() {};
public:
/** This is the class ID that we've assigned to Scintilla. */
static const CFStringRef kScintillaListBoxClassID;
static const ControlKind kScintillaListBoxKind;
ScintillaListBox( void* windowid );
/** Returns the HIView object kind, needed to subclass TView. */
virtual ControlKind GetKind() { return kScintillaListBoxKind; }
private:
virtual ControlPartCode HitTest( const HIPoint& where );
virtual void Draw( RgnHandle rgn, CGContextRef gc );
virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
public:
static HIViewRef Create();
private:
static OSStatus Construct( HIViewRef inControl, TView** outView );
};
}
#endif

View File

@ -0,0 +1,110 @@
#include "ScintillaCocoa.h"
#include "ScintillaListBox.h"
using namespace Scintilla;
const CFStringRef ScintillaListBox::kScintillaListBoxClassID = CFSTR( "org.scintilla.listbox" );
const ControlKind ScintillaListBox::kScintillaListBoxKind = { 'ejon', 'Sclb' };
ScintillaListBox::ScintillaListBox( void* windowid ) :
TView( reinterpret_cast<HIViewRef>( windowid ) )
{
ActivateInterface( kMouse );
// debugPrint = true;
}
void ScintillaListBox::Draw(
RgnHandle /*inLimitRgn*/,
CGContextRef inContext )
{
Rect contentBounds;
GetControlBounds(GetViewRef(), &contentBounds);
HIRect controlFrame;
HIViewGetFrame( GetViewRef(), &controlFrame );
// what is the global pos?
Surface *surfaceWindow = Surface::Allocate();
if (surfaceWindow)
{
surfaceWindow->Init(inContext, GetViewRef());
// TODO: Implement or find workaround
// ctip->PaintCT(surfaceWindow);
surfaceWindow->Release();
delete surfaceWindow;
}
}
ControlPartCode ScintillaListBox::HitTest( const HIPoint& where )
{
if ( CGRectContainsPoint( Bounds(), where ) )
return 1;
else
return kControlNoPart;
}
OSStatus ScintillaListBox::MouseDown(HIPoint& location, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
ListBox* ctip = NULL;
ScintillaCocoa *sciThis = NULL;
OSStatus err = GetControlProperty( GetViewRef(), scintillaListBoxType, 0, sizeof( ctip ), NULL, &ctip );
err = GetControlProperty( GetViewRef(), scintillaMacOSType, 0, sizeof( sciThis ), NULL, &sciThis );
// TODO: Implement of find work around.
// ctip->MouseClick( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ));
// TODO: still needed?
// sciThis->ListBoxClick();
return noErr;
}
OSStatus ScintillaListBox::MouseUp(HIPoint& /*inMouseLocation*/, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
return noErr;
}
HIViewRef ScintillaListBox::Create()
{
// Register the HIView, if needed
static bool registered = false;
if ( not registered )
{
TView::RegisterSubclass( kScintillaListBoxClassID, Construct );
registered = true;
}
OSStatus err = noErr;
EventRef event = CreateInitializationEvent();
assert( event != NULL );
HIViewRef control = NULL;
err = HIObjectCreate( kScintillaListBoxClassID, event, reinterpret_cast<HIObjectRef*>( &control ) );
ReleaseEvent( event );
if ( err == noErr ) {
Platform::DebugPrintf("ScintillaListBox::Create control %08X\n",control);
return control;
}
return NULL;
}
OSStatus ScintillaListBox::Construct( HIViewRef inControl, TView** outView )
{
*outView = new ScintillaListBox( inControl );
Platform::DebugPrintf("ScintillaListBox::Construct scintilla %08X\n",*outView);
if ( *outView != NULL )
return noErr;
else
return memFullErr;
}
extern "C" {
HIViewRef scintilla_listbox_new() {
return ScintillaListBox::Create();
}
}

View File

@ -0,0 +1,23 @@
/**
* AppController.h
* SciTest
*
* Created by Mike Lischke on 01.04.09.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#import <Cocoa/Cocoa.h>
#import "ScintillaView.h"
#import "InfoBar.h"
@interface AppController : NSObject {
IBOutlet NSBox *mEditHost;
ScintillaView* mEditor;
}
- (void) awakeFromNib;
- (void) setupEditor;
@end

View File

@ -0,0 +1,215 @@
/**
* AppController.m
* ScintillaTest
*
* Created by Mike Lischke on 01.04.09.
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#import "AppController.h"
const char major_keywords[] =
"accessible add all alter analyze and as asc asensitive "
"before between bigint binary blob both by "
"call cascade case change char character check collate column condition connection constraint "
"continue convert create cross current_date current_time current_timestamp current_user cursor "
"database databases day_hour day_microsecond day_minute day_second dec decimal declare default "
"delayed delete desc describe deterministic distinct distinctrow div double drop dual "
"each else elseif enclosed escaped exists exit explain "
"false fetch float float4 float8 for force foreign from fulltext "
"goto grant group "
"having high_priority hour_microsecond hour_minute hour_second "
"if ignore in index infile inner inout insensitive insert int int1 int2 int3 int4 int8 integer "
"interval into is iterate "
"join "
"key keys kill "
"label leading leave left like limit linear lines load localtime localtimestamp lock long "
"longblob longtext loop low_priority "
"master_ssl_verify_server_cert match mediumblob mediumint mediumtext middleint minute_microsecond "
"minute_second mod modifies "
"natural not no_write_to_binlog null numeric "
"on optimize option optionally or order out outer outfile "
"precision primary procedure purge "
"range read reads read_only read_write real references regexp release rename repeat replace "
"require restrict return revoke right rlike "
"schema schemas second_microsecond select sensitive separator set show smallint spatial specific "
"sql sqlexception sqlstate sqlwarning sql_big_result sql_calc_found_rows sql_small_result ssl "
"starting straight_join "
"table terminated then tinyblob tinyint tinytext to trailing trigger true "
"undo union unique unlock unsigned update upgrade usage use using utc_date utc_time utc_timestamp "
"values varbinary varchar varcharacter varying "
"when where while with write "
"xor "
"year_month "
"zerofill";
const char procedure_keywords[] = // Not reserved words but intrinsic part of procedure definitions.
"begin comment end";
const char client_keywords[] = // Definition of keywords only used by clients, not the server itself.
"delimiter";
const char user_keywords[] = // Definition of own keywords, not used by MySQL.
"edit";
//--------------------------------------------------------------------------------------------------
@implementation AppController
- (void) awakeFromNib
{
// Manually set up the scintilla editor. Create an instance and dock it to our edit host.
// Leave some free space around the new view to avoid overlapping with the box borders.
NSRect newFrame = mEditHost.frame;
newFrame.size.width -= 2 * newFrame.origin.x;
newFrame.size.height -= 3 * newFrame.origin.y;
mEditor = [[[ScintillaView alloc] initWithFrame: newFrame] autorelease];
[mEditHost.contentView addSubview: mEditor];
[mEditor setAutoresizesSubviews: YES];
[mEditor setAutoresizingMask: NSViewWidthSizable | NSViewHeightSizable];
// Let's load some text for the editor, as initial content.
NSError* error = nil;
NSString* path = [[NSBundle mainBundle] pathForResource: @"TestData"
ofType: @"sql" inDirectory: nil];
NSString* sql = [NSString stringWithContentsOfFile: path
encoding: NSUTF8StringEncoding
error: &error];
if (error && [[error domain] isEqual: NSCocoaErrorDomain])
NSLog(@"%@", error);
[mEditor setString: sql];
[self setupEditor];
}
//--------------------------------------------------------------------------------------------------
/**
* Initialize scintilla editor (styles, colors, markers, folding etc.].
*/
- (void) setupEditor
{
// Lexer type is MySQL.
[mEditor setGeneralProperty: SCI_SETLEXER parameter: SCLEX_MYSQL value: 0];
// alternatively: [mEditor setEditorProperty: SCI_SETLEXERLANGUAGE parameter: nil value: (sptr_t) "mysql"];
// Number of styles we use with this lexer.
[mEditor setGeneralProperty: SCI_SETSTYLEBITS parameter: 5 value: 0];
// Keywords to highlight. Indices are:
// 0 - Major keywords (reserved keywords)
// 1 - Normal keywords (everything not reserved but integral part of the language)
// 2 - Database objects
// 3 - Function keywords
// 4 - System variable keywords
// 5 - Procedure keywords (keywords used in procedures like "begin" and "end")
// 6..8 - User keywords 1..3
[mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 0 value: major_keywords];
[mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 5 value: procedure_keywords];
[mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 6 value: client_keywords];
[mEditor setReferenceProperty: SCI_SETKEYWORDS parameter: 7 value: user_keywords];
// Colors and styles for various syntactic elements. First the default style.
[mEditor setStringProperty: SCI_STYLESETFONT parameter: STYLE_DEFAULT value: @"Andale Mono"];
// [mEditor setStringProperty: SCI_STYLESETFONT parameter: STYLE_DEFAULT value: @"Monospac821 BT"]; // Very pleasing programmer's font.
[mEditor setGeneralProperty: SCI_STYLESETSIZE parameter: STYLE_DEFAULT value: 14];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: STYLE_DEFAULT value: [NSColor blackColor]];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DEFAULT value: [NSColor blackColor]];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_COMMENT fromHTML: @"#097BF7"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_COMMENTLINE fromHTML: @"#097BF7"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_HIDDENCOMMAND fromHTML: @"#097BF7"];
[mEditor setColorProperty: SCI_STYLESETBACK parameter: SCE_MYSQL_HIDDENCOMMAND fromHTML: @"#F0F0F0"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_VARIABLE fromHTML: @"378EA5"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_SYSTEMVARIABLE fromHTML: @"378EA5"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_KNOWNSYSTEMVARIABLE fromHTML: @"#3A37A5"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_NUMBER fromHTML: @"#7F7F00"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_SQSTRING fromHTML: @"#FFAA3E"];
// Note: if we were using ANSI quotes we would set the DQSTRING to the same color as the
// the back tick string.
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DQSTRING fromHTML: @"#274A6D"];
// Keyword highlighting.
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_MAJORKEYWORD fromHTML: @"#007F00"];
[mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_MAJORKEYWORD value: 1];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_KEYWORD fromHTML: @"#007F00"];
[mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_KEYWORD value: 1];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_PROCEDUREKEYWORD fromHTML: @"#56007F"];
[mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_MYSQL_PROCEDUREKEYWORD value: 1];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_USER1 fromHTML: @"#808080"];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_USER2 fromHTML: @"#808080"];
[mEditor setColorProperty: SCI_STYLESETBACK parameter: SCE_MYSQL_USER2 fromHTML: @"#F0E0E0"];
// The following 3 styles have no impact as we did not set a keyword list for any of them.
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_DATABASEOBJECT value: [NSColor redColor]];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_FUNCTION value: [NSColor redColor]];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_IDENTIFIER value: [NSColor blackColor]];
[mEditor setColorProperty: SCI_STYLESETFORE parameter: SCE_MYSQL_QUOTEDIDENTIFIER fromHTML: @"#274A6D"];
[mEditor setGeneralProperty: SCI_STYLESETBOLD parameter: SCE_SQL_OPERATOR value: 1];
// Line number style.
[mEditor setColorProperty: SCI_STYLESETFORE parameter: STYLE_LINENUMBER fromHTML: @"#F0F0F0"];
[mEditor setColorProperty: SCI_STYLESETBACK parameter: STYLE_LINENUMBER fromHTML: @"#808080"];
[mEditor setGeneralProperty: SCI_SETMARGINTYPEN parameter: 0 value: SC_MARGIN_NUMBER];
[mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 0 value: 35];
// Markers.
[mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 1 value: 16];
// Some special lexer properties.
[mEditor setLexerProperty: @"fold" value: @"1"];
[mEditor setLexerProperty: @"fold.compact" value: @"0"];
[mEditor setLexerProperty: @"fold.comment" value: @"1"];
[mEditor setLexerProperty: @"fold.preprocessor" value: @"1"];
// Folder setup.
[mEditor setGeneralProperty: SCI_SETMARGINWIDTHN parameter: 2 value: 16];
[mEditor setGeneralProperty: SCI_SETMARGINMASKN parameter: 2 value: SC_MASK_FOLDERS];
[mEditor setGeneralProperty: SCI_SETMARGINSENSITIVEN parameter: 2 value: 1];
[mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEROPEN value: SC_MARK_BOXMINUS];
[mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDER value: SC_MARK_BOXPLUS];
[mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERSUB value: SC_MARK_VLINE];
[mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERTAIL value: SC_MARK_LCORNER];
[mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEREND value: SC_MARK_BOXPLUSCONNECTED];
[mEditor setGeneralProperty: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDEROPENMID value: SC_MARK_BOXMINUSCONNECTED];
[mEditor setGeneralProperty
: SCI_MARKERDEFINE parameter: SC_MARKNUM_FOLDERMIDTAIL value: SC_MARK_TCORNER];
for (int n= 25; n < 32; ++n) // Markers 25..31 are reserved for folding.
{
[mEditor setColorProperty: SCI_MARKERSETFORE parameter: n value: [NSColor whiteColor]];
[mEditor setColorProperty: SCI_MARKERSETBACK parameter: n value: [NSColor blackColor]];
}
// Init markers & indicators for highlighting of syntax errors.
[mEditor setColorProperty: SCI_INDICSETFORE parameter: 0 value: [NSColor redColor]];
[mEditor setGeneralProperty: SCI_INDICSETUNDER parameter: 0 value: 1];
[mEditor setGeneralProperty: SCI_INDICSETSTYLE parameter: 0 value: INDIC_SQUIGGLE];
[mEditor setColorProperty: SCI_MARKERSETBACK parameter: 0 fromHTML: @"#B1151C"];
[mEditor setColorProperty: SCI_SETSELBACK parameter: 1 value: [NSColor selectedTextBackgroundColor]];
// Uncomment if you wanna see auto wrapping in action.
//[mEditor setGeneralProperty: SCI_SETWRAPMODE parameter: SC_WRAP_WORD value: 0];
InfoBar* infoBar = [[[InfoBar alloc] initWithFrame: NSMakeRect(0, 0, 400, 0)] autorelease];
[infoBar setDisplay: IBShowAll];
[mEditor setInfoBar: infoBar top: NO];
[mEditor setStatusText: @"Operation complete"];
}
@end
//--------------------------------------------------------------------------------------------------

File diff suppressed because it is too large Load Diff

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>com.sun.${PRODUCT_NAME:identifier}</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundleName</key>
<string>${PRODUCT_NAME}</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>NSMainNibFile</key>
<string>MainMenu</string>
<key>NSPrincipalClass</key>
<string>NSApplication</string>
</dict>
</plist>

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,381 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 45;
objects = {
/* Begin PBXBuildFile section */
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = 1DDD58140DA1D0A300B32029 /* MainMenu.xib */; };
271FA52C0F850BE20033D021 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 271FA52B0F850BE20033D021 /* AppController.mm */; };
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */ = {isa = PBXBuildFile; fileRef = 2791F4480FC1A8E9009DBCF9 /* TestData.sql */; };
27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */ = {isa = PBXBuildFile; fileRef = 2744E5EA0FC16BE200E85C33 /* Scintilla.framework */; };
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 089C165CFE840E0CC02AAC07 /* InfoPlist.strings */; };
8D11072D0486CEB800E47090 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 29B97316FDCFA39411CA2CEA /* main.m */; settings = {ATTRIBUTES = (); }; };
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */; };
/* End PBXBuildFile section */
/* Begin PBXContainerItemProxy section */
2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
proxyType = 2;
remoteGlobalIDString = 8DC2EF5B0486A6940098B216;
remoteInfo = Scintilla;
};
27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */ = {
isa = PBXContainerItemProxy;
containerPortal = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
proxyType = 1;
remoteGlobalIDString = 8DC2EF4F0486A6940098B216;
remoteInfo = Scintilla;
};
/* End PBXContainerItemProxy section */
/* Begin PBXCopyFilesBuildPhase section */
272133C20F973596006BE49A /* CopyFiles */ = {
isa = PBXCopyFilesBuildPhase;
buildActionMask = 2147483647;
dstPath = "";
dstSubfolderSpec = 10;
files = (
27AF7ECA0FC2C388007160EF /* Scintilla.framework in CopyFiles */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXCopyFilesBuildPhase section */
/* Begin PBXFileReference section */
089C165DFE840E0CC02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Cocoa.framework; path = /System/Library/Frameworks/Cocoa.framework; sourceTree = "<absolute>"; };
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreData.framework; path = /System/Library/Frameworks/CoreData.framework; sourceTree = "<absolute>"; };
1DDD58150DA1D0A300B32029 /* English */ = {isa = PBXFileReference; lastKnownFileType = file.xib; name = English; path = English.lproj/MainMenu.xib; sourceTree = "<group>"; };
271FA52A0F850BE20033D021 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = "<group>"; };
271FA52B0F850BE20033D021 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = "<group>"; wrapsLines = 0; };
2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = ScintillaFramework.xcodeproj; path = ../ScintillaFramework/ScintillaFramework.xcodeproj; sourceTree = SOURCE_ROOT; };
2791F4480FC1A8E9009DBCF9 /* TestData.sql */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = TestData.sql; sourceTree = "<group>"; };
29B97316FDCFA39411CA2CEA /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = "<group>"; };
29B97324FDCFA39411CA2CEA /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = /System/Library/Frameworks/AppKit.framework; sourceTree = "<absolute>"; };
29B97325FDCFA39411CA2CEA /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = /System/Library/Frameworks/Foundation.framework; sourceTree = "<absolute>"; };
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScintillaTest_Prefix.pch; sourceTree = "<group>"; };
8D1107310486CEB800E47090 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = "<group>"; };
8D1107320486CEB800E47090 /* ScintillaTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = ScintillaTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D11072E0486CEB800E47090 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
27AF7EC30FC2C351007160EF /* Scintilla.framework in Frameworks */,
8D11072F0486CEB800E47090 /* Cocoa.framework in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
080E96DDFE201D6D7F000001 /* Classes */ = {
isa = PBXGroup;
children = (
271FA52A0F850BE20033D021 /* AppController.h */,
271FA52B0F850BE20033D021 /* AppController.mm */,
);
name = Classes;
sourceTree = "<group>";
};
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A1FEA54F0111CA2CBB /* Cocoa.framework */,
);
name = "Linked Frameworks";
sourceTree = "<group>";
};
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */ = {
isa = PBXGroup;
children = (
29B97324FDCFA39411CA2CEA /* AppKit.framework */,
13E42FB307B3F0F600E4EEF1 /* CoreData.framework */,
29B97325FDCFA39411CA2CEA /* Foundation.framework */,
);
name = "Other Frameworks";
sourceTree = "<group>";
};
19C28FACFE9D520D11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D1107320486CEB800E47090 /* ScintillaTest.app */,
);
name = Products;
sourceTree = "<group>";
};
2744E5E30FC16BE200E85C33 /* Products */ = {
isa = PBXGroup;
children = (
2744E5EA0FC16BE200E85C33 /* Scintilla.framework */,
);
name = Products;
sourceTree = "<group>";
};
29B97314FDCFA39411CA2CEA /* ScintillaTest */ = {
isa = PBXGroup;
children = (
2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */,
080E96DDFE201D6D7F000001 /* Classes */,
29B97315FDCFA39411CA2CEA /* Other Sources */,
29B97317FDCFA39411CA2CEA /* Resources */,
29B97323FDCFA39411CA2CEA /* Frameworks */,
19C28FACFE9D520D11CA2CBB /* Products */,
);
name = ScintillaTest;
sourceTree = "<group>";
};
29B97315FDCFA39411CA2CEA /* Other Sources */ = {
isa = PBXGroup;
children = (
32CA4F630368D1EE00C91783 /* ScintillaTest_Prefix.pch */,
29B97316FDCFA39411CA2CEA /* main.m */,
);
name = "Other Sources";
sourceTree = "<group>";
};
29B97317FDCFA39411CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
2791F4480FC1A8E9009DBCF9 /* TestData.sql */,
8D1107310486CEB800E47090 /* Info.plist */,
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */,
1DDD58140DA1D0A300B32029 /* MainMenu.xib */,
);
name = Resources;
sourceTree = "<group>";
};
29B97323FDCFA39411CA2CEA /* Frameworks */ = {
isa = PBXGroup;
children = (
1058C7A0FEA54F0111CA2CBB /* Linked Frameworks */,
1058C7A2FEA54F0111CA2CBB /* Other Frameworks */,
);
name = Frameworks;
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D1107260486CEB800E47090 /* ScintillaTest */ = {
isa = PBXNativeTarget;
buildConfigurationList = C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */;
buildPhases = (
8D1107290486CEB800E47090 /* Resources */,
8D11072C0486CEB800E47090 /* Sources */,
8D11072E0486CEB800E47090 /* Frameworks */,
272133C20F973596006BE49A /* CopyFiles */,
);
buildRules = (
);
dependencies = (
27AF7EC70FC2C36A007160EF /* PBXTargetDependency */,
);
name = ScintillaTest;
productInstallPath = "$(HOME)/Applications";
productName = ScintillaTest;
productReference = 8D1107320486CEB800E47090 /* ScintillaTest.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
29B97313FDCFA39411CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */;
compatibilityVersion = "Xcode 3.1";
hasScannedForEncodings = 1;
mainGroup = 29B97314FDCFA39411CA2CEA /* ScintillaTest */;
projectDirPath = "";
projectReferences = (
{
ProductGroup = 2744E5E30FC16BE200E85C33 /* Products */;
ProjectRef = 2744E5E20FC16BE200E85C33 /* ScintillaFramework.xcodeproj */;
},
);
projectRoot = "";
targets = (
8D1107260486CEB800E47090 /* ScintillaTest */,
);
};
/* End PBXProject section */
/* Begin PBXReferenceProxy section */
2744E5EA0FC16BE200E85C33 /* Scintilla.framework */ = {
isa = PBXReferenceProxy;
fileType = wrapper.framework;
path = Scintilla.framework;
remoteRef = 2744E5E90FC16BE200E85C33 /* PBXContainerItemProxy */;
sourceTree = BUILT_PRODUCTS_DIR;
};
/* End PBXReferenceProxy section */
/* Begin PBXResourcesBuildPhase section */
8D1107290486CEB800E47090 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072B0486CEB800E47090 /* InfoPlist.strings in Resources */,
1DDD58160DA1D0A300B32029 /* MainMenu.xib in Resources */,
2791F4490FC1A8E9009DBCF9 /* TestData.sql in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D11072C0486CEB800E47090 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D11072D0486CEB800E47090 /* main.m in Sources */,
271FA52C0F850BE20033D021 /* AppController.mm in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXTargetDependency section */
27AF7EC70FC2C36A007160EF /* PBXTargetDependency */ = {
isa = PBXTargetDependency;
name = Scintilla;
targetProxy = 27AF7EC60FC2C36A007160EF /* PBXContainerItemProxy */;
};
/* End PBXTargetDependency section */
/* Begin PBXVariantGroup section */
089C165CFE840E0CC02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
089C165DFE840E0CC02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
1DDD58140DA1D0A300B32029 /* MainMenu.xib */ = {
isa = PBXVariantGroup;
children = (
1DDD58150DA1D0A300B32029 /* English */,
);
name = MainMenu.xib;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
C01FCF4B08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
COPY_PHASE_STRIP = NO;
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
);
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_MODEL_TUNING = G5;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_LEXER,
SCI_NAMESPACE,
);
HEADER_SEARCH_PATHS = "../..//**";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "";
PRODUCT_NAME = ScintillaTest;
USER_HEADER_SEARCH_PATHS = "";
};
name = Debug;
};
C01FCF4C08A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ALWAYS_SEARCH_USER_PATHS = NO;
DEBUG_INFORMATION_FORMAT = "dwarf-with-dsym";
FRAMEWORK_SEARCH_PATHS = (
"$(inherited)",
"\"$(SRCROOT)/../../../../MySQL/Workbench/5.2/ext/scintilla/cocoa/ScintillaFramework/build/Debug\"",
);
GCC_MODEL_TUNING = G5;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = ScintillaTest_Prefix.pch;
GCC_PREPROCESSOR_DEFINITIONS = (
SCI_LEXER,
SCI_NAMESPACE,
);
HEADER_SEARCH_PATHS = "../..//**";
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "$(inherited)";
OTHER_LDFLAGS = "";
PRODUCT_NAME = ScintillaTest;
USER_HEADER_SEARCH_PATHS = "";
};
name = Release;
};
C01FCF4F08A954540054247B /* Debug */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
ONLY_ACTIVE_ARCH = YES;
OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = macosx10.5;
};
name = Debug;
};
C01FCF5008A954540054247B /* Release */ = {
isa = XCBuildConfiguration;
buildSettings = {
ARCHS = "$(ARCHS_STANDARD_32_BIT)";
GCC_C_LANGUAGE_STANDARD = c99;
GCC_WARN_ABOUT_RETURN_TYPE = YES;
GCC_WARN_UNUSED_VARIABLE = YES;
OTHER_LDFLAGS = "";
PREBINDING = NO;
SDKROOT = macosx10.5;
};
name = Release;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
C01FCF4A08A954540054247B /* Build configuration list for PBXNativeTarget "ScintillaTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4B08A954540054247B /* Debug */,
C01FCF4C08A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
C01FCF4E08A954540054247B /* Build configuration list for PBXProject "ScintillaTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
C01FCF4F08A954540054247B /* Debug */,
C01FCF5008A954540054247B /* Release */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Release;
};
/* End XCConfigurationList section */
};
rootObject = 29B97313FDCFA39411CA2CEA /* Project object */;
}

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,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,120 @@
/**
* Declaration of the native Cocoa View that serves as container for the scintilla parts.
*
* Created by Mike Lischke.
*
* Copyright 2009 Sun Microsystems, Inc. All rights reserved.
* This file is dual licensed under LGPL v2.1 and the Scintilla license (http://www.scintilla.org/License.txt).
*/
#import <Cocoa/Cocoa.h>
#import "Platform.h"
#import "Scintilla.h"
#import "SciLexer.h"
#import "InfoBarCommunicator.h"
#import "ScintillaCocoa.h"
@class ScintillaView;
extern NSString *SCIUpdateUINotification;
/**
* InnerView is the Cocoa interface to the Scintilla backend. It handles text input and
* provides a canvas for painting the output.
*/
@interface InnerView : NSView <NSTextInput>
{
@private
ScintillaView* mOwner;
NSCursor* mCurrentCursor;
NSTrackingRectTag mCurrentTrackingRect;
// Set when we are in composition mode and partial input is displayed.
NSRange mMarkedTextRange;
// Caret position when a drag operation started.
int mLastPosition;
}
- (void) dealloc;
- (void) removeMarkedText;
- (void) setCursor: (Scintilla::Window::Cursor) cursor;
@property (retain) ScintillaView* owner;
@end
@interface ScintillaView : NSView <InfoBarCommunicator>
{
@private
// The back end is kind of a controller and model in one.
// It uses the content view for display.
Scintilla::ScintillaCocoa* mBackend;
// This is the actual content to which the backend renders itself.
InnerView* mContent;
NSScroller* mHorizontalScroller;
NSScroller* mVerticalScroller;
// Area to display additional controls (e.g. zoom info, caret position, status info).
NSView <InfoBarCommunicator>* mInfoBar;
BOOL mInfoBarAtTop;
int mInitialInfoBarWidth;
}
- (void) dealloc;
- (void) layout;
- (void) sendNotification: (NSString*) notificationName;
- (void) notify: (NotificationType) type message: (NSString*) message location: (NSPoint) location
value: (float) value;
- (void) setCallback: (id <InfoBarCommunicator>) callback;
// Scroller handling
- (BOOL) setVerticalScrollRange: (int) range page: (int) page;
- (void) setVerticalScrollPosition: (float) position;
- (BOOL) setHorizontalScrollRange: (int) range page: (int) page;
- (void) setHorizontalScrollPosition: (float) position;
- (void) scrollerAction: (id) sender;
- (InnerView*) content;
// NSTextView compatibility layer.
- (NSString*) string;
- (void) setString: (NSString*) aString;
- (void) insertText: (NSString*) aString;
- (void) setEditable: (BOOL) editable;
- (BOOL) isEditable;
- (NSRange) selectedRange;
- (NSString*) selectedString;
// Native call through to the backend.
+ (sptr_t) directCall: (ScintillaView*) sender message: (unsigned int) message wParam: (uptr_t) wParam
lParam: (sptr_t) lParam;
// Back end properties getters and setters.
- (void) setGeneralProperty: (int) property parameter: (long) parameter value: (long) value;
- (long) getGeneralProperty: (int) property;
- (long) getGeneralProperty: (int) property parameter: (long) parameter;
- (long) getGeneralProperty: (int) property parameter: (long) parameter extra: (long) extra;
- (long) getGeneralProperty: (int) property ref: (const void*) ref;
- (void) setColorProperty: (int) property parameter: (long) parameter value: (NSColor*) value;
- (void) setColorProperty: (int) property parameter: (long) parameter fromHTML: (NSString*) fromHTML;
- (NSColor*) getColorProperty: (int) property parameter: (long) parameter;
- (void) setReferenceProperty: (int) property parameter: (long) parameter value: (const void*) value;
- (const void*) getReferenceProperty: (int) property parameter: (long) parameter;
- (void) setStringProperty: (int) property parameter: (long) parameter value: (NSString*) value;
- (NSString*) getStringProperty: (int) property parameter: (long) parameter;
- (void) setLexerProperty: (NSString*) name value: (NSString*) value;
- (NSString*) getLexerProperty: (NSString*) name;
- (void) setInfoBar: (NSView <InfoBarCommunicator>*) aView top: (BOOL) top;
- (void) setStatusText: (NSString*) text;
@property Scintilla::ScintillaCocoa* backend;
@end

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 446 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 33 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

View File

@ -1,611 +0,0 @@
# Make file for GTK+/Scintilla on Windows Visual C++
# Borland C++ does not work
# Copyright 1998-2000 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# This makefile is for using Visual C++ with nmake or Borland C++ with make depending on
# the setting of the VENDOR macro. If no VENDOR is defined n the command line then
# the tool used is automatically detected.
# Usage for Microsoft:
# nmake -f scintilla.mak
# Usage for Borland:
# make -f scintilla.mak
# For debug versions define DEBUG on the command line, for Borland:
# make DEBUG=1 -f scintilla.mak
# The main makefile uses mingw32 gcc and may be more current than this file.
.SUFFIXES: .cxx
DIR_O=.
DIR_BIN=..\bin
COMPONENT=$(DIR_BIN)\Scintilla.dll
LEXCOMPONENT=$(DIR_BIN)\SciLexer.dll
STATIC_LIB=$(DIR_BIN)\Scintilla-static.lib
!IFNDEF VENDOR
!IFDEF _NMAKE_VER
#Microsoft nmake so make default VENDOR MICROSOFT
VENDOR=MICROSOFT
!ELSE
VENDOR=BORLAND
!ENDIF
!ENDIF
!IF "$(VENDOR)"=="MICROSOFT"
CC=cl
RC=rc
LD=link
!IFDEF USE_GTK2
MARSHALLER=$(DIR_O)\scintilla-marshal.obj
GTK_TOP= ../../gtk2
TOP = $(GTK_TOP)
!INCLUDE $(TOP)/glib/build/win32/make.msc
GTK_INCLUDES= -I$(GTK_TOP)/gtk+ \
-I$(GTK_TOP)/gtk+/gdk \
-I$(GTK_TOP)/glib/glib \
-I$(GTK_TOP)/glib/gmodule \
-I$(GTK_TOP)/glib \
-I$(GTK_TOP)\libiconv\include \
-I$(GTK_TOP)\pango \
-I$(GTK_TOP)\atk
ALL_GTK_LIBS=$(GTK2_LIBS) $(GLIB_LIBS) $(LIBICONV_LIBS)
!ELSE
GTK_TOP= ../../win32gtk
GTK_INCLUDES= -I $(GTK_TOP)/gtk+ -I $(GTK_TOP)/gtk+/gdk -I $(GTK_TOP)/glib -I $(GTK_TOP)/glib/gmodule
ALL_GTK_LIBS=$(GTK_TOP)/gtk+/gtk/gtk-1.3.lib \
$(GTK_TOP)/gtk+/gdk/gdk-1.3.lib \
$(GTK_TOP)/glib/gmodule/gmodule-1.3.lib \
$(GTK_TOP)/glib/glib-1.3.lib
!ENDIF
INCLUDEDIRS=-I ../include -I ../src $(GTK_INCLUDES)
CXXFLAGS=/TP /W4 -EHsc -DGTK -D_CRT_SECURE_NO_DEPRECATE=1
CFLAGS=/W4 -DGTK
# For something scary:/Wp64
CXXDEBUG=/Zi /Od /MDd -DDEBUG
CXXNDEBUG=/Ox /MD -DNDEBUG
NAMEFLAG=-Fo
LDFLAGS=/opt:nowin98
LDDEBUG=/DEBUG
#LIBS=KERNEL32.lib USER32.lib GDI32.lib IMM32.lib OLE32.LIB
LIBS=$(ALL_GTK_LIBS)
!IFDEF QUIET
CC=@$(CC)
CXXDEBUG=$(CXXDEBUG) /nologo
CXXNDEBUG=$(CXXNDEBUG) /nologo
LDFLAGS=$(LDFLAGS) /nologo
!ENDIF
!ELSE
# BORLAND
!error Borland C++ not supported
CC=bcc32
RC=brcc32 -r
LD=ilink32
INCLUDEDIRS=-I../include -I../src
CXXFLAGS = -v
CXXFLAGS=-P -tWM -w -w-prc -w-inl -RT- -x
# Above turns off warnings for clarfying parentheses and inlines with for not expanded
CXXDEBUG=-v -DDEBUG
CXXNDEBUG=-O1 -DNDEBUG
NAMEFLAG=-o
LDFLAGS=
LDDEBUG=-v
LIBS=import32 cw32mt
!ENDIF
!IFDEF DEBUG
CXXFLAGS=$(CXXFLAGS) $(CXXDEBUG)
LDFLAGS=$(LDDEBUG) $(LDFLAGS)
!ELSE
CXXFLAGS=$(CXXFLAGS) $(CXXNDEBUG)
!ENDIF
#ALL: $(STATIC_LIB) $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj
ALL: $(STATIC_LIB) $(DIR_O)\ScintillaGTKS.obj $(DIR_O)\WindowAccessor.obj
clean::
-del /q $(DIR_O)\*.obj $(DIR_O)\*.pdb $(COMPONENT) $(LEXCOMPONENT) $(DIR_O)\*.res $(DIR_BIN)\*.map
SOBJS=\
$(DIR_O)\AutoComplete.obj \
$(DIR_O)\CallTip.obj \
$(DIR_O)\CellBuffer.obj \
$(DIR_O)\ContractionState.obj \
$(DIR_O)\CharClassify.obj \
$(DIR_O)\Decoration.obj \
$(DIR_O)\Document.obj \
$(DIR_O)\Editor.obj \
$(DIR_O)\ExternalLexer.obj \
$(DIR_O)\Indicator.obj \
$(DIR_O)\KeyMap.obj \
$(DIR_O)\LineMarker.obj \
$(DIR_O)\PlatGTK.obj \
$(DIR_O)\PositionCache.obj \
$(MARSHALLER) \
$(DIR_O)\RESearch.obj \
$(DIR_O)\RunStyles.obj \
$(DIR_O)\PropSet.obj \
$(DIR_O)\ScintillaBase.obj \
$(DIR_O)\ScintillaGTK.obj \
$(DIR_O)\Selection.obj \
$(DIR_O)\Style.obj \
$(DIR_O)\UniConversion.obj \
$(DIR_O)\ViewStyle.obj \
$(DIR_O)\XPM.obj
#++Autogenerated -- run src/LexGen.py to regenerate
#**LEXOBJS=\\\n\(\t$(DIR_O)\\\*.obj \\\n\)
LEXOBJS=\
$(DIR_O)\LexAbaqus.obj \
$(DIR_O)\LexAda.obj \
$(DIR_O)\LexAPDL.obj \
$(DIR_O)\LexAsm.obj \
$(DIR_O)\LexAsn1.obj \
$(DIR_O)\LexASY.obj \
$(DIR_O)\LexAU3.obj \
$(DIR_O)\LexAVE.obj \
$(DIR_O)\LexBaan.obj \
$(DIR_O)\LexBash.obj \
$(DIR_O)\LexBasic.obj \
$(DIR_O)\LexBullant.obj \
$(DIR_O)\LexCaml.obj \
$(DIR_O)\LexCLW.obj \
$(DIR_O)\LexCmake.obj \
$(DIR_O)\LexCOBOL.obj \
$(DIR_O)\LexConf.obj \
$(DIR_O)\LexCPP.obj \
$(DIR_O)\LexCrontab.obj \
$(DIR_O)\LexCsound.obj \
$(DIR_O)\LexCSS.obj \
$(DIR_O)\LexD.obj \
$(DIR_O)\LexEiffel.obj \
$(DIR_O)\LexErlang.obj \
$(DIR_O)\LexEScript.obj \
$(DIR_O)\LexFlagship.obj \
$(DIR_O)\LexForth.obj \
$(DIR_O)\LexFortran.obj \
$(DIR_O)\LexGAP.obj \
$(DIR_O)\LexGui4Cli.obj \
$(DIR_O)\LexHaskell.obj \
$(DIR_O)\LexHTML.obj \
$(DIR_O)\LexInno.obj \
$(DIR_O)\LexKix.obj \
$(DIR_O)\LexLisp.obj \
$(DIR_O)\LexLout.obj \
$(DIR_O)\LexLua.obj \
$(DIR_O)\LexMagik.obj \
$(DIR_O)\LexMatlab.obj \
$(DIR_O)\LexMetapost.obj \
$(DIR_O)\LexMMIXAL.obj \
$(DIR_O)\LexMPT.obj \
$(DIR_O)\LexMSSQL.obj \
$(DIR_O)\LexMySQL.obj \
$(DIR_O)\LexNimrod.obj \
$(DIR_O)\LexNsis.obj \
$(DIR_O)\LexOpal.obj \
$(DIR_O)\LexOthers.obj \
$(DIR_O)\LexPascal.obj \
$(DIR_O)\LexPB.obj \
$(DIR_O)\LexPerl.obj \
$(DIR_O)\LexPLM.obj \
$(DIR_O)\LexPOV.obj \
$(DIR_O)\LexPowerPro.obj \
$(DIR_O)\LexPowerShell.obj \
$(DIR_O)\LexProgress.obj \
$(DIR_O)\LexPS.obj \
$(DIR_O)\LexPython.obj \
$(DIR_O)\LexR.obj \
$(DIR_O)\LexRebol.obj \
$(DIR_O)\LexRuby.obj \
$(DIR_O)\LexScriptol.obj \
$(DIR_O)\LexSmalltalk.obj \
$(DIR_O)\LexSML.obj \
$(DIR_O)\LexSorcus.obj \
$(DIR_O)\LexSpecman.obj \
$(DIR_O)\LexSpice.obj \
$(DIR_O)\LexSQL.obj \
$(DIR_O)\LexTACL.obj \
$(DIR_O)\LexTADS3.obj \
$(DIR_O)\LexTAL.obj \
$(DIR_O)\LexTCL.obj \
$(DIR_O)\LexTeX.obj \
$(DIR_O)\LexVB.obj \
$(DIR_O)\LexVerilog.obj \
$(DIR_O)\LexVHDL.obj \
$(DIR_O)\LexYAML.obj \
#--Autogenerated -- end of automatically generated section
LOBJS=\
$(DIR_O)\AutoComplete.obj \
$(DIR_O)\CallTip.obj \
$(DIR_O)\CellBuffer.obj \
$(DIR_O)\ContractionState.obj \
$(DIR_O)\CharClassify.obj \
$(DIR_O)\Decoration.obj \
$(DIR_O)\Document.obj \
$(DIR_O)\DocumentAccessor.obj \
$(DIR_O)\Editor.obj \
$(DIR_O)\Indicator.obj \
$(DIR_O)\KeyMap.obj \
$(DIR_O)\KeyWords.obj \
$(DIR_O)\LineMarker.obj \
$(DIR_O)\PlatGTK.obj \
$(DIR_O)\PositionCache.obj \
$(MARSHALLER) \
$(DIR_O)\RESearch.obj \
$(DIR_O)\RunStyles.obj \
$(DIR_O)\PropSet.obj \
$(DIR_O)\ScintillaBaseL.obj \
$(DIR_O)\ScintillaGTKL.obj \
$(DIR_O)\Selection.obj \
$(DIR_O)\Style.obj \
$(DIR_O)\StyleContext.obj \
$(DIR_O)\UniConversion.obj \
$(DIR_O)\ViewStyle.obj \
$(DIR_O)\XPM.obj \
$(DIR_O)\ExternalLexer.obj \
$(LEXOBJS)
!IF "$(VENDOR)"=="MICROSOFT"
$(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res
lib.exe /OUT:$@ $(LOBJS) $(LIBS)
$(COMPONENT): $(SOBJS) #$(DIR_O)\ScintRes.res
$(LD) $(LDFLAGS) /DLL /OUT:$@ $(SOBJS) $(LIBS)
$(DIR_O)\ScintRes.res : ScintRes.rc
$(RC) /fo$@ $(*B).rc
$(LEXCOMPONENT): $(LOBJS) #$(DIR_O)\ScintRes.res
$(LD) $(LDFLAGS) /DLL /OUT:$@ $(LOBJS) $(LIBS)
!ELSE
$(STATIC_LIB): $(LOBJS) #$(DIR_O)\ScintRes.res
$(LD) /OUT:$@ $(LOBJS) $(LIBS)
$(COMPONENT): $(SOBJS) ScintRes.res
$(LD) $(LDFLAGS) -Tpd -c c0d32 $(SOBJS), $@, , $(LIBS), , ScintRes.res
$(DIR_O)\ScintRes.res: ScintRes.rc
$(RC) $*.rc
$(LEXCOMPONENT): $(LOBJS)
$(LD) $(LDFLAGS) -Tpd -c c0d32 $(LOBJS), $@, , $(LIBS), , ScintRes.res
!ENDIF
# Define how to build all the objects and what they depend on
# Most of the source is in ..\src with a couple in this directory
{..\src}.cxx{$(DIR_O)}.obj:
$(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $<
{.}.cxx{$(DIR_O)}.obj:
$(CC) $(INCLUDEDIRS) $(CXXFLAGS) -c $(NAMEFLAG)$@ $<
{.}.c{$(DIR_O)}.obj:
$(CC) $(INCLUDEDIRS) $(CFLAGS) -c $(NAMEFLAG)$@ $<
# Some source files are compiled into more than one object because of different conditional compilation
$(DIR_O)\ScintillaBaseL.obj: ..\src\ScintillaBase.cxx
$(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ..\src\ScintillaBase.cxx
$(DIR_O)\ScintillaGTKL.obj: ScintillaGTK.cxx
$(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSCI_LEXER -c $(NAMEFLAG)$@ ScintillaGTK.cxx
$(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx
$(CC) $(INCLUDEDIRS) $(CXXFLAGS) -DSTATIC_BUILD -c $(NAMEFLAG)$@ ScintillaGTK.cxx
# Dependencies
# All lexers depend on this set of headers
LEX_HEADERS=..\include\Platform.h ..\include\PropSet.h \
..\include\Accessor.h ..\include\KeyWords.h \
..\include\Scintilla.h ..\include\SciLexer.h ..\src\StyleContext.h
$(DIR_O)\AutoComplete.obj: ../src/AutoComplete.cxx ../include/Platform.h \
../include/PropSet.h ../src/AutoComplete.h
$(DIR_O)\CallTip.obj: ../src/CallTip.cxx ../include/Platform.h \
../include/Scintilla.h ../src/CallTip.h
$(DIR_O)\CellBuffer.obj: ../src/CellBuffer.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/CellBuffer.h
$(DIR_O)\CharClassify.obj: ../src/CharClassify.cxx ../src/CharClassify.h
$(DIR_O)\ContractionState.obj: ../src/ContractionState.cxx ../include/Platform.h \
../src/ContractionState.h
$(DIR_O)\Document.obj: ../src/Document.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/CellBuffer.h ../src/CharClassify.h \
../src/Document.h ../src/RESearch.h
$(DIR_O)\DocumentAccessor.obj: ../src/DocumentAccessor.cxx ../include/Platform.h \
../include/PropSet.h ../src/SVector.h \
../include/Accessor.h ../src/DocumentAccessor.h ../src/SplitVector.h \
../src/Partitioning.h ../src/CellBuffer.h ../include/Scintilla.h \
../src/CharClassify.h ../src/Document.h
$(DIR_O)\Editor.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Document.h ../src/Editor.h ../src/Selection.h ../src/PositionCache.h
$(DIR_O)\ExternalLexer.obj: ../src/ExternalLexer.cxx ../include/Platform.h \
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
../include/Accessor.h ../src/DocumentAccessor.h \
../include/KeyWords.h ../src/ExternalLexer.h
$(DIR_O)\Indicator.obj: ../src/Indicator.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Indicator.h
$(DIR_O)\KeyMap.obj: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
../src/KeyMap.h
$(DIR_O)\KeyWords.obj: ../src/KeyWords.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
#++Autogenerated -- run src/LexGen.py to regenerate
#**\n\($(DIR_O)\\\*.obj: ..\\src\\\*.cxx $(LEX_HEADERS)\n\n\)
$(DIR_O)\LexAbaqus.obj: ..\src\LexAbaqus.cxx $(LEX_HEADERS)
$(DIR_O)\LexAda.obj: ..\src\LexAda.cxx $(LEX_HEADERS)
$(DIR_O)\LexAPDL.obj: ..\src\LexAPDL.cxx $(LEX_HEADERS)
$(DIR_O)\LexAsm.obj: ..\src\LexAsm.cxx $(LEX_HEADERS)
$(DIR_O)\LexAsn1.obj: ..\src\LexAsn1.cxx $(LEX_HEADERS)
$(DIR_O)\LexASY.obj: ..\src\LexASY.cxx $(LEX_HEADERS)
$(DIR_O)\LexAU3.obj: ..\src\LexAU3.cxx $(LEX_HEADERS)
$(DIR_O)\LexAVE.obj: ..\src\LexAVE.cxx $(LEX_HEADERS)
$(DIR_O)\LexBaan.obj: ..\src\LexBaan.cxx $(LEX_HEADERS)
$(DIR_O)\LexBash.obj: ..\src\LexBash.cxx $(LEX_HEADERS)
$(DIR_O)\LexBasic.obj: ..\src\LexBasic.cxx $(LEX_HEADERS)
$(DIR_O)\LexBullant.obj: ..\src\LexBullant.cxx $(LEX_HEADERS)
$(DIR_O)\LexCaml.obj: ..\src\LexCaml.cxx $(LEX_HEADERS)
$(DIR_O)\LexCLW.obj: ..\src\LexCLW.cxx $(LEX_HEADERS)
$(DIR_O)\LexCmake.obj: ..\src\LexCmake.cxx $(LEX_HEADERS)
$(DIR_O)\LexCOBOL.obj: ..\src\LexCOBOL.cxx $(LEX_HEADERS)
$(DIR_O)\LexConf.obj: ..\src\LexConf.cxx $(LEX_HEADERS)
$(DIR_O)\LexCPP.obj: ..\src\LexCPP.cxx $(LEX_HEADERS)
$(DIR_O)\LexCrontab.obj: ..\src\LexCrontab.cxx $(LEX_HEADERS)
$(DIR_O)\LexCsound.obj: ..\src\LexCsound.cxx $(LEX_HEADERS)
$(DIR_O)\LexCSS.obj: ..\src\LexCSS.cxx $(LEX_HEADERS)
$(DIR_O)\LexD.obj: ..\src\LexD.cxx $(LEX_HEADERS)
$(DIR_O)\LexEiffel.obj: ..\src\LexEiffel.cxx $(LEX_HEADERS)
$(DIR_O)\LexErlang.obj: ..\src\LexErlang.cxx $(LEX_HEADERS)
$(DIR_O)\LexEScript.obj: ..\src\LexEScript.cxx $(LEX_HEADERS)
$(DIR_O)\LexFlagship.obj: ..\src\LexFlagship.cxx $(LEX_HEADERS)
$(DIR_O)\LexForth.obj: ..\src\LexForth.cxx $(LEX_HEADERS)
$(DIR_O)\LexFortran.obj: ..\src\LexFortran.cxx $(LEX_HEADERS)
$(DIR_O)\LexGAP.obj: ..\src\LexGAP.cxx $(LEX_HEADERS)
$(DIR_O)\LexGui4Cli.obj: ..\src\LexGui4Cli.cxx $(LEX_HEADERS)
$(DIR_O)\LexHaskell.obj: ..\src\LexHaskell.cxx $(LEX_HEADERS)
$(DIR_O)\LexHTML.obj: ..\src\LexHTML.cxx $(LEX_HEADERS)
$(DIR_O)\LexInno.obj: ..\src\LexInno.cxx $(LEX_HEADERS)
$(DIR_O)\LexKix.obj: ..\src\LexKix.cxx $(LEX_HEADERS)
$(DIR_O)\LexLisp.obj: ..\src\LexLisp.cxx $(LEX_HEADERS)
$(DIR_O)\LexLout.obj: ..\src\LexLout.cxx $(LEX_HEADERS)
$(DIR_O)\LexLua.obj: ..\src\LexLua.cxx $(LEX_HEADERS)
$(DIR_O)\LexMagik.obj: ..\src\LexMagik.cxx $(LEX_HEADERS)
$(DIR_O)\LexMatlab.obj: ..\src\LexMatlab.cxx $(LEX_HEADERS)
$(DIR_O)\LexMetapost.obj: ..\src\LexMetapost.cxx $(LEX_HEADERS)
$(DIR_O)\LexMMIXAL.obj: ..\src\LexMMIXAL.cxx $(LEX_HEADERS)
$(DIR_O)\LexMPT.obj: ..\src\LexMPT.cxx $(LEX_HEADERS)
$(DIR_O)\LexMSSQL.obj: ..\src\LexMSSQL.cxx $(LEX_HEADERS)
$(DIR_O)\LexMySQL.obj: ..\src\LexMySQL.cxx $(LEX_HEADERS)
$(DIR_O)\LexNimrod.obj: ..\src\LexNimrod.cxx $(LEX_HEADERS)
$(DIR_O)\LexNsis.obj: ..\src\LexNsis.cxx $(LEX_HEADERS)
$(DIR_O)\LexOpal.obj: ..\src\LexOpal.cxx $(LEX_HEADERS)
$(DIR_O)\LexOthers.obj: ..\src\LexOthers.cxx $(LEX_HEADERS)
$(DIR_O)\LexPascal.obj: ..\src\LexPascal.cxx $(LEX_HEADERS)
$(DIR_O)\LexPB.obj: ..\src\LexPB.cxx $(LEX_HEADERS)
$(DIR_O)\LexPerl.obj: ..\src\LexPerl.cxx $(LEX_HEADERS)
$(DIR_O)\LexPLM.obj: ..\src\LexPLM.cxx $(LEX_HEADERS)
$(DIR_O)\LexPOV.obj: ..\src\LexPOV.cxx $(LEX_HEADERS)
$(DIR_O)\LexPowerPro.obj: ..\src\LexPowerPro.cxx $(LEX_HEADERS)
$(DIR_O)\LexPowerShell.obj: ..\src\LexPowerShell.cxx $(LEX_HEADERS)
$(DIR_O)\LexProgress.obj: ..\src\LexProgress.cxx $(LEX_HEADERS)
$(DIR_O)\LexPS.obj: ..\src\LexPS.cxx $(LEX_HEADERS)
$(DIR_O)\LexPython.obj: ..\src\LexPython.cxx $(LEX_HEADERS)
$(DIR_O)\LexR.obj: ..\src\LexR.cxx $(LEX_HEADERS)
$(DIR_O)\LexRebol.obj: ..\src\LexRebol.cxx $(LEX_HEADERS)
$(DIR_O)\LexRuby.obj: ..\src\LexRuby.cxx $(LEX_HEADERS)
$(DIR_O)\LexScriptol.obj: ..\src\LexScriptol.cxx $(LEX_HEADERS)
$(DIR_O)\LexSmalltalk.obj: ..\src\LexSmalltalk.cxx $(LEX_HEADERS)
$(DIR_O)\LexSML.obj: ..\src\LexSML.cxx $(LEX_HEADERS)
$(DIR_O)\LexSorcus.obj: ..\src\LexSorcus.cxx $(LEX_HEADERS)
$(DIR_O)\LexSpecman.obj: ..\src\LexSpecman.cxx $(LEX_HEADERS)
$(DIR_O)\LexSpice.obj: ..\src\LexSpice.cxx $(LEX_HEADERS)
$(DIR_O)\LexSQL.obj: ..\src\LexSQL.cxx $(LEX_HEADERS)
$(DIR_O)\LexTACL.obj: ..\src\LexTACL.cxx $(LEX_HEADERS)
$(DIR_O)\LexTADS3.obj: ..\src\LexTADS3.cxx $(LEX_HEADERS)
$(DIR_O)\LexTAL.obj: ..\src\LexTAL.cxx $(LEX_HEADERS)
$(DIR_O)\LexTCL.obj: ..\src\LexTCL.cxx $(LEX_HEADERS)
$(DIR_O)\LexTeX.obj: ..\src\LexTeX.cxx $(LEX_HEADERS)
$(DIR_O)\LexVB.obj: ..\src\LexVB.cxx $(LEX_HEADERS)
$(DIR_O)\LexVerilog.obj: ..\src\LexVerilog.cxx $(LEX_HEADERS)
$(DIR_O)\LexVHDL.obj: ..\src\LexVHDL.cxx $(LEX_HEADERS)
$(DIR_O)\LexYAML.obj: ..\src\LexYAML.cxx $(LEX_HEADERS)
#--Autogenerated -- end of automatically generated section
$(DIR_O)\LineMarker.obj: ../src/LineMarker.cxx ../include/Platform.h \
../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h
$(DIR_O)\PlatGTK.obj: PlatGTK.cxx ../include/Platform.h \
../src/UniConversion.h ../src/XPM.h
$(DIR_O)\PositionCache.obj: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/CellBuffer.h ../src/KeyMap.h \
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Decoration.h ../src/Document.h ../src/Editor.h ../src/Selection.h ../src/PositionCache.h
$(DIR_O)\PropSet.obj: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h
$(DIR_O)\RESearch.obj: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
$(DIR_O)\RunStyles.obj: ../src/RunStyles.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h
$(DIR_O)\ScintillaBase.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
../include/Scintilla.h ../include/PropSet.h \
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \
../src/AutoComplete.h ../src/CharClassify.h ../src/Document.h \
../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
$(DIR_O)\ScintillaBaseL.obj: ../src/ScintillaBase.cxx ../include/Platform.h \
../include/Scintilla.h ../include/PropSet.h \
../src/ContractionState.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/RunStyles.h ../src/CellBuffer.h \
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \
../src/AutoComplete.h ../src/CharClassify.h ../src/Document.h \
../src/Editor.h ../src/Selection.h ../src/ScintillaBase.h
$(DIR_O)\ScintillaGTK.obj: ScintillaGTK.cxx ../include/Platform.h \
../include/Scintilla.h ../src/ContractionState.h \
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Document.h ../src/Editor.h ../src/ScintillaBase.h \
../src/Selection.h ../src/UniConversion.h
$(DIR_O)\ScintillaGTKL.obj: ScintillaGTK.cxx ../include/Platform.h \
../include/Scintilla.h ../src/ContractionState.h \
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Document.h ../src/Editor.h ../src/ScintillaBase.h \
../src/Selection.h ../src/UniConversion.h
$(DIR_O)\ScintillaGTKS.obj: ScintillaGTK.cxx ../include/Platform.h \
../include/Scintilla.h ../src/ContractionState.h \
../src/SVector.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h \
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
../src/AutoComplete.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Document.h ../src/Editor.h ../src/ScintillaBase.h \
../src/Selection.h ../src/UniConversion.h
$(DIR_O)\Selection.obj: ../src/Selection.cxx ../include/Platform.h ../include/Scintilla.h \
../src/Selection.h
$(DIR_O)\Style.obj: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
../src/Style.h
$(DIR_O)\StyleContext.obj: ../src/StyleContext.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h \
../src/StyleContext.h
$(DIR_O)\UniConversion.obj: ../src/UniConversion.cxx ../src/UniConversion.h
$(DIR_O)\ViewStyle.obj: ../src/ViewStyle.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h
$(DIR_O)\WindowAccessor.obj: ../src/WindowAccessor.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h \
../include/WindowAccessor.h ../include/Scintilla.h
$(DIR_O)\XPM.obj: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h

View File

@ -1,289 +0,0 @@
// SciTE - Scintilla based Text Editor
/** @file SString.h
** A simple string class.
**/
// Copyright 1998-2004 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#ifndef SSTRING_H
#define SSTRING_H
// These functions are implemented because each platform calls them something different.
int CompareCaseInsensitive(const char *a, const char *b);
int CompareNCaseInsensitive(const char *a, const char *b, size_t len);
bool EqualCaseInsensitive(const char *a, const char *b);
#ifdef SCI_NAMESPACE
namespace Scintilla {
#endif
// Define another string class.
// While it would be 'better' to use std::string, that doubles the executable size.
// An SString may contain embedded nul characters.
/**
* Base class from which the two other classes (SBuffer & SString)
* are derived.
*/
class SContainer {
public:
/** Type of string lengths (sizes) and positions (indexes). */
typedef size_t lenpos_t;
/** Out of bounds value indicating that the string argument should be measured. */
enum { measure_length=0xffffffffU};
protected:
char *s; ///< The C string
lenpos_t sSize; ///< The size of the buffer, less 1: ie. the maximum size of the string
SContainer() : s(0), sSize(0) {}
~SContainer() {
delete []s; // Suppose it was allocated using StringAllocate
s = 0;
sSize = 0;
}
/** Size of buffer. */
lenpos_t size() const {
if (s) {
return sSize;
} else {
return 0;
}
}
public:
/**
* Allocate uninitialized memory big enough to fit a string of the given length.
* @return the pointer to the new string
*/
static char *StringAllocate(lenpos_t len);
/**
* Duplicate a buffer/C string.
* Allocate memory of the given size, or big enough to fit the string if length isn't given;
* then copy the given string in the allocated memory.
* @return the pointer to the new string
*/
static char *StringAllocate(
const char *s, ///< The string to duplicate
lenpos_t len=measure_length); ///< The length of memory to allocate. Optional.
};
/**
* @brief A string buffer class.
*
* Main use is to ask an API the length of a string it can provide,
* then to allocate a buffer of the given size, and to provide this buffer
* to the API to put the string.
* This class is intended to be shortlived, to be transformed as SString
* as soon as it holds the string, so it has little members.
* Note: we assume the buffer is filled by the API. If the length can be shorter,
* we should set sLen to strlen(sb.ptr()) in related SString constructor and assignment.
*/
class SBuffer : protected SContainer {
public:
SBuffer(lenpos_t len) {
s = StringAllocate(len);
if (s) {
*s = '\0';
sSize = len;
} else {
sSize = 0;
}
}
private:
/// Copy constructor
// Here only to be on the safe size, user should avoid returning SBuffer values.
SBuffer(const SBuffer &source) : SContainer() {
s = StringAllocate(source.s, source.sSize);
sSize = (s) ? source.sSize : 0;
}
/// Default assignment operator
// Same here, shouldn't be used
SBuffer &operator=(const SBuffer &source) {
if (this != &source) {
delete []s;
s = StringAllocate(source.s, source.sSize);
sSize = (s) ? source.sSize : 0;
}
return *this;
}
public:
/** Provide direct read/write access to buffer. */
char *ptr() {
return s;
}
/** Ownership of the buffer have been taken, so release it. */
void reset() {
s = 0;
sSize = 0;
}
/** Size of buffer. */
lenpos_t size() const {
return SContainer::size();
}
};
/**
* @brief A simple string class.
*
* Hold the length of the string for quick operations,
* can have a buffer bigger than the string to avoid too many memory allocations and copies.
* May have embedded zeroes as a result of @a substitute, but relies too heavily on C string
* functions to allow reliable manipulations of these strings, other than simple appends, etc.
*/
class SString : protected SContainer {
lenpos_t sLen; ///< The size of the string in s
lenpos_t sizeGrowth; ///< Minimum growth size when appending strings
enum { sizeGrowthDefault = 64 };
bool grow(lenpos_t lenNew);
SString &assign(const char *sOther, lenpos_t sSize_=measure_length);
public:
SString() : sLen(0), sizeGrowth(sizeGrowthDefault) {}
SString(const SString &source) : SContainer(), sizeGrowth(sizeGrowthDefault) {
s = StringAllocate(source.s, source.sLen);
sSize = sLen = (s) ? source.sLen : 0;
}
SString(const char *s_) : sizeGrowth(sizeGrowthDefault) {
s = StringAllocate(s_);
sSize = sLen = (s) ? strlen(s) : 0;
}
SString(SBuffer &buf) : sizeGrowth(sizeGrowthDefault) {
s = buf.ptr();
sSize = sLen = buf.size();
// Consumes the given buffer!
buf.reset();
}
SString(const char *s_, lenpos_t first, lenpos_t last) : sizeGrowth(sizeGrowthDefault) {
// note: expects the "last" argument to point one beyond the range end (a la STL iterators)
s = StringAllocate(s_ + first, last - first);
sSize = sLen = (s) ? last - first : 0;
}
SString(int i);
SString(double d, int precision);
~SString() {
sLen = 0;
}
void clear() {
if (s) {
*s = '\0';
}
sLen = 0;
}
/** Size of buffer. */
lenpos_t size() const {
return SContainer::size();
}
/** Size of string in buffer. */
lenpos_t length() const {
return sLen;
}
/** Read access to a character of the string. */
char operator[](lenpos_t i) const {
return (s && i < sSize) ? s[i] : '\0';
}
SString &operator=(const char *source) {
return assign(source);
}
SString &operator=(const SString &source) {
if (this != &source) {
assign(source.s, source.sLen);
}
return *this;
}
bool operator==(const SString &sOther) const;
bool operator!=(const SString &sOther) const {
return !operator==(sOther);
}
bool operator==(const char *sOther) const;
bool operator!=(const char *sOther) const {
return !operator==(sOther);
}
bool contains(char ch) const {
return (s && *s) ? strchr(s, ch) != 0 : false;
}
void setsizegrowth(lenpos_t sizeGrowth_) {
sizeGrowth = sizeGrowth_;
}
const char *c_str() const {
return s ? s : "";
}
/** Give ownership of buffer to caller which must use delete[] to free buffer. */
char *detach() {
char *sRet = s;
s = 0;
sSize = 0;
sLen = 0;
return sRet;
}
SString substr(lenpos_t subPos, lenpos_t subLen=measure_length) const;
SString &lowercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length);
SString &uppercase(lenpos_t subPos = 0, lenpos_t subLen=measure_length);
SString &append(const char *sOther, lenpos_t sLenOther=measure_length, char sep = '\0');
SString &operator+=(const char *sOther) {
return append(sOther, static_cast<lenpos_t>(measure_length));
}
SString &operator+=(const SString &sOther) {
return append(sOther.s, sOther.sLen);
}
SString &operator+=(char ch) {
return append(&ch, 1);
}
SString &appendwithseparator(const char *sOther, char sep) {
return append(sOther, strlen(sOther), sep);
}
SString &insert(lenpos_t pos, const char *sOther, lenpos_t sLenOther=measure_length);
/**
* Remove @a len characters from the @a pos position, included.
* Characters at pos + len and beyond replace characters at pos.
* If @a len is 0, or greater than the length of the string
* starting at @a pos, the string is just truncated at @a pos.
*/
void remove(lenpos_t pos, lenpos_t len);
SString &change(lenpos_t pos, char ch) {
if (pos < sLen) { // character changed must be in string bounds
*(s + pos) = ch;
}
return *this;
}
/** Read an integral numeric value from the string. */
int value() const {
return s ? atoi(s) : 0;
}
bool startswith(const char *prefix);
bool endswith(const char *suffix);
int search(const char *sFind, lenpos_t start=0) const;
bool contains(const char *sFind) const {
return search(sFind) >= 0;
}
int substitute(char chFind, char chReplace);
int substitute(const char *sFind, const char *sReplace);
int remove(const char *sFind) {
return substitute(sFind, "");
}
};
/**
* Duplicate a C string.
* Allocate memory of the given size, or big enough to fit the string if length isn't given;
* then copy the given string in the allocated memory.
* @return the pointer to the new string
*/
inline char *StringDup(
const char *s, ///< The string to duplicate
SContainer::lenpos_t len=SContainer::measure_length) ///< The length of memory to allocate. Optional.
{
return SContainer::StringAllocate(s, len);
}
#ifdef SCI_NAMESPACE
}
#endif
#endif

View File

@ -0,0 +1,608 @@
/*******************************************************************************
Copyright (c) 2007 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
********************************************************************************/
#include "ScintillaMacOSX.h"
#include "ExtInput.h"
using namespace Scintilla;
// uncomment this for a log to /dev/console
// #define LOG_TSM 1
#if LOG_TSM
FILE* logFile = NULL;
#endif
static EventHandlerUPP tsmHandler;
static EventTypeSpec tsmSpecs[] = {
{ kEventClassTextInput, kEventTextInputUpdateActiveInputArea },
// { kEventClassTextInput, kEventTextInputUnicodeForKeyEvent },
{ kEventClassTextInput, kEventTextInputOffsetToPos },
{ kEventClassTextInput, kEventTextInputPosToOffset },
{ kEventClassTextInput, kEventTextInputGetSelectedText }
};
#define kScintillaTSM 'ScTs'
// The following structure is attached to the HIViewRef as property kScintillaTSM
struct TSMData
{
HIViewRef view; // this view
TSMDocumentID docid; // the TSM document ID
EventHandlerRef handler; // the event handler
ScintillaMacOSX* scintilla; // the Scintilla pointer
int styleMask; // the document style mask
int indicStyle [3]; // indicator styles save
int indicColor [3]; // indicator colors save
int selStart; // starting position of selection (Scintilla offset)
int selLength; // UTF-8 number of characters
int selCur; // current position (Scintilla offset)
int inhibitRecursion; // true to stop recursion
bool active; // true if this is active
};
static const int numSpecs = 5;
// Fetch a range of text as UTF-16; delete the buffer after use
static char* getTextPortion (TSMData* data, UInt32 start, UInt32 size)
{
Scintilla::TextRange range;
range.chrg.cpMin = start;
range.chrg.cpMax = start + size;
range.lpstrText = new char [size + 1];
range.lpstrText [size] = 0;
data->scintilla->WndProc (SCI_GETTEXTRANGE, 0, (uptr_t) &range);
return range.lpstrText;
}
static pascal OSStatus doHandleTSM (EventHandlerCallRef, EventRef inEvent, void* userData);
void ExtInput::attach (HIViewRef viewRef)
{
if (NULL == tsmHandler)
tsmHandler = NewEventHandlerUPP (doHandleTSM);
::UseInputWindow (NULL, FALSE);
#ifdef LOG_TSM
if (NULL == logFile)
logFile = fopen ("/dev/console", "a");
#endif
// create and attach the TSM data
TSMData* data = new TSMData;
data->view = viewRef;
data->active = false;
data->inhibitRecursion = 0;
::GetControlProperty (viewRef, scintillaMacOSType, 0, sizeof( data->scintilla ), NULL, &data->scintilla);
if (NULL != data->scintilla)
{
// create the TSM document ref
InterfaceTypeList interfaceTypes;
interfaceTypes[0] = kUnicodeDocumentInterfaceType;
::NewTSMDocument (1, interfaceTypes, &data->docid, (long) viewRef);
// install my event handler
::InstallControlEventHandler (viewRef, tsmHandler, numSpecs, tsmSpecs, data, &data->handler);
::SetControlProperty (viewRef, kScintillaTSM, 0, sizeof (data), &data);
}
else
delete data;
}
static TSMData* getTSMData (HIViewRef viewRef)
{
TSMData* data = NULL;
UInt32 n;
::GetControlProperty (viewRef, kScintillaTSM, 0, sizeof (data), &n, (UInt32*) &data);
return data;
}
void ExtInput::detach (HIViewRef viewRef)
{
TSMData* data = getTSMData (viewRef);
if (NULL != data)
{
::DeleteTSMDocument (data->docid);
::RemoveEventHandler (data->handler);
delete data;
}
}
void ExtInput::activate (HIViewRef viewRef, bool on)
{
TSMData* data = getTSMData (viewRef);
if (NULL == data)
return;
if (on)
{
::ActivateTSMDocument (data->docid);
HIRect bounds;
::HIViewGetBounds (viewRef, &bounds);
::HIViewConvertRect (&bounds, viewRef, NULL);
RgnHandle hRgn = ::NewRgn();
::SetRectRgn (hRgn, (short) bounds.origin.x, (short) bounds.origin.y,
(short) (bounds.origin.x + bounds.size.width),
(short) (bounds.origin.y + bounds.size.height));
#if LOG_TSM
fprintf (logFile, "TSMSetInlineInputRegion (%08lX, %ld:%ld-%ld:%ld)\n",
(long) data->docid, (long) bounds.origin.x, (long) bounds.origin.y,
(long) (bounds.origin.x + bounds.size.width), (long) (bounds.origin.y + bounds.size.height));
fflush (logFile);
#endif
::TSMSetInlineInputRegion (data->docid, HIViewGetWindow (data->view), hRgn);
::DisposeRgn (hRgn);
::UseInputWindow (NULL, FALSE);
}
else
{
#if LOG_TSM
fprintf (logFile, "DeactivateTSMDocument (%08lX)\n", (long) data->docid);
fflush (logFile);
#endif
::DeactivateTSMDocument (data->docid);
}
}
static void startInput (TSMData* data, bool delSelection = true)
{
if (!data->active && 0 == data->inhibitRecursion)
{
data->active = true;
// Delete any selection
if( delSelection )
data->scintilla->WndProc (SCI_REPLACESEL, 0, reinterpret_cast<sptr_t>(""));
// need all style bits because we do indicators
data->styleMask = data->scintilla->WndProc (SCI_GETSTYLEBITS, 0, 0);
data->scintilla->WndProc (SCI_SETSTYLEBITS, 5, 0);
// Set the target range for successive replacements
data->selStart =
data->selCur = data->scintilla->WndProc (SCI_GETCURRENTPOS, 0, 0);
data->selLength = 0;
// save needed styles
for (int i = 0; i < 2; i++)
{
data->indicStyle [i] = data->scintilla->WndProc (SCI_INDICGETSTYLE, i, 0);
data->indicColor [i] = data->scintilla->WndProc (SCI_INDICGETFORE, i, 0);
}
// set styles and colors
data->scintilla->WndProc (SCI_INDICSETSTYLE, 0, INDIC_SQUIGGLE);
data->scintilla->WndProc (SCI_INDICSETFORE, 0, 0x808080);
data->scintilla->WndProc (SCI_INDICSETSTYLE, 1, INDIC_PLAIN); // selected converted
data->scintilla->WndProc (SCI_INDICSETFORE, 1, 0x808080);
data->scintilla->WndProc (SCI_INDICSETSTYLE, 2, INDIC_PLAIN); // selected raw
data->scintilla->WndProc (SCI_INDICSETFORE, 2, 0x0000FF);
// stop Undo
data->scintilla->WndProc (SCI_BEGINUNDOACTION, 0, 0);
}
}
static void stopInput (TSMData* data, int pos)
{
if (data->active && 0 == data->inhibitRecursion)
{
// First fix the doc - this may cause more messages
// but do not fall into recursion
data->inhibitRecursion++;
::FixTSMDocument (data->docid);
data->inhibitRecursion--;
data->active = false;
// Remove indicator styles
data->scintilla->WndProc (SCI_STARTSTYLING, data->selStart, INDICS_MASK);
data->scintilla->WndProc (SCI_SETSTYLING, pos - data->selStart, 0);
// Restore old indicator styles and colors
data->scintilla->WndProc (SCI_SETSTYLEBITS, data->styleMask, 0);
for (int i = 0; i < 2; i++)
{
data->scintilla->WndProc (SCI_INDICSETSTYLE, i, data->indicStyle [i]);
data->scintilla->WndProc (SCI_INDICSETFORE, i, data->indicColor [i]);
}
// remove selection and re-allow selections to display
data->scintilla->WndProc (SCI_SETSEL, pos, pos);
data->scintilla->WndProc (SCI_TARGETFROMSELECTION, 0, 0);
data->scintilla->WndProc (SCI_HIDESELECTION, 0, 0);
// move the caret behind the current area
data->scintilla->WndProc (SCI_SETCURRENTPOS, pos, 0);
// re-enable Undo
data->scintilla->WndProc (SCI_ENDUNDOACTION, 0, 0);
// re-colorize
int32_t startLine = data->scintilla->WndProc (SCI_LINEFROMPOSITION, data->selStart, 0);
int32_t startPos = data->scintilla->WndProc (SCI_POSITIONFROMLINE, startLine, 0);
int32_t endLine = data->scintilla->WndProc (SCI_LINEFROMPOSITION, pos, 0);
if (endLine == startLine)
endLine++;
int32_t endPos = data->scintilla->WndProc (SCI_POSITIONFROMLINE, endLine, 0);
data->scintilla->WndProc (SCI_COLOURISE, startPos, endPos);
}
}
void ExtInput::stop (HIViewRef viewRef)
{
TSMData* data = getTSMData (viewRef);
if (NULL != data)
stopInput (data, data->selStart + data->selLength);
}
static char* UTF16toUTF8 (const UniChar* buf, int len, int& utf8len)
{
CFStringRef str = CFStringCreateWithCharactersNoCopy (NULL, buf, (UInt32) len, kCFAllocatorNull);
CFRange range = { 0, len };
CFIndex bufLen;
CFStringGetBytes (str, range, kCFStringEncodingUTF8, '?', false, NULL, 0, &bufLen);
UInt8* utf8buf = new UInt8 [bufLen+1];
CFStringGetBytes (str, range, kCFStringEncodingUTF8, '?', false, utf8buf, bufLen, NULL);
utf8buf [bufLen] = 0;
CFRelease (str);
utf8len = (int) bufLen;
return (char*) utf8buf;
}
static int UCS2Length (const char* buf, int len)
{
int n = 0;
while (len > 0)
{
int bytes = 0;
char ch = *buf;
while (ch & 0x80)
bytes++, ch <<= 1;
len -= bytes;
n += bytes;
}
return n;
}
static int UTF8Length (const UniChar* buf, int len)
{
int n = 0;
while (len > 0)
{
UInt32 uch = *buf++;
len--;
if (uch >= 0xD800 && uch <= 0xDBFF && len > 0)
{
UInt32 uch2 = *buf;
if (uch2 >= 0xDC00 && uch2 <= 0xDFFF)
{
buf++;
len--;
uch = ((uch & 0x3FF) << 10) + (uch2 & 0x3FF);
}
}
n++;
if (uch > 0x7F)
n++;
if (uch > 0x7FF)
n++;
if (uch > 0xFFFF)
n++;
if (uch > 0x1FFFFF)
n++;
if (uch > 0x3FFFFFF)
n++;
}
return n;
}
static OSStatus handleTSMUpdateActiveInputArea (TSMData* data, EventRef inEvent)
{
UInt32 fixLength;
int caretPos = -1;
UInt32 actualSize;
::TextRangeArray* hiliteRanges = NULL;
char* hiliteBuffer = NULL;
bool done;
// extract the text
UniChar* buffer = NULL;
UniChar temp [128];
UniChar* text = temp;
// get the fix length (in bytes)
OSStatus err = ::GetEventParameter (inEvent, kEventParamTextInputSendFixLen,
typeLongInteger, NULL, sizeof (long), NULL, &fixLength);
// need the size (in bytes)
if (noErr == err)
err = ::GetEventParameter (inEvent, kEventParamTextInputSendText,
typeUnicodeText, NULL, 256, &actualSize, temp);
// then allocate and fetch if necessary
UInt32 textLength = actualSize / sizeof (UniChar);
fixLength /= sizeof (UniChar);
if (noErr == err)
{
// this indicates that we are completely done
done = (fixLength == textLength || fixLength < 0);
if (textLength >= 128)
{
buffer = text = new UniChar [textLength];
err = ::GetEventParameter (inEvent, kEventParamTextInputSendText,
typeUnicodeText, NULL, actualSize, NULL, (void*) text);
}
// set the text now, but convert it to UTF-8 first
int utf8len;
char* utf8 = UTF16toUTF8 (text, textLength, utf8len);
data->scintilla->WndProc (SCI_SETTARGETSTART, data->selStart, 0);
data->scintilla->WndProc (SCI_SETTARGETEND, data->selStart + data->selLength, 0);
data->scintilla->WndProc (SCI_HIDESELECTION, 1, 0);
data->scintilla->WndProc (SCI_REPLACETARGET, utf8len, (sptr_t) utf8);
data->selLength = utf8len;
delete [] utf8;
}
// attempt to extract the array of hilite ranges
if (noErr == err)
{
::TextRangeArray tempTextRangeArray;
OSStatus tempErr = ::GetEventParameter (inEvent, kEventParamTextInputSendHiliteRng,
typeTextRangeArray, NULL, sizeof (::TextRangeArray), &actualSize, &tempTextRangeArray);
if (noErr == tempErr)
{
// allocate memory and get the stuff!
hiliteBuffer = new char [actualSize];
hiliteRanges = (::TextRangeArray*) hiliteBuffer;
err = ::GetEventParameter (inEvent, kEventParamTextInputSendHiliteRng,
typeTextRangeArray, NULL, actualSize, NULL, hiliteRanges);
if (noErr != err)
{
delete [] hiliteBuffer;
hiliteBuffer = NULL;
hiliteRanges = NULL;
}
}
}
#if LOG_TSM
fprintf (logFile, "kEventTextInputUpdateActiveInputArea:\n"
" TextLength = %ld\n"
" FixLength = %ld\n",
(long) textLength, (long) fixLength);
fflush (logFile);
#endif
if (NULL != hiliteRanges)
{
for (int i = 0; i < hiliteRanges->fNumOfRanges; i++)
{
#if LOG_TSM
fprintf (logFile, " Range #%d: %ld-%ld (%d)\n",
i+1,
hiliteRanges->fRange[i].fStart,
hiliteRanges->fRange[i].fEnd,
hiliteRanges->fRange[i].fHiliteStyle);
fflush (logFile);
#endif
// start and end of range, zero based
long bgn = long (hiliteRanges->fRange[i].fStart) / sizeof (UniChar);
long end = long (hiliteRanges->fRange[i].fEnd) / sizeof (UniChar);
if (bgn >= 0 && end >= 0)
{
// move the caret if this is requested
if (hiliteRanges->fRange[i].fHiliteStyle == kTSMHiliteCaretPosition)
caretPos = bgn;
else
{
// determine which style to use
int style;
switch (hiliteRanges->fRange[i].fHiliteStyle)
{
case kTSMHiliteRawText: style = INDIC0_MASK; break;
case kTSMHiliteSelectedRawText: style = INDIC0_MASK; break;
case kTSMHiliteConvertedText: style = INDIC1_MASK; break;
case kTSMHiliteSelectedConvertedText: style = INDIC2_MASK; break;
default: style = INDIC0_MASK;
}
// bgn and end are Unicode offsets from the starting pos
// use the text buffer to determine the UTF-8 offsets
long utf8bgn = data->selStart + UTF8Length (text, bgn);
long utf8size = UTF8Length (text + bgn, end - bgn);
// set indicators
int oldEnd = data->scintilla->WndProc (SCI_GETENDSTYLED, 0, 0);
data->scintilla->WndProc (SCI_STARTSTYLING, utf8bgn, INDICS_MASK);
data->scintilla->WndProc (SCI_SETSTYLING, utf8size, style & ~1);
data->scintilla->WndProc (SCI_STARTSTYLING, oldEnd, 31);
}
}
}
}
if (noErr == err)
{
// if the fixed length is == to the new text, we are done
if (done)
stopInput (data, data->selStart + UTF8Length (text, textLength));
else if (caretPos >= 0)
{
data->selCur = data->selStart + UTF8Length (text, caretPos);
data->scintilla->WndProc (SCI_SETCURRENTPOS, data->selCur, 0);
}
}
delete [] hiliteBuffer;
delete [] buffer;
return err;
}
struct MacPoint {
short v;
short h;
};
static OSErr handleTSMOffset2Pos (TSMData* data, EventRef inEvent)
{
long offset;
// get the offfset to convert
OSStatus err = ::GetEventParameter (inEvent, kEventParamTextInputSendTextOffset,
typeLongInteger, NULL, sizeof (long), NULL, &offset);
if (noErr == err)
{
// where is the caret now?
HIPoint where;
int line = (int) data->scintilla->WndProc (SCI_LINEFROMPOSITION, data->selCur, 0);
where.x = data->scintilla->WndProc (SCI_POINTXFROMPOSITION, 0, data->selCur);
where.y = data->scintilla->WndProc (SCI_POINTYFROMPOSITION, 0, data->selCur)
+ data->scintilla->WndProc (SCI_TEXTHEIGHT, line, 0);
// convert to window coords
::HIViewConvertPoint (&where, data->view, NULL);
// convert to screen coords
Rect global;
GetWindowBounds (HIViewGetWindow (data->view), kWindowStructureRgn, &global);
MacPoint pt;
pt.h = (short) where.x + global.left;
pt.v = (short) where.y + global.top;
// set the result
err = ::SetEventParameter (inEvent, kEventParamTextInputReplyPoint, typeQDPoint, sizeof (MacPoint), &pt);
#if LOG_TSM
fprintf (logFile, "kEventTextInputOffsetToPos:\n"
" Offset: %ld\n"
" Pos: %ld:%ld (orig = %ld:%ld)\n", offset,
(long) pt.h, (long) pt.v,
(long) where.x, (long) where.y);
fflush (logFile);
#endif
}
return err;
}
static OSErr handleTSMPos2Offset (TSMData* data, EventRef inEvent)
{
MacPoint qdPosition;
long offset;
short regionClass;
// retrieve the global point to convert
OSStatus err = ::GetEventParameter (inEvent, kEventParamTextInputSendCurrentPoint,
typeQDPoint, NULL, sizeof (MacPoint), NULL, &qdPosition);
if (noErr == err)
{
#if LOG_TSM
fprintf (logFile, "kEventTextInputPosToOffset:\n"
" Pos: %ld:%ld\n", (long) qdPosition.v, (long) qdPosition.h);
fflush (logFile);
#endif
// convert to local coordinates
HIRect rect;
rect.origin.x = qdPosition.h;
rect.origin.y = qdPosition.v;
rect.size.width =
rect.size.height = 1;
::HIViewConvertRect (&rect, NULL, data->view);
// we always report the position to be within the composition;
// coords inside the same pane are clipped to the composition,
// and if the position is outside, then we deactivate this instance
// this leaves the edit open and active so we can edit multiple panes
regionClass = kTSMInsideOfActiveInputArea;
// compute the offset (relative value)
offset = data->scintilla->WndProc (SCI_POSITIONFROMPOINTCLOSE, (uptr_t) rect.origin.x, (sptr_t) rect.origin.y);
if (offset >= 0)
{
// convert to a UTF-16 offset (Brute Force)
char* buf = getTextPortion (data, 0, offset);
offset = UCS2Length (buf, offset);
delete [] buf;
#if LOG_TSM
fprintf (logFile, " Offset: %ld (class %ld)\n", offset, (long) regionClass);
fflush (logFile);
#endif
// store the offset
err = ::SetEventParameter (inEvent, kEventParamTextInputReplyTextOffset, typeLongInteger, sizeof (long), &offset);
if (noErr == err)
err = ::SetEventParameter (inEvent, kEventParamTextInputReplyRegionClass, typeShortInteger, sizeof (short), &regionClass);
}
else
{
// not this pane!
err = eventNotHandledErr;
ExtInput::activate (data->view, false);
}
}
return err;
}
static OSErr handleTSMGetText (TSMData* data, EventRef inEvent)
{
char* buf = getTextPortion (data, data->selStart, data->selLength);
#if LOG_TSM
fprintf (logFile, "kEventTextInputGetSelectedText:\n"
" Text: \"%s\"\n", buf);
fflush (logFile);
#endif
OSStatus status = ::SetEventParameter (inEvent, kEventParamTextInputReplyText, typeUTF8Text, data->selLength, buf);
delete [] buf;
return status;
}
static pascal OSStatus doHandleTSM (EventHandlerCallRef, EventRef inEvent, void* userData)
{
TSMData* data = (TSMData*) userData;
OSStatus err = eventNotHandledErr;
switch (::GetEventKind (inEvent))
{
case kEventTextInputUpdateActiveInputArea:
// Make sure that input has been started
startInput (data);
err = handleTSMUpdateActiveInputArea (data, inEvent);
break;
// case kEventTextInputUnicodeForKeyEvent:
// err = handleTSMUnicodeInput (inEvent);
// break;
case kEventTextInputOffsetToPos:
err = handleTSMOffset2Pos (data, inEvent);
break;
case kEventTextInputPosToOffset:
err = handleTSMPos2Offset (data, inEvent);
break;
case kEventTextInputGetSelectedText:
// Make sure that input has been started
startInput (data, false);
err = handleTSMGetText (data, inEvent);
break;
}
return err;
}

View File

@ -0,0 +1,64 @@
/*******************************************************************************
Copyright (c) 2007 Adobe Systems Incorporated
Permission is hereby granted, free of charge, to any person obtaining a copy of
this software and associated documentation files (the "Software"), to deal in
the Software without restriction, including without limitation the rights to
use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
the Software, and to permit persons to whom the Software is furnished to do so,
subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
********************************************************************************/
#ifndef _ExtInput_h
#define _ExtInput_h
#include <Carbon/Carbon.h>
#include "Scintilla.h"
namespace Scintilla
{
/**
The ExtInput class provides TSM input services to Scintilla.
It uses the indicators 0 and 1 (see SCI_INDICSETSTYLE) to apply
underlines to partially converted text.
*/
class ExtInput
{
public:
/**
Attach extended input to a HIView with attached Scintilla. This installs the needed
event handlers etc.
*/
static void attach (HIViewRef ref);
/**
Detach extended input from a HIViewwith attached Scintilla.
*/
static void detach (HIViewRef ref);
/**
Activate or deactivate extended input. This method should be called whenever
the view gains or loses focus.
*/
static void activate (HIViewRef ref, bool on);
/**
Terminate extended input.
*/
static void stop (HIViewRef ref);
};
} // end namespace
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,99 @@
#ifndef PLATMACOSX_H
#define PLATMACOSX_H
#include <cstring>
#include <cstdio>
#include <cstdlib>
#include <assert.h>
#include <sys/time.h>
#include <Carbon/Carbon.h>
#include "QuartzTextLayout.h"
#include "Platform.h"
#include "Scintilla.h"
namespace Scintilla {
class SurfaceImpl : public Surface {
private:
bool unicodeMode;
float x;
float y;
CGContextRef gc;
/** The text layout instance */
QuartzTextLayout* textLayout;
/** If the surface is a bitmap context, contains a reference to the bitmap data. */
uint8_t* bitmapData;
/** If the surface is a bitmap context, stores the dimensions of the bitmap. */
int bitmapWidth;
int bitmapHeight;
/** Set the CGContext's fill colour to the specified allocated colour. */
void FillColour( const ColourAllocated& back );
// 24-bit RGB+A bitmap data constants
static const int BITS_PER_COMPONENT = 8;
static const int BITS_PER_PIXEL = BITS_PER_COMPONENT * 4;
static const int BYTES_PER_PIXEL = BITS_PER_PIXEL / 8;
public:
SurfaceImpl();
~SurfaceImpl();
void Init(WindowID wid);
void Init(SurfaceID sid, WindowID wid);
void InitPixMap(int width, int height, Surface *surface_, WindowID wid);
CGContextRef GetContext() { return gc; }
void Release();
bool Initialised();
void PenColour(ColourAllocated fore);
/** Returns a CGImageRef that represents the surface. Returns NULL if this is not possible. */
CGImageRef GetImage();
void CopyImageRectangle(Surface &surfaceSource, PRectangle srcRect, PRectangle dstRect);
int LogPixelsY();
int DeviceHeightFont(int points);
void MoveTo(int x_, int y_);
void LineTo(int x_, int y_);
void Polygon(Scintilla::Point *pts, int npts, ColourAllocated fore, ColourAllocated back);
void RectangleDraw(PRectangle rc, ColourAllocated fore, ColourAllocated back);
void FillRectangle(PRectangle rc, ColourAllocated back);
void FillRectangle(PRectangle rc, Surface &surfacePattern);
void RoundedRectangle(PRectangle rc, ColourAllocated fore, ColourAllocated back);
void AlphaRectangle(PRectangle rc, int cornerSize, ColourAllocated fill, int alphaFill,
ColourAllocated outline, int alphaOutline, int flags);
void Ellipse(PRectangle rc, ColourAllocated fore, ColourAllocated back);
void Copy(PRectangle rc, Scintilla::Point from, Surface &surfaceSource);
void DrawTextNoClip(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back);
void DrawTextClipped(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore, ColourAllocated back);
void DrawTextTransparent(PRectangle rc, Font &font_, int ybase, const char *s, int len, ColourAllocated fore);
void MeasureWidths(Font &font_, const char *s, int len, int *positions);
int WidthText(Font &font_, const char *s, int len);
int WidthChar(Font &font_, char ch);
int Ascent(Font &font_);
int Descent(Font &font_);
int InternalLeading(Font &font_);
int ExternalLeading(Font &font_);
int Height(Font &font_);
int AverageCharWidth(Font &font_);
int SetPalette(Scintilla::Palette *pal, bool inBackGround);
void SetClip(PRectangle rc);
void FlushCachedState();
void SetUnicodeMode(bool unicodeMode_);
void SetDBCSMode(int codePage);
};
}
#endif

View File

@ -0,0 +1,141 @@
/*
* QuartzTextLayout.h
*
* Original Code by Evan Jones on Wed Oct 02 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
*/
#ifndef _QUARTZ_TEXT_LAYOUT_H
#define _QUARTZ_TEXT_LAYOUT_H
#include <Carbon/Carbon.h>
#include "QuartzTextStyle.h"
class QuartzTextLayout
{
public:
/** Create a text layout for drawing on the specified context. */
QuartzTextLayout( CGContextRef context ) : layout( NULL ), unicode_string( NULL ), unicode_length( 0 )
{
OSStatus err = ATSUCreateTextLayout( &layout );
if (0 != err)
layout = NULL;
setContext(context);
ATSUAttributeTag tag = kATSULineLayoutOptionsTag;
ByteCount size = sizeof( ATSLineLayoutOptions );
ATSLineLayoutOptions rendering = kATSLineUseDeviceMetrics; //| kATSLineFractDisable | kATSLineUseQDRendering
ATSUAttributeValuePtr valuePtr = &rendering;
err = ATSUSetLayoutControls( layout, 1, &tag, &size, &valuePtr );
}
~QuartzTextLayout()
{
if (NULL != layout)
ATSUDisposeTextLayout( layout );
layout = NULL;
if ( unicode_string != NULL )
{
delete[] unicode_string;
unicode_string = NULL;
unicode_length = 0;
}
}
/** Assign a string to the text layout object. */
// TODO: Create a UTF8 version
// TODO: Optimise the ASCII version by not copying so much
OSStatus setText( const UInt8* buffer, size_t byteLength, CFStringEncoding encoding )
{
if (NULL == layout)
return -1;
CFStringRef str = CFStringCreateWithBytes( NULL, buffer, byteLength, encoding, false );
if (!str)
return -1;
unicode_length = CFStringGetLength( str );
if (unicode_string)
delete[] unicode_string;
unicode_string = new UniChar[ unicode_length ];
CFStringGetCharacters( str, CFRangeMake( 0, unicode_length ), unicode_string );
CFRelease( str );
str = NULL;
OSStatus err;
err = ATSUSetTextPointerLocation( layout, unicode_string, kATSUFromTextBeginning, kATSUToTextEnd, unicode_length );
if( err != noErr ) return err;
// Turn on the default font fallbacks
return ATSUSetTransientFontMatching( layout, true );
}
inline void setText( const UInt8* buffer, size_t byteLength, const QuartzTextStyle& r )
{
this->setText( buffer, byteLength, kCFStringEncodingUTF8 );
ATSUSetRunStyle( layout, r.getATSUStyle(), 0, unicode_length );
}
/** Apply the specified text style on the entire range of text. */
void setStyle( const QuartzTextStyle& style )
{
ATSUSetRunStyle( layout, style.getATSUStyle(), kATSUFromTextBeginning, kATSUToTextEnd );
}
/** Draw the text layout into the current CGContext at the specified position, flipping the CGContext's Y axis if required.
* @param x The x axis position to draw the baseline in the current CGContext.
* @param y The y axis position to draw the baseline in the current CGContext.
* @param flipTextYAxis If true, the CGContext's Y axis will be flipped before drawing the text, and restored afterwards. Use this when drawing in an HIView's CGContext, where the origin is the top left corner. */
void draw( float x, float y, bool flipTextYAxis = false )
{
if (NULL == layout || 0 == unicode_length)
return;
if ( flipTextYAxis )
{
CGContextSaveGState( gc );
CGContextScaleCTM( gc, 1.0, -1.0 );
y = -y;
}
OSStatus err;
err = ATSUDrawText( layout, kATSUFromTextBeginning, kATSUToTextEnd, X2Fix( x ), X2Fix( y ) );
if ( flipTextYAxis ) CGContextRestoreGState( gc );
}
/** Sets a single text layout control on the ATSUTextLayout object.
* @param tag The control to set.
* @param size The size of the parameter pointed to by value.
* @param value A pointer to the new value for the control.
*/
void setControl( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value )
{
ATSUSetLayoutControls( layout, 1, &tag, &size, &value );
}
ATSUTextLayout getLayout() {
return layout;
}
inline CFIndex getLength() const { return unicode_length; }
inline void setContext (CGContextRef context)
{
gc = context;
if (NULL != layout)
setControl( kATSUCGContextTag, sizeof( gc ), &gc );
}
private:
ATSUTextLayout layout;
UniChar* unicode_string;
int unicode_length;
CGContextRef gc;
};
#endif

View File

@ -0,0 +1,94 @@
/*
* QuartzTextStyle.h
* wtf
*
* Created by Evan Jones on Wed Oct 02 2002.
* Copyright (c) 2002 __MyCompanyName__. All rights reserved.
*
*/
#include <Carbon/Carbon.h>
#ifndef _QUARTZ_TEXT_STYLE_H
#define _QUARTZ_TEXT_STYLE_H
#include "QuartzTextStyleAttribute.h"
class QuartzTextStyle
{
public:
QuartzTextStyle()
{
ATSUCreateStyle( &style );
}
~QuartzTextStyle()
{
if ( style != NULL )
ATSUDisposeStyle( style );
style = NULL;
}
void setAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value )
{
ATSUSetAttributes( style, 1, &tag, &size, &value );
}
void setAttribute( QuartzTextStyleAttribute& attribute )
{
setAttribute( attribute.getTag(), attribute.getSize(), attribute.getValuePtr() );
}
void getAttribute( ATSUAttributeTag tag, ByteCount size, ATSUAttributeValuePtr value, ByteCount* actualSize )
{
ATSUGetAttribute( style, tag, size, value, actualSize );
}
template <class T>
T getAttribute( ATSUAttributeTag tag )
{
T value;
ByteCount actualSize;
ATSUGetAttribute( style, tag, sizeof( T ), &value, &actualSize );
return value;
}
// TODO: Is calling this actually faster than calling setAttribute multiple times?
void setAttributes( QuartzTextStyleAttribute* attributes[], int number )
{
// Create the parallel arrays and initialize them properly
ATSUAttributeTag* tags = new ATSUAttributeTag[ number ];
ByteCount* sizes = new ByteCount[ number ];
ATSUAttributeValuePtr* values = new ATSUAttributeValuePtr[ number ];
for ( int i = 0; i < number; ++ i )
{
tags[i] = attributes[i]->getTag();
sizes[i] = attributes[i]->getSize();
values[i] = attributes[i]->getValuePtr();
}
ATSUSetAttributes( style, number, tags, sizes, values );
// Free the arrays that were allocated
delete[] tags;
delete[] sizes;
delete[] values;
}
void setFontFeature( ATSUFontFeatureType featureType, ATSUFontFeatureSelector selector )
{
ATSUSetFontFeatures( style, 1, &featureType, &selector );
}
const ATSUStyle& getATSUStyle() const
{
return style;
}
private:
ATSUStyle style;
};
#endif

View File

@ -0,0 +1,144 @@
/*
* QuartzTextStyleAttribute.h
*
* Original Code by Evan Jones on Wed Oct 02 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
*/
#include <Carbon/Carbon.h>
#ifndef _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
#define _QUARTZ_TEXT_STYLE_ATTRIBUTE_H
class QuartzTextStyleAttribute
{
public:
QuartzTextStyleAttribute() {}
virtual ~QuartzTextStyleAttribute() {}
virtual ByteCount getSize() const = 0;
virtual ATSUAttributeValuePtr getValuePtr() = 0;
virtual ATSUAttributeTag getTag() const = 0;
};
class QuartzTextSize : public QuartzTextStyleAttribute
{
public:
QuartzTextSize( float points )
{
size = X2Fix( points );
}
ByteCount getSize() const
{
return sizeof( size );
}
ATSUAttributeValuePtr getValuePtr()
{
return &size;
}
ATSUAttributeTag getTag() const
{
return kATSUSizeTag;
}
private:
Fixed size;
};
class QuartzTextStyleAttributeBoolean : public QuartzTextStyleAttribute
{
public:
QuartzTextStyleAttributeBoolean( bool newVal ) : value( newVal ) {}
ByteCount getSize() const
{
return sizeof( value );
}
ATSUAttributeValuePtr getValuePtr()
{
return &value;
}
virtual ATSUAttributeTag getTag() const = 0;
private:
Boolean value;
};
class QuartzTextBold : public QuartzTextStyleAttributeBoolean
{
public:
QuartzTextBold( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
ATSUAttributeTag getTag() const
{
return kATSUQDBoldfaceTag;
}
};
class QuartzTextItalic : public QuartzTextStyleAttributeBoolean
{
public:
QuartzTextItalic( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
ATSUAttributeTag getTag() const
{
return kATSUQDItalicTag;
}
};
class QuartzTextUnderline : public QuartzTextStyleAttributeBoolean
{
public:
QuartzTextUnderline( bool newVal ) : QuartzTextStyleAttributeBoolean( newVal ) {}
ATSUAttributeTag getTag() const {
return kATSUQDUnderlineTag;
}
};
class QuartzFont : public QuartzTextStyleAttribute
{
public:
/** Create a font style from a name. */
QuartzFont( const char* name, int length )
{
assert( name != NULL && length > 0 && name[length] == '\0' );
// try to create font
OSStatus err = ATSUFindFontFromName( const_cast<char*>( name ), length, kFontFullName, (unsigned) kFontNoPlatform, kFontRomanScript, (unsigned) kFontNoLanguage, &fontid );
// need a fallback if font isn't installed
if( err != noErr || fontid == kATSUInvalidFontID )
::ATSUFindFontFromName( "Lucida Grande", 13, kFontFullName, (unsigned) kFontNoPlatform, kFontRomanScript, (unsigned) kFontNoLanguage, &fontid );
}
ByteCount getSize() const
{
return sizeof( fontid );
}
ATSUAttributeValuePtr getValuePtr()
{
return &fontid;
}
ATSUAttributeTag getTag() const
{
return kATSUFontTag;
}
ATSUFontID getFontID() const
{
return fontid;
}
private:
ATSUFontID fontid;
};
#endif

View File

@ -0,0 +1,4 @@
{
IBClasses = ();
IBVersion = 1;
}

View File

@ -0,0 +1,19 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>IBFramework Version</key>
<string>345.0</string>
<key>IBOldestOS</key>
<integer>3</integer>
<key>IBOpenObjects</key>
<array>
<integer>29</integer>
<integer>166</integer>
</array>
<key>IBSystem Version</key>
<string>7B44</string>
<key>targetFramework</key>
<string>IBCarbonFramework</string>
</dict>
</plist>

View File

@ -0,0 +1,271 @@
<?xml version="1.0" standalone="yes"?>
<object class="NSIBObjectData">
<string name="targetFramework">IBCarbonFramework</string>
<object name="rootObject" class="NSCustomObject" id="1">
<string name="customClass">NSApplication</string>
</object>
<array count="38" name="allObjects">
<object class="IBCarbonMenu" id="29">
<string name="title">main</string>
<array count="4" name="items">
<object class="IBCarbonMenuItem" id="185">
<string name="title">Foo</string>
<object name="submenu" class="IBCarbonMenu" id="184">
<string name="title">Foo</string>
<array count="1" name="items">
<object class="IBCarbonMenuItem" id="187">
<string name="title">About Foo</string>
<int name="keyEquivalentModifier">0</int>
<ostype name="command">abou</ostype>
</object>
</array>
<string name="name">_NSAppleMenu</string>
</object>
</object>
<object class="IBCarbonMenuItem" id="127">
<string name="title">File</string>
<object name="submenu" class="IBCarbonMenu" id="131">
<string name="title">File</string>
<array count="10" name="items">
<object class="IBCarbonMenuItem" id="139">
<string name="title">New</string>
<string name="keyEquivalent">n</string>
<ostype name="command">new </ostype>
</object>
<object class="IBCarbonMenuItem" id="134">
<string name="title">Open…</string>
<string name="keyEquivalent">o</string>
<ostype name="command">open</ostype>
</object>
<object class="IBCarbonMenuItem" id="133">
<boolean name="separator">TRUE</boolean>
</object>
<object class="IBCarbonMenuItem" id="130">
<string name="title">Close</string>
<string name="keyEquivalent">w</string>
<ostype name="command">clos</ostype>
</object>
<object class="IBCarbonMenuItem" id="138">
<string name="title">Save</string>
<string name="keyEquivalent">s</string>
<ostype name="command">save</ostype>
</object>
<object class="IBCarbonMenuItem" id="137">
<string name="title">Save As…</string>
<string name="keyEquivalent">S</string>
<ostype name="command">svas</ostype>
</object>
<object class="IBCarbonMenuItem" id="132">
<string name="title">Revert</string>
<string name="keyEquivalent">r</string>
<ostype name="command">rvrt</ostype>
</object>
<object class="IBCarbonMenuItem" id="128">
<boolean name="separator">TRUE</boolean>
</object>
<object class="IBCarbonMenuItem" id="135">
<string name="title">Page Setup…</string>
<string name="keyEquivalent">P</string>
<ostype name="command">page</ostype>
</object>
<object class="IBCarbonMenuItem" id="136">
<string name="title">Print…</string>
<string name="keyEquivalent">p</string>
<ostype name="command">prnt</ostype>
</object>
</array>
</object>
</object>
<object class="IBCarbonMenuItem" id="152">
<string name="title">Edit</string>
<object name="submenu" class="IBCarbonMenu" id="147">
<string name="title">Edit</string>
<array count="10" name="items">
<object class="IBCarbonMenuItem" id="141">
<string name="title">Undo</string>
<string name="keyEquivalent">z</string>
<ostype name="command">undo</ostype>
</object>
<object class="IBCarbonMenuItem" id="146">
<string name="title">Redo</string>
<string name="keyEquivalent">Z</string>
<ostype name="command">redo</ostype>
</object>
<object class="IBCarbonMenuItem" id="142">
<boolean name="separator">TRUE</boolean>
</object>
<object class="IBCarbonMenuItem" id="143">
<string name="title">Cut</string>
<string name="keyEquivalent">x</string>
<ostype name="command">cut </ostype>
</object>
<object class="IBCarbonMenuItem" id="149">
<string name="title">Copy</string>
<string name="keyEquivalent">c</string>
<ostype name="command">copy</ostype>
</object>
<object class="IBCarbonMenuItem" id="144">
<string name="title">Paste</string>
<string name="keyEquivalent">v</string>
<ostype name="command">past</ostype>
</object>
<object class="IBCarbonMenuItem" id="151">
<string name="title">Delete</string>
<ostype name="command">clea</ostype>
</object>
<object class="IBCarbonMenuItem" id="148">
<string name="title">Select All</string>
<string name="keyEquivalent">a</string>
<ostype name="command">sall</ostype>
</object>
<object class="IBCarbonMenuItem" id="199">
<boolean name="separator">TRUE</boolean>
</object>
<object class="IBCarbonMenuItem" id="198">
<string name="title">Special Characters…</string>
<ostype name="command">chrp</ostype>
</object>
</array>
</object>
</object>
<object class="IBCarbonMenuItem" id="192">
<string name="title">Window</string>
<object name="submenu" class="IBCarbonMenu" id="195">
<string name="title">Window</string>
<array count="6" name="items">
<object class="IBCarbonMenuItem" id="197">
<string name="title">Zoom Window</string>
<ostype name="command">zoom</ostype>
</object>
<object class="IBCarbonMenuItem" id="190">
<boolean name="dynamic">TRUE</boolean>
<string name="title">Minimize Window</string>
<string name="keyEquivalent">m</string>
<ostype name="command">mini</ostype>
</object>
<object class="IBCarbonMenuItem" id="191">
<boolean name="dynamic">TRUE</boolean>
<string name="title">Minimize All Windows</string>
<string name="keyEquivalent">m</string>
<int name="keyEquivalentModifier">1572864</int>
<ostype name="command">mina</ostype>
</object>
<object class="IBCarbonMenuItem" id="194">
<boolean name="separator">TRUE</boolean>
</object>
<object class="IBCarbonMenuItem" id="196">
<boolean name="dynamic">TRUE</boolean>
<string name="title">Bring All to Front</string>
<ostype name="command">bfrt</ostype>
</object>
<object class="IBCarbonMenuItem" id="193">
<boolean name="dynamic">TRUE</boolean>
<string name="title">Arrange in Front</string>
<int name="keyEquivalentModifier">1572864</int>
<ostype name="command">frnt</ostype>
</object>
</array>
<string name="name">_NSWindowsMenu</string>
</object>
</object>
</array>
<string name="name">_NSMainMenu</string>
</object>
<reference idRef="127"/>
<reference idRef="128"/>
<reference idRef="130"/>
<reference idRef="131"/>
<reference idRef="132"/>
<reference idRef="133"/>
<reference idRef="134"/>
<reference idRef="135"/>
<reference idRef="136"/>
<reference idRef="137"/>
<reference idRef="138"/>
<reference idRef="139"/>
<reference idRef="141"/>
<reference idRef="142"/>
<reference idRef="143"/>
<reference idRef="144"/>
<reference idRef="146"/>
<reference idRef="147"/>
<reference idRef="148"/>
<reference idRef="149"/>
<reference idRef="151"/>
<reference idRef="152"/>
<object class="IBCarbonWindow" id="166">
<string name="windowRect">204 300 564 780 </string>
<string name="title">Window</string>
<object name="rootControl" class="IBCarbonRootControl" id="167">
<string name="bounds">0 0 360 480 </string>
<string name="viewFrame">0 0 480 360 </string>
</object>
<boolean name="receiveUpdates">FALSE</boolean>
<boolean name="liveResize">TRUE</boolean>
<boolean name="compositing">TRUE</boolean>
</object>
<reference idRef="167"/>
<reference idRef="184"/>
<reference idRef="185"/>
<reference idRef="187"/>
<reference idRef="190"/>
<reference idRef="191"/>
<reference idRef="192"/>
<reference idRef="193"/>
<reference idRef="194"/>
<reference idRef="195"/>
<reference idRef="196"/>
<reference idRef="197"/>
<reference idRef="198"/>
<reference idRef="199"/>
</array>
<array count="38" name="allParents">
<reference idRef="1"/>
<reference idRef="29"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="127"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="131"/>
<reference idRef="147"/>
<reference idRef="147"/>
<reference idRef="147"/>
<reference idRef="147"/>
<reference idRef="147"/>
<reference idRef="152"/>
<reference idRef="147"/>
<reference idRef="147"/>
<reference idRef="147"/>
<reference idRef="29"/>
<reference idRef="1"/>
<reference idRef="166"/>
<reference idRef="185"/>
<reference idRef="29"/>
<reference idRef="184"/>
<reference idRef="195"/>
<reference idRef="195"/>
<reference idRef="29"/>
<reference idRef="195"/>
<reference idRef="195"/>
<reference idRef="192"/>
<reference idRef="195"/>
<reference idRef="195"/>
<reference idRef="147"/>
<reference idRef="147"/>
</array>
<dictionary count="3" name="nameTable">
<string>Files Owner</string>
<reference idRef="1"/>
<string>MainWindow</string>
<reference idRef="166"/>
<string>MenuBar</string>
<reference idRef="29"/>
</dictionary>
<unsigned_int name="nextObjectID">200</unsigned_int>
</object>

View File

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//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>SciTest</string>
<key>CFBundleIconFile</key>
<string></string>
<key>CFBundleIdentifier</key>
<string>com.apple.myCarbonApp</string>
<key>CFBundleInfoDictionaryVersion</key>
<string>6.0</string>
<key>CFBundlePackageType</key>
<string>APPL</string>
<key>CFBundleSignature</key>
<string>????</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>CSResourcesFileMapped</key>
<true/>
</dict>
</plist>

View File

@ -0,0 +1,289 @@
// !$*UTF8*$!
{
archiveVersion = 1;
classes = {
};
objectVersion = 42;
objects = {
/* Begin PBXBuildFile section */
3002B123087DCEC600CEAF79 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 3002B122087DCEC600CEAF79 /* main.cpp */; };
30973FF8086B7F4F0088809C /* libscintilla.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 30973FF7086B7F4F0088809C /* libscintilla.a */; };
8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */ = {isa = PBXBuildFile; fileRef = 0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */; };
8D0C4E8E0486CD37000505A6 /* main.nib in Resources */ = {isa = PBXBuildFile; fileRef = 02345980000FD03B11CA0E72 /* main.nib */; };
8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 20286C33FDCF999611CA2CEA /* Carbon.framework */; };
/* End PBXBuildFile section */
/* Begin PBXFileReference section */
0867D6ABFE840B52C02AAC07 /* English */ = {isa = PBXFileReference; fileEncoding = 10; lastKnownFileType = text.plist.strings; name = English; path = English.lproj/InfoPlist.strings; sourceTree = "<group>"; };
1870340FFE93FCAF11CA0CD7 /* English */ = {isa = PBXFileReference; lastKnownFileType = wrapper.nib; name = English; path = English.lproj/main.nib; sourceTree = "<group>"; };
20286C33FDCF999611CA2CEA /* Carbon.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Carbon.framework; path = /System/Library/Frameworks/Carbon.framework; sourceTree = "<absolute>"; };
3002B122087DCEC600CEAF79 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 30; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = "<group>"; };
30973FF7086B7F4F0088809C /* libscintilla.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libscintilla.a; path = ../../bin/libscintilla.a; sourceTree = SOURCE_ROOT; };
32DBCF6D0370B57F00C91783 /* SciTest_Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SciTest_Prefix.pch; sourceTree = "<group>"; };
4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = ApplicationServices.framework; path = /System/Library/Frameworks/ApplicationServices.framework; sourceTree = "<absolute>"; };
4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreServices.framework; path = /System/Library/Frameworks/CoreServices.framework; sourceTree = "<absolute>"; };
8D0C4E960486CD37000505A6 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist; path = Info.plist; sourceTree = "<group>"; };
8D0C4E970486CD37000505A6 /* SciTest.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = SciTest.app; sourceTree = BUILT_PRODUCTS_DIR; };
/* End PBXFileReference section */
/* Begin PBXFrameworksBuildPhase section */
8D0C4E910486CD37000505A6 /* Frameworks */ = {
isa = PBXFrameworksBuildPhase;
buildActionMask = 2147483647;
files = (
8D0C4E920486CD37000505A6 /* Carbon.framework in Frameworks */,
30973FF8086B7F4F0088809C /* libscintilla.a in Frameworks */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXFrameworksBuildPhase section */
/* Begin PBXGroup section */
195DF8CFFE9D517E11CA2CBB /* Products */ = {
isa = PBXGroup;
children = (
8D0C4E970486CD37000505A6 /* SciTest.app */,
);
name = Products;
sourceTree = "<group>";
};
20286C29FDCF999611CA2CEA /* SciTest */ = {
isa = PBXGroup;
children = (
20286C2AFDCF999611CA2CEA /* Sources */,
20286C2CFDCF999611CA2CEA /* Resources */,
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */,
195DF8CFFE9D517E11CA2CBB /* Products */,
);
name = SciTest;
sourceTree = "<group>";
};
20286C2AFDCF999611CA2CEA /* Sources */ = {
isa = PBXGroup;
children = (
3002B122087DCEC600CEAF79 /* main.cpp */,
32DBCF6D0370B57F00C91783 /* SciTest_Prefix.pch */,
);
name = Sources;
sourceTree = "<group>";
};
20286C2CFDCF999611CA2CEA /* Resources */ = {
isa = PBXGroup;
children = (
8D0C4E960486CD37000505A6 /* Info.plist */,
0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */,
02345980000FD03B11CA0E72 /* main.nib */,
);
name = Resources;
sourceTree = "<group>";
};
20286C32FDCF999611CA2CEA /* External Frameworks and Libraries */ = {
isa = PBXGroup;
children = (
30973FF7086B7F4F0088809C /* libscintilla.a */,
20286C33FDCF999611CA2CEA /* Carbon.framework */,
4A9504CAFFE6A41611CA0CBA /* CoreServices.framework */,
4A9504C8FFE6A3BC11CA0CBA /* ApplicationServices.framework */,
);
name = "External Frameworks and Libraries";
sourceTree = "<group>";
};
/* End PBXGroup section */
/* Begin PBXNativeTarget section */
8D0C4E890486CD37000505A6 /* SciTest */ = {
isa = PBXNativeTarget;
buildConfigurationList = 304E977D0C0519E500702100 /* Build configuration list for PBXNativeTarget "SciTest" */;
buildPhases = (
8D0C4E8C0486CD37000505A6 /* Resources */,
8D0C4E8F0486CD37000505A6 /* Sources */,
8D0C4E910486CD37000505A6 /* Frameworks */,
);
buildRules = (
);
dependencies = (
);
name = SciTest;
productInstallPath = "$(HOME)/Applications";
productName = SciTest;
productReference = 8D0C4E970486CD37000505A6 /* SciTest.app */;
productType = "com.apple.product-type.application";
};
/* End PBXNativeTarget section */
/* Begin PBXProject section */
20286C28FDCF999611CA2CEA /* Project object */ = {
isa = PBXProject;
buildConfigurationList = 304E97810C0519E500702100 /* Build configuration list for PBXProject "SciTest" */;
compatibilityVersion = "Xcode 2.4";
hasScannedForEncodings = 1;
mainGroup = 20286C29FDCF999611CA2CEA /* SciTest */;
projectDirPath = "";
projectRoot = "";
targets = (
8D0C4E890486CD37000505A6 /* SciTest */,
);
};
/* End PBXProject section */
/* Begin PBXResourcesBuildPhase section */
8D0C4E8C0486CD37000505A6 /* Resources */ = {
isa = PBXResourcesBuildPhase;
buildActionMask = 2147483647;
files = (
8D0C4E8D0486CD37000505A6 /* InfoPlist.strings in Resources */,
8D0C4E8E0486CD37000505A6 /* main.nib in Resources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXResourcesBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
8D0C4E8F0486CD37000505A6 /* Sources */ = {
isa = PBXSourcesBuildPhase;
buildActionMask = 2147483647;
files = (
3002B123087DCEC600CEAF79 /* main.cpp in Sources */,
);
runOnlyForDeploymentPostprocessing = 0;
};
/* End PBXSourcesBuildPhase section */
/* Begin PBXVariantGroup section */
02345980000FD03B11CA0E72 /* main.nib */ = {
isa = PBXVariantGroup;
children = (
1870340FFE93FCAF11CA0CD7 /* English */,
);
name = main.nib;
sourceTree = "<group>";
};
0867D6AAFE840B52C02AAC07 /* InfoPlist.strings */ = {
isa = PBXVariantGroup;
children = (
0867D6ABFE840B52C02AAC07 /* English */,
);
name = InfoPlist.strings;
sourceTree = "<group>";
};
/* End PBXVariantGroup section */
/* Begin XCBuildConfiguration section */
304E977E0C0519E500702100 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = NO;
GCC_DYNAMIC_NO_PIC = NO;
GCC_ENABLE_FIX_AND_CONTINUE = YES;
GCC_GENERATE_DEBUGGING_SYMBOLS = YES;
GCC_OPTIMIZATION_LEVEL = 0;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SciTest_Prefix.pch;
HEADER_SEARCH_PATHS = (
..,
../../include,
../../src,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = ../../bin;
OTHER_CFLAGS = (
"-DSCI_NAMESPACE=1",
"-DSCI_NAMESPACE",
"-DMACOSX",
"-DSCI_LEXER",
);
OTHER_CPLUSPLUSFLAGS = (
"-DSCI_NAMESPACE=1",
"-DSCI_NAMESPACE",
"-DMACOSX",
"-DSCI_LEXER",
);
PRODUCT_NAME = SciTest;
WRAPPER_EXTENSION = app;
ZERO_LINK = YES;
};
name = Development;
};
304E977F0C0519E500702100 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
COPY_PHASE_STRIP = YES;
GCC_ENABLE_FIX_AND_CONTINUE = NO;
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SciTest_Prefix.pch;
HEADER_SEARCH_PATHS = (
..,
../../include,
../../src,
);
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "";
PRODUCT_NAME = SciTest;
WRAPPER_EXTENSION = app;
ZERO_LINK = NO;
};
name = Deployment;
};
304E97800C0519E500702100 /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
GCC_GENERATE_DEBUGGING_SYMBOLS = NO;
GCC_PRECOMPILE_PREFIX_HEADER = YES;
GCC_PREFIX_HEADER = SciTest_Prefix.pch;
INFOPLIST_FILE = Info.plist;
INSTALL_PATH = "$(HOME)/Applications";
LIBRARY_SEARCH_PATHS = "";
PRODUCT_NAME = SciTest;
WRAPPER_EXTENSION = app;
};
name = Default;
};
304E97820C0519E500702100 /* Development */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Development;
};
304E97830C0519E500702100 /* Deployment */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Deployment;
};
304E97840C0519E500702100 /* Default */ = {
isa = XCBuildConfiguration;
buildSettings = {
};
name = Default;
};
/* End XCBuildConfiguration section */
/* Begin XCConfigurationList section */
304E977D0C0519E500702100 /* Build configuration list for PBXNativeTarget "SciTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
304E977E0C0519E500702100 /* Development */,
304E977F0C0519E500702100 /* Deployment */,
304E97800C0519E500702100 /* Default */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Default;
};
304E97810C0519E500702100 /* Build configuration list for PBXProject "SciTest" */ = {
isa = XCConfigurationList;
buildConfigurations = (
304E97820C0519E500702100 /* Development */,
304E97830C0519E500702100 /* Deployment */,
304E97840C0519E500702100 /* Default */,
);
defaultConfigurationIsVisible = 0;
defaultConfigurationName = Default;
};
/* End XCConfigurationList section */
};
rootObject = 20286C28FDCF999611CA2CEA /* Project object */;
}

View File

@ -0,0 +1,5 @@
//
// Prefix header for all source files of the 'SciTest' target in the 'SciTest' project.
//
#include <Carbon/Carbon.h>

View File

@ -0,0 +1,255 @@
//
// main.c
// SciTest
//
// Copyright (c) 2005-2006 ActiveState Software Inc.
// All rights reserved.
//
// Created by Shane Caraveo on 3/20/05.
//
#include <Carbon/Carbon.h>
#include "TView.h"
#include "TCarbonEvent.h"
#include "ScintillaMacOSX.h"
extern "C" HIViewRef scintilla_new(void);
const HILayoutInfo kBindToParentLayout = {
kHILayoutInfoVersionZero,
{ { NULL, kHILayoutBindTop }, { NULL, kHILayoutBindLeft }, { NULL, kHILayoutBindBottom }, { NULL, kHILayoutBindRight } },
{ { NULL, kHILayoutScaleAbsolute, 0 }, { NULL, kHILayoutScaleAbsolute, 0 } },
{ { NULL, kHILayoutPositionTop, 0 }, { NULL, kHILayoutPositionLeft, 0 } }
};
using namespace Scintilla;
/* XPM */
static char *ac_class[] = {
/* columns rows colors chars-per-pixel */
"18 12 24 1",
" c black",
". c #403030",
"X c #473636",
"o c #4E3C3C",
"O c #474141",
"+ c #5F4C4C",
"@ c #756362",
"# c #98342C",
"$ c #A0392F",
"% c #B24235",
"& c #B2443C",
"* c #B34E3E",
"= c #B54E44",
"- c #B65146",
"; c #B7584F",
": c #B8554C",
"> c #B75A50",
", c #B95852",
"< c #B96259",
"1 c #B89B9B",
"2 c #BCA0A0",
"3 c #C1A5A5",
"4 c gray100",
"5 c None",
/* pixels */
"555555555555555555",
"55553$$$$$$$#@5555",
"55552;%&&==;=o5555",
"55551>&&*=;:=.5555",
"55551>&*=;::=.5555",
"55551>*==:::-X5555",
"55551>==:::,;.5555",
"55551<==:;,<>.5555",
"55551<;;;;<<;.5555",
"55551;-==;;;;X5555",
"55555+XX..X..O5555",
"555555555555555555"
};
const char keywords[]="and and_eq asm auto bitand bitor bool break "
"case catch char class compl const const_cast continue "
"default delete do double dynamic_cast else enum explicit export extern false float for "
"friend goto if inline int long mutable namespace new not not_eq "
"operator or or_eq private protected public "
"register reinterpret_cast return short signed sizeof static static_cast struct switch "
"template this throw true try typedef typeid typename union unsigned using "
"virtual void volatile wchar_t while xor xor_eq";
pascal OSStatus WindowEventHandler(EventHandlerCallRef inCallRef,
EventRef inEvent,
void* inUserData )
{
HIViewRef sciView = *reinterpret_cast<HIViewRef*>( inUserData );
WindowRef window = GetControlOwner(sciView);
ScintillaMacOSX* scintilla;
GetControlProperty( sciView, scintillaMacOSType, 0, sizeof( scintilla ), NULL, &scintilla );
TCarbonEvent event( inEvent );
// If the window is not active, let the standard window handler execute.
if ( ! IsWindowActive( window ) ) return eventNotHandledErr;
const HIViewRef rootView = HIViewGetRoot( window );
assert( rootView != NULL );
if ( event.GetKind() == kEventMouseDown )
{
UInt32 inKeyModifiers;
event.GetParameter( kEventParamKeyModifiers, &inKeyModifiers );
EventMouseButton inMouseButton;
event.GetParameter<EventMouseButton>( kEventParamMouseButton, typeMouseButton, &inMouseButton );
if (inMouseButton == kEventMouseButtonTertiary) {
if (inKeyModifiers & optionKey) {
const char *test = "\001This is a test calltip This is a test calltip This is a test calltip";
scintilla->WndProc( SCI_CALLTIPSHOW, 0, (long int)test );
} else {
char *list = "test_1?0 test_2 test_3 test_4 test_5 test_6 test_7 test_8 test_9 test_10 test_11 test_12";
scintilla->WndProc( SCI_AUTOCSHOW, 0, (long int)list );
}
return noErr;
}
}
return eventNotHandledErr;
}
int main(int argc, char* argv[])
{
IBNibRef nibRef;
WindowRef window;
OSStatus err;
// Create a Nib reference passing the name of the nib file (without the .nib extension)
// CreateNibReference only searches into the application bundle.
err = CreateNibReference(CFSTR("main"), &nibRef);
require_noerr( err, CantGetNibRef );
// Once the nib reference is created, set the menu bar. "MainMenu" is the name of the menu bar
// object. This name is set in InterfaceBuilder when the nib is created.
err = SetMenuBarFromNib(nibRef, CFSTR("MenuBar"));
require_noerr( err, CantSetMenuBar );
// Then create a window. "MainWindow" is the name of the window object. This name is set in
// InterfaceBuilder when the nib is created.
err = CreateWindowFromNib(nibRef, CFSTR("MainWindow"), &window);
require_noerr( err, CantCreateWindow );
// We don't need the nib reference anymore.
DisposeNibReference(nibRef);
HIRect boundsRect;
// GOOD and BAD methods off embedding into a window. This is used
// to test Window::SetPositionRelative under different situations.
#define GOOD
#ifdef GOOD
#ifdef USE_CONTROL
ControlRef root;
GetRootControl(window, &root);
#else
HIViewRef root;
HIViewFindByID(HIViewGetRoot(window),
kHIViewWindowContentID,
&root);
#endif
HIViewGetBounds(root, &boundsRect);
#else // BAD like mozilla
HIViewRef root;
root = HIViewGetRoot(window);
Rect cBounds, sBounds;
GetWindowBounds(window, kWindowContentRgn, &cBounds);
GetWindowBounds(window, kWindowStructureRgn, &sBounds);
boundsRect.origin.x = cBounds.left - sBounds.left;
boundsRect.origin.y = cBounds.top - sBounds.top;
boundsRect.size.width = cBounds.right - cBounds.left;
boundsRect.size.height = cBounds.bottom - cBounds.top;
#endif
// get a scintilla control, and add it to it's parent container
HIViewRef sciView;
sciView = scintilla_new();
HIViewAddSubview(root, sciView);
// some scintilla init
ScintillaMacOSX* scintilla;
GetControlProperty( sciView, scintillaMacOSType, 0, sizeof( scintilla ), NULL, &scintilla );
scintilla->WndProc( SCI_SETLEXER, SCLEX_CPP, 0);
scintilla->WndProc( SCI_SETSTYLEBITS, 5, 0);
scintilla->WndProc(SCI_STYLESETFORE, 0, 0x808080); // White space
scintilla->WndProc(SCI_STYLESETFORE, 1, 0x007F00); // Comment
scintilla->WndProc(SCI_STYLESETITALIC, 1, 1); // Comment
scintilla->WndProc(SCI_STYLESETFORE, 2, 0x007F00); // Line comment
scintilla->WndProc(SCI_STYLESETITALIC, 2, 1); // Line comment
scintilla->WndProc(SCI_STYLESETFORE, 3, 0x3F703F); // Doc comment
scintilla->WndProc(SCI_STYLESETITALIC, 3, 1); // Doc comment
scintilla->WndProc(SCI_STYLESETFORE, 4, 0x7F7F00); // Number
scintilla->WndProc(SCI_STYLESETFORE, 5, 0x7F0000); // Keyword
scintilla->WndProc(SCI_STYLESETBOLD, 5, 1); // Keyword
scintilla->WndProc(SCI_STYLESETFORE, 6, 0x7F007F); // String
scintilla->WndProc(SCI_STYLESETFORE, 7, 0x7F007F); // Character
scintilla->WndProc(SCI_STYLESETFORE, 8, 0x804080); // UUID
scintilla->WndProc(SCI_STYLESETFORE, 9, 0x007F7F); // Preprocessor
scintilla->WndProc(SCI_STYLESETFORE,10, 0x000000); // Operators
scintilla->WndProc(SCI_STYLESETBOLD,10, 1); // Operators
scintilla->WndProc(SCI_STYLESETFORE,11, 0x000000); // Identifiers
scintilla->WndProc(SCI_SETKEYWORDS, 0, (sptr_t)(char *)keywords); // Keyword
/*
these fail compilation on osx now
scintilla->WndProc( SCI_SETPROPERTY, "fold", (long int)"1");
scintilla->WndProc( SCI_SETPROPERTY, "fold.compact", (long int)"0");
scintilla->WndProc( SCI_SETPROPERTY, "fold.comment", (long int)"1");
scintilla->WndProc( SCI_SETPROPERTY, "fold.preprocessor", (long int)"1");
*/
scintilla->WndProc( SCI_REGISTERIMAGE, 0, (long int)ac_class);
scintilla->WndProc( SCI_SETMARGINTYPEN, 0, (long int)SC_MARGIN_NUMBER);
scintilla->WndProc( SCI_SETMARGINWIDTHN, 0, (long int)30);
scintilla->WndProc( SCI_SETMARGINTYPEN, 1, (long int)SC_MARGIN_SYMBOL);
scintilla->WndProc( SCI_SETMARGINMASKN, 1, (long int)SC_MASK_FOLDERS);
scintilla->WndProc( SCI_SETMARGINWIDTHN, 1, (long int)20);
scintilla->WndProc( SCI_SETMARGINTYPEN, 2, (long int)SC_MARGIN_SYMBOL);
scintilla->WndProc( SCI_SETMARGINWIDTHN, 2, (long int)16);
//scintilla->WndProc( SCI_SETWRAPMODE, SC_WRAP_WORD, 0);
//scintilla->WndProc( SCI_SETWRAPVISUALFLAGS, SC_WRAPVISUALFLAG_END | SC_WRAPVISUALFLAG_START, 0);
// set the size of scintilla to the size of the container
HIViewSetFrame( sciView, &boundsRect );
// bind the size of scintilla to the size of it's container window
HIViewSetLayoutInfo(sciView, &kBindToParentLayout);
// setup some event handling
static const EventTypeSpec kWindowMouseEvents[] =
{
{ kEventClassMouse, kEventMouseDown },
};
InstallEventHandler( GetWindowEventTarget( window ), WindowEventHandler,
GetEventTypeCount( kWindowMouseEvents ), kWindowMouseEvents, &sciView, NULL );
// show scintilla
ShowControl(sciView);
SetAutomaticControlDragTrackingEnabledForWindow(window, true);
// The window was created hidden so show it.
ShowWindow( window );
// Call the event loop
RunApplicationEventLoop();
CantCreateWindow:
CantSetMenuBar:
CantGetNibRef:
return err;
}

View File

@ -0,0 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple Computer//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>BuildVersion</key>
<string>92</string>
<key>CFBundleVersion</key>
<string>1.0</string>
<key>ProductBuildVersion</key>
<string>7K571</string>
<key>ProjectName</key>
<string>NibPBTemplates</string>
<key>SourceVersion</key>
<string>1200000</string>
</dict>
</plist>

View File

@ -0,0 +1,117 @@
#include "ScintillaMacOSX.h"
#include "ScintillaCallTip.h"
#include "CallTip.h"
using namespace Scintilla;
const CFStringRef ScintillaCallTip::kScintillaCallTipClassID = CFSTR( "org.scintilla.calltip" );
const ControlKind ScintillaCallTip::kScintillaCallTipKind = { 'ejon', 'Scct' };
ScintillaCallTip::ScintillaCallTip( void* windowid ) :
TView( reinterpret_cast<HIViewRef>( windowid ) )
{
ActivateInterface( kMouse );
// debugPrint = true;
}
void ScintillaCallTip::Draw(
RgnHandle /*inLimitRgn*/,
CGContextRef inContext )
{
// Get a reference to the Scintilla C++ object
CallTip* ctip = NULL;
OSStatus err;
err = GetControlProperty( GetViewRef(), scintillaCallTipType, 0, sizeof( ctip ), NULL, &ctip );
assert(err == noErr);
if (ctip == NULL) return;
Rect contentBounds;
GetControlBounds(GetViewRef(), &contentBounds);
HIRect controlFrame;
HIViewGetFrame( GetViewRef(), &controlFrame );
// what is the global pos?
Surface *surfaceWindow = Surface::Allocate();
if (surfaceWindow) {
surfaceWindow->Init(inContext, GetViewRef());
ctip->PaintCT(surfaceWindow);
surfaceWindow->Release();
delete surfaceWindow;
}
}
ControlPartCode ScintillaCallTip::HitTest( const HIPoint& where )
{
if ( CGRectContainsPoint( Bounds(), where ) )
return 1;
else
return kControlNoPart;
}
OSStatus ScintillaCallTip::MouseDown(HIPoint& location, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
CallTip* ctip = NULL;
ScintillaMacOSX *sciThis = NULL;
OSStatus err = GetControlProperty( GetViewRef(), scintillaCallTipType, 0, sizeof( ctip ), NULL, &ctip );
err = GetControlProperty( GetViewRef(), scintillaMacOSType, 0, sizeof( sciThis ), NULL, &sciThis );
ctip->MouseClick( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ));
sciThis->CallTipClick();
return noErr;
}
OSStatus ScintillaCallTip::MouseUp(HIPoint& /*inMouseLocation*/, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
return noErr;
}
OSStatus ScintillaCallTip::MouseDragged( HIPoint& location, UInt32 /*modifiers*/, EventMouseButton /*button*/, UInt32 /*clickCount*/ )
{
SetThemeCursor( kThemeArrowCursor );
return noErr;
}
HIViewRef ScintillaCallTip::Create()
{
// Register the HIView, if needed
static bool registered = false;
if ( not registered )
{
TView::RegisterSubclass( kScintillaCallTipClassID, Construct );
registered = true;
}
OSStatus err = noErr;
EventRef event = CreateInitializationEvent();
assert( event != NULL );
HIViewRef control = NULL;
err = HIObjectCreate( kScintillaCallTipClassID, event, reinterpret_cast<HIObjectRef*>( &control ) );
ReleaseEvent( event );
if ( err == noErr ) {
Platform::DebugPrintf("ScintillaCallTip::Create control %08X\n",control);
return control;
}
return NULL;
}
OSStatus ScintillaCallTip::Construct( HIViewRef inControl, TView** outView )
{
*outView = new ScintillaCallTip( inControl );
Platform::DebugPrintf("ScintillaCallTip::Construct scintilla %08X\n",*outView);
if ( *outView != NULL )
return noErr;
else
return memFullErr;
}
extern "C" {
HIViewRef scintilla_calltip_new() {
return ScintillaCallTip::Create();
}
}

View File

@ -0,0 +1,64 @@
/*
* ScintillaMacOSX.h
* tutorial
*
* Created by Evan Jones on Sun Sep 01 2002.
* Copyright (c) 2002 __MyCompanyName__. All rights reserved.
*
*/
#ifndef SCINTILLA_CALLTIP_H
#define SCINTILLA_CALLTIP_H
#include "TView.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include "Platform.h"
#include "Scintilla.h"
static const OSType scintillaCallTipType = 'Scct';
namespace Scintilla {
class ScintillaCallTip : public TView
{
public:
// Private so ScintillaCallTip objects can not be copied
ScintillaCallTip(const ScintillaCallTip &) : TView( NULL ) {}
ScintillaCallTip &operator=(const ScintillaCallTip &) { return * this; }
~ScintillaCallTip() {};
public:
/** This is the class ID that we've assigned to Scintilla. */
static const CFStringRef kScintillaCallTipClassID;
static const ControlKind kScintillaCallTipKind;
ScintillaCallTip( void* windowid );
/** Returns the HIView object kind, needed to subclass TView. */
virtual ControlKind GetKind() { return kScintillaCallTipKind; }
private:
virtual ControlPartCode HitTest( const HIPoint& where );
virtual void Draw( RgnHandle rgn, CGContextRef gc );
virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseDragged( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
public:
static HIViewRef Create();
private:
static OSStatus Construct( HIViewRef inControl, TView** outView );
};
}
#endif

View File

@ -0,0 +1,103 @@
#include "ScintillaMacOSX.h"
#include "ScintillaListBox.h"
using namespace Scintilla;
const CFStringRef ScintillaListBox::kScintillaListBoxClassID = CFSTR( "org.scintilla.listbox" );
const ControlKind ScintillaListBox::kScintillaListBoxKind = { 'ejon', 'Sclb' };
ScintillaListBox::ScintillaListBox( void* windowid ) :
TView( reinterpret_cast<HIViewRef>( windowid ) )
{
ActivateInterface( kMouse );
// debugPrint = true;
}
void ScintillaListBox::Draw(
RgnHandle /*inLimitRgn*/,
CGContextRef inContext )
{
Rect contentBounds;
GetControlBounds(GetViewRef(), &contentBounds);
HIRect controlFrame;
HIViewGetFrame( GetViewRef(), &controlFrame );
// what is the global pos?
Surface *surfaceWindow = Surface::Allocate();
if (surfaceWindow) {
surfaceWindow->Init(inContext, GetViewRef());
ctip->PaintCT(surfaceWindow);
surfaceWindow->Release();
delete surfaceWindow;
}
}
ControlPartCode ScintillaListBox::HitTest( const HIPoint& where )
{
if ( CGRectContainsPoint( Bounds(), where ) )
return 1;
else
return kControlNoPart;
}
OSStatus ScintillaListBox::MouseDown(HIPoint& location, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
ListBox* ctip = NULL;
ScintillaMacOSX *sciThis = NULL;
OSStatus err = GetControlProperty( GetViewRef(), scintillaListBoxType, 0, sizeof( ctip ), NULL, &ctip );
err = GetControlProperty( GetViewRef(), scintillaMacOSType, 0, sizeof( sciThis ), NULL, &sciThis );
ctip->MouseClick( Scintilla::Point( static_cast<int>( location.x ), static_cast<int>( location.y ) ));
sciThis->ListBoxClick();
return noErr;
}
OSStatus ScintillaListBox::MouseUp(HIPoint& /*inMouseLocation*/, UInt32 /*inKeyModifiers*/, EventMouseButton button, UInt32 /*inClickCount*/ )
{
if ( button != kEventMouseButtonPrimary ) return eventNotHandledErr;
return noErr;
}
HIViewRef ScintillaListBox::Create()
{
// Register the HIView, if needed
static bool registered = false;
if ( not registered )
{
TView::RegisterSubclass( kScintillaListBoxClassID, Construct );
registered = true;
}
OSStatus err = noErr;
EventRef event = CreateInitializationEvent();
assert( event != NULL );
HIViewRef control = NULL;
err = HIObjectCreate( kScintillaListBoxClassID, event, reinterpret_cast<HIObjectRef*>( &control ) );
ReleaseEvent( event );
if ( err == noErr ) {
Platform::DebugPrintf("ScintillaListBox::Create control %08X\n",control);
return control;
}
return NULL;
}
OSStatus ScintillaListBox::Construct( HIViewRef inControl, TView** outView )
{
*outView = new ScintillaListBox( inControl );
Platform::DebugPrintf("ScintillaListBox::Construct scintilla %08X\n",*outView);
if ( *outView != NULL )
return noErr;
else
return memFullErr;
}
extern "C" {
HIViewRef scintilla_listbox_new() {
return ScintillaListBox::Create();
}
}

View File

@ -0,0 +1,63 @@
/*
* ScintillaMacOSX.h
* tutorial
*
* Created by Evan Jones on Sun Sep 01 2002.
* Copyright (c) 2002 __MyCompanyName__. All rights reserved.
*
*/
#ifndef SCINTILLA_LISTBOX_H
#define SCINTILLA_LISTBOX_H
#include "TView.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include "Platform.h"
#include "Scintilla.h"
static const OSType scintillaListBoxType = 'sclb';
namespace Scintilla {
class ScintillaListBox : public TView
{
public:
// Private so ScintillaListBox objects can not be copied
ScintillaListBox(const ScintillaListBox &) : TView( NULL ) {}
ScintillaListBox &operator=(const ScintillaListBox &) { return * this; }
~ScintillaListBox() {};
public:
/** This is the class ID that we've assigned to Scintilla. */
static const CFStringRef kScintillaListBoxClassID;
static const ControlKind kScintillaListBoxKind;
ScintillaListBox( void* windowid );
/** Returns the HIView object kind, needed to subclass TView. */
virtual ControlKind GetKind() { return kScintillaListBoxKind; }
private:
virtual ControlPartCode HitTest( const HIPoint& where );
virtual void Draw( RgnHandle rgn, CGContextRef gc );
virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
public:
static HIViewRef Create();
private:
static OSStatus Construct( HIViewRef inControl, TView** outView );
};
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,234 @@
/*
* ScintillaMacOSX.h
* tutorial
*
* Original code by Evan Jones on Sun Sep 01 2002.
* Contributors:
* Shane Caraveo, ActiveState
* Bernd Paradies, Adobe
*
*/
#include "TView.h"
#include <stdlib.h>
#include <string.h>
#include <stdio.h>
#include <ctype.h>
#include <time.h>
#include <vector>
#include "Platform.h"
#include "Scintilla.h"
#include "PlatMacOSX.h"
#include "ScintillaWidget.h"
#ifdef SCI_LEXER
#include "SciLexer.h"
#include "PropSet.h"
#include "PropSetSimple.h"
#include "Accessor.h"
#include "KeyWords.h"
#endif
#include "SVector.h"
#include "SplitVector.h"
#include "Partitioning.h"
#include "RunStyles.h"
#include "ContractionState.h"
#include "CellBuffer.h"
#include "CallTip.h"
#include "KeyMap.h"
#include "Indicator.h"
#include "XPM.h"
#include "LineMarker.h"
#include "Style.h"
#include "AutoComplete.h"
#include "ViewStyle.h"
#include "CharClassify.h"
#include "Decoration.h"
#include "Document.h"
#include "Selection.h"
#include "PositionCache.h"
#include "Editor.h"
#include "ScintillaBase.h"
#include "ScintillaCallTip.h"
static const OSType scintillaMacOSType = 'Scin';
namespace Scintilla {
/**
On the Mac, there is no WM_COMMAND or WM_NOTIFY message that can be sent
back to the parent. Therefore, there must be a callback handler that acts
like a Windows WndProc, where Scintilla can send notifications to. Use
ScintillaMacOSX::registerNotifyHandler() to register such a handler.
Messgae format is:
<br>
WM_COMMAND: HIWORD (wParam) = notification code, LOWORD (wParam) = 0 (no control ID), lParam = ScintillaMacOSX*
<br>
WM_NOTIFY: wParam = 0 (no control ID), lParam = ptr to SCNotification structure, with hwndFrom set to ScintillaMacOSX*
*/
typedef void(*SciNotifyFunc) (intptr_t windowid, unsigned int iMessage, uintptr_t wParam, uintptr_t lParam);
/**
Scintilla sends these two messages to the nofity handler. Please refer
to the Windows API doc for details about the message format.
*/
#define WM_COMMAND 1001
#define WM_NOTIFY 1002
class ScintillaMacOSX : public ScintillaBase, public TView
{
public:
HIViewRef vScrollBar;
HIViewRef hScrollBar;
SInt32 scrollBarFixedSize;
SciNotifyFunc notifyProc;
intptr_t notifyObj;
bool capturedMouse;
// true if scintilla initiated the drag session
bool inDragSession() { return inDragDrop == ddDragging; };
bool isTracking;
// Private so ScintillaMacOSX objects can not be copied
ScintillaMacOSX(const ScintillaMacOSX &) : ScintillaBase(), TView( NULL ) {}
ScintillaMacOSX &operator=(const ScintillaMacOSX &) { return * this; }
public:
/** This is the class ID that we've assigned to Scintilla. */
static const CFStringRef kScintillaClassID;
static const ControlKind kScintillaKind;
ScintillaMacOSX( void* windowid );
virtual ~ScintillaMacOSX();
//~ static void ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widget_class);
/** Returns the HIView object kind, needed to subclass TView. */
virtual ControlKind GetKind() { return kScintillaKind; }
/// Register the notify callback
void registerNotifyCallback(intptr_t windowid, SciNotifyFunc callback);
private:
virtual void Initialise();
virtual void Finalise();
// pasteboard support
bool GetPasteboardData(PasteboardRef &pasteBoard,
SelectionText *selectedText, bool *isFileURL);
void SetPasteboardData(PasteboardRef &pasteBoard,
const SelectionText &selectedText);
char *GetStringFromCFString(CFStringRef &textString, int *textLen);
// Drag and drop
virtual void StartDrag();
Scintilla::Point GetDragPoint(DragRef inDrag);
bool GetDragData(DragRef inDrag, PasteboardRef &pasteBoard,
SelectionText *selectedText,
bool *isFileURL);
void SetDragCursor(DragRef inDrag);
virtual bool DragEnter(DragRef inDrag );
virtual bool DragWithin(DragRef inDrag );
virtual bool DragLeave(DragRef inDrag );
virtual OSStatus DragReceive(DragRef inDrag );
void DragScroll();
int scrollSpeed;
int scrollTicks;
EventRecord mouseDownEvent;
MouseTrackingRef mouseTrackingRef;
MouseTrackingRegionID mouseTrackingID;
HIPoint GetLocalPoint(::Point pt);
void InsertCharacters (const UniChar* buf, int len);
static pascal void IdleTimerEventHandler(EventLoopTimerRef inTimer,
EventLoopIdleTimerMessage inState,
void *scintilla );
public: // Public for scintilla_send_message
virtual sptr_t WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
void SyncPaint( void* gc, PRectangle rc);
//void FullPaint( void* gc );
virtual void Draw( RgnHandle rgn, CGContextRef gc );
virtual sptr_t DefWndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam);
virtual void SetTicking(bool on);
virtual bool SetIdle(bool on);
virtual void SetMouseCapture(bool on);
virtual bool HaveMouseCapture();
virtual PRectangle GetClientRectangle();
virtual void ScrollText(int linesToMove);
virtual void SetVerticalScrollPos();
virtual void SetHorizontalScrollPos();
virtual bool ModifyScrollBars(int nMax, int nPage);
virtual void ReconfigureScrollBars();
void Resize(int width, int height);
static pascal void LiveScrollHandler( ControlHandle control, SInt16 part );
bool ScrollBarHit(HIPoint location);
virtual void NotifyChange();
virtual void NotifyFocus(bool focus);
virtual void NotifyParent(SCNotification scn);
void NotifyKey(int key, int modifiers);
void NotifyURIDropped(const char *list);
#ifndef EXT_INPUT
// Extended UTF8-UTF6-conversion to handle surrogate pairs correctly (CL265070)
virtual int KeyDefault(int key, int modifiers);
#endif
static pascal OSStatus CommandEventHandler( EventHandlerCallRef inCallRef, EventRef inEvent, void* data );
bool HasSelection();
bool CanUndo();
bool CanRedo();
bool AlwaysTrue();
virtual void CopyToClipboard(const SelectionText &selectedText);
virtual void Copy();
virtual bool CanPaste();
virtual void Paste();
virtual void Paste(bool rectangular);
virtual void CreateCallTipWindow(PRectangle rc);
virtual void AddToPopUp(const char *label, int cmd = 0, bool enabled = true);
virtual void ClaimSelection();
static sptr_t DirectFunction(ScintillaMacOSX *sciThis,
unsigned int iMessage, uptr_t wParam, sptr_t lParam);
/** Timer event handler. Simply turns around and calls Tick. */
virtual void TimerFired( EventLoopTimerRef );
virtual OSStatus BoundsChanged( UInt32 inOptions, const HIRect& inOriginalBounds, const HIRect& inCurrentBounds, RgnHandle inInvalRgn );
virtual ControlPartCode HitTest( const HIPoint& where );
virtual OSStatus SetFocusPart( ControlPartCode desiredFocus, RgnHandle, Boolean, ControlPartCode* outActualFocus );
virtual OSStatus TextInput( TCarbonEvent& event );
// Configure the features of this control
virtual UInt32 GetBehaviors();
virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount, TCarbonEvent& inEvent );
virtual OSStatus MouseDown( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseDown( EventRecord *rec );
virtual OSStatus MouseUp( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseUp( EventRecord *rec );
virtual OSStatus MouseDragged( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseDragged( EventRecord *rec );
virtual OSStatus MouseEntered( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseExited( HIPoint& location, UInt32 modifiers, EventMouseButton button, UInt32 clickCount );
virtual OSStatus MouseWheelMoved( EventMouseWheelAxis axis, SInt32 delta, UInt32 modifiers );
virtual OSStatus ContextualMenuClick( HIPoint& location );
virtual OSStatus ActiveStateChanged();
virtual void CallTipClick();
public:
static HIViewRef Create();
private:
static OSStatus Construct( HIViewRef inControl, TView** outView );
};
}

View File

@ -0,0 +1,519 @@
/*
File: TCarbonEvent.cp
Version: 1.0
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject
to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
copyrights in this original Apple software (the "Apple Software"), to use,
reproduce, modify and redistribute the Apple Software, with or without
modifications, in source and/or binary forms; provided that if you redistribute
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions of
the Apple Software. Neither the name, trademarks, service marks or logos of
Apple Computer, Inc. may be used to endorse or promote products derived from the
Apple Software without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or implied,
are granted by Apple herein, including but not limited to any patent rights that
may be infringed by your derivative works or by other works in which the Apple
Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright © 2002 Apple Computer, Inc., All Rights Reserved
*/
#include "TCarbonEvent.h"
//-----------------------------------------------------------------------------------
// TCarbonEvent constructor
//-----------------------------------------------------------------------------------
//
TCarbonEvent::TCarbonEvent(
UInt32 inClass,
UInt32 inKind )
{
CreateEvent( NULL, inClass, inKind, GetCurrentEventTime(), 0, &fEvent );
}
//-----------------------------------------------------------------------------------
// TCarbonEvent constructor
//-----------------------------------------------------------------------------------
//
TCarbonEvent::TCarbonEvent(
EventRef inEvent )
{
fEvent = inEvent;
RetainEvent( fEvent );
}
//-----------------------------------------------------------------------------------
// TCarbonEvent destructor
//-----------------------------------------------------------------------------------
//
TCarbonEvent::~TCarbonEvent()
{
ReleaseEvent( fEvent );
}
//-----------------------------------------------------------------------------------
// GetClass
//-----------------------------------------------------------------------------------
//
UInt32 TCarbonEvent::GetClass() const
{
return GetEventClass( fEvent );
}
//-----------------------------------------------------------------------------------
// GetKind
//-----------------------------------------------------------------------------------
//
UInt32 TCarbonEvent::GetKind() const
{
return GetEventKind( fEvent );
}
//-----------------------------------------------------------------------------------
// SetTime
//-----------------------------------------------------------------------------------
//
void TCarbonEvent::SetTime(
EventTime inTime )
{
SetEventTime( fEvent, inTime );
}
//-----------------------------------------------------------------------------------
// GetTime
//-----------------------------------------------------------------------------------
//
EventTime TCarbonEvent::GetTime() const
{
return GetEventTime( fEvent );
}
//-----------------------------------------------------------------------------------
// Retain
//-----------------------------------------------------------------------------------
//
void TCarbonEvent::Retain()
{
RetainEvent( fEvent );
}
//-----------------------------------------------------------------------------------
// Release
//-----------------------------------------------------------------------------------
//
void TCarbonEvent::Release()
{
ReleaseEvent( fEvent );
}
//-----------------------------------------------------------------------------------
// PostToQueue
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::PostToQueue(
EventQueueRef inQueue,
EventPriority inPriority )
{
return PostEventToQueue( inQueue, fEvent, inPriority );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
EventParamType inType,
UInt32 inSize,
const void* inData )
{
return SetEventParameter( fEvent, inName, inType, inSize, inData );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
EventParamType inType,
UInt32 inBufferSize,
void* outData )
{
return GetEventParameter( fEvent, inName, inType, NULL, inBufferSize, NULL, outData );
}
//-----------------------------------------------------------------------------------
// GetParameterType
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameterType(
EventParamName inName,
EventParamType* outType )
{
return GetEventParameter( fEvent, inName, typeWildCard, outType, 0, NULL, NULL );
}
//-----------------------------------------------------------------------------------
// GetParameterSize
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameterSize(
EventParamName inName,
UInt32* outSize )
{
return GetEventParameter( fEvent, inName, typeWildCard, NULL, 0, outSize, NULL );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
Boolean inValue )
{
return SetParameter<Boolean>( inName, typeBoolean, inValue );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
Boolean* outValue )
{
return GetParameter<Boolean>( inName, typeBoolean, outValue );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
bool inValue )
{
return SetParameter<Boolean>( inName, typeBoolean, (Boolean) inValue );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
bool* outValue )
{
return GetParameter<Boolean>( inName, sizeof( Boolean ), (Boolean*) outValue );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
Point inPt )
{
return SetParameter<Point>( inName, typeQDPoint, inPt );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
Point* outPt )
{
return GetParameter<Point>( inName, typeQDPoint, outPt );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
const HIPoint& inPt )
{
return SetParameter<HIPoint>( inName, typeHIPoint, inPt );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
HIPoint* outPt )
{
return GetParameter<HIPoint>( inName, typeHIPoint, outPt );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
const Rect& inRect )
{
return SetParameter<Rect>( inName, typeQDRectangle, inRect );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
Rect* outRect )
{
return GetParameter<Rect>( inName, typeQDRectangle, outRect );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
const HIRect& inRect )
{
return SetParameter<HIRect>( inName, typeHIRect, inRect );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
HIRect* outRect )
{
return GetParameter<HIRect>( inName, typeHIRect, outRect );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
const HISize& inSize )
{
return SetParameter<HISize>( inName, typeHISize, inSize );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
HISize* outSize )
{
return GetParameter<HISize>( inName, typeHISize, outSize );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
RgnHandle inRegion )
{
return SetParameter<RgnHandle>( inName, typeQDRgnHandle, inRegion );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
RgnHandle* outRegion )
{
return GetParameter<RgnHandle>( inName, typeQDRgnHandle, outRegion );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
WindowRef inWindow )
{
return SetParameter<WindowRef>( inName, typeWindowRef, inWindow );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
WindowRef* outWindow )
{
return GetParameter<WindowRef>( inName, typeWindowRef, outWindow );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
ControlRef inControl )
{
return SetParameter<ControlRef>( inName, typeControlRef, inControl );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
ControlRef* outControl )
{
return GetParameter<ControlRef>( inName, typeControlRef, outControl );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
MenuRef inMenu )
{
return SetParameter<MenuRef>( inName, typeMenuRef, inMenu );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
MenuRef* outMenu )
{
return GetParameter<MenuRef>( inName, typeMenuRef, outMenu );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
DragRef inDrag )
{
return SetParameter<DragRef>( inName, typeDragRef, inDrag );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
DragRef* outDrag )
{
return GetParameter<DragRef>( inName, typeDragRef, outDrag );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
UInt32 inValue )
{
return SetParameter<UInt32>( inName, typeUInt32, inValue );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
UInt32* outValue )
{
return GetParameter<UInt32>( inName, typeUInt32, outValue );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
const HICommand& inValue )
{
return SetParameter<HICommand>( inName, typeHICommand, inValue );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
HICommand* outValue )
{
return GetParameter<HICommand>( inName, typeHICommand, outValue );
}
//-----------------------------------------------------------------------------------
// SetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::SetParameter(
EventParamName inName,
const ControlPartCode& inValue )
{
return SetParameter<ControlPartCode>( inName, typeControlPartCode, inValue );
}
//-----------------------------------------------------------------------------------
// GetParameter
//-----------------------------------------------------------------------------------
//
OSStatus TCarbonEvent::GetParameter(
EventParamName inName,
ControlPartCode* outValue )
{
return GetParameter<ControlPartCode>( inName, typeControlPartCode, outValue );
}

View File

@ -0,0 +1,230 @@
/*
File: TCarbonEvent.h
Version: 1.0
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject
to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
copyrights in this original Apple software (the "Apple Software"), to use,
reproduce, modify and redistribute the Apple Software, with or without
modifications, in source and/or binary forms; provided that if you redistribute
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions of
the Apple Software. Neither the name, trademarks, service marks or logos of
Apple Computer, Inc. may be used to endorse or promote products derived from the
Apple Software without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or implied,
are granted by Apple herein, including but not limited to any patent rights that
may be infringed by your derivative works or by other works in which the Apple
Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright © 2002 Apple Computer, Inc., All Rights Reserved
*/
#ifndef TCarbonEvent_H_
#define TCarbonEvent_H_
#include <Carbon/Carbon.h>
class TCarbonEvent
{
public:
// Construction/Destruction
TCarbonEvent(
UInt32 inClass,
UInt32 inKind );
TCarbonEvent(
EventRef inEvent );
virtual ~TCarbonEvent();
UInt32 GetClass() const;
UInt32 GetKind() const;
// Time
void SetTime(
EventTime inTime );
EventTime GetTime() const;
// Retention
void Retain();
void Release();
// Accessors
operator EventRef&()
{ return fEvent; };
EventRef GetEventRef()
{ return fEvent; }
// Posting
OSStatus PostToQueue(
EventQueueRef inQueue,
EventPriority inPriority = kEventPriorityStandard );
// Parameters
OSStatus SetParameter(
EventParamName inName,
EventParamType inType,
UInt32 inSize,
const void* inData );
OSStatus GetParameter(
EventParamName inName,
EventParamType inType,
UInt32 inBufferSize,
void* outData );
OSStatus GetParameterType(
EventParamName inName,
EventParamType* outType );
OSStatus GetParameterSize(
EventParamName inName,
UInt32* outSize );
// Simple parameters
OSStatus SetParameter(
EventParamName inName,
Boolean inValue );
OSStatus GetParameter(
EventParamName inName,
Boolean* outValue );
OSStatus SetParameter(
EventParamName inName,
bool inValue );
OSStatus GetParameter(
EventParamName inName,
bool* outValue );
OSStatus SetParameter(
EventParamName inName,
Point inPt );
OSStatus GetParameter(
EventParamName inName,
Point* outPt );
OSStatus SetParameter(
EventParamName inName,
const HIPoint& inPt );
OSStatus GetParameter(
EventParamName inName,
HIPoint* outPt );
OSStatus SetParameter(
EventParamName inName,
const Rect& inRect );
OSStatus GetParameter(
EventParamName inName,
Rect* outRect );
OSStatus SetParameter(
EventParamName inName,
const HIRect& inRect );
OSStatus GetParameter(
EventParamName inName,
HIRect* outRect );
OSStatus SetParameter(
EventParamName inName,
const HISize& inSize );
OSStatus GetParameter(
EventParamName inName,
HISize* outSize );
OSStatus SetParameter(
EventParamName inName,
RgnHandle inRegion );
OSStatus GetParameter(
EventParamName inName,
RgnHandle* outRegion );
OSStatus SetParameter(
EventParamName inName,
WindowRef inWindow );
OSStatus GetParameter(
EventParamName inName,
WindowRef* outWindow );
OSStatus SetParameter(
EventParamName inName,
ControlRef inControl );
OSStatus GetParameter(
EventParamName inName,
ControlRef* outControl );
OSStatus SetParameter(
EventParamName inName,
MenuRef inMenu );
OSStatus GetParameter(
EventParamName inName,
MenuRef* outMenu );
OSStatus SetParameter(
EventParamName inName,
DragRef inDrag );
OSStatus GetParameter(
EventParamName inName,
DragRef* outDrag );
OSStatus SetParameter(
EventParamName inName,
UInt32 inValue );
OSStatus GetParameter(
EventParamName inName,
UInt32* outValue );
OSStatus SetParameter(
EventParamName inName,
const HICommand& inValue );
OSStatus GetParameter(
EventParamName inName,
HICommand* outValue );
OSStatus SetParameter(
EventParamName inName,
const ControlPartCode& inValue );
OSStatus GetParameter(
EventParamName inName,
ControlPartCode* outValue );
// Template parameters
template <class T> OSStatus SetParameter(
EventParamName inName,
EventParamType inType,
const T& inValue )
{
return SetParameter( inName, inType, sizeof( T ), &inValue );
}
template <class T> OSStatus GetParameter(
EventParamName inName,
EventParamType inType,
T* outValue )
{
return GetParameter( inName, inType, sizeof( T ), outValue );
}
private:
EventRef fEvent;
};
#endif // TCarbonEvent_H_

496
scintilla/macosx/TRect.h Normal file
View File

@ -0,0 +1,496 @@
/*
File: TRect.h
Version: 1.0
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject
to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
copyrights in this original Apple software (the "Apple Software"), to use,
reproduce, modify and redistribute the Apple Software, with or without
modifications, in source and/or binary forms; provided that if you redistribute
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions of
the Apple Software. Neither the name, trademarks, service marks or logos of
Apple Computer, Inc. may be used to endorse or promote products derived from the
Apple Software without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or implied,
are granted by Apple herein, including but not limited to any patent rights that
may be infringed by your derivative works or by other works in which the Apple
Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright © 2002 Apple Computer, Inc., All Rights Reserved
*/
#ifndef TRect_H_
#define TRect_H_
#include <Carbon/Carbon.h>
class TRect
: public HIRect
{
public:
// Construction/Destruction
TRect();
TRect(
const HIRect* inRect );
TRect(
const HIRect& inRect );
TRect(
const HIPoint& inOrigin,
const HISize& inSize );
TRect(
float inX,
float inY,
float inWidth,
float inHeight );
TRect(
const Rect& inRect );
~TRect();
// Operators
operator HIRect*()
{ return this; }
operator Rect() const;
// Accessors
float MinX() const
{ return CGRectGetMinX( *this ); }
float MaxX() const
{ return CGRectGetMaxX( *this ); }
float MinY() const
{ return CGRectGetMinY( *this ); }
float MaxY() const
{ return CGRectGetMaxY( *this ); }
float Width() const
{ return CGRectGetWidth( *this ); }
float Height() const
{ return CGRectGetHeight( *this ); }
const HIPoint& Origin() const
{ return origin; }
const HISize& Size() const
{ return size; }
float CenterX() const
{ return CGRectGetMidX( *this ); }
float CenterY() const
{ return CGRectGetMidY( *this ); }
HIPoint Center() const;
// Modifiers
const HIRect& Inset(
float inX,
float inY );
const HIRect& Outset(
float inX,
float inY );
const HIRect& MoveBy(
float inDx,
float inDy );
const HIRect& MoveTo(
float inX,
float inY );
const HIRect& Set(
const HIRect* inRect );
const HIRect& Set(
const HIRect& inRect );
const HIRect& Set(
float inX,
float inY,
float inWidth,
float inHeight );
const HIRect& Set(
const Rect* inRect );
const HIRect& SetAroundCenter(
float inCenterX,
float inCenterY,
float inWidth,
float inHeight );
const HIRect& SetWidth(
float inWidth );
const HIRect& SetHeight(
float inHeight );
const HIRect& SetOrigin(
const HIPoint& inOrigin );
const HIRect& SetOrigin(
float inX,
float inY );
const HIRect& SetSize(
const HISize& inSize );
const HIRect& SetSize(
float inWidth,
float inHeight );
// Tests
bool Contains(
const HIPoint& inPoint );
bool Contains(
const HIRect& inRect );
bool Contains(
const Point& inPoint );
bool Contains(
const Rect& inRect );
};
//-----------------------------------------------------------------------------------
// TRect constructor
//-----------------------------------------------------------------------------------
//
inline TRect::TRect()
{
}
//-----------------------------------------------------------------------------------
// TRect constructor
//-----------------------------------------------------------------------------------
//
inline TRect::TRect(
const HIRect* inRect )
{
*this = *inRect;
}
//-----------------------------------------------------------------------------------
// TRect constructor
//-----------------------------------------------------------------------------------
//
inline TRect::TRect(
const HIRect& inRect )
{
origin = inRect.origin;
size = inRect.size;
}
//-----------------------------------------------------------------------------------
// TRect constructor
//-----------------------------------------------------------------------------------
//
inline TRect::TRect(
const HIPoint& inOrigin,
const HISize& inSize )
{
origin = inOrigin;
size = inSize;
}
//-----------------------------------------------------------------------------------
// TRect constructor
//-----------------------------------------------------------------------------------
//
inline TRect::TRect(
float inX,
float inY,
float inWidth,
float inHeight )
{
*this = CGRectMake( inX, inY, inWidth, inHeight );
}
//-----------------------------------------------------------------------------------
// TRect destructor
//-----------------------------------------------------------------------------------
//
inline TRect::~TRect()
{
}
//-----------------------------------------------------------------------------------
// TRect constructor
//-----------------------------------------------------------------------------------
//
inline TRect::TRect(
const Rect& inRect )
{
Set( &inRect );
}
//-----------------------------------------------------------------------------------
// Rect operator
//-----------------------------------------------------------------------------------
// Converts the HIRect to a QD rect and returns it
//
inline TRect::operator Rect() const
{
Rect qdRect;
qdRect.top = (SInt16) MinY();
qdRect.left = (SInt16) MinX();
qdRect.bottom = (SInt16) MaxY();
qdRect.right = (SInt16) MaxX();
return qdRect;
}
//-----------------------------------------------------------------------------------
// Center
//-----------------------------------------------------------------------------------
//
inline HIPoint TRect::Center() const
{
return CGPointMake( CGRectGetMidX( *this ), CGRectGetMidY( *this ) );
}
//-----------------------------------------------------------------------------------
// Inset
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::Inset(
float inX,
float inY )
{
*this = CGRectInset( *this, inX, inY );
return *this;
}
//-----------------------------------------------------------------------------------
// Outset
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::Outset(
float inX,
float inY )
{
*this = CGRectInset( *this, -inX, -inY );
return *this;
}
//-----------------------------------------------------------------------------------
// MoveBy
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::MoveBy(
float inDx,
float inDy )
{
origin = CGPointMake( MinX() + inDx, MinY() + inDy );
return *this;
}
//-----------------------------------------------------------------------------------
// MoveTo
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::MoveTo(
float inX,
float inY )
{
origin = CGPointMake( inX, inY );
return *this;
}
//-----------------------------------------------------------------------------------
// Set
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::Set(
const HIRect* inRect )
{
*this = *inRect;
return *this;
}
//-----------------------------------------------------------------------------------
// Set
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::Set(
const HIRect& inRect )
{
*this = inRect;
return *this;
}
//-----------------------------------------------------------------------------------
// Set
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::Set(
float inX,
float inY,
float inWidth,
float inHeight )
{
*this = CGRectMake( inX, inY, inWidth, inHeight );
return *this;
}
//-----------------------------------------------------------------------------------
// Set
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::Set(
const Rect* inRect )
{
origin.x = inRect->left;
origin.y = inRect->top;
size.width = inRect->right - inRect->left;
size.height = inRect->bottom - inRect->top;
return *this;
}
//-----------------------------------------------------------------------------------
// SetAroundCenter
//-----------------------------------------------------------------------------------
// Sets the rectangle by specifying dimensions around a center point
//
inline const HIRect& TRect::SetAroundCenter(
float inCenterX,
float inCenterY,
float inWidth,
float inHeight )
{
*this = CGRectMake( inCenterX - inWidth/2, inCenterY - inHeight/2, inWidth, inHeight );
return *this;
}
//-----------------------------------------------------------------------------------
// SetWidth
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::SetWidth(
float inWidth )
{
size.width = inWidth;
return *this;
}
//-----------------------------------------------------------------------------------
// SetHeight
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::SetHeight(
float inHeight )
{
size.height = inHeight;
return *this;
}
//-----------------------------------------------------------------------------------
// SetOrigin
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::SetOrigin(
const HIPoint& inOrigin )
{
origin = inOrigin;
return *this;
}
//-----------------------------------------------------------------------------------
// SetOrigin
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::SetOrigin(
float inX,
float inY )
{
origin = CGPointMake( inX, inY );
return *this;
}
//-----------------------------------------------------------------------------------
// SetSize
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::SetSize(
const HISize& inSize )
{
size = inSize;
return *this;
}
//-----------------------------------------------------------------------------------
// SetSize
//-----------------------------------------------------------------------------------
//
inline const HIRect& TRect::SetSize(
float inWidth,
float inHeight )
{
size = CGSizeMake( inWidth, inHeight );
return *this;
}
//-----------------------------------------------------------------------------------
// Contains
//-----------------------------------------------------------------------------------
//
inline bool TRect::Contains(
const HIPoint& inPoint )
{
return CGRectContainsPoint( *this, inPoint );
}
//-----------------------------------------------------------------------------------
// Contains
//-----------------------------------------------------------------------------------
//
inline bool TRect::Contains(
const HIRect& inRect )
{
return CGRectContainsRect( *this, inRect );
}
//-----------------------------------------------------------------------------------
// Contains
//-----------------------------------------------------------------------------------
//
inline bool TRect::Contains(
const Point& inPoint )
{
return Contains( CGPointMake( inPoint.h, inPoint.v ) );
}
//-----------------------------------------------------------------------------------
// Contains
//-----------------------------------------------------------------------------------
//
inline bool TRect::Contains(
const Rect& inRect )
{
return Contains( CGRectMake( inRect.left, inRect.top,
inRect.right - inRect.left, inRect.bottom - inRect.top ) );
}
#endif // TRect_H_

1442
scintilla/macosx/TView.cxx Normal file

File diff suppressed because it is too large Load Diff

286
scintilla/macosx/TView.h Normal file
View File

@ -0,0 +1,286 @@
/*
File: TView.h
Version: 1.0
Disclaimer: IMPORTANT: This Apple software is supplied to you by Apple Computer, Inc.
("Apple") in consideration of your agreement to the following terms, and your
use, installation, modification or redistribution of this Apple software
constitutes acceptance of these terms. If you do not agree with these terms,
please do not use, install, modify or redistribute this Apple software.
In consideration of your agreement to abide by the following terms, and subject
to these terms, Apple grants you a personal, non-exclusive license, under AppleÕs
copyrights in this original Apple software (the "Apple Software"), to use,
reproduce, modify and redistribute the Apple Software, with or without
modifications, in source and/or binary forms; provided that if you redistribute
the Apple Software in its entirety and without modifications, you must retain
this notice and the following text and disclaimers in all such redistributions of
the Apple Software. Neither the name, trademarks, service marks or logos of
Apple Computer, Inc. may be used to endorse or promote products derived from the
Apple Software without specific prior written permission from Apple. Except as
expressly stated in this notice, no other rights or licenses, express or implied,
are granted by Apple herein, including but not limited to any patent rights that
may be infringed by your derivative works or by other works in which the Apple
Software may be incorporated.
The Apple Software is provided by Apple on an "AS IS" basis. APPLE MAKES NO
WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION THE IMPLIED
WARRANTIES OF NON-INFRINGEMENT, MERCHANTABILITY AND FITNESS FOR A PARTICULAR
PURPOSE, REGARDING THE APPLE SOFTWARE OR ITS USE AND OPERATION ALONE OR IN
COMBINATION WITH YOUR PRODUCTS.
IN NO EVENT SHALL APPLE BE LIABLE FOR ANY SPECIAL, INDIRECT, INCIDENTAL OR
CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
ARISING IN ANY WAY OUT OF THE USE, REPRODUCTION, MODIFICATION AND/OR DISTRIBUTION
OF THE APPLE SOFTWARE, HOWEVER CAUSED AND WHETHER UNDER THEORY OF CONTRACT, TORT
(INCLUDING NEGLIGENCE), STRICT LIABILITY OR OTHERWISE, EVEN IF APPLE HAS BEEN
ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Copyright © 2002 Apple Computer, Inc., All Rights Reserved
*/
#ifndef TView_H_
#define TView_H_
#include <Carbon/Carbon.h>
#include "TCarbonEvent.h"
#include "TRect.h"
#define PURE_VIRTUAL 0
class TView
{
public:
// Bounds and Frame
OSStatus SetFrame(
const HIRect& inBounds );
HIRect Frame();
HIRect Bounds();
// Visibility
OSStatus Show();
OSStatus Hide();
EventTargetRef GetEventTarget();
OSStatus AddSubView(
TView* inSubView );
OSStatus RemoveFromSuperView();
// Accessors
HIViewRef GetViewRef() const
{ return fViewRef; }
void Hilite(
ControlPartCode inPart );
ControlPartCode GetHilite();
WindowRef GetOwner();
SInt32 GetValue();
void SetValue(
SInt32 inValue );
SInt32 GetMinimum();
void SetMinimum(
SInt32 inMinimum );
SInt32 GetMaximum();
void SetMaximum(
SInt32 inMaximum );
// State
Boolean IsVisible();
Boolean IsEnabled();
Boolean IsActive();
OSStatus Invalidate(); // was SetNeedsDisplay()
// A "fake" event handler
virtual void TimerFired( EventLoopTimerRef inTimer );
protected:
// Autoinvalidation
enum {
kAutoInvalidateOnActivate = (1 << 0),
kAutoInvalidateOnHilite = (1 << 1),
kAutoInvalidateOnEnable = (1 << 2),
kAutoInvalidateOnValueChange = (1 << 3),
kAutoInvalidateOnTitleChange = (1 << 4)
};
void ChangeAutoInvalidateFlags(
OptionBits inSetFlags,
OptionBits inClearFlags );
OptionBits GetAutoInvalidateFlags()
{ return fAutoInvalidateFlags; }
// Types
typedef OSStatus (*ConstructProc)(
ControlRef inBaseControl,
TView** outView );
// Construction/Destruction
TView( HIViewRef inControl );
virtual ~TView();
virtual ControlKind GetKind() = PURE_VIRTUAL;
virtual UInt32 GetBehaviors();
// Handlers
virtual OSStatus ActiveStateChanged();
virtual OSStatus BoundsChanged(
UInt32 inOptions,
const HIRect& inOriginalBounds,
const HIRect& inCurrentBounds,
RgnHandle inInvalRgn );
virtual OSStatus ControlHit(
ControlPartCode inPart,
UInt32 inModifiers );
virtual OSStatus EnabledStateChanged();
virtual void Draw(
RgnHandle inLimitRgn,
CGContextRef inContext );
virtual OSStatus GetData(
OSType inTag,
ControlPartCode inPart,
Size inSize,
Size* outSize,
void* inPtr );
virtual OSStatus GetRegion(
ControlPartCode inPart,
RgnHandle outRgn );
virtual OSStatus HiliteChanged(
ControlPartCode inOriginalPart,
ControlPartCode inCurrentPart,
RgnHandle inInvalRgn );
virtual ControlPartCode HitTest(
const HIPoint& inWhere );
virtual OSStatus Initialize(
TCarbonEvent& inEvent );
virtual OSStatus SetData(
OSType inTag,
ControlPartCode inPart,
Size inSize,
const void* inPtr );
virtual OSStatus SetFocusPart(
ControlPartCode inDesiredFocus,
RgnHandle inNnvalidRgn,
Boolean inFocusEverything,
ControlPartCode* outActualFocus );
virtual OSStatus TextInput(
TCarbonEvent& inEvent );
virtual OSStatus TitleChanged();
virtual OSStatus Track(
TCarbonEvent& inEvent,
ControlPartCode* outPartHit );
virtual OSStatus ValueChanged();
// Sizing
virtual OSStatus GetSizeConstraints(
HISize* outMin,
HISize* outMax );
virtual OSStatus GetOptimalSize(
HISize* outSize,
float* outBaseLine );
// Accessors
WindowRef GetWindowRef()
{ return GetControlOwner( GetViewRef() ); }
// Drag and drop
virtual bool DragEnter(
DragRef inDrag );
virtual bool DragWithin(
DragRef inDrag );
virtual bool DragLeave(
DragRef inDrag );
virtual OSStatus DragReceive(
DragRef inDrag );
// Command processing
virtual OSStatus ProcessCommand(
const HICommand& inCommand );
virtual OSStatus UpdateCommandStatus(
const HICommand& inCommand );
// Mouse events
virtual OSStatus MouseDown(
HIPoint& inMouseLocation,
UInt32 inKeyModifiers,
EventMouseButton inMouseButton,
UInt32 inClickCount,
TCarbonEvent& inEvent);
virtual OSStatus MouseUp(
HIPoint& inMouseLocation,
UInt32 inKeyModifiers,
EventMouseButton inMouseButton,
UInt32 inClickCount );
virtual OSStatus MouseDragged(
HIPoint& inMouseLocation,
UInt32 inKeyModifiers,
EventMouseButton inMouseButton,
UInt32 inClickCount );
virtual OSStatus MouseEntered(
HIPoint& inMouseLocation,
UInt32 inKeyModifiers,
EventMouseButton inMouseButton,
UInt32 inClickCount );
virtual OSStatus MouseExited(
HIPoint& inMouseLocation,
UInt32 inKeyModifiers,
EventMouseButton inMouseButton,
UInt32 inClickCount );
virtual OSStatus MouseWheelMoved( EventMouseWheelAxis inAxis, SInt32 inDelta, UInt32 inKeyModifiers );
virtual OSStatus ContextualMenuClick( HIPoint& inMouseLocation );
// Utility
static OSStatus RegisterSubclass(
CFStringRef inID,
ConstructProc inProc );
static EventRef CreateInitializationEvent();
enum Interface {
kDragAndDrop = 1,
kKeyboardFocus,
kMouse,
kMouseTracking
};
virtual OSStatus ActivateInterface(
Interface inInterface );
OSStatus InstallTimer(
EventTimerInterval inFireDelay,
EventLoopTimerRef* outTimer );
// Debugging
virtual void PrintDebugInfo();
Boolean debugPrint;
private:
static pascal OSStatus ObjectEventHandler(
EventHandlerCallRef inCallRef,
EventRef inEvent,
void* inUserData );
static pascal OSStatus ViewEventHandler(
EventHandlerCallRef inCallRef,
EventRef inEvent,
void* inUserData );
static pascal OSStatus WindowEventHandler(
EventHandlerCallRef inCallRef,
EventRef inEvent,
void* inUserData );
static pascal void TimerEventHandler(
EventLoopTimerRef inTimer,
void* inUserData );
OSStatus HandleEvent(
EventHandlerCallRef inCallRef,
TCarbonEvent& inEvent );
HIViewRef fViewRef;
EventHandlerRef fHandler;
EventHandlerRef mouseEventHandler;
OptionBits fAutoInvalidateFlags;
};
typedef TView* TViewPtr;
#endif // TView_H_

375
scintilla/macosx/deps.mak Normal file
View File

@ -0,0 +1,375 @@
ExtInput.o: ExtInput.cxx ScintillaMacOSX.h TView.h TCarbonEvent.h TRect.h \
../include/Platform.h ../include/Scintilla.h PlatMacOSX.h \
QuartzTextLayout.h QuartzTextStyle.h QuartzTextStyleAttribute.h \
../include/ScintillaWidget.h ../include/SciLexer.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../src/SVector.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h ../src/CellBuffer.h ../src/CallTip.h \
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/AutoComplete.h ../src/ViewStyle.h \
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
../src/Selection.h ../src/PositionCache.h ../src/Editor.h \
../src/ScintillaBase.h ScintillaCallTip.h ExtInput.h
PlatMacOSX.o: PlatMacOSX.cxx QuartzTextLayout.h QuartzTextStyle.h \
QuartzTextStyleAttribute.h TCarbonEvent.h ../include/Platform.h \
../include/Scintilla.h PlatMacOSX.h ../src/XPM.h \
../include/ScintillaWidget.h
ScintillaCallTip.o: ScintillaCallTip.cxx ScintillaMacOSX.h TView.h \
TCarbonEvent.h TRect.h ../include/Platform.h ../include/Scintilla.h \
PlatMacOSX.h QuartzTextLayout.h QuartzTextStyle.h \
QuartzTextStyleAttribute.h ../include/ScintillaWidget.h \
../include/SciLexer.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/RunStyles.h ../src/ContractionState.h \
../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \
../src/XPM.h ../src/LineMarker.h ../src/Style.h ../src/AutoComplete.h \
../src/ViewStyle.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h ../src/ScintillaBase.h ScintillaCallTip.h
ScintillaListBox.o: ScintillaListBox.cxx ScintillaMacOSX.h TView.h \
TCarbonEvent.h TRect.h ../include/Platform.h ../include/Scintilla.h \
PlatMacOSX.h QuartzTextLayout.h QuartzTextStyle.h \
QuartzTextStyleAttribute.h ../include/ScintillaWidget.h \
../include/SciLexer.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/RunStyles.h ../src/ContractionState.h \
../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \
../src/XPM.h ../src/LineMarker.h ../src/Style.h ../src/AutoComplete.h \
../src/ViewStyle.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h ../src/ScintillaBase.h ScintillaCallTip.h \
ScintillaListBox.h
ScintillaMacOSX.o: ScintillaMacOSX.cxx ScintillaMacOSX.h TView.h \
TCarbonEvent.h TRect.h ../include/Platform.h ../include/Scintilla.h \
PlatMacOSX.h QuartzTextLayout.h QuartzTextStyle.h \
QuartzTextStyleAttribute.h ../include/ScintillaWidget.h \
../include/SciLexer.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../src/SVector.h ../src/SplitVector.h \
../src/Partitioning.h ../src/RunStyles.h ../src/ContractionState.h \
../src/CellBuffer.h ../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h \
../src/XPM.h ../src/LineMarker.h ../src/Style.h ../src/AutoComplete.h \
../src/ViewStyle.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h ../src/ScintillaBase.h ScintillaCallTip.h \
../src/UniConversion.h
TCarbonEvent.o: TCarbonEvent.cxx TCarbonEvent.h
TView.o: TView.cxx TView.h TCarbonEvent.h TRect.h
AutoComplete.o: ../src/AutoComplete.cxx ../include/Platform.h \
../src/CharClassify.h ../src/AutoComplete.h
CallTip.o: ../src/CallTip.cxx ../include/Platform.h \
../include/Scintilla.h ../src/CallTip.h
CellBuffer.o: ../src/CellBuffer.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/CellBuffer.h
CharClassify.o: ../src/CharClassify.cxx ../src/CharClassify.h
ContractionState.o: ../src/ContractionState.cxx ../include/Platform.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h
Decoration.o: ../src/Decoration.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Decoration.h
Document.o: ../src/Document.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/CellBuffer.h ../src/PerLine.h \
../src/CharClassify.h ../src/Decoration.h ../src/Document.h \
../src/RESearch.h
DocumentAccessor.o: ../src/DocumentAccessor.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/DocumentAccessor.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/CellBuffer.h ../include/Scintilla.h ../src/CharClassify.h \
../src/Decoration.h ../src/Document.h
Editor.o: ../src/Editor.cxx ../include/Platform.h ../include/Scintilla.h \
../src/SplitVector.h ../src/Partitioning.h ../src/RunStyles.h \
../src/ContractionState.h ../src/CellBuffer.h ../src/KeyMap.h \
../src/Indicator.h ../src/XPM.h ../src/LineMarker.h ../src/Style.h \
../src/ViewStyle.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h
ExternalLexer.o: ../src/ExternalLexer.cxx ../include/Platform.h \
../include/Scintilla.h ../include/SciLexer.h ../include/PropSet.h \
../include/Accessor.h ../src/DocumentAccessor.h ../include/KeyWords.h \
../src/ExternalLexer.h
Indicator.o: ../src/Indicator.cxx ../include/Platform.h \
../include/Scintilla.h ../src/Indicator.h
KeyMap.o: ../src/KeyMap.cxx ../include/Platform.h ../include/Scintilla.h \
../src/KeyMap.h
KeyWords.o: ../src/KeyWords.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAPDL.o: ../src/LexAPDL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexASY.o: ../src/LexASY.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexAU3.o: ../src/LexAU3.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAVE.o: ../src/LexAVE.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAbaqus.o: ../src/LexAbaqus.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexAda.o: ../src/LexAda.cxx ../include/Platform.h ../include/Accessor.h \
../src/StyleContext.h ../include/PropSet.h ../include/KeyWords.h \
../include/SciLexer.h
LexAsm.o: ../src/LexAsm.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexAsn1.o: ../src/LexAsn1.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexBaan.o: ../src/LexBaan.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexBash.o: ../src/LexBash.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexBasic.o: ../src/LexBasic.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexBullant.o: ../src/LexBullant.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexCLW.o: ../src/LexCLW.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexCOBOL.o: ../src/LexCOBOL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
LexCPP.o: ../src/LexCPP.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexCSS.o: ../src/LexCSS.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexCaml.o: ../src/LexCaml.cxx ../include/Platform.h ../include/PropSet.h \
../src/PropSetSimple.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexCmake.o: ../src/LexCmake.cxx ../include/Platform.h \
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexConf.o: ../src/LexConf.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexCrontab.o: ../src/LexCrontab.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexCsound.o: ../src/LexCsound.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexD.o: ../src/LexD.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexEScript.o: ../src/LexEScript.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexEiffel.o: ../src/LexEiffel.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexErlang.o: ../src/LexErlang.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexFlagship.o: ../src/LexFlagship.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexForth.o: ../src/LexForth.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexFortran.o: ../src/LexFortran.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexGAP.o: ../src/LexGAP.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexGui4Cli.o: ../src/LexGui4Cli.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexHTML.o: ../src/LexHTML.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexHaskell.o: ../src/LexHaskell.cxx ../include/Platform.h \
../include/PropSet.h ../src/PropSetSimple.h ../include/Accessor.h \
../src/StyleContext.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexInno.o: ../src/LexInno.cxx ../include/Platform.h ../src/CharClassify.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexKix.o: ../src/LexKix.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexLisp.o: ../src/LexLisp.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexLout.o: ../src/LexLout.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexLua.o: ../src/LexLua.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexMMIXAL.o: ../src/LexMMIXAL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexMPT.o: ../src/LexMPT.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexMSSQL.o: ../src/LexMSSQL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexMagik.o: ../src/LexMagik.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexMatlab.o: ../src/LexMatlab.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexMetapost.o: ../src/LexMetapost.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
LexMySQL.o: ../src/LexMySQL.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexNimrod.o: ../src/LexNimrod.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexNsis.o: ../src/LexNsis.cxx ../include/Platform.h ../src/CharClassify.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexOpal.o: ../src/LexOpal.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexOthers.o: ../src/LexOthers.cxx ../include/Platform.h \
../src/CharClassify.h ../include/PropSet.h ../include/Accessor.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexPB.o: ../src/LexPB.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexPLM.o: ../src/LexPLM.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexPOV.o: ../src/LexPOV.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexPS.o: ../src/LexPS.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexPascal.o: ../src/LexPascal.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h \
../src/CharacterSet.h
LexPerl.o: ../src/LexPerl.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/CharacterSet.h
LexPowerPro.o: ../src/LexPowerPro.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h \
../src/CharacterSet.h
LexPowerShell.o: ../src/LexPowerShell.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexProgress.o: ../src/LexProgress.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexPython.o: ../src/LexPython.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexR.o: ../src/LexR.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexRebol.o: ../src/LexRebol.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h ../src/StyleContext.h
LexRuby.o: ../src/LexRuby.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h
LexSML.o: ../src/LexSML.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexSQL.o: ../src/LexSQL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexScriptol.o: ../src/LexScriptol.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexSmalltalk.o: ../src/LexSmalltalk.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexSorcus.o: ../src/LexSorcus.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexSpecman.o: ../src/LexSpecman.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexSpice.o: ../src/LexSpice.cxx ../include/Platform.h \
../include/Accessor.h ../src/StyleContext.h ../include/PropSet.h \
../include/KeyWords.h ../include/SciLexer.h
LexTACL.o: ../src/LexTACL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexTADS3.o: ../src/LexTADS3.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexTAL.o: ../src/LexTAL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexTCL.o: ../src/LexTCL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexTeX.o: ../src/LexTeX.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../include/KeyWords.h ../include/Scintilla.h \
../include/SciLexer.h ../src/StyleContext.h
LexVB.o: ../src/LexVB.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexVHDL.o: ../src/LexVHDL.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LexVerilog.o: ../src/LexVerilog.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h \
../include/KeyWords.h ../include/Scintilla.h ../include/SciLexer.h
LexYAML.o: ../src/LexYAML.cxx ../include/Platform.h ../include/PropSet.h \
../include/Accessor.h ../src/StyleContext.h ../include/KeyWords.h \
../include/Scintilla.h ../include/SciLexer.h
LineMarker.o: ../src/LineMarker.cxx ../include/Platform.h \
../include/Scintilla.h ../src/XPM.h ../src/LineMarker.h
PerLine.o: ../src/PerLine.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/CellBuffer.h ../src/PerLine.h
PositionCache.o: ../src/PositionCache.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
../src/KeyMap.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h ../src/CharClassify.h \
../src/Decoration.h ../src/Document.h ../src/Selection.h \
../src/PositionCache.h
PropSet.o: ../src/PropSet.cxx ../include/Platform.h ../include/PropSet.h \
../src/PropSetSimple.h
RESearch.o: ../src/RESearch.cxx ../src/CharClassify.h ../src/RESearch.h
RunStyles.o: ../src/RunStyles.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h
ScintillaBase.o: ../src/ScintillaBase.cxx ../include/Platform.h \
../include/Scintilla.h ../include/PropSet.h ../src/PropSetSimple.h \
../include/SciLexer.h ../include/Accessor.h ../src/DocumentAccessor.h \
../include/KeyWords.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/ContractionState.h ../src/CellBuffer.h \
../src/CallTip.h ../src/KeyMap.h ../src/Indicator.h ../src/XPM.h \
../src/LineMarker.h ../src/Style.h ../src/ViewStyle.h \
../src/AutoComplete.h ../src/CharClassify.h ../src/Decoration.h \
../src/Document.h ../src/Selection.h ../src/PositionCache.h \
../src/Editor.h ../src/ScintillaBase.h
Selection.o: ../src/Selection.cxx ../include/Platform.h \
../include/Scintilla.h ../src/Selection.h
Style.o: ../src/Style.cxx ../include/Platform.h ../include/Scintilla.h \
../src/Style.h
StyleContext.o: ../src/StyleContext.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../src/StyleContext.h
UniConversion.o: ../src/UniConversion.cxx ../src/UniConversion.h
ViewStyle.o: ../src/ViewStyle.cxx ../include/Platform.h \
../include/Scintilla.h ../src/SplitVector.h ../src/Partitioning.h \
../src/RunStyles.h ../src/Indicator.h ../src/XPM.h ../src/LineMarker.h \
../src/Style.h ../src/ViewStyle.h
WindowAccessor.o: ../src/WindowAccessor.cxx ../include/Platform.h \
../include/PropSet.h ../include/Accessor.h ../include/WindowAccessor.h \
../include/Scintilla.h
XPM.o: ../src/XPM.cxx ../include/Platform.h ../src/XPM.h

115
scintilla/macosx/makefile Normal file
View File

@ -0,0 +1,115 @@
# Make file for Scintilla on Mac OS X
# Copyright 2002 by Evan Jones <ejones@uwaterloo.ca>
# Based on the GTK makefile Copyright 1998-2001 by Neil Hodgson <neilh@scintilla.org>
# The License.txt file describes the conditions under which this software may be distributed.
# This makefile assumes that Apple's version of GCC 3.1 is used and changes will be needed to use other compilers.
# GNU make does not like \r\n line endings so should be saved to CVS in binary form.
.SUFFIXES: .cxx .c .o .h .a
CC = g++
CCOMP = gcc
LIBTOOL = libtool
GCC_MAJOR := $(shell $(CC) -v 2>&1 | \
grep version | cut -d' ' -f3 | cut -d'.' -f1)
# We call it "libscintilla" so when you add it to a Project Builder project,
# Project Builder will link it correctly.
STATICLIB=../bin/libscintilla.a
DYNAMICLIB=../bin/libscintilla.dylib
vpath %.h ../src ../include
vpath %.cxx ../src
INCLUDEDIRS=-I ../include -I ../src
ifeq ($(GCC_MAJOR),3)
# 10.4 will have GCC 4 or better, so this should only ever happen
# on a 10.3 or older PPC box
ARCHFLAGS=-arch ppc -faltivec -mcpu=7400 -mtune=7400 -mpowerpc -mpowerpc-gfxopt
else
ifndef NATIVE
ARCH_BASE_FLAGS=/Developer/SDKs/MacOSX10.5.sdk -arch ppc -arch i386
ARCHFLAGS=-isysroot $(ARCH_BASE_FLAGS)
LINK_FLAGS=-Wl,-syslibroot,$(ARCH_BASE_FLAGS)
DYN_FLAGS=$(LINK_FLAGS) -framework Carbon -bundle
endif
endif
OPTIONS=-Wall -Wno-missing-braces -Wno-char-subscripts -DSCI_NAMESPACE -DMACOSX -DSCI_LEXER
#DEBUG = 1
ifdef DEBUG
DFLAGS=-DDEBUG -g
else
DFLAGS=-DNDEBUG -Os
endif
ifdef CONTAINER_HANDLES_EVENTS
CONTAINER=-DCONTAINER_HANDLES_EVENTS=1
endif
ifdef EXT_INPUT
EXT_INPUT=-DEXT_INPUT
EXTOBS=ExtInput.o
endif
.cxx.o:
$(CC) $(CXXFLAGS) $(OPTIONS) $(DFLAGS) $(CONTAINER) $(ARCHFLAGS) $(EXT_INPUT) $(INCLUDEDIRS) -c $<
.c.o:
$(CCOMP) $(CXXFLAGS) $(OPTIONS) $(DFLAGS) $(CONTAINER) $(ARCHFLAGS) $(EXT_INPUT) $(INCLUDEDIRS) -w -c $<
#++Autogenerated -- run src/LexGen.py to regenerate
#**LEXOBJS=\\\n\(\*.o \)
LEXOBJS=\
LexAbaqus.o LexAda.o LexAPDL.o LexAsm.o LexAsn1.o LexASY.o LexAU3.o LexAVE.o \
LexBaan.o LexBash.o LexBasic.o LexBullant.o LexCaml.o LexCLW.o LexCmake.o \
LexCOBOL.o LexConf.o LexCPP.o LexCrontab.o LexCsound.o LexCSS.o LexD.o \
LexEiffel.o LexErlang.o LexEScript.o LexFlagship.o LexForth.o LexFortran.o \
LexGAP.o LexGui4Cli.o LexHaskell.o LexHTML.o LexInno.o LexKix.o LexLisp.o \
LexLout.o LexLua.o LexMagik.o LexMarkdown.o LexMatlab.o LexMetapost.o \
LexMMIXAL.o LexMPT.o LexMSSQL.o LexMySQL.o LexNimrod.o LexNsis.o LexOpal.o \
LexOthers.o LexPascal.o LexPB.o LexPerl.o LexPLM.o LexPOV.o LexPowerPro.o \
LexPowerShell.o LexProgress.o LexPS.o LexPython.o LexR.o LexRebol.o LexRuby.o \
LexScriptol.o LexSmalltalk.o LexSML.o LexSorcus.o LexSpecman.o LexSpice.o \
LexSQL.o LexTACL.o LexTADS3.o LexTAL.o LexTCL.o LexTeX.o LexVB.o LexVerilog.o \
LexVHDL.o LexYAML.o
#--Autogenerated -- end of automatically generated section
# The LEXOBJS have to be treated specially as the functions in them are not called from external code
all: $(STATICLIB) $(LEXOBJS)
shared: $(DYNAMICLIB) $(LEXOBJS)
clean:
rm -f *.o $(COMPLIB)
deps:
$(CC) -MM -DSCI_NAMESPACE -DMACOSX -DSCI_LEXER $(CXXFLAGS) $(INCLUDEDIRS) *.cxx ../src/*.cxx >deps.mak
COMPLIB=DocumentAccessor.o WindowAccessor.o KeyWords.o StyleContext.o \
CharClassify.o Decoration.o Document.o PerLine.o CallTip.o PositionCache.o \
ScintillaBase.o ContractionState.o Editor.o ExternalLexer.o PropSet.o PlatMacOSX.o \
KeyMap.o LineMarker.o ScintillaMacOSX.o CellBuffer.o ViewStyle.o \
RESearch.o RunStyles.o Selection.o Style.o Indicator.o AutoComplete.o UniConversion.o XPM.o \
TCarbonEvent.o TView.o ScintillaCallTip.o $(EXTOBS) \
$(LEXOBJS)
$(STATICLIB): $(COMPLIB)
$(LIBTOOL) -static -o $@ $^
$(DYNAMICLIB): $(COMPLIB)
$(CC) -dynamic -o $@ $(DYN_FLAGS) $^
# Generate header files from Scintilla.iface
../include/Scintilla_gen.h: ../include/HFacer.py ../include/Face.py ../include/Scintilla.iface
cd ../include && python HFacer.py
../include/SciLexer_gen.h: ../include/HFacer.py ../include/Face.py ../include/Scintilla.iface
cd ../include && python HFacer.py
../include/Scintilla.h: ../include/Scintilla_gen.h
../include/SciLexer.h: ../include/SciLexer_gen.h
# Automatically generate header dependencies with "make deps"
include deps.mak

View File

@ -0,0 +1,12 @@
// Scintilla source code edit control
/** @file FontQuality.h
** Definitions to control font anti-aliasing.
**/
// Copyright 1998-2009 by Neil Hodgson <neilh@scintilla.org>
// The License.txt file describes the conditions under which this software may be distributed.
#define SC_EFF_QUALITY_MASK 0xF
#define SC_EFF_QUALITY_DEFAULT 0
#define SC_EFF_QUALITY_NON_ANTIALIASED 1
#define SC_EFF_QUALITY_ANTIALIASED 2
#define SC_EFF_QUALITY_LCD_OPTIMIZED 3

View File

@ -0,0 +1,412 @@
/******************************************************************
* LexMarkdown.cxx
*
* A simple Markdown lexer for scintilla.
*
* Includes highlighting for some extra features from the
* Pandoc implementation; strikeout, using '#.' as a default
* ordered list item marker, and delimited code blocks.
*
* Limitations:
*
* Standard indented code blocks are not highlighted at all,
* as it would conflict with other indentation schemes. Use
* delimited code blocks for blanket highlighting of an
* entire code block. Embedded HTML is not highlighted either.
* Blanket HTML highlighting has issues, because some Markdown
* implementations allow Markdown markup inside of the HTML. Also,
* there is a following blank line issue that can't be ignored,
* explained in the next paragraph. Embedded HTML and code
* blocks would be better supported with language specific
* highlighting.
*
* The highlighting aims to accurately reflect correct syntax,
* but a few restrictions are relaxed. Delimited code blocks are
* highlighted, even if the line following the code block is not blank.
* Requiring a blank line after a block, breaks the highlighting
* in certain cases, because of the way Scintilla ends up calling
* the lexer.
*
* Written by Jon Strait - jstrait@moonloop.net
*
* The License.txt file describes the conditions under which this
* software may be distributed.
*
*****************************************************************/
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <stdio.h>
#include <stdarg.h>
#include "Platform.h"
#include "PropSet.h"
#include "Accessor.h"
#include "StyleContext.h"
#include "KeyWords.h"
#include "Scintilla.h"
#include "SciLexer.h"
#ifdef SCI_NAMESPACE
using namespace Scintilla;
#endif
static inline bool IsNewline(const int ch) {
return (ch == '\n' || ch == '\r');
}
// True if can follow ch down to the end with possibly trailing whitespace
static bool FollowToLineEnd(const int ch, const int state, const unsigned int endPos, StyleContext &sc) {
unsigned int i = 0;
while (sc.GetRelative(++i) == ch)
;
// Skip over whitespace
while (IsASpaceOrTab(sc.GetRelative(i)) && sc.currentPos + i < endPos)
++i;
if (IsNewline(sc.GetRelative(i)) || sc.currentPos + i == endPos) {
sc.Forward(i);
sc.ChangeState(state);
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
return true;
}
else return false;
}
// Set the state on text section from current to length characters,
// then set the rest until the newline to default, except for any characters matching token
static void SetStateAndZoom(const int state, const int length, const int token, StyleContext &sc) {
sc.SetState(state);
sc.Forward(length);
sc.SetState(SCE_MARKDOWN_DEFAULT);
sc.Forward();
bool started = false;
while (sc.More() && !IsNewline(sc.ch)) {
if (sc.ch == token && !started) {
sc.SetState(state);
started = true;
}
else if (sc.ch != token) {
sc.SetState(SCE_MARKDOWN_DEFAULT);
started = false;
}
sc.Forward();
}
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
}
// Does the previous line have more than spaces and tabs?
static bool HasPrevLineContent(StyleContext &sc) {
int i = 0;
// Go back to the previous newline
while ((--i + sc.currentPos) && !IsNewline(sc.GetRelative(i)))
;
while (--i + sc.currentPos) {
if (IsNewline(sc.GetRelative(i)))
break;
if (!IsASpaceOrTab(sc.GetRelative(i)))
return true;
}
return false;
}
static bool IsValidHrule(const unsigned int endPos, StyleContext &sc) {
int c, count = 1;
unsigned int i = 0;
while (++i) {
c = sc.GetRelative(i);
if (c == sc.ch)
++count;
// hit a terminating character
else if (!IsASpaceOrTab(c) || sc.currentPos + i == endPos) {
// Are we a valid HRULE
if ((IsNewline(c) || sc.currentPos + i == endPos) &&
count >= 3 && !HasPrevLineContent(sc)) {
sc.SetState(SCE_MARKDOWN_HRULE);
sc.Forward(i);
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
return true;
}
else {
sc.SetState(SCE_MARKDOWN_DEFAULT);
return false;
}
}
}
return false;
}
static void ColorizeMarkdownDoc(unsigned int startPos, int length, int initStyle,
WordList **, Accessor &styler) {
unsigned int endPos = startPos + length;
int precharCount = 0;
// Don't advance on a new loop iteration and retry at the same position.
// Useful in the corner case of having to start at the beginning file position
// in the default state.
bool freezeCursor = false;
StyleContext sc(startPos, length, initStyle, styler);
while (sc.More()) {
// Skip past escaped characters
if (sc.ch == '\\') {
sc.Forward();
continue;
}
// A blockquotes resets the line semantics
if (sc.state == SCE_MARKDOWN_BLOCKQUOTE)
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
// Conditional state-based actions
if (sc.state == SCE_MARKDOWN_CODE2) {
if (sc.Match("``") && sc.GetRelative(-2) != ' ') {
sc.Forward(2);
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
else if (sc.state == SCE_MARKDOWN_CODE) {
if (sc.ch == '`' && sc.chPrev != ' ')
sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);
}
/* De-activated because it gets in the way of other valid indentation
* schemes, for example multiple paragraphs inside a list item.
// Code block
else if (sc.state == SCE_MARKDOWN_CODEBK) {
bool d = true;
if (IsNewline(sc.ch)) {
if (sc.chNext != '\t') {
for (int c = 1; c < 5; ++c) {
if (sc.GetRelative(c) != ' ')
d = false;
}
}
}
else if (sc.atLineStart) {
if (sc.ch != '\t' ) {
for (int i = 0; i < 4; ++i) {
if (sc.GetRelative(i) != ' ')
d = false;
}
}
}
if (!d)
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
}
*/
// Strong
else if (sc.state == SCE_MARKDOWN_STRONG1) {
if (sc.Match("**") && sc.chPrev != ' ') {
sc.Forward(2);
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
else if (sc.state == SCE_MARKDOWN_STRONG2) {
if (sc.Match("__") && sc.chPrev != ' ') {
sc.Forward(2);
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
// Emphasis
else if (sc.state == SCE_MARKDOWN_EM1) {
if (sc.ch == '*' && sc.chPrev != ' ')
sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);
}
else if (sc.state == SCE_MARKDOWN_EM2) {
if (sc.ch == '_' && sc.chPrev != ' ')
sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);
}
else if (sc.state == SCE_MARKDOWN_CODEBK) {
if (sc.atLineStart && sc.Match("~~~")) {
int i = 1;
while (!IsNewline(sc.GetRelative(i)) && sc.currentPos + i < endPos)
i++;
sc.Forward(i);
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
else if (sc.state == SCE_MARKDOWN_STRIKEOUT) {
if (sc.Match("~~") && sc.chPrev != ' ') {
sc.Forward(2);
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
else if (sc.state == SCE_MARKDOWN_LINE_BEGIN) {
// Header
if (sc.Match("######"))
SetStateAndZoom(SCE_MARKDOWN_HEADER6, 6, '#', sc);
else if (sc.Match("#####"))
SetStateAndZoom(SCE_MARKDOWN_HEADER5, 5, '#', sc);
else if (sc.Match("####"))
SetStateAndZoom(SCE_MARKDOWN_HEADER4, 4, '#', sc);
else if (sc.Match("###"))
SetStateAndZoom(SCE_MARKDOWN_HEADER3, 3, '#', sc);
else if (sc.Match("##"))
SetStateAndZoom(SCE_MARKDOWN_HEADER2, 2, '#', sc);
else if (sc.Match("#")) {
// Catch the special case of an unordered list
if (sc.chNext == '.' && IsASpaceOrTab(sc.GetRelative(2))) {
precharCount = 0;
sc.SetState(SCE_MARKDOWN_PRECHAR);
}
else
SetStateAndZoom(SCE_MARKDOWN_HEADER1, 1, '#', sc);
}
// Code block
else if (sc.Match("~~~")) {
if (!HasPrevLineContent(sc))
sc.SetState(SCE_MARKDOWN_CODEBK);
else
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
else if (sc.ch == '=') {
if (HasPrevLineContent(sc) && FollowToLineEnd('=', SCE_MARKDOWN_HEADER1, endPos, sc))
;
else
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
else if (sc.ch == '-') {
if (HasPrevLineContent(sc) && FollowToLineEnd('-', SCE_MARKDOWN_HEADER2, endPos, sc))
;
else {
precharCount = 0;
sc.SetState(SCE_MARKDOWN_PRECHAR);
}
}
else if (IsNewline(sc.ch))
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
else {
precharCount = 0;
sc.SetState(SCE_MARKDOWN_PRECHAR);
}
}
// The header lasts until the newline
else if (sc.state == SCE_MARKDOWN_HEADER1 || sc.state == SCE_MARKDOWN_HEADER2 ||
sc.state == SCE_MARKDOWN_HEADER3 || sc.state == SCE_MARKDOWN_HEADER4 ||
sc.state == SCE_MARKDOWN_HEADER5 || sc.state == SCE_MARKDOWN_HEADER6) {
if (IsNewline(sc.ch))
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
}
// New state only within the initial whitespace
if (sc.state == SCE_MARKDOWN_PRECHAR) {
// Blockquote
if (sc.ch == '>' && precharCount < 5)
sc.SetState(SCE_MARKDOWN_BLOCKQUOTE);
/*
// Begin of code block
else if (!HasPrevLineContent(sc) && (sc.chPrev == '\t' || precharCount >= 4))
sc.SetState(SCE_MARKDOWN_CODEBK);
*/
// HRule - Total of three or more hyphens, asterisks, or underscores
// on a line by themselves
else if ((sc.ch == '-' || sc.ch == '*' || sc.ch == '_') && IsValidHrule(endPos, sc))
;
// Unordered list
else if ((sc.ch == '-' || sc.ch == '*' || sc.ch == '+') && IsASpaceOrTab(sc.chNext)) {
sc.SetState(SCE_MARKDOWN_ULIST_ITEM);
sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);
}
// Ordered list
else if (IsADigit(sc.ch)) {
int digitCount = 0;
while (IsADigit(sc.GetRelative(++digitCount)))
;
if (sc.GetRelative(digitCount) == '.' &&
IsASpaceOrTab(sc.GetRelative(digitCount + 1))) {
sc.SetState(SCE_MARKDOWN_OLIST_ITEM);
sc.Forward(digitCount + 1);
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
}
// Alternate Ordered list
else if (sc.ch == '#' && sc.chNext == '.' && IsASpaceOrTab(sc.GetRelative(2))) {
sc.SetState(SCE_MARKDOWN_OLIST_ITEM);
sc.Forward(2);
sc.SetState(SCE_MARKDOWN_DEFAULT);
}
else if (sc.ch != ' ' || precharCount > 2)
sc.SetState(SCE_MARKDOWN_DEFAULT);
else
++precharCount;
}
// New state anywhere in doc
if (sc.state == SCE_MARKDOWN_DEFAULT) {
if (sc.atLineStart && sc.ch == '#') {
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
freezeCursor = true;
}
// Links and Images
if (sc.Match("![") || sc.ch == '[') {
int i = 0, j = 0, k = 0;
int len = endPos - sc.currentPos;
while (i < len && (sc.GetRelative(++i) != ']' || sc.GetRelative(i - 1) == '\\'))
;
if (sc.GetRelative(i) == ']') {
j = i;
if (sc.GetRelative(++i) == '(') {
while (i < len && (sc.GetRelative(++i) != ')' || sc.GetRelative(i - 1) == '\\'))
;
if (sc.GetRelative(i) == ')')
k = i;
}
else if (sc.GetRelative(i) == '[' || sc.GetRelative(++i) == '[') {
while (i < len && (sc.GetRelative(++i) != ']' || sc.GetRelative(i - 1) == '\\'))
;
if (sc.GetRelative(i) == ']')
k = i;
}
}
// At least a link text
if (j) {
sc.SetState(SCE_MARKDOWN_LINK);
sc.Forward(j);
// Also has a URL or reference portion
if (k)
sc.Forward(k - j);
sc.ForwardSetState(SCE_MARKDOWN_DEFAULT);
}
}
// Code - also a special case for alternate inside spacing
if (sc.Match("``") && sc.GetRelative(3) != ' ') {
sc.SetState(SCE_MARKDOWN_CODE2);
sc.Forward();
}
else if (sc.ch == '`' && sc.chNext != ' ') {
sc.SetState(SCE_MARKDOWN_CODE);
}
// Strong
else if (sc.Match("**") && sc.GetRelative(2) != ' ') {
sc.SetState(SCE_MARKDOWN_STRONG1);
sc.Forward();
}
else if (sc.Match("__") && sc.GetRelative(2) != ' ') {
sc.SetState(SCE_MARKDOWN_STRONG2);
sc.Forward();
}
// Emphasis
else if (sc.ch == '*' && sc.chNext != ' ')
sc.SetState(SCE_MARKDOWN_EM1);
else if (sc.ch == '_' && sc.chNext != ' ')
sc.SetState(SCE_MARKDOWN_EM2);
// Strikeout
else if (sc.Match("~~") && sc.GetRelative(2) != ' ') {
sc.SetState(SCE_MARKDOWN_STRIKEOUT);
sc.Forward();
}
// Beginning of line
else if (IsNewline(sc.ch))
sc.SetState(SCE_MARKDOWN_LINE_BEGIN);
}
// Advance if not holding back the cursor for this iteration.
if (!freezeCursor)
sc.Forward();
freezeCursor = false;
}
sc.Complete();
}
LexerModule lmMarkdown(SCLEX_MARKDOWN, ColorizeMarkdownDoc, "markdown");