home *** CD-ROM | disk | FTP | other *** search
/ OpenStep (Enterprise) / OpenStepENTCD.toast / OEDEV / DEV.Z / NSResponder.h < prev    next >
Text File  |  1996-09-09  |  5KB  |  164 lines

  1. /*
  2.         NSResponder.h
  3.         Application Kit
  4.         Copyright (c) 1994-1996, NeXT Software, Inc.
  5.         All rights reserved.
  6. */
  7.  
  8. #import <Foundation/Foundation.h>
  9. #import <AppKit/NSEvent.h>
  10.  
  11. @class NSMenu;
  12.  
  13. @interface NSResponder : NSObject <NSCoding>
  14. {
  15.     id _nextResponder;
  16. }
  17.  
  18. - (NSResponder *)nextResponder;
  19. - (void)setNextResponder:(NSResponder *)aResponder;
  20. - (BOOL)tryToPerform:(SEL)anAction with:(id)anObject;
  21. - (BOOL)performKeyEquivalent:(NSEvent *)theEvent;
  22. - (id)validRequestorForSendType:(NSString *)sendType returnType:(NSString *)returnType;
  23. - (void)mouseDown:(NSEvent *)theEvent;
  24. - (void)rightMouseDown:(NSEvent *)theEvent;
  25. - (void)mouseUp:(NSEvent *)theEvent;
  26. - (void)rightMouseUp:(NSEvent *)theEvent;
  27. - (void)mouseMoved:(NSEvent *)theEvent;
  28. - (void)mouseDragged:(NSEvent *)theEvent;
  29. - (void)rightMouseDragged:(NSEvent *)theEvent;
  30. - (void)mouseEntered:(NSEvent *)theEvent;
  31. - (void)mouseExited:(NSEvent *)theEvent;
  32. - (void)keyDown:(NSEvent *)theEvent;
  33. - (void)keyUp:(NSEvent *)theEvent;
  34. - (void)flagsChanged:(NSEvent *)theEvent;
  35. - (void)noResponderFor:(SEL)eventSelector;
  36. - (BOOL)acceptsFirstResponder;
  37. - (BOOL)becomeFirstResponder;
  38. - (BOOL)resignFirstResponder;
  39.  
  40. #ifndef STRICT_OPENSTEP
  41. - (void)interpretKeyEvents:(NSArray *)eventArray;
  42. - (void)flushBufferedKeyEvents;
  43.  
  44. - (void)setMenu:(NSMenu *)menu;
  45. - (NSMenu *)menu;
  46.  
  47. - (void)showContextHelp:(id)sender;
  48. #endif
  49.  
  50. - (void)helpRequested:(NSEvent *)eventPtr;
  51.  
  52. @end
  53.  
  54. #ifndef STRICT_OPENSTEP
  55. @interface NSResponder(NSKeyboardUI)
  56. - (BOOL)performMnemonic:(NSString *)theString;
  57. @end
  58. #endif
  59.  
  60. #ifndef STRICT_OPENSTEP
  61. @interface NSResponder (NSStandardKeyBindingMethods)
  62.  
  63. // This category contains a large number of methods intended for use as key binding commands.  NSResponder does not implement any of them.  NSTextView implements a certain subset of them (see the NSTextView.h header).  Your responder subclasses can implement any that make sense.  You can make up your own as well, but you should use these if the concepts map.  If your view is key and uses key binding and the user types a key sequence which is bound to a command which is not implemented in your class, it is OK, nothing will happen by default.
  64.  
  65. /************************* Key binding entry-points *************************/
  66.  
  67. - (void)insertText:(NSString *)insertString;
  68.     // When key events have been passed off to the key binding mechanism through interpretKeyEvents:, they end up back in the view through either this method or the below doCommand... methods.  insertText: is used to pass through text that was not a command.
  69.  
  70. - (void)doCommandBySelector:(SEL)aSelector;
  71.     // Performs the given selector if possible.
  72.  
  73. /************************* Standard bindable commands *************************/
  74.  
  75.     /* Selection movement and scrolling */
  76.  
  77. - (void)moveForward:(id)sender;
  78. - (void)moveRight:(id)sender;
  79. - (void)moveBackward:(id)sender;
  80. - (void)moveLeft:(id)sender;
  81. - (void)moveUp:(id)sender;
  82. - (void)moveDown:(id)sender;
  83. - (void)moveWordForward:(id)sender;
  84. - (void)moveWordBackward:(id)sender;
  85. - (void)moveToBeginningOfLine:(id)sender;
  86. - (void)moveToEndOfLine:(id)sender;
  87. - (void)moveToBeginningOfParagraph:(id)sender;
  88. - (void)moveToEndOfParagraph:(id)sender;
  89. - (void)moveToEndOfDocument:(id)sender;
  90. - (void)moveToBeginningOfDocument:(id)sender;
  91. - (void)pageDown:(id)sender;
  92. - (void)pageUp:(id)sender;
  93. - (void)centerSelectionInVisibleArea:(id)sender;
  94.  
  95. - (void)moveBackwardAndModifySelection:(id)sender;
  96. - (void)moveForwardAndModifySelection:(id)sender;
  97. - (void)moveWordForwardAndModifySelection:(id)sender;
  98. - (void)moveWordBackwardAndModifySelection:(id)sender;
  99. - (void)moveUpAndModifySelection:(id)sender;
  100. - (void)moveDownAndModifySelection:(id)sender;
  101.  
  102. - (void)scrollPageUp:(id)sender;
  103. - (void)scrollPageDown:(id)sender;
  104. - (void)scrollLineUp:(id)sender;
  105. - (void)scrollLineDown:(id)sender;
  106.  
  107.     /* Graphical Element transposition */
  108.  
  109. - (void)transpose:(id)sender;
  110. - (void)transposeWords:(id)sender;
  111.  
  112.     /* Selections */
  113.  
  114. - (void)selectAll:(id)sender;
  115. - (void)selectParagraph:(id)sender;
  116. - (void)selectLine:(id)sender;
  117. - (void)selectWord:(id)sender;
  118.  
  119.     /* Insertions and Indentations */
  120.  
  121. - (void)indent:(id)sender;
  122. - (void)insertTab:(id)sender;
  123. - (void)insertBacktab:(id)sender;
  124. - (void)insertNewline:(id)sender;
  125. - (void)insertParagraphSeparator:(id)sender;
  126. - (void)insertNewlineIgnoringFieldEditor:(id)sender;
  127. - (void)insertTabIgnoringFieldEditor:(id)sender;
  128.  
  129.     /* Case changes */
  130.  
  131. - (void)changeCaseOfLetter:(id)sender;
  132. - (void)uppercaseWord:(id)sender;
  133. - (void)lowercaseWord:(id)sender;
  134. - (void)capitalizeWord:(id)sender;
  135.  
  136.     /* Deletions */
  137.  
  138. - (void)deleteForward:(id)sender;
  139. - (void)deleteBackward:(id)sender;
  140. - (void)deleteWordForward:(id)sender;
  141. - (void)deleteWordBackward:(id)sender;
  142. - (void)deleteToBeginningOfLine:(id)sender;
  143. - (void)deleteToEndOfLine:(id)sender;
  144. - (void)deleteToBeginningOfParagraph:(id)sender;
  145. - (void)deleteToEndOfParagraph:(id)sender;
  146.  
  147. - (void)yank:(id)sender;
  148.  
  149.     /* Completion */
  150.  
  151. - (void)complete:(id)sender;
  152.  
  153.     /* Mark/Point manipulation */
  154.  
  155. - (void)setMark:(id)sender;
  156. - (void)deleteToMark:(id)sender;
  157. - (void)selectToMark:(id)sender;
  158. - (void)swapWithMark:(id)sender;
  159.  
  160. @end
  161.  
  162. #endif /* !STRICT_OPENSTEP */
  163.  
  164.