home *** CD-ROM | disk | FTP | other *** search
/ NeXTSTEP 3.0 / NeXTSTEP3.0.iso / NextDeveloper / Headers / appkit / Matrix.h < prev    next >
Text File  |  1992-02-07  |  6KB  |  195 lines

  1. /*
  2.     Matrix.h
  3.     Application Kit, Release 2.0
  4.     Copyright (c) 1988, 1989, 1990, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "Control.h"
  8. #import "color.h"
  9.  
  10. /* Matrix Constants */
  11.  
  12. #define NX_RADIOMODE        0
  13. #define NX_HIGHLIGHTMODE    1
  14. #define NX_LISTMODE        2
  15. #define NX_TRACKMODE        3
  16.  
  17. @interface Matrix : Control
  18. {
  19.     id                  cellList;
  20.     id                  target;
  21.     SEL                 action;
  22.     id                  selectedCell;
  23.     int                 selectedRow;
  24.     int                 selectedCol;
  25.     int                 numRows;
  26.     int                 numCols;
  27.     NXSize              cellSize;
  28.     NXSize              intercell;
  29.     float               backgroundGray;
  30.     float               cellBackgroundGray;
  31.     id                  font;
  32.     id                  protoCell;
  33.     id                  cellClass;
  34.     id                  nextText;
  35.     id                  previousText;
  36.     SEL                 doubleAction;
  37.     SEL                 errorAction;
  38.     id                  textDelegate;
  39.     struct _mFlags {
  40.     unsigned int        highlightMode:1;
  41.     unsigned int        radioMode:1;
  42.     unsigned int        listMode:1;
  43.     unsigned int        allowEmptySel:1;
  44.     unsigned int        autoscroll:1;
  45.     unsigned int        reaction:1;
  46.     unsigned int        selectionByRect:1;
  47.     unsigned int        _RESERVED:7;
  48.     unsigned int        _autosizeCells:1;
  49.     unsigned int        _drawingAncestor:1;
  50.     }                   mFlags;
  51.     unsigned short      _reservedMshort1;
  52.     unsigned int        _reservedMint1;
  53.     void            *_private;
  54. }
  55.  
  56. + initialize;
  57. + setCellClass:factoryId;
  58.  
  59. - initFrame:(const NXRect *)frameRect;
  60. - initFrame:(const NXRect *)frameRect mode:(int)aMode prototype:aCell numRows:(int)rowsHigh numCols:(int)colsWide;
  61. - initFrame:(const NXRect *)frameRect mode:(int)aMode cellClass:factoryId numRows:(int)rowsHigh numCols:(int)colsWide;
  62.  
  63. - free;
  64. - setCellClass:factoryId;
  65. - prototype;
  66. - setPrototype:aCell;
  67. - makeCellAt:(int)row :(int)col;
  68. - (int)mode;
  69. - setMode:(int)aMode;
  70. - setEmptySelectionEnabled:(BOOL)flag;
  71. - (BOOL)isEmptySelUE'onEnabled;
  72. - sendAction:(SEL)aSelector to:anObject forAllCells:(BOOL)flag;
  73. - cellList;
  74. - selectedCell;
  75. - getSelectedCells:(List *)aList;
  76. - (int)selectedRow;
  77. - (int)selectedCol;
  78. - setSelectionByRect:(BOOL)flag;
  79. - (BOOL)isSelectionByRect;
  80. - setSelectionFrom:(int)startPos to:(int)endPos anchor:(int)anchorPos lit:(BOOL)lit;
  81. - clearSelectedCell;
  82. - selectCellAt:(int)row :(int)col;
  83. - selectAll:sender;
  84. - selectCell:aCell;
  85. - selectCellWithTag:(int)anInt;
  86. - getCellSize:(NXSize *)theSize;
  87. - setCellSize:(const NXSize *)aSize;
  88. - getIntercell:(NXSize *)theSize;
  89. - setIntercell:(const NXSize *)aSize;
  90. - setEnabled:(BOOL)flag;
  91. - setScrollable:(BOOL)flag;
  92. - font;
  93. - setFont:fontObj;
  94. - (float)backgroundGray;
  95. - setBackgroundGray:(float)value;
  96. - setBackgroundColor:(NXColor)color;
  97. - (NXColor)backgroundColor;
  98. - setBackgroundTransparent:(BOOL)flag;
  99. - (BOOL)isBackgroundTransparent;
  100. - setCellBackgroundColor:(NXColor)color;
  101. - (NXColor)cellBackgroundColor;
  102. - setCellBackgroundTransparent:(BOOL)flag;
  103. - (BOOL)isCellBackgroundTransparent;
  104. - (float)cellBackgroundGray;
  105. - setCellBackgroundGray:(float)value;
  106. - setState:(int)value at:(int)row :(int)col;
  107. - setIcon:(const char *)iconName at:(int)row :(int)col;
  108. - setTitle:(const char *)aString at:(int)row :(int)col;
  109. - (int)cellCount;
  110. - getNumRows:(int *)rowCount numCols:(int *)colCount;
  111. - cellAt:(int)row :(int)col;
  112. - getCellFrame:(NXRect *)theRect at:(int)row :(int)col;
  113. - getRow:(int *)row andCol:(int *)col ofCell:aCell;
  114. - getRow:(int *)row andCol:(int *)col forPoint:(const NXPoint *)aPoint;
  115. - renewRows:(int)newRows cols:(int)newCols;
  116. - putCell:newCell at:(int)row :(int)col;
  117. - addRow;
  118. - insertRowAt:(int)row;
  119. - removeRowAt:(int)row andFree:(BOOL)flag;
  120. - addCol;
  121. - insertColAt:(int)col;
  122. - removeColAt:(int)col andFree:(BOOL)flag;
  123. - findCellWithTag:(int)anInt;
  124. - setTag:(int)anInt at:(int)row :(int)col;
  125. - target;
  126. - setTarget:anObject;
  127. - setTarget:anObject at:(int)row :(int)col;
  128. - (SEL)action;
  129. - setAction:(SEL)aSelector;
  130. - (SEL)doubleAction;
  131. - setDoubleAction:(SEL)aSelector;
  132. - (SEL)errorAction;
  133. - setErrorAction:(SEL)aSelector;
  134. - setAction:(SEL)aSelector at:(int)row :(int)col;
  135. - setTag:(int)anInt target:anObject action:(SEL)aSelector at:(int)row :(int)col;
  136. - setAutosizeCells:(BOOL)flag;
  137. - (BOOL)doesAutosizeCells;
  138. - sizeTo:(float)width :(float)height;
  139. - sizeToCells;
  140. - sizeToFit;
  141. - validateSize:(BOOL)flag;
  142. -UE(cSize;
  143. - drawCell:aCell;
  144. - drawCellInside:aCell;
  145. - drawCellAt:(int)row :(int)col;
  146. - highlightCellAt:(int)row :(int)col lit:(BOOL)flag;
  147. - drawSelf:(const NXRect *)rects :(int)rectCount;
  148. - display;
  149. - setAutoscroll:(BOOL)flag;
  150. - scrollCellToVisible:(int)row :(int)col;
  151. - setReaction:(BOOL)flag;
  152. - (int)mouseDownFlags;
  153. - mouseDown:(NXEvent *)theEvent;
  154. - (BOOL)performKeyEquivalent:(NXEvent *)theEvent;
  155. - sendAction:(SEL)theAction to:theTarget;
  156. - sendAction;
  157. - sendDoubleAction;
  158. - textDelegate;
  159. - setTextDelegate:anObject;
  160. - (BOOL)textWillEnd:textObject;
  161. - (BOOL)textWillChange:textObject;
  162. - textDidEnd:textObject endChar:(unsigned short)whyEnd;
  163. - textDidChange:textObject;
  164. - textDidGetKeys:textObject isEmpty:(BOOL)flag;
  165. - selectText:sender;
  166. - selectTextAt:(int)row :(int)col;
  167. - setPreviousText:anObject;
  168. - setNextText:anObject;
  169. - (BOOL)acceptsFirstMouse;
  170. - write:(NXTypedStream *)stream;
  171. - read:(NXTypedStream *)stream;
  172. - resetCursorRects;
  173.  
  174. /* 
  175.  * The following new... methods are now obsolete.  They remain in this  
  176.  * interface file for backward compatibility only.  Use Object's alloc method  
  177.  * and the init... methods defined in this class instead.
  178.  */
  179. + newFrame:(const NXRect *)frameRect;
  180. + newFrame:(const NXRect *)frameRect mode:(int)aMode prototype:aCell numRows:(int)rowsHigh numCols:(int)colsWide;
  181. + newFrame:(const NXRect *)frameRect mode:(int)aMode cellClass:factoryId numRows:(int)rowsHigh numCols:(int)colsWide;
  182.  
  183.  
  184. @end
  185.  
  186. #ifdef KANJI
  187. @interface Matrix(InputManager)
  188. - setIMEnabled:(BOOL)flag;
  189. @end
  190.  
  191. @interface Matrix(IMSupportDelegate)
  192. - (BOOL)textUsesIM:sender;
  193. @end
  194. #endif
  195.