]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/NSView.h
extract setting max length in wxGridCellTextEditor::DoCreate() and call it from wxGri...
[wxWidgets.git] / include / wx / cocoa / NSView.h
CommitLineData
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
8ea5271e 18typedef struct _NSRect NSRect;
f7e98dee 19class wxWindow;
8ea5271e 20
fb896a32
DE
21WX_DECLARE_OBJC_HASHMAP(NSView);
22class wxCocoaNSView
23{
24/* NSView is a rather special case and requires some extra attention */
25 WX_DECLARE_OBJC_INTERFACE_HASHMAP(NSView)
26public:
27 void AssociateNSView(WX_NSView cocoaNSView);
28 void DisassociateNSView(WX_NSView cocoaNSView);
29protected:
30 static void *sm_cocoaObserver;
31public:
f7e98dee 32 virtual wxWindow* GetWxWindow() const
1b88201f 33 { return NULL; }
fb896a32 34 virtual void Cocoa_FrameChanged(void) = 0;
7c5a378f 35 virtual void Cocoa_synthesizeMouseMoved(void) = 0;
c05e07cb
DE
36 virtual bool Cocoa_acceptsFirstMouse(bool &acceptsFirstMouse, WX_NSEvent theEvent)
37 { return false; }
2d6c4e48
DE
38 virtual bool Cocoa_drawRect(const NSRect &rect)
39 { return false; }
40 virtual bool Cocoa_mouseDown(WX_NSEvent theEvent)
41 { return false; }
42 virtual bool Cocoa_mouseDragged(WX_NSEvent theEvent)
43 { return false; }
44 virtual bool Cocoa_mouseUp(WX_NSEvent theEvent)
45 { return false; }
46 virtual bool Cocoa_mouseMoved(WX_NSEvent theEvent)
47 { return false; }
48 virtual bool Cocoa_mouseEntered(WX_NSEvent theEvent)
49 { return false; }
50 virtual bool Cocoa_mouseExited(WX_NSEvent theEvent)
51 { return false; }
52 virtual bool Cocoa_rightMouseDown(WX_NSEvent theEvent)
53 { return false; }
54 virtual bool Cocoa_rightMouseDragged(WX_NSEvent theEvent)
55 { return false; }
56 virtual bool Cocoa_rightMouseUp(WX_NSEvent theEvent)
57 { return false; }
58 virtual bool Cocoa_otherMouseDown(WX_NSEvent theEvent)
59 { return false; }
60 virtual bool Cocoa_otherMouseDragged(WX_NSEvent theEvent)
61 { return false; }
62 virtual bool Cocoa_otherMouseUp(WX_NSEvent theEvent)
63 { return false; }
5558135c 64 virtual bool Cocoa_resetCursorRects()
1b88201f 65 { return false; }
7c5a378f
DE
66 virtual bool Cocoa_viewDidMoveToWindow()
67 { return false; }
68 virtual bool Cocoa_viewWillMoveToWindow(WX_NSWindow newWindow)
69 { return false; }
31e57091 70 virtual ~wxCocoaNSView() { }
fb896a32
DE
71};
72
1b88201f
WS
73#endif
74 // __WX_COCOA_NSVIEW_H__