5 // Created by Doug Dickinson on Fri Apr 18 2003.
6 // Copyright (c) 2003 Doug Dickinson (dasher AT DressTheMonkey DOT plus DOT com). All rights reserved.
11 #import <AppKit/NSOpenGLView.h>
12 #import <AppKit/NSNibDeclarations.h>
13 #import "COSXDasherScreen.h"
14 #import "AlphabetLetter.h"
16 #import "DasherViewCocoa.h"
17 #import "KeyboardHelper.h"
19 @
class NSColor
, NSTimer
, NSTextField
, NSString
, NSMutableDictionary
;
29 @interface DasherViewOpenGL
: NSOpenGLView
<DasherViewCocoa
> {
31 COSXDasherScreen
*aquaDasherScreen
;
33 IBOutlet DasherApp
*dasherApp
;
35 NSTrackingRectTag trackingRectTag
;
37 NSString
*_cachedFontName
;
39 ZippyCache
*_zippyCache
;
41 NSMutableDictionary
*_textAttributeCache
;
43 NSArray
*_colourScheme
;
45 NSImage
*_boxesBuffer
;
46 NSImage
*_mouseBuffer
;
47 NSImage
*currentBuffer
;
49 colour_t
*colourTable
;
51 NSMutableDictionary
*_letterDict
;
52 CKeyboardHelper
*_keyboardHelper
;
56 - (void)sendMarker
:(int)iMarker
;
57 - (void)blankCallback
;
58 - (void)displayCallback
;
59 - (void)drawRect
:(NSRect
)rect
;
60 - (void)mouseEntered
:(NSEvent
*)theEvent
;
61 - (void)mouseExited
:(NSEvent
*)theEvent
;
62 - (void)mouseDown
:(NSEvent
*)e
;
63 - (void)mouseUp
:(NSEvent
*)e
;
64 - (void)keyDown
:(NSEvent
*)e
;
65 - (void)keyUp
:(NSEvent
*)e
;
66 - (void)circleCallbackCentrePoint
:(NSPoint
)aCentrePoint radius
:(float)aRadius outlineColorIndex
:(int)anOutlineColorIndex fillColourIndex
:(int)aFillColourIndex shouldFill
:(BOOL
)shouldFill lineWidth
:(int)aLineWidth
;
67 - (void)rectangleCallbackX1
:(int)x1 y1
:(int)y1 x2
:(int)x2 y2
:(int)y2 fillColorIndex
:(int)aFillColorIndex outlineColorIndex
:(int)anOutlineColorIndex shouldOutline
:(BOOL
)shouldOutline shouldFill
:(BOOL
)shouldFill lineWidth
:(int)aLineWidth
;
68 - (AlphabetLetter
*)letterForString
:(NSString
*)aString
;
69 - (NSSize
)textSizeCallbackWithString
:(NSString
*)aString size
:(int)aSize colorIndex
:(int)aColorIndex
;
70 - (void)drawTextCallbackWithString
:(NSString
*)aString x1
:(int)x1 y1
:(int)y1 size
:(int)aSize colorIndex
:(int)aColorIndex
;
71 - (void)colourSchemeCallbackWithColourTable
:(colour_t
*)aColourTable
;
72 - (void)polylineCallbackPoints
:(NSArray
*)points width
:(int)aWidth colorIndex
:(int)aColorIndex
;
73 - (id
)initWithFrame
:(NSRect
)frame
;
74 - (void)userDefaultsDidChange
:(NSNotification
*)aNote
;
75 - (void)adjustTrackingRect
;
79 - (void)finishRealization
;
80 - (COSXDasherScreen
*)aquaDasherScreen
;
81 - (BOOL
)acceptsFirstResponder
;
82 - (NSArray
*)colourScheme
;
83 - (void)setColourScheme
:(NSArray
*)newColourScheme
;
84 - (void)setColourSchemeFromColourInfo
:(const CColourIO::ColourInfo
*)pColourScheme
;
85 - (NSImage
*)boxesBuffer
;
86 - (void)setBoxesBuffer
:(NSImage
*)value
;
87 - (NSImage
*)mouseBuffer
;
88 - (void)setMouseBuffer
:(NSImage
*)value
;
89 - (ZippyCache
*)zippyCache
;
90 - (void)setZippyCache
:(ZippyCache
*)newZippyCache
;
91 - (NSString
*)cachedFontName
;
92 - (void)setCachedFontName
:(NSString
*)newCachedFontName
;
96 - (void) gl_reshape
:(int)w
:(int)h
;
99 - (NSPoint
)mouseLocation
;
100 - (float)boundsWidth
;
101 - (float)boundsHeight
;