Panda3D
 All Classes Functions Variables Enumerations
cocoaPandaView.h
1 // Filename: cocoaPandaView.h
2 // Created by: rdb (17May12)
3 //
4 ////////////////////////////////////////////////////////////////////
5 //
6 // PANDA 3D SOFTWARE
7 // Copyright (c) Carnegie Mellon University. All rights reserved.
8 //
9 // All use of this software is subject to the terms of the revised BSD
10 // license. You should have received a copy of this license along
11 // with this source code in a file named "LICENSE."
12 //
13 ////////////////////////////////////////////////////////////////////
14 
15 #include "graphicsWindow.h"
16 
17 #import <AppKit/NSView.h>
18 #import <AppKit/NSOpenGL.h>
19 
21 
22 @interface CocoaPandaView : NSView {
23  @private
24  NSOpenGLContext *_context;
25  CocoaGraphicsWindow *_graphicsWindow;
26 }
27 
28 - (id) initWithFrame:(NSRect)frameRect context:(NSOpenGLContext*)context window:(CocoaGraphicsWindow*)window;
29 - (NSOpenGLContext*) openGLContext;
30 - (GraphicsWindow*) graphicsWindow;
31 
32 - (void) drawRect:(NSRect)dirtyRect;
33 - (void) finalize;
34 - (BOOL) isFlipped;
35 - (BOOL) needsDisplay;
36 - (BOOL) acceptsFirstResponder;
37 - (BOOL) becomeFirstResponder;
38 - (BOOL) resignFirstResponder;
39 - (void) resetCursorRects;
40 
41 - (void) setFrame: (NSRect) frame;
42 
43 // Keyboard events
44 - (void) keyDown: (NSEvent *) event;
45 - (void) keyUp: (NSEvent *) event;
46 - (void) flagsChanged: (NSEvent *) event;
47 
48 // Mouse events
49 - (void) mouseDown: (NSEvent *) event;
50 - (void) mouseDragged: (NSEvent *) event;
51 - (void) mouseUp: (NSEvent *) event;
52 - (void) mouseMoved: (NSEvent *) event;
53 - (void) rightMouseDown: (NSEvent *) event;
54 - (void) rightMouseDragged: (NSEvent *) event;
55 - (void) rightMouseUp: (NSEvent *) event;
56 - (void) otherMouseDown: (NSEvent *) event;
57 - (void) otherMouseDragged: (NSEvent *) event;
58 - (void) otherMouseUp: (NSEvent *) event;
59 
60 - (void) scrollWheel: (NSEvent *) event;
61 
62 - (BOOL) isOpaque;
63 
64 @end
A window, fullscreen or on a desktop, into which a graphics device sends its output for interactive d...
An interface to the Cocoa system for managing OpenGL windows under Mac OS X.