]>
Commit | Line | Data |
---|---|---|
fb896a32 DE |
1 | /////////////////////////////////////////////////////////////////////////////// |
2 | // Name: wx/cocoa/NSView.h | |
3 | // Purpose: wxCocoaNSView class | |
4 | // Author: David Elliott | |
5 | // Modified by: | |
6 | // Created: 2003/02/15 | |
1b88201f | 7 | // RCS-ID: $Id$ |
fb896a32 | 8 | // Copyright: (c) 2003 David Elliott |
65571936 | 9 | // Licence: wxWindows licence |
fb896a32 DE |
10 | /////////////////////////////////////////////////////////////////////////////// |
11 | ||
12 | #ifndef __WX_COCOA_NSVIEW_H__ | |
13 | #define __WX_COCOA_NSVIEW_H__ | |
14 | ||
15 | #include "wx/hashmap.h" | |
e6686511 | 16 | #include "wx/cocoa/ObjcAssociate.h" |
fb896a32 | 17 | |
4799f3ba DE |
18 | #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64) |
19 | typedef struct CGRect NSRect; | |
20 | #else | |
8ea5271e | 21 | typedef struct _NSRect NSRect; |
4799f3ba DE |
22 | #endif |
23 | ||
f7e98dee | 24 | class wxWindow; |
8ea5271e | 25 | |
fb896a32 DE |
26 | WX_DECLARE_OBJC_HASHMAP(NSView); |
27 | class wxCocoaNSView | |
28 | { | |
29 | /* NSView is a rather special case and requires some extra attention */ | |
30 | WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView) | |
31 | public: | |
32 | void AssociateNSView(WX_NSView cocoaNSView); | |
33 | void DisassociateNSView(WX_NSView cocoaNSView); | |
34 | protected: | |
35 | static void *sm_cocoaObserver; | |
36 | public: | |
f7e98dee | 37 | virtual wxWindow* GetWxWindow() const |
1b88201f | 38 | { return NULL; } |
fb896a32 | 39 | virtual void Cocoa_FrameChanged(void) = 0; |
7c5a378f | 40 | virtual void Cocoa_synthesizeMouseMoved(void) = 0; |
8e33de15 | 41 | virtual bool Cocoa_acceptsFirstMouse(bool &WXUNUSED(acceptsFirstMouse), WX_NSEvent WXUNUSED(theEvent)) |
c05e07cb | 42 | { return false; } |
8e33de15 | 43 | virtual bool Cocoa_drawRect(const NSRect &WXUNUSED(rect)) |
2d6c4e48 | 44 | { return false; } |
8e33de15 | 45 | virtual bool Cocoa_mouseDown(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 46 | { return false; } |
8e33de15 | 47 | virtual bool Cocoa_mouseDragged(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 48 | { return false; } |
8e33de15 | 49 | virtual bool Cocoa_mouseUp(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 50 | { return false; } |
8e33de15 | 51 | virtual bool Cocoa_mouseMoved(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 52 | { return false; } |
8e33de15 | 53 | virtual bool Cocoa_mouseEntered(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 54 | { return false; } |
8e33de15 | 55 | virtual bool Cocoa_mouseExited(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 56 | { return false; } |
8e33de15 | 57 | virtual bool Cocoa_rightMouseDown(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 58 | { return false; } |
8e33de15 | 59 | virtual bool Cocoa_rightMouseDragged(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 60 | { return false; } |
8e33de15 | 61 | virtual bool Cocoa_rightMouseUp(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 62 | { return false; } |
8e33de15 | 63 | virtual bool Cocoa_otherMouseDown(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 64 | { return false; } |
8e33de15 | 65 | virtual bool Cocoa_otherMouseDragged(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 66 | { return false; } |
8e33de15 | 67 | virtual bool Cocoa_otherMouseUp(WX_NSEvent WXUNUSED(theEvent)) |
2d6c4e48 | 68 | { return false; } |
5558135c | 69 | virtual bool Cocoa_resetCursorRects() |
1b88201f | 70 | { return false; } |
7c5a378f DE |
71 | virtual bool Cocoa_viewDidMoveToWindow() |
72 | { return false; } | |
8e33de15 | 73 | virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow WXUNUSED(newWindow)) |
7c5a378f | 74 | { return false; } |
31e57091 | 75 | virtual ~wxCocoaNSView() { } |
fb896a32 DE |
76 | }; |
77 | ||
1b88201f WS |
78 | #endif |
79 | // __WX_COCOA_NSVIEW_H__ |