]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/NSView.h
1 ///////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/NSView.h
3 // Purpose: wxCocoaNSView class
4 // Author: David Elliott
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 ///////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_COCOA_NSVIEW_H__
12 #define __WX_COCOA_NSVIEW_H__
14 #include "wx/hashmap.h"
15 #include "wx/cocoa/ObjcAssociate.h"
17 #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
18 typedef struct CGRect NSRect
;
20 typedef struct _NSRect NSRect
;
27 WX_DECLARE_OBJC_HASHMAP(NSView
);
30 /* NSView is a rather special case and requires some extra attention */
31 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView
)
33 void AssociateNSView(WX_NSView cocoaNSView
);
34 void DisassociateNSView(WX_NSView cocoaNSView
);
36 static struct objc_object
*sm_cocoaObserver
;
38 virtual wxWindow
* GetWxWindow() const
40 virtual void Cocoa_FrameChanged(void) = 0;
41 virtual void Cocoa_synthesizeMouseMoved(void) = 0;
42 virtual bool Cocoa_acceptsFirstMouse(bool &WXUNUSED(acceptsFirstMouse
), WX_NSEvent
WXUNUSED(theEvent
))
44 virtual bool Cocoa_drawRect(const NSRect
&WXUNUSED(rect
))
46 virtual bool Cocoa_mouseDown(WX_NSEvent
WXUNUSED(theEvent
))
48 virtual bool Cocoa_mouseDragged(WX_NSEvent
WXUNUSED(theEvent
))
50 virtual bool Cocoa_mouseUp(WX_NSEvent
WXUNUSED(theEvent
))
52 virtual bool Cocoa_mouseMoved(WX_NSEvent
WXUNUSED(theEvent
))
54 virtual bool Cocoa_mouseEntered(WX_NSEvent
WXUNUSED(theEvent
))
56 virtual bool Cocoa_mouseExited(WX_NSEvent
WXUNUSED(theEvent
))
58 virtual bool Cocoa_rightMouseDown(WX_NSEvent
WXUNUSED(theEvent
))
60 virtual bool Cocoa_rightMouseDragged(WX_NSEvent
WXUNUSED(theEvent
))
62 virtual bool Cocoa_rightMouseUp(WX_NSEvent
WXUNUSED(theEvent
))
64 virtual bool Cocoa_otherMouseDown(WX_NSEvent
WXUNUSED(theEvent
))
66 virtual bool Cocoa_otherMouseDragged(WX_NSEvent
WXUNUSED(theEvent
))
68 virtual bool Cocoa_otherMouseUp(WX_NSEvent
WXUNUSED(theEvent
))
70 virtual bool Cocoa_resetCursorRects()
72 virtual bool Cocoa_viewDidMoveToWindow()
74 virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow
WXUNUSED(newWindow
))
76 virtual ~wxCocoaNSView() { }
80 // __WX_COCOA_NSVIEW_H__