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

Last change on this file since 129 was 129, checked in by Nicholas Riley, 21 years ago

PSPreferencesController.[hm]: Manage preferences window, just like in
HostLauncher (and DockCam, I guess, though I didn't check.)

NJRHotKeyField.[hm], NJRHotKeyFieldCell.[hm]: Implements a NSTextField
subclass which intercepts every keyboard event it can, and turns it
into a human-readable representation. Don't ask me how many hours of
work this was.

English.lproj/MainMenu.nib: Hook up Preferences menu item.

English.lproj/Preferences.nib: Simple Preferences panel. One
NJRHotKeyField, one button, a couple of static text fields.

NSString-NJRExtensions.[hm]: Added method from HostLauncher (modified
to output attributed string, as it's needed in order to get the right
mix of fonts), -keyEquivalentAttributedStringWithModifierMask:.
Greatly broadened the number of keys which this method can process to
pretty much the entire extended keyboard.

NSFont-NJRExtensions.[hm]: Provide a class method for obtaining a
theme font as a NSFont.

File size: 696 bytes
RevLine 
[53]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
[129]20- (NSAttributedString *)keyEquivalentAttributedStringWithModifierMask:(unsigned int)modifierMask;
[53]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.