]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/NSView.h
Separated the Objective-C to C++ association code into the new header
[wxWidgets.git] / include / wx / cocoa / NSView.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/NSView.h
3 // Purpose: wxCocoaNSView class
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/02/15
7 // RCS-ID: $Id:
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 ///////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_NSVIEW_H__
13 #define __WX_COCOA_NSVIEW_H__
14
15 #include "wx/hashmap.h"
16 #include "wx/cocoa/ObjcAssociate.h"
17
18 typedef struct _NSRect NSRect;
19
20 WX_DECLARE_OBJC_HASHMAP(NSView);
21 class wxCocoaNSView
22 {
23 /* NSView is a rather special case and requires some extra attention */
24 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView)
25 public:
26 void AssociateNSView(WX_NSView cocoaNSView);
27 void DisassociateNSView(WX_NSView cocoaNSView);
28 protected:
29 static void *sm_cocoaObserver;
30 public:
31 virtual void Cocoa_FrameChanged(void) = 0;
32 virtual bool Cocoa_drawRect(const NSRect &rect) = 0;
33 virtual bool Cocoa_mouseDown(WX_NSEvent theEvent) = 0;
34 virtual bool Cocoa_mouseDragged(WX_NSEvent theEvent) = 0;
35 virtual bool Cocoa_mouseUp(WX_NSEvent theEvent) = 0;
36 virtual bool Cocoa_mouseMoved(WX_NSEvent theEvent) = 0;
37 virtual bool Cocoa_mouseEntered(WX_NSEvent theEvent) = 0;
38 virtual bool Cocoa_mouseExited(WX_NSEvent theEvent) = 0;
39 virtual bool Cocoa_rightMouseDown(WX_NSEvent theEvent) = 0;
40 virtual bool Cocoa_rightMouseDragged(WX_NSEvent theEvent) = 0;
41 virtual bool Cocoa_rightMouseUp(WX_NSEvent theEvent) = 0;
42 virtual bool Cocoa_otherMouseDown(WX_NSEvent theEvent) = 0;
43 virtual bool Cocoa_otherMouseDragged(WX_NSEvent theEvent) = 0;
44 virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent) = 0;
45 };
46
47 #endif // _WX_COCOA_NSVIEW_H_