source: trunk/ICeCoffEE/ICeCoffEE/ICeCoffEE.h@ 375

Last change on this file since 375 was 375, checked in by Nicholas Riley, 16 years ago

ICeCoffEE.[hm]: Restore ICCF_CheckRange, moved in [322], as we don't
want the range limited in TestParser.

ICeCoffEEParser.m: Remove ICCF_CheckRange. Comment out expandFront
URL/parens stuff; it's as yet untested. Handle {...} in URLs. Don't
assert when )/} is last character in string. Fix indentation.

ICeCoffEE.xcodeproj: Link TestParser to Cocoa normally. Remove
obsolete build settings.

TestParser.m: Stub out ICCF_CheckRange. Test beginning with
one-character ranges all the way through the string. Output summary
stats at end.

File size: 1.8 KB
Line 
1/* ICeCoffEE */
2
3#import "ICeCoffEESuper.h"
4#import "ICeCoffEEShared.h"
5#import "ICeCoffEEConfig.h"
6
7#define ICCF_OSErrAssert(err, context) NSAssert(err == noErr || err == userCanceledErr, ICCF_ErrString(err, context));
8#define ICCF_OSErrCAssert(err, context) NSCAssert(err == noErr || err == userCanceledErr, ICCF_ErrString(err, context));
9
10// search for: (?<!ICCF_LocalizedString\()(?<!ICLog\()(?<!ICapeprintf("\()(?<!%)(@"(?!Internal error: )[^"]+") replace with: ICCF_LocalizedString(\1)
11#define ICCF_LocalizedString(key) \
12 [(NSString *)CFBundleCopyLocalizedString(ICCF_bundle, (CFStringRef)(key), CFSTR(""), NULL) autorelease]
13
14// returns an explanation for the provided OSStatus in the supplied
15// if nil is returned, the error is harmless (e.g., user cancelled)
16NSString *ICCF_ErrString(OSStatus err, NSString *context);
17
18// handles an exception as specified by ICError* preferences
19// if NO is returned, the exception is harmless (e.g., user cancelled)
20BOOL ICCF_HandleException(NSException *e);
21
22// returns YES if the event is a command-mouse down
23BOOL ICCF_EventIsCommandMouseDown(NSEvent *e);
24
25// returns the action determined by the event's keyboard modifiers
26iccfURLAction ICCF_KeyboardAction(NSEvent *e);
27
28// throws an exception if the URL range is nonexistent or too big
29void ICCF_CheckRange(NSRange range);
30
31// calls ICCF_DoURLAction
32// returns YES unless the user cancelled
33BOOL ICCF_LaunchURL(NSString *string, iccfURLAction action);
34
35// launch URL from on selected text view cursor position or selection
36void ICCF_LaunchURLFromTextView(NSTextView *self, NSEvent *triggeringEvent);
37
38// returns contextual menu with Services item added, if selected
39NSMenu *ICCF_MenuForEvent(NSView *self, NSMenu *contextMenu, NSEvent *e);
40
41// adds or removes services menu in menu bar
42void ICCF_AddRemoveServicesMenu();
43
44@interface ICeCoffEE : ICeCoffEESuper
45
46@end
Note: See TracBrowser for help on using the repository browser.