summaryrefslogtreecommitdiff
path: root/QSFoundation.framework/Versions/A/PrivateHeaders/NDHotKeyControl.h
blob: 511d37fee70324508815d4ad0e8cda0eaaa13c7a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
/*!
	@header NDHotKeyControl.h
	@abstract Header file for a subclass of NSTextField for getting hot key combinations from the user.
	@discussion The <tt>NDHotKeyControl</tt> can be used to get a  <tt>NDHotKeyEvent</tt> for the last key combination pressed by the user.
 
	Created by Nathan Day on Wed Mar 05 2003.
	Copyright (c) 2002 Nathan Day. All rights reserved.
 */

#import <AppKit/AppKit.h>

@class	NDHotKeyEvent;

/*!
	@class NDHotKeyControl
	@abstract Subclass of NSTextField for getting hot key combinations from the user.
	@discussion The <tt>NDHotKeyControl</tt> can be used to get a  <tt>NDHotKeyEvent</tt> for the last key combination pressed by the user.
 */
@interface NDHotKeyControl : NSTextField
{
@private
	unsigned short		keyCode;
	unichar				character;
	unsigned long		modifierFlags;
}

/*!
	@method keyCode
	@abstract Get key code.
	@discussion Returns the key code for the last key combination the user pressed while the reciever was active.
	@result A <tt>unsigned short</tt> containing key code.
 */
- (unsigned short)keyCode;

/*!
	@method character
	@abstract Get unicode character.
	@discussion Returns the unicode character for the last key combination the user pressed while the reciever was active.
	@result A <tt>unichar</tt> containing character.
 */
- (unichar)character;

/*!
	@method modifierFlags
	@abstract Get modifer flags.
	@discussion Returns the modifer flags for the last key combination the user pressed while the reciever was active.
	@result A <tt>unsigned long</tt> containing modifer flags.
 */
- (unsigned long)modifierFlags;

/*!
	@method hotKeyEvent
	@abstract Get <tt>NDHotKeyEvent</tt>
	@discussion Returns the <tt>NDHotKeyEvent</tt> instance for the last key combination the user pressed while the reciever was active. The <tt>NDHotKeyEvent</tt> returned will either be one that has already been created or a newly created one otherwise.
	@result A <tt>NDHotKeyEvent</tt> for the hot key event.
 */
- (NDHotKeyEvent *)hotKeyEvent;

@end