home *** CD-ROM | disk | FTP | other *** search
/ Nebula / nebula.bin / SourceCode / MiniExamples / ConvertXYtoChar / TurboText.h < prev    next >
Text File  |  1991-10-04  |  920b  |  32 lines

  1. /* TurboText.h
  2.  * Purpose:  A subclass of the Text object.  This is necessary in order
  3.  *     to over-ride mouseDown.  The -convertPoint: method posts a fake
  4.  *    mouse up event at the desired x,y coordinate location.  It then sets
  5.  *    an internal flag and calls mouseDown with a fake mouse down event.
  6.  *    The end result is that the Text object will believe that the user has
  7.  *    clicked the mouse on the desired location and will cause a selection
  8.  *    at the appropriate point.
  9.  *
  10.  * You may freely copy, distribute, and reuse the code in this example.
  11.  * NeXT disclaims any warranty of any kind, expressed or  implied, as to its
  12.  * fitness for any particular use.
  13.  *
  14.  * Written by: Sharon Zakhour
  15.  * Created: 22/July/91
  16.  *
  17.  */
  18.  
  19. #import <appkit/Text.h>
  20.  
  21. @interface TurboText:Text
  22. {
  23.     BOOL convert;
  24.     int    charPos;
  25. }
  26.  
  27. - initFrame:(NXRect *)frameRect;
  28. - mouseDown:(NXEvent *)theEvent;
  29. - (int)convertPoint: (NXPoint *)myPoint;
  30.  
  31. @end
  32.