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