]>
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 typedef struct _NSRect NSRect
;
21 WX_DECLARE_OBJC_HASHMAP(NSView
);
24 /* NSView is a rather special case and requires some extra attention */
25 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView
)
27 void AssociateNSView(WX_NSView cocoaNSView
);
28 void DisassociateNSView(WX_NSView cocoaNSView
);
30 static void *sm_cocoaObserver
;
32 virtual wxWindow
* GetWxWindow() const
34 virtual void Cocoa_FrameChanged(void) = 0;
35 virtual void Cocoa_synthesizeMouseMoved(void) = 0;
36 virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse
, WX_NSEvent theEvent
)
38 virtual bool Cocoa_drawRect(const NSRect
&rect
)
40 virtual bool Cocoa_mouseDown(WX_NSEvent theEvent
)
42 virtual bool Cocoa_mouseDragged(WX_NSEvent theEvent
)
44 virtual bool Cocoa_mouseUp(WX_NSEvent theEvent
)
46 virtual bool Cocoa_mouseMoved(WX_NSEvent theEvent
)
48 virtual bool Cocoa_mouseEntered(WX_NSEvent theEvent
)
50 virtual bool Cocoa_mouseExited(WX_NSEvent theEvent
)
52 virtual bool Cocoa_rightMouseDown(WX_NSEvent theEvent
)
54 virtual bool Cocoa_rightMouseDragged(WX_NSEvent theEvent
)
56 virtual bool Cocoa_rightMouseUp(WX_NSEvent theEvent
)
58 virtual bool Cocoa_otherMouseDown(WX_NSEvent theEvent
)
60 virtual bool Cocoa_otherMouseDragged(WX_NSEvent theEvent
)
62 virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent
)
64 virtual bool Cocoa_resetCursorRects()
66 virtual bool Cocoa_viewDidMoveToWindow()
68 virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow newWindow
)
70 virtual ~wxCocoaNSView() { }
74 // __WX_COCOA_NSVIEW_H__