More better names.
[enjoyable.git] / Classes / NJKeyInputField.h
index 84498ff..bc1876c 100644 (file)
@@ -11,16 +11,15 @@ extern const CGKeyCode NJKeyInputFieldEmpty;
 
 @protocol NJKeyInputFieldDelegate;
 
-@interface NJKeyInputField : NSTextField
+@interface NJKeyInputField : NSControl
     // An NJKeyInputField is a NSTextField-like widget that receives
     // exactly one key press, and displays the name of that key, then
     // resigns its first responder status. It can also inform a
     // special delegate when its content changes.
 
-+ (NSString *)stringForKeyCode:(CGKeyCode)keyCode;
-    // Give the string name for a virtual key code.
++ (NSString *)displayNameForKeyCode:(CGKeyCode)keyCode;
 
-@property (nonatomic, weak) IBOutlet id <NJKeyInputFieldDelegate, NSTextFieldDelegate> delegate;
+@property (nonatomic, weak) IBOutlet id <NJKeyInputFieldDelegate> delegate;
 
 @property (nonatomic, assign) CGKeyCode keyCode;
     // The currently displayed key code, or NJKeyInputFieldEmpty if no
@@ -28,16 +27,15 @@ extern const CGKeyCode NJKeyInputFieldEmpty;
     // inform the delegate.
 
 @property (nonatomic, readonly) BOOL hasKeyCode;
-    // True if any key is active, false otherwise.
+    // YES if any key is set, NO otherwise.
 
 - (void)clear;
     // Clear the currently active key and call the delegate.
 
 @end
 
-@protocol NJKeyInputFieldDelegate <NSObject>
+@protocol NJKeyInputFieldDelegate
 
-@optional
 - (void)keyInputField:(NJKeyInputField *)keyInput
          didChangeKey:(CGKeyCode)keyCode;
 - (void)keyInputFieldDidClear:(NJKeyInputField *)keyInput;