]>
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
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 ///////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_NSVIEW_H__
13 #define __WX_COCOA_NSVIEW_H__
15 #include "wx/hashmap.h"
16 #include "wx/cocoa/ObjcAssociate.h"
18 #if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
19 typedef struct CGRect NSRect
;
21 typedef struct _NSRect NSRect
;
28 WX_DECLARE_OBJC_HASHMAP(NSView
);
31 /* NSView is a rather special case and requires some extra attention */
32 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView
)
34 void AssociateNSView(WX_NSView cocoaNSView
);
35 void DisassociateNSView(WX_NSView cocoaNSView
);
37 static struct objc_object
*sm_cocoaObserver
;
39 virtual wxWindow
* GetWxWindow() const
41 virtual void Cocoa_FrameChanged(void) = 0;
42 virtual void Cocoa_synthesizeMouseMoved(void) = 0;
43 virtual bool Cocoa_acceptsFirstMouse(bool &WXUNUSED(acceptsFirstMouse
), WX_NSEvent
WXUNUSED(theEvent
))
45 virtual bool Cocoa_drawRect(const NSRect
&WXUNUSED(rect
))
47 virtual bool Cocoa_mouseDown(WX_NSEvent
WXUNUSED(theEvent
))
49 virtual bool Cocoa_mouseDragged(WX_NSEvent
WXUNUSED(theEvent
))
51 virtual bool Cocoa_mouseUp(WX_NSEvent
WXUNUSED(theEvent
))
53 virtual bool Cocoa_mouseMoved(WX_NSEvent
WXUNUSED(theEvent
))
55 virtual bool Cocoa_mouseEntered(WX_NSEvent
WXUNUSED(theEvent
))
57 virtual bool Cocoa_mouseExited(WX_NSEvent
WXUNUSED(theEvent
))
59 virtual bool Cocoa_rightMouseDown(WX_NSEvent
WXUNUSED(theEvent
))
61 virtual bool Cocoa_rightMouseDragged(WX_NSEvent
WXUNUSED(theEvent
))
63 virtual bool Cocoa_rightMouseUp(WX_NSEvent
WXUNUSED(theEvent
))
65 virtual bool Cocoa_otherMouseDown(WX_NSEvent
WXUNUSED(theEvent
))
67 virtual bool Cocoa_otherMouseDragged(WX_NSEvent
WXUNUSED(theEvent
))
69 virtual bool Cocoa_otherMouseUp(WX_NSEvent
WXUNUSED(theEvent
))
71 virtual bool Cocoa_resetCursorRects()
73 virtual bool Cocoa_viewDidMoveToWindow()
75 virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow
WXUNUSED(newWindow
))
77 virtual ~wxCocoaNSView() { }
81 // __WX_COCOA_NSVIEW_H__