diff options
Diffstat (limited to 'macosx/SciTest')
| -rw-r--r-- | macosx/SciTest/English.lproj/InfoPlist.strings | bin | 0 -> 256 bytes | |||
| -rw-r--r-- | macosx/SciTest/Info.plist | 24 | ||||
| -rw-r--r-- | macosx/SciTest/SciTest.xcode/project.pbxproj | 287 | ||||
| -rw-r--r-- | macosx/SciTest/SciTest_Prefix.pch | 5 | ||||
| -rw-r--r-- | macosx/SciTest/main.cpp | 225 | ||||
| -rw-r--r-- | macosx/SciTest/version.plist | 16 | 
6 files changed, 557 insertions, 0 deletions
| diff --git a/macosx/SciTest/English.lproj/InfoPlist.strings b/macosx/SciTest/English.lproj/InfoPlist.stringsBinary files differ new file mode 100644 index 000000000..4dcb4fe03 --- /dev/null +++ b/macosx/SciTest/English.lproj/InfoPlist.strings diff --git a/macosx/SciTest/Info.plist b/macosx/SciTest/Info.plist new file mode 100644 index 000000000..7163dff62 --- /dev/null +++ b/macosx/SciTest/Info.plist @@ -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> diff --git a/macosx/SciTest/SciTest.xcode/project.pbxproj b/macosx/SciTest/SciTest.xcode/project.pbxproj new file mode 100644 index 000000000..9ef8fd9bb --- /dev/null +++ b/macosx/SciTest/SciTest.xcode/project.pbxproj @@ -0,0 +1,287 @@ +// !$*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" */; +			hasScannedForEncodings = 1; +			mainGroup = 20286C29FDCF999611CA2CEA /* SciTest */; +			projectDirPath = ""; +			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 */; +} diff --git a/macosx/SciTest/SciTest_Prefix.pch b/macosx/SciTest/SciTest_Prefix.pch new file mode 100644 index 000000000..552cf97fc --- /dev/null +++ b/macosx/SciTest/SciTest_Prefix.pch @@ -0,0 +1,5 @@ +// +// Prefix header for all source files of the 'SciTest' target in the 'SciTest' project. +// + +#include <Carbon/Carbon.h> diff --git a/macosx/SciTest/main.cpp b/macosx/SciTest/main.cpp new file mode 100644 index 000000000..374038005 --- /dev/null +++ b/macosx/SciTest/main.cpp @@ -0,0 +1,225 @@ +//
 +//  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"
 +};
 +
 +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);
 +	/*
 +	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;
 +}
 +
 diff --git a/macosx/SciTest/version.plist b/macosx/SciTest/version.plist new file mode 100644 index 000000000..df8c3dc7d --- /dev/null +++ b/macosx/SciTest/version.plist @@ -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> | 
