source: trunk/Cocoa/Pester/Source/NJRHotKeyField.h@ 130

Last change on this file since 130 was 130, checked in by Nicholas Riley, 19 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: 673 bytes
Line 
1//
2// NJRHotKeyField.h
3// Pester
4//
5// Created by Nicholas Riley on Sat Mar 29 2003.
6// Copyright (c) 2003 Nicholas Riley. All rights reserved.
7//
8
9#import <AppKit/AppKit.h>
10
11
12@interface NJRHotKeyField : NSTextField {
13 NSString *hotKeyCharacters;
14 unsigned hotKeyModifierFlags;
15 unsigned short hotKeyCode;
16}
17
18- (IBAction)clear:(id)sender;
19
20- (NSDictionary *)propertyListRepresentation;
21- (void)setFromPropertyList:(NSDictionary *)dict;
22
23@end
24
25@interface NSObject (NJRHotKeyFieldDelegate)
26
27- (BOOL)hotKeyField:(NJRHotKeyField *)hotKeyField shouldAcceptCharacter:(unichar)keyChar modifierFlags:(unsigned)modifierFlags rejectionMessage:(NSString **)message;
28
29@end
Note: See TracBrowser for help on using the repository browser.