source: trunk/Cocoa/Pester/Source/NSString-NJRExtensions.h@ 312

Last change on this file since 312 was 130, checked in by Nicholas Riley, 22 years ago

PSPreferencesController.[hm]: Filter hot keys. Read and write to
preferences.

NJRHotKeyField.[hm]: Added property list serialization of hot key data
(not quite like PSAlarm/Alert because we're a GUI element). Added
delegate method for hot key filtering and action triggering when hot
key set or cleared. Only use filtered modifiers to avoid bizarre
behavior. More bug fixes.

English.lproj/Preferences.nib: Connected Clear button. Connected
NJRHotKeyField delegate and target to PSPreferencesController.

NSString-NJRExtensions.[hm]: Replaced "...modifierMask" with
"...modifierFlags" because it's more appropriate.

File size: 698 bytes
Line 
1//
2// NSString-NJRExtensions.h
3// Pester
4//
5// Created by Nicholas Riley on Mon Dec 16 2002.
6// Copyright (c) 2002 Nicholas Riley. All rights reserved.
7//
8
9#import <AppKit/AppKit.h>
10
11
12@interface NSString (NJRExtensions)
13
14- (NSAttributedString *)small;
15- (NSAttributedString *)smallBold;
16- (NSAttributedString *)underlined;
17
18+ (NSString *)ellipsisString;
19
20- (NSAttributedString *)keyEquivalentAttributedStringWithModifierFlags:(unsigned int)modifierFlags;
21
22@end
23
24@interface NSMutableString (NJRExtensions)
25
26- (void)truncateToLength:(unsigned)maxLength by:(NSLineBreakMode)method;
27- (void)truncateToWidth:(float)maxWidth by:(NSLineBreakMode)method withAttributes:(NSDictionary *)attributes;
28
29@end
Note: See TracBrowser for help on using the repository browser.