home *** CD-ROM | disk | FTP | other *** search
/ OpenStep 4.2J (Developer) / os42jdev.iso / NextDeveloper / OpenStepConversion / IntermediateFrameworks3 / AppKit.framework / Headers / NSCStringText.h < prev    next >
Text File  |  1994-09-29  |  19KB  |  572 lines

  1. /*
  2.     Text.h
  3.     Application Kit, Release 2.1J
  4.     Copyright (c) 1988, NeXT, Inc.  All rights reserved. 
  5. */
  6.  
  7. #import "NSText.h"
  8. #import "NSView.h"
  9. #import "chunk.h"
  10. #import "NSColor.h"
  11. #import "NSFontManager.h"
  12. #import "NSSpellChecker.h"
  13. #import "NXRTFDErrors.h"
  14.  
  15. #ifdef KANJI
  16. typedef wchar_t wchar;                // Basic character type
  17. #else KANJI
  18. typedef unsigned char wchar;            // Basic character type
  19. #endif KANJI
  20.  
  21. #define NSTextBlockSize 512
  22.  
  23. typedef struct _NXTextBlock {
  24.     struct _NXTextBlock *next;        /* next text block in link list */
  25.     struct _NXTextBlock *prior;        /* previous text block in link list */
  26.     struct _tbFlags {
  27.     unsigned int    malloced:1;    /* true if block was malloced */
  28.     unsigned int    PAD:15;
  29.     } tbFlags;
  30.     short           chars;        /* number of chars in this block */
  31.     wchar  *text;            /* the text */
  32. } NSTextBlock;
  33.  
  34. /*
  35.  *  NXRun represents a single run of text w/ a given format
  36.  */
  37.   
  38. typedef struct {
  39.     unsigned int underline:1;
  40.     unsigned int dummy:1;        /* unused */
  41.     unsigned int subclassWantsRTF:1;
  42.     unsigned int graphic:1;
  43.     unsigned int forcedSymbol:1;    /* did alt-char force use to use symbol */
  44.     unsigned int RESERVED:11;
  45. } NSRunFlags;
  46.  
  47. typedef struct _NXRun {
  48.     id              font;    /* Font id */
  49.     int             chars;    /* number of chars in run */
  50.     void           *paraStyle;    /* implementation dependent paraStyle
  51.                  * sheet info. */
  52.     float        textGray;    /* text gray of current run */
  53.     int            textRGBColor;    /* text color negative if not set */
  54.     unsigned char   superscript;/* superscript in points */
  55.     unsigned char   subscript;    /* subscript in points */
  56.     id          info;    /* available for subclasses of Text */
  57.     NSRunFlags rFlags;
  58. } NSRun;
  59.  
  60. /*
  61.  *  NXRunArray is a NXChunk that holds the set of formats for a Text object
  62.  */
  63.  
  64. typedef struct _NXRunArray {
  65.     NSTextChunk         chunk;
  66.     NSRun           runs[1];
  67. } NSRunArray;
  68.  
  69. /*
  70.  * NXBreakArray is a NXChunk that holds line break information for a Text
  71.  * Object. it is mostly an array of line descriptors.  each line
  72.  * descriptor contains 3 fields: 
  73.  *
  74.  *     1) line change bit (sign bit), set if this line defines a new height 
  75.  *     2) paragraph end bit (next to sign bit), set if the end of this 
  76.  *       line ends the paragraph 
  77.  *     3) numbers of characters in the line (low order 14 bits) 
  78.  *
  79.  * if the line change bit is set, the descriptor is the first field of a
  80.  * NXHeightChange. since this record is bracketed by negative short
  81.  * values, the breaks array can be sequentially accessed backwards and
  82.  * forwards. 
  83.  */
  84.  
  85. #if m68k
  86. typedef short NSLineDesc;
  87. #else
  88. typedef    int NSLineDesc;
  89. #endif
  90.  
  91. typedef struct _NXHeightInfo {
  92.     float         newHeight;    /* line height from here forward */
  93.     float         oldHeight;    /* height before change */
  94.     NSLineDesc      lineDesc;    /* line descriptor */
  95. } NSHeightInfo;
  96.  
  97. typedef struct _NXHeightChange {
  98.     NSLineDesc      lineDesc;    /* line descriptor */
  99.     NSHeightInfo    heightInfo;
  100. } NSHeightChange;
  101.  
  102. typedef struct _NXBreakArray {
  103.     NSTextChunk         chunk;
  104.     NSLineDesc      breaks[1];
  105. } NSBreakArray;
  106.  
  107. /*
  108.  * NXLay represents a single run of text in a line and records
  109.  * everything needed to select or draw that piece.
  110.  */
  111.  
  112. typedef struct {
  113.     unsigned int mustMove:1;    /* unimplemented */
  114.     unsigned int isMoveChar:1;
  115.     unsigned int RESERVED:14;
  116. } NSLayFlags;
  117.  
  118. typedef struct _NXLay {
  119.     float         x;        /* x coordinate of moveto */
  120.     float         y;        /* y coordinate of moveto */
  121.     short           offset;    /* offset in line array for text */
  122.     short           chars;    /* number of characters in lay */
  123.     id              font;    /* font id */
  124.     void           *paraStyle;    /* implementation dependent fontStyle
  125.                  * sheet info. */
  126.     NSRun *run;            /* run for lay */
  127.     NSLayFlags        lFlags;
  128. } NSLay;
  129.  
  130. /*
  131.  *  NXLayArray is a NXChunk that holds the layout for the current line
  132.  */
  133.  
  134. typedef struct _NXLayArray {
  135.     NSTextChunk         chunk;
  136.     NSLay           lays[1];
  137. } NSLayArray;
  138.  
  139. /*
  140.  *  NXWidthArray is a NXChunk that holds the widths for the current line
  141.  */
  142.  
  143. typedef struct _NXWidthArray {
  144.     NSTextChunk         chunk;
  145.     float         widths[1];
  146. } NSWidthArray;
  147.  
  148. /*
  149.  *  NXCharArray is a NXChunk that holds the chars for the current line
  150.  */
  151.  
  152. typedef struct _NXCharArray {
  153.     NSTextChunk         chunk;
  154.     wchar       text[1];
  155. } NSCharArray;
  156.  
  157. /*
  158.  *  Word definition Finite State Machine transition struct
  159.  */
  160. typedef struct _NXFSM {
  161.     const struct _NXFSM  *next;    /* state to go to, NULL implies final state */
  162.     short           delta;    /* if final state, this undoes lookahead */
  163.     short           token;    /* if final state, < 0 word is newline,
  164.                  * = is dark, > is white space */
  165. } NSFSM;
  166.  
  167. /*
  168.  *  Represents one end of a selection
  169.  */
  170.  
  171. typedef struct _NXSelPt {
  172.     int             cp;        /* character position */
  173.     int             line;    /* offset of LineDesc in break table */
  174.     float         x;        /* x coordinate */
  175.     float         y;        /* y coordinate */
  176.     int             c1st;    /* character position of first character
  177.                  * on the line */
  178.     float         ht;        /* line height */
  179. } NSSelPt;
  180.  
  181. /*
  182.  *  describes tabstop
  183.  */
  184.  
  185. typedef struct _NXTabStop {
  186.     short           kind;    /* only NX_LEFTTAB implemented*/
  187.     float         x;        /* x coordinate for stop */
  188. } NSTabStop;
  189.  
  190. typedef struct _NXTextCache {
  191.     int curPos;            /* current position in text stream */
  192.     NSRun *curRun;        /* cache current block of text and */
  193.     int runFirstPos;        /* character pos that corresponds */
  194.     NSTextBlock *curBlock;    /* cache current block of text and */
  195.     int blockFirstPos;        /* character pos that corresponds */
  196. } NSTextCache;
  197.  
  198. typedef struct _NXLayInfo {
  199.     NSRect rect;        /* bounds rect for current line. */
  200.     float descent;        /* descent for current line, can be reset
  201.                  * by scanFunc */
  202.     float width;        /* width of line */
  203.     float left;        /* left side visible coordinate */
  204.     float right;        /* right side visible coordinate */
  205.     float rightIndent;    /* how much white space is left at right
  206.                  * side of line */
  207.     NSLayArray *lays;        /* scanFunc fills with NXLay items */
  208.     NSWidthArray *widths;    /* scanFunc fills with character widths */
  209.     NSCharArray *chars;        /* scanFunc fills with characters */
  210.     NSTextCache cache;        /* cache of current block & run */
  211.     NSRect *textClipRect;    /* if non-nil, the current clip for drawing */
  212.     struct _lFlags {
  213.     unsigned int horizCanGrow:1;/* 1 if scanFunc should perform dynamic
  214.                  * growing of x margins */
  215.     unsigned int vertCanGrow:1;/* 1 if scanFunc should perform dynamic
  216.                  * growing of y margins */
  217.     unsigned int erase:1;    /* used to tell drawFunc to erase before
  218.                  * drawing line  */
  219.     unsigned int ping:1;    /* used to tell drawFunc to ping server */
  220.     unsigned int endsParagraph:1;/* true if line ends the paragraph, eg
  221.                  * ends in newline */
  222.     unsigned int resetCache:1;/* used in scanFunc to reset local caches */
  223.     unsigned int RESERVED:10;
  224.     } lFlags;
  225. } NSLayInfo;
  226.  
  227. /*
  228.  *  Gives a paragraph fontStyle
  229.  */
  230.  
  231. typedef struct _NXTextStyle {
  232.     float         indent1st;    /* how far first line in paragraph is
  233.                  * indented */
  234.     float         indent2nd;    /* how far second line is indented */
  235.     float         lineHt;    /* line height */
  236.     float         descentLine;/* distance to ascent line from bottom of
  237.                  * line */
  238.     short           alignment;    /* justification */
  239.     short           numTabs;    /* number of tab stops */
  240.     NSTabStop      *tabs;    /* array of tab stops */
  241. } NSTextStyle;
  242.  
  243.  
  244. /* tab stop fontStyles */
  245.  
  246. enum {
  247.     NSLefttabKey            = 0,
  248.     NSBackspaceKey            = 8,
  249.     NSCarriageReturnKey            = 13,
  250.     NSDeleteKey                = 0x7f,
  251.     NSBacktabKey            = 25
  252. };
  253.  
  254. /* movement codes for movement between fields */
  255.  
  256. enum {
  257.     NSIllegalTextMovement        = 0,
  258.     NSReturnTextMovement        = 0x10,
  259.     NSTabTextMovement            = 0x11,
  260.     NSBacktabTextMovement        = 0x12,
  261.     NSLeftTextMovement            = 0x13,
  262.     NSRightTextMovement            = 0x14,
  263.     NSUpTextMovement            = 0x15,
  264.     NSDownTextMovement            = 0x16
  265. };
  266.  
  267. typedef enum {
  268.     NSLeftAlignedParagraph = NSLeftTextAlignment,
  269.     NSRightAlignedParagraph = NSRightTextAlignment,
  270.     NSCenterAlignedParagraph = NSCenterTextAlignment,
  271.     NSJustificationAlignedParagraph = NSJustifiedTextAlignment,
  272.     NSFirstIndentParagraph,
  273.     NSIndentParagraph,
  274.     NSAddTabParagraph,
  275.     NSRemoveTabParagraph,
  276.     NSLeftMarginParagraph,
  277.     NSRightMarginParagraph
  278. } NSParagraphProperty;
  279.  
  280.  
  281. /* 
  282.     Word tables for various languages.  The SmartLeft and SmartRight arrays
  283.     are suitable as arguments for the messages setPreSelSmartTable: and
  284.     setPostSelSmartTable.  When doing a paste, if the character to the left
  285.     (right) of the new word is not in the left (right) table, an extra space
  286.     is added on that side.  The CharCats tables define the character classes
  287.     used in the word wrap or click tables.  The BreakTables are finite state
  288.     machines that determine word wrapping.  The ClickTables are finite state
  289.     machines that determine which characters are selected when the user
  290.     double clicks.
  291. */
  292.  
  293. extern const unsigned char * const NSEnglishSmartLeftChars;
  294. extern const unsigned char * const NSEnglishSmartRightChars;
  295. extern const unsigned char * const NSEnglishCharCatTable;
  296. extern const NSFSM * const NSEnglishBreakTable;
  297. extern const int NSEnglishBreakTableSize;
  298. extern const NSFSM * const NSEnglishNoBreakTable;
  299. extern const int NSEnglishNoBreakTableSize;
  300. extern const NSFSM * const NSEnglishClickTable;
  301. extern const int NSEnglishClickTableSize;
  302.  
  303. extern const unsigned char * const NSCSmartLeftChars;
  304. extern const unsigned char * const NSCSmartRightChars;
  305. extern const unsigned char * const NSCCharCatTable;
  306. extern const NSFSM * const NSCBreakTable;
  307. extern const int NSCBreakTableSize;
  308. extern const NSFSM * const NSCClickTable;
  309. extern const int NSCClickTableSize;
  310.  
  311. typedef int (*NSTextFunc) (id self, NSLayInfo *layInfo);
  312. typedef unsigned short (*NSCharFilterFunc) (
  313.     unsigned short charCode, int flags, unsigned short charSet);
  314. typedef char  *(*NSTextFilterFunc) (
  315.     id self, unsigned char * insertText, int *insertLength, int position);
  316. #ifdef KANJI
  317. typedef BOOL (*NXclickFunc) ( id self, int clickPos, NSSelPt * left, NSSelPt * right ) ;
  318. #endif
  319.  
  320. @class NSText;
  321.  
  322. @interface NSCStringText : NSText
  323. {
  324.     const NSFSM        *breakTable;
  325.     const NSFSM        *clickTable;
  326.     const unsigned char *preSelSmartTable;
  327.     const unsigned char *postSelSmartTable;
  328.     const unsigned char *charCategoryTable;
  329.     char                delegateMethods;
  330.     NSCharFilterFunc    charFilterFunc;
  331.     NSTextFilterFunc    textFilterFunc;
  332.     char               *_compilerErrorSpacer;
  333.     NSTextFunc          scanFunc;
  334.     NSTextFunc          drawFunc;
  335.     id                  delegate;
  336.     int                 tag;
  337.     void           *cursorTE;
  338.     NSTextBlock        *firstTextBlock;
  339.     NSTextBlock        *lastTextBlock;
  340.     NSRunArray         *theRuns;
  341.     NSRun               typingRun;
  342.     NSBreakArray       *theBreaks;
  343.     int                 growLine;
  344.     int                 textLength;
  345.     float             maxY;
  346.     float             maxX;
  347.     NSRect              bodyRect;
  348.     float             borderWidth;
  349.     char                clickCount;
  350.     NSSelPt             sp0;
  351.     NSSelPt             spN;
  352.     NSSelPt             anchorL;
  353.     NSSelPt             anchorR;
  354.     NSSize              maxSize;
  355.     NSSize              minSize;
  356.     struct _tFlags {
  357. #ifdef __BIG_ENDIAN__
  358.         unsigned int        _editMode:2;
  359.         unsigned int        _selectMode:2;
  360.         unsigned int        _caretState:2;
  361.         unsigned int        changeState:1;
  362.         unsigned int        charWrap:1;
  363.         unsigned int        haveDown:1;
  364.         unsigned int        anchorIs0:1;
  365.         unsigned int        horizResizable:1;
  366.         unsigned int        vertResizable:1;
  367.         unsigned int        overstrikeDiacriticals:1;
  368.         unsigned int        monoFont:1;
  369.         unsigned int        disableFontPanel:1;
  370.         unsigned int        inClipView:1;
  371. #else
  372.         unsigned int        inClipView:1;
  373.         unsigned int        disableFontPanel:1;
  374.         unsigned int        monoFont:1;
  375.         unsigned int        overstrikeDiacriticals:1;
  376.         unsigned int        vertResizable:1;
  377.         unsigned int        horizResizable:1;
  378.         unsigned int        anchorIs0:1;
  379.         unsigned int        haveDown:1;
  380.         unsigned int        charWrap:1;
  381.         unsigned int        changeState:1;
  382.         unsigned int        _caretState:2;
  383.         unsigned int        _selectMode:2;
  384.         unsigned int        _editMode:2;
  385. #endif
  386.     }                   tFlags;
  387.     void               *_info;
  388.     NXStream           *textStream;
  389.     NSString           *_string;
  390. }
  391.  
  392. + excludeFromServicesMenu:(BOOL)flag;
  393. + getDefaultFont;
  394. + setDefaultFont:anObject;
  395.  
  396. - initFrame:(NSRect)frameRect text:(NSString *)theText alignment:(NSTextAlignment)mode;
  397.  
  398. - renewRuns:(NSRunArray *)newRuns text:(NSString *)newText frame:(NSRect)newFrame tag:(int)newTag;
  399. - renewFont:newFontId text:(NSString *)newText frame:(NSRect)newFrame tag:(int)newTag;
  400. - renewFont:(NSString *)newFontName size:(float)newFontSize style:(int)newFontStyle text:(NSString *)newText frame:(NSRect)newFrame tag:(int)newTag;
  401. - adjustPageHeightNew:(float *)newBottom top:(float)oldTop bottom:(float)oldBottom limit:(float)bottomLimit;
  402.  
  403. - (NSRect)paragraphRect:(int)prNumber start:(int *)startPos end:(int *)endPos;
  404. - setCharFilter:(NSCharFilterFunc)aFunc;
  405. - (NSCharFilterFunc)charFilter;
  406. - setTextFilter:(NSTextFilterFunc)aFunc;
  407. - (NSTextFilterFunc)textFilter;
  408. - (const unsigned char *)preSelSmartTable;
  409. - setPreSelSmartTable:(const unsigned char *)aTable;
  410. - (const unsigned char *)postSelSmartTable;
  411. - setPostSelSmartTable:(const unsigned char *)aTable;
  412. - (const unsigned char *)charCategoryTable;
  413. - setCharCategoryTable:(const unsigned char *)aTable;
  414. - (const NSFSM *)breakTable;
  415. - setBreakTable:(const NSFSM *)aTable;
  416. - (const NSFSM *)clickTable;
  417. - setClickTable:(const NSFSM *)aTable;
  418. - setTag:(int)anInt;
  419. - (int)tag;
  420. - (NSColor *)runColor: (NSRun *)run;
  421. - (NSColor *)selColor;
  422.  
  423. - finishReadingRichText;
  424. - startReadingRichText;
  425. - setRetainedWhileDrawing:(BOOL)aFlag;
  426. - (BOOL) isRetainedWhileDrawing;
  427. - (NSTextBlock *)firstTextBlock;
  428. - setScanFunc:(NSTextFunc)aFunc;
  429. - (NSTextFunc)scanFunc;
  430. - setDrawFunc:(NSTextFunc)aFunc;
  431. - (NSTextFunc)drawFunc;
  432. @end
  433.  
  434. @interface NSCStringText(NSFrameRect)
  435. - (void)resizeTextWithOldBounds:(NSRect)oldBounds maxRect:(NSRect)maxRect;
  436. @end
  437.  
  438. @interface NSCStringText(Layout)
  439. - (int)calcLine;
  440. - (void *)paragraphStyleForFont:fontId alignment:(int)alignment;
  441. - (BOOL)charWrap;
  442. - (float)descentLine;
  443. - getMarginLeft:(float *)leftMargin right:(float *)rightMargin top:(float *)topMargin bottom:(float *)bottomMargin;
  444. - getMinWidth:(float *)width minHeight:(float *)height maxWidth:(float)widthMax maxHeight:(float)heightMax;
  445. - (void *)defaultParaStyle;
  446. - (float)lineHeight;
  447. - setCharWrap:(BOOL)flag;
  448. - setDescentLine:(float)value;
  449. - setLineHeight:(float)value;
  450. - setMarginLeft:(float)leftMargin right:(float)rightMargin top:(float)topMargin bottom:(float)bottomMargin;
  451. - setNoWrap;
  452. - setParaStyle:(void *)paraStyle;
  453. @end
  454.  
  455. @interface NSCStringText(LinePosition)
  456. - (int)lineFromPosition:(int)position;
  457. - (int)positionFromLine:(int)line;
  458. @end
  459.  
  460. @interface NSCStringText(Event)
  461. - clear:sender;
  462. - moveCaret:(unsigned short)theKey;
  463. - becomeKeyWindow;
  464. - selectText:sender;
  465. @end
  466.  
  467. @interface NSCStringText(Selection)
  468. - setSel:(int)start :(int)end;
  469. - getSel:(NSSelPt *)start :(NSSelPt *)end;
  470. - hideCaret;
  471. - (BOOL)isSelectable;
  472. - replaceSel:(NSString *)aString;
  473. - replaceSel:(NSString *)aString length:(int)length;
  474. - replaceSel:(NSString *)aString length:(int)length runs:(NSRunArray *)insertRuns;
  475. - scrollSelToVisible;
  476. - selectError;
  477. - selectNull;
  478. - setSelColor:(NSColor *) color;
  479. - showCaret;
  480. - validRequestorForSendType:(NSString *)sendType andReturnType:(NSString *)returnType;
  481. - readSelectionFromPasteboard:pboard;
  482. - (BOOL)writeSelectionToPasteboard:pboard types:(NSArray *)types;
  483. @end
  484.  
  485. @interface NSCStringText(NSFont)
  486. - setFont:fontObj paraStyle:(void *)paraStyle;
  487. - setSelFontFamily:(NSString *)fontName;
  488. - setSelFontSize:(float)size;
  489. - setSelFontStyle:(NSFontTraitMask)traits;
  490. - setSelFont:fontId;
  491. - setSelFont:fontId paraStyle:(void *)paraStyle;
  492. - changeTabStopAt:(float)oldX to:(float)newX;
  493. - setSelProp:(NSParagraphProperty)prop to:(float)val;
  494. @end
  495.  
  496. @interface NSCStringText(Graphics)
  497. - replaceSelWithCell:cell;
  498. - (NSPoint)locationOfCell:cell;
  499. - setLocation:(NSPoint)origin ofCell:cell;
  500. + registerDirective:(NSString *)directive forClass:class;
  501. @end
  502.  
  503. @interface NSCStringText(Find)
  504. - (BOOL)findText:(NSString *)textPattern ignoreCase:(BOOL) ignoreCase backwards:(BOOL) backwards wrap:(BOOL) wrap;
  505. @end
  506.  
  507. @interface NSObject(TextDelegate)
  508. - textWillResize:textObject;
  509. - (NSRect)textDidResize:textObject oldBounds:(NSRect)oldBounds;
  510. - textWillSetSel:textObject toFont:font;
  511. - textWillConvert:textObject fromFont:from toFont:to;
  512. - textWillStartReadingRichText:textObject;
  513. - textWillFinishReadingRichText:textObject;
  514. - (NSSize)textWillWrite:textObject;
  515. - textDidRead:textObject paperSize:(NSSize)paperSize;
  516. @end
  517.  
  518. @interface NSObject(TextCell)
  519. /*
  520.  * Any object added to the Text object via replaceSelWithCell: must
  521.  * respond to all of the following messages:
  522.  */
  523. - highlight:(NSRect)cellFrame inView:controlView lit:(BOOL)flag;
  524. - drawSelf:(NSRect)cellFrame inView:controlView;
  525. - (BOOL)trackMouse:(NSEvent *)theEvent inRect:(NSRect)cellFrame ofView:controlView untilMouseUp:(BOOL)untilMouseUp;
  526. - (NSSize)cellSize;
  527. - readRichText:(NXStream *)stream forView:view;
  528. - (NSString *)richTextForView:view;
  529. @end
  530.  
  531.  
  532. extern void NSTextFontInfo(
  533.     id fid, float *ascender, float *descender, float *lineHt);
  534. extern int NSScanALine(id self, NSLayInfo *layInfo);
  535. extern int NSDrawALine(id self, NSLayInfo *layInfo);
  536. extern unsigned short NSFieldFilter(
  537.     unsigned short theChar, int flags, unsigned short charSet);
  538. extern unsigned short NSEditorFilter(
  539.     unsigned short theChar, int flags, unsigned short charSet);
  540. extern void NSSetTextCache(id self, NSTextCache *cache, int pos);
  541. extern int NSAdjustTextCache(id self, NSTextCache *cache, int pos);
  542. extern void NSFlushTextCache(id self, NSTextCache *cache);
  543. extern NSData *NSDataWithWordTable(const unsigned char *smartLeft,
  544.         const unsigned char *smartRight,
  545.         const unsigned char *charClasses,
  546.         const NSFSM *wrapBreaks, int wrapBreaksCount,
  547.         const NSFSM *clickBreaks, int clickBreaksCount, BOOL charWrap);
  548. extern void NSReadWordTable(NSZone *zone, NSData *data,
  549.         unsigned char **smartLeft, unsigned char **smartRight,
  550.         unsigned char **charClasses,
  551.         NSFSM **wrapBreaks, int *wrapBreaksCount,
  552.         NSFSM **clickBreaks, int *clickBreaksCount,
  553.         BOOL *charWrap);
  554. #ifdef KANJI
  555. extern BOOL NSClick ( id self, int clickPos, NSSelPt * left, NSSelPt * right );
  556. #endif
  557.  
  558. typedef struct {
  559.     unsigned char primary[256];
  560.     unsigned char secondary[256];
  561.     unsigned char primaryCI[256];
  562.     unsigned char secondaryCI[256];
  563. } NXStringOrderTable;
  564.  
  565. extern int NSOrderStrings(const unsigned char *s1, const unsigned char *s2, BOOL caseSensitive, int length, NXStringOrderTable *table);
  566. extern NXStringOrderTable *NSDefaultStringOrderTable(void);
  567.  
  568. @interface NSCStringText(ObsoleteAfterColorConversion)
  569. - setSelGray:(float)value;
  570. - (float)runGray: (NSRun *)run;
  571. @end
  572.