(a) makes the control mode list box (in the preferences pane) under mac
[dasher.git] / Src / MacOSX / DasherViewOpenGL.h
blob353d281988438edcc0a622a94a739455f95f8130
1 //
2 // DasherViewOpenGL.h
3 // MacOSX
4 //
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.
7 //
11 #import <AppKit/NSOpenGLView.h>
12 #import <AppKit/NSNibDeclarations.h>
13 #import "COSXDasherScreen.h"
14 #import "AlphabetLetter.h"
15 #import "ColourIO.h"
16 #import "DasherViewCocoa.h"
17 #import "KeyboardHelper.h"
19 @class NSColor, NSTimer, NSTextField, NSString, NSMutableDictionary;
20 @class NSBezierPath;
21 @class ZippyCache;
22 @class DasherApp;
24 typedef struct {
25 float r, g, b;
26 } colour_t;
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;
76 - (BOOL)isFlipped;
77 - (BOOL)isOpaque;
78 - (void)awakeFromNib;
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;
93 - (void)dealloc;
94 - (void)gl_init;
95 - (void)reshape;
96 - (void) gl_reshape:(int)w :(int)h;
97 - (void)flushCaches;
99 - (NSPoint)mouseLocation;
100 - (float)boundsWidth;
101 - (float)boundsHeight;
104 @end