source: trunk/Cocoa/Pester/Source/NJRHotKeyManager.h@ 505

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

PSPreferencesController.[hm]: Added support for registering hot keys;
not the most elegant thing in the world, but much better than it was
in the prototype. Triggered by +readPreferences.

NJRHotKeyField.[hm]: Replaced model components (wow, was that ever
dumb) by NJRHotKey reference, eliminating cumbersome archiving model.
Added accessors for hot key.

NJRHotKeyManager.[hm]: Ported Quentin Carnicelli's HotKeyCenter code
to use NJRHotKey, cleaned up, and removed reverse-engineered pre-10.2
support.

NJRHotKey.[hm]: New. Provides Cocoa-centric storage for
three-component hot keys, mapping from Cocoa to Carbon modifiers.

PSApplication.m: Reorganized. Added invocation of
+[PSPreferencesController readPreferences].

Fixes bug 29.

File size: 719 bytes
RevLine 
[131]1//
2// NJRHotKeyManager.h
3// Pester
4//
5// Created by Nicholas Riley on Tue Apr 01 2003.
6// Copyright (c) 2003 Nicholas Riley. All rights reserved.
7//
8
9#import <Foundation/Foundation.h>
10
11@class NJRHotKey;
12
13@interface NJRHotKeyManager : NSObject {
14 BOOL shortcutsEnabled;
15 NSMutableDictionary *shortcuts;
16}
17
18+ (NJRHotKeyManager *)sharedManager;
19
20- (BOOL)addShortcutWithIdentifier:(NSString *)identifier hotKey:(NJRHotKey *)hotKey target:(id)target action:(SEL)action;
21- (void)removeShortcutWithIdentifier:(NSString *)identifier;
22
23- (NSArray *)shortcutIdentifiers;
24- (NJRHotKey *)hotKeyForShortcutWithIdentifier:(NSString *)identifier;
25
26- (void)setShortcutsEnabled:(BOOL)enabled;
27- (BOOL)shortcutsEnabled;
28
29
30@end
Note: See TracBrowser for help on using the repository browser.