]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/NSView.h
add an assert indicating that old code overriding OnExecute() must be updated with 2.9
[wxWidgets.git] / include / wx / cocoa / NSView.h
... / ...
CommitLineData
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 licence
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#if defined(__LP64__) || defined(NS_BUILD_32_LIKE_64)
19typedef struct CGRect NSRect;
20#else
21typedef struct _NSRect NSRect;
22#endif
23
24struct objc_object;
25
26class wxWindow;
27
28WX_DECLARE_OBJC_HASHMAP(NSView);
29class wxCocoaNSView
30{
31/* NSView is a rather special case and requires some extra attention */
32 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView)
33public:
34 void AssociateNSView(WX_NSView cocoaNSView);
35 void DisassociateNSView(WX_NSView cocoaNSView);
36protected:
37 static struct objc_object *sm_cocoaObserver;
38public:
39 virtual wxWindow* GetWxWindow() const
40 { return NULL; }
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))
44 { return false; }
45 virtual bool Cocoa_drawRect(const NSRect &WXUNUSED(rect))
46 { return false; }
47 virtual bool Cocoa_mouseDown(WX_NSEvent WXUNUSED(theEvent))
48 { return false; }
49 virtual bool Cocoa_mouseDragged(WX_NSEvent WXUNUSED(theEvent))
50 { return false; }
51 virtual bool Cocoa_mouseUp(WX_NSEvent WXUNUSED(theEvent))
52 { return false; }
53 virtual bool Cocoa_mouseMoved(WX_NSEvent WXUNUSED(theEvent))
54 { return false; }
55 virtual bool Cocoa_mouseEntered(WX_NSEvent WXUNUSED(theEvent))
56 { return false; }
57 virtual bool Cocoa_mouseExited(WX_NSEvent WXUNUSED(theEvent))
58 { return false; }
59 virtual bool Cocoa_rightMouseDown(WX_NSEvent WXUNUSED(theEvent))
60 { return false; }
61 virtual bool Cocoa_rightMouseDragged(WX_NSEvent WXUNUSED(theEvent))
62 { return false; }
63 virtual bool Cocoa_rightMouseUp(WX_NSEvent WXUNUSED(theEvent))
64 { return false; }
65 virtual bool Cocoa_otherMouseDown(WX_NSEvent WXUNUSED(theEvent))
66 { return false; }
67 virtual bool Cocoa_otherMouseDragged(WX_NSEvent WXUNUSED(theEvent))
68 { return false; }
69 virtual bool Cocoa_otherMouseUp(WX_NSEvent WXUNUSED(theEvent))
70 { return false; }
71 virtual bool Cocoa_resetCursorRects()
72 { return false; }
73 virtual bool Cocoa_viewDidMoveToWindow()
74 { return false; }
75 virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow WXUNUSED(newWindow))
76 { return false; }
77 virtual ~wxCocoaNSView() { }
78};
79
80#endif
81 // __WX_COCOA_NSVIEW_H__