supernova: allocators - fix construct method
[supercollider.git] / editors / scapp / include / SCTextView.h
blob2f075721aac84c128a3af7e825dca71272efc469
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>
22 #import "TextFinder.h"
24 #if __LP64__
25 typedef long NSInteger;
26 typedef unsigned long NSUInteger;
27 #else
28 typedef int NSInteger;
29 typedef unsigned int NSUInteger;
30 #endif
32 @interface SCTextView : NSTextView
34 NSString *langClassToCall;
35 int keyDownActionIndex, keyUpActionIndex;
36 int objectKeyDownActionIndex, objectKeyUpActionIndex;
37 BOOL mAcceptsFirstResponder;
38 BOOL useAutoInOutdent; // defaults false for SCTextViews, true for docs
39 NSMutableArray *completionDict;
41 - (void) setAcceptsFirstResponder: (BOOL) flag;
42 - (void) keyDown: (NSEvent*) event;
43 - (void) mouseDown: (NSEvent*) event;
44 - (void) mouseUpAction: (NSEvent*) theEvent index: (int) index;
46 - (void) setUsesAutoInOutdent: (bool)flag;
47 - (bool) usesAutoInOutdent;
49 - (IBAction) executeSelection: (id) sender;
50 - (void) autoIndent: (NSEvent*) event;
51 - (void)outdentBrack;
52 - (NSString*)currentlySelectedTextOrLine: (NSRange*) outRange;
53 - (NSString*)currentlySelectedText: (NSRange*) outRange;
54 - (void) setLangClassToCall: (NSString*) stringin withKeyDownActionIndex:(int) downIndex withKeyUpActionIndex:(int) upIndex ;
55 - (void) setObjectKeyDownActionIndex:(int) mindex setObjectKeyUpActionIndex:(int) downIndex;
56 - (void)setDefaultTabsTo:(float)value;
57 - (IBAction)openCode:(id)sender;
58 - (IBAction) showHelpFor: (id) sender;
59 - (IBAction)showHelpSearch:(id)sender;
61 - (IBAction)methodTemplates: (id)sender;
62 - (IBAction)methodReferences: (id)sender;
63 - (void) balanceParens: (id) sender;
64 - (NSArray*)completionsForPartialWordRange:(NSRange)charRange indexOfSelectedItem:(NSInteger*)index;
66 // If completions textfile exists, ensures it's loaded. Returns false if fail or textfile not found
67 - (bool) loadCompletionDict;
69 // redirect to TextFinder
70 - (void)cmdF:(id)sender;
71 @end
73 bool matchBraks(unsigned int *startpos, unsigned int *endpos, unichar *text, int length, unichar rightBrak, bool ignoreImmediateParens);
74 bool blankUnparsedChars(unichar* buffer, int length, bool process);