diff options
Diffstat (limited to 'Source/SPNarrowDownCompletion.h')
-rw-r--r-- | Source/SPNarrowDownCompletion.h | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/Source/SPNarrowDownCompletion.h b/Source/SPNarrowDownCompletion.h new file mode 100644 index 00000000..baabb240 --- /dev/null +++ b/Source/SPNarrowDownCompletion.h @@ -0,0 +1,65 @@ +// +// $Id: SPNarrowDownCompletion.h 744 2009-05-22 20:00:00Z bibiko $ +// +// SPGrowlController.h +// sequel-pro +// +// Created by Hans-J. Bibiko on May 14, 2009. +// +// This class is based on TextMate's TMDIncrementalPopUp implementation +// (Dialog plugin) written by Joachim MÃ¥rtensson, Allan Odgaard, and H.-J. Bibiko. +// see license: http://svn.textmate.org/trunk/LICENSE +// +// This program is free software; you can redistribute it and/or modify +// it under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 2 of the License, or +// (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA +// +// More info at <http://code.google.com/p/sequel-pro/> + +#import <Cocoa/Cocoa.h> + +#define SP_NARROWDOWNLIST_MAX_ROWS 15 + +#ifndef enumerate +#define enumerate(container,var) for(NSEnumerator* _enumerator = [container objectEnumerator]; var = [_enumerator nextObject]; ) +#endif + +#ifndef sizeofA +#define sizeofA(a) (sizeof(a)/sizeof(a[0])) +#endif + + +@interface SPNarrowDownCompletion : NSWindow { + + NSArray* suggestions; + NSMutableString* mutablePrefix; + NSString* staticPrefix; + NSArray* filtered; + NSTableView* theTableView; + NSPoint caretPos; + BOOL isAbove; + BOOL closeMe; + BOOL caseSensitive; + NSFont *tableFont; + NSRange theCharRange; + id theView; + + NSMutableCharacterSet* textualInputCharacters; + +} + +- (id)initWithItems:(NSArray*)someSuggestions alreadyTyped:(NSString*)aUserString staticPrefix:(NSString*)aStaticPrefix additionalWordCharacters:(NSString*)someAdditionalWordCharacters caseSensitive:(BOOL)isCaseSensitive charRange:(NSRange)initRange inView:(id)aView; +- (void)setCaretPos:(NSPoint)aPos; +- (void)insert_text:(NSString* )aString; + +@end |