home *** CD-ROM | disk | FTP | other *** search
/ Altsys Virtuoso 2.0K / virtuoso_20k.iso / NeXTanswers / OpenStepSpec_rtf / ApplicationKit / Classes / NSMenu.rtf < prev    next >
Encoding:
Text File  |  1994-07-01  |  5.6 KB  |  102 lines

  1. {\rtf0\ansi\paperw16228 \paperh18648 \margl-907 \margr0 \margt0 \margb0 {\fonttbl\f0\fswiss Helvetica;\f1\froman Times;\f2\fmodern Courier;\f3\ftech Symbol;\f4\froman Palatino;}
  2. {\stylesheet{\s0 \li100 \fi0 \ri1007 \ql   1Head;}
  3. {\s1 \li100 \fi0 \ri1007 \ql   ClassName;}
  4. {\s2 \li2872 \fi-2771 \ri1007 \ql \tx2872   ConformsTo;}
  5. {\s3 \li2872 \fi-2771 \ri1007 \ql   DeclaredIn;}
  6. {\s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030   Description;}
  7. {\s5 \li7030 \fi-5796 \ri1007 \ql   DescriptionPart;}
  8. {\s6 \li0 \fi0 \ri0 \ql \tx-25 \tx8290 \tx9172   Footer;}
  9. {\s7 \li2872 \fi-2771 \ri1007 \ql \tx2872   InheritsFrom;}
  10. {\s8 \li100 \fi0 \ri1007 \ql   Summary;}
  11. }
  12. \li0 \fi0 \ri0 \ql \sb0 \f1 \fs24 
  13. (Preliminary Documentation) Copyright \f3 \'e3\f1 1994 by NeXT Computer, Inc.  All Rights Reserved.\
  14. \
  15. \s0 \li100 \fi0 \ri1007 \ql \f0 \b \fs36 \fs16 \
  16. \
  17. \
  18. \
  19. \
  20. \
  21. \
  22. \fs36 NSMenu \
  23. \pard \s7 \li2872 \fi-2771 \ri1007 \ql \tx2872 \f1 \b0 \fs28 \fs16 \
  24. \
  25. \
  26. \fs28 \f0 \b \fs28 Inherits From:    \b0 \fs28 \f1 NSPanel : NSWindow : NSResponder : NSObject \
  27. \fs16 \
  28. \fs28 \s3 \fs16 \fs28 \f0 \b \fs28 Declared In:    \b0 \fs28 \f1 appkit/NSMenu.h \
  29. \fs16 \
  30. \fs28 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs28 \fs16 \
  31. \
  32. \fs28 Creating a Menu Zone \
  33. \fs16 \
  34. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 + (void)\b setMenuZone:\b0 (NSZone *)\i zone\i0     Sets the zone from which NSMenus should be allocated.\
  35. \fi-6552 \fi-6552 \fi-6552 + (NSZone *)\b menuZone\b0     Returns the zone from which NSMenus should be allocated, creating one if necessary.\
  36. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  37. \
  38. \
  39. \fs28 Initializing a New NSMenu \
  40. \fs16 \
  41. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (id)\b initWithTitle:\b0 (NSString *)\i aTitle\i0     Initializes and returns a new NSMenu using \i aTitle\i0  for its title.\
  42. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  43. \
  44. \
  45. \fs28 Setting Up the Menu Commands \
  46. \fs16 \
  47. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (id)\b addItemWithTitle:\b0 (NSString *)\i aString\i0     Adds a new item with title \i aString\i0 , action \i aSelector\i0 , and   \
  48. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b action:\b0 (SEL)\i aSelector\i0         key equivalent \i charCode\i0  to the end of the NSMenu.  \
  49. \b keyEquivalent:\b0 (NSString *)\i charCode\i0          Returns the new NSMenuCell.\
  50. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (id)\b insertItemWithTitle:\b0 (NSString *)\i aString\i0      Adds a new item at \i index\i0  having the title \i aString\i0 , action \
  51. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b action:\b0 (SEL)\i aSelector\i0      \i     aSelector\i0 , and key equivalent \i charCode\i0 . Returns the\
  52. \b keyEquivalent:\b0 (NSString *)\i charCode\i0           new NSMenuCell.\
  53. \b atIndex:\b0 (unsigned int)\i index\
  54. \s4 \li7029 \fi-5794 \fi-6552 \i0 \fi-6552 {\f3 -} (void)\b setItemMatrix:\b0 (NSMatrix *)\i aMatrix\i0     Replaces the current matrix of items with \i aMatrix\i0 .\
  55. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSMatrix *)\b itemMatrix\b0     Returns the NSMenu\'27s Matrix of NSMenuCell items.\
  56. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  57. \
  58. \
  59. \fs28 Finding Menu Items \
  60. \fs16 \
  61. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (id)\b cellWithTag:\b0 (int)\i aTag\i0     Returns the NSMenuCell that has \i aTag\i0  as its tag.\
  62. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  63. \
  64. \
  65. \fs28 Building Submenus \
  66. \fs16 \
  67. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSMenuCell *)\b setSubmenu:\b0 (NSMenu *)\i aMenu\i0     Makes \i aMenu\i0  a submenu controlled by \i aCell\i0 .\
  68. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \b forItem:\b0 (NSMenuCell *)\i aCell\
  69. \s4 \li7029 \fi-5794 \fi-6552 \i0 \fi-6552 {\f3 -} (void)\b submenuAction:\b0 (id)\i sender\i0     Activates a submenu attached to sender\'27s NSMenu.\
  70. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  71. \
  72. \
  73. \fs28 Managing NSMenu Windows \
  74. \fs16 \
  75. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (NSMenu *)\b attachedMenu\b0     Returns the NSMenu attached to the receiver or \b nil\b0  if there\'27s no such object.\
  76. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b isAttached\b0     Returns YES if the receiver is attached to another menu and NO otherwise.\
  77. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (BOOL)\b isTornOff\b0     Returns NO if the receiver is attached to another menu (or if it\'27s the main menu) and YES otherwise.\
  78. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSPoint)\b locationForSubmenu:\b0 (NSMenu *)\i aSubmenu\
  79. \fi-6552 \s5 \li7030 \fi-6553 \fi-5796 \i0     Determines where to display an attached submenu when it\'27s brought up.\
  80. \s4 \li7029 \fi-5794 \fi-6552 \fi-6552 {\f3 -} (void)\b sizeToFit\b0     Resizes the NSMenu to exactly fit the command items.\
  81. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (NSMenu *)\b supermenu\b0     Returns the receiver\'27s supermenu.\
  82. \fi-6552 \pard \s8 \li100 \fi0 \ri1007 \ql \f0 \b \fs16 \
  83. \
  84. \
  85. \fs28 Displaying the Menu \
  86. \fs16 \
  87. \fs28 \pard \s4 \li7029 \fi-6552 \ri1007 \ql \tx6652 \tx7030 \f1 \b0 \fi-6552 {\f3 -} (BOOL)\b autoenablesItems\b0     Returns whether the NSMenu enables and disables its NSMenuCells.  (See the NSMenuActionResponder informal protocol.)\
  88. \fi-6552 \fi-6552 \fi-6552 {\f3 -} (void)\b setAutoenablesItems:\b0 (BOOL)\i flag\i0     Sets whether the NSMenu enables and disables its NSMenuCells.  (See the NSMenuActionResponder informal protocol.)\
  89. \fi-6552 \fi-6552 \fi-6552 \
  90. \fi-6552 \pard \s0 \li100 \fi0 \tx478 \tx856 \tx1234 \fs16 \
  91. \
  92. \fs28 \
  93. \fs16 \
  94. \
  95. \fs28 \ri1007 \fs28 \fs16 \fs28 \
  96. \fs16 \
  97. \
  98. \fs28 \fs16 \fs28 \
  99. \fs16 \
  100. \
  101. \fs28 }
  102.