class library: Spawner - don't access PriorityQueue-array
[supercollider.git] / editors / scapp / include / SCTextView.h
blob3a2a3f1683324c2ff2642a7a432543a2ab8de26d
1 /*
2 SuperCollider real time audio synthesis system
3 Copyright (c) 2002 James McCartney. All rights reserved.
4 http://www.audiosynth.com
6 This program is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2 of the License, or
9 (at your option) any later version.
11 This program is distributed in the hope that it will be useful,
12 but WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 GNU General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with this program; if not, write to the Free Software
18 Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
21 #import <Cocoa/Cocoa.h>
23 #if __LP64__
24 typedef long NSInteger;
25 typedef unsigned long NSUInteger;
26 #else
27 typedef int NSInteger;
28 typedef unsigned int NSUInteger;
29 #endif
31 @interface SCTextView : NSTextView
33 NSString *langClassToCall;
34 int keyDownActionIndex, keyUpActionIndex;
35 int objectKeyDownActionIndex, objectKeyUpActionIndex;
36 BOOL mAcceptsFirstResponder;
37 BOOL useAutoInOutdent; // defaults false for SCTextViews, true for docs
38 NSMutableArray *completionDict;
40 - (void) setAcceptsFirstResponder: (BOOL) flag;
41 - (void) keyDown: (NSEvent*) event;
42 - (void) mouseDown: (NSEvent*) event;
43 - (void) mouseUpAction: (NSEvent*) theEvent index: (int) index;
45 - (void) setUsesAutoInOutdent: (bool)flag;
46 - (bool) usesAutoInOutdent;
48 - (IBAction) executeSelection: (id) sender;
49 - (void) autoIndent: (NSEvent*) event;
50 - (void)outdentBrack;
51 - (NSString*)currentlySelectedTextOrLine: (NSRange*) outRange;
52 - (NSString*)currentlySelectedText: (NSRange*) outRange;
53 - (void) setLangClassToCall: (NSString*) stringin withKeyDownActionIndex:(int) downIndex withKeyUpActionIndex:(int) upIndex ;
54 - (void) setObjectKeyDownActionIndex:(int) mindex setObjectKeyUpActionIndex:(int) downIndex;
55 - (void)setDefaultTabsTo:(float)value;
56 - (IBAction)openCode:(id)sender;
57 - (IBAction) showHelpFor: (id) sender;
58 - (IBAction)showHelpSearch:(id)sender;
60 - (IBAction)methodTemplates: (id)sender;
61 - (IBAction)methodReferences: (id)sender;
62 - (void) balanceParens: (id) sender;
63 - (NSArray*)completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger*)index;
65 // If completions textfile exists, ensures it's loaded. Returns false if fail or textfile not found
66 - (bool) loadCompletionDict;
67 @end
69 bool matchBraks(unsigned int *startpos, unsigned int *endpos, unichar *text, int length, unichar rightBrak, bool ignoreImmediateParens);
70 bool blankUnparsedChars(unichar* buffer, int length, bool process);