This is TurboText.h in view mode; [Download] [Up]
/* TurboText.h * Purpose: A subclass of the Text object. This is necessary in order * to over-ride mouseDown. The -convertPoint: method posts a fake * mouse up event at the desired x,y coordinate location. It then sets * an internal flag and calls mouseDown with a fake mouse down event. * The end result is that the Text object will believe that the user has * clicked the mouse on the desired location and will cause a selection * at the appropriate point. * * You may freely copy, distribute, and reuse the code in this example. * NeXT disclaims any warranty of any kind, expressed or implied, as to its * fitness for any particular use. * * Written by: Sharon Zakhour * Created: 22/July/91 * */ #import <appkit/Text.h> @interface TurboText:Text { BOOL convert; int charPos; } - initFrame:(NXRect *)frameRect; - mouseDown:(NXEvent *)theEvent; - (int)convertPoint: (NXPoint *)myPoint; @end
These are the contents of the former NiCE NeXT User Group NeXTSTEP/OpenStep software archive, currently hosted by Netfuture.ch.