|
|
1.1 ! root 1: #if 0 ! 2: ! 3: PressureView.h -- Pressure sensitive View subclass for painting ! 4: ! 5: by Peter Graffagnino, NeXT Computer Inc. ! 6: ! 7: You may freely copy, distribute, and reuse the code in this example. ! 8: NeXT disclaims any warranty of any kind, expressed or implied, as to its ! 9: fitness for any particular use. ! 10: ! 11: #endif ! 12: ! 13: #import <appkit/View.h> ! 14: ! 15: @interface PressureView : View ! 16: { ! 17: id proximityText; ! 18: id backingImage; ! 19: id brush; ! 20: BOOL pressureState; ! 21: BOOL coalesceState; ! 22: } ! 23: ! 24: ! 25: - initFrame:(const NXRect *)r; ! 26: - free; ! 27: - clear:sender; ! 28: - drawSelf:(const NXRect *)rects :(int)rectCount; ! 29: - sizeTo: (NXCoord) x : (NXCoord) y; ! 30: - mouseDown:(NXEvent *)e; ! 31: - (BOOL) acceptsFirstResponder; ! 32: - awakeFromNib; ! 33: - flagsChanged:(NXEvent *)e; ! 34: - setCoalesceState:sender; ! 35: - setPressureState:sender; ! 36: - resetCursorRects; ! 37: - setPressureRect; ! 38: ! 39: ! 40: @end
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.