1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/dcclient.h
3 // Purpose: wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_DCCLIENT_H__
13 #define __WX_COCOA_DCCLIENT_H__
15 #include "wx/cocoa/dc.h"
17 // DFE: A while ago I stumbled upon the fact that retrieving the parent
18 // NSView of the content view seems to return the entire window rectangle
19 // (including decorations). Of course, that is not at all part of the
20 // Cocoa or OpenStep APIs, but it might be a neat hack.
21 class WXDLLIMPEXP_CORE wxWindowDCImpl
: public wxCocoaDCImpl
23 DECLARE_DYNAMIC_CLASS(wxWindowDCImpl
)
25 wxWindowDCImpl(wxDC
*owner
);
26 // Create a DC corresponding to a window
27 wxWindowDCImpl(wxDC
*owner
, wxWindow
*win
);
28 virtual ~wxWindowDCImpl(void);
32 WX_NSView m_lockedNSView
;
34 virtual bool CocoaLockFocus();
35 virtual bool CocoaUnlockFocus();
36 bool CocoaLockFocusOnNSView(WX_NSView nsview
);
37 bool CocoaUnlockFocusOnNSView();
38 virtual bool CocoaGetBounds(void *rectData
);
41 class WXDLLIMPEXP_CORE wxClientDCImpl
: public wxWindowDCImpl
43 DECLARE_DYNAMIC_CLASS(wxClientDCImpl
)
45 wxClientDCImpl(wxDC
*owner
);
46 // Create a DC corresponding to a window
47 wxClientDCImpl(wxDC
*owner
, wxWindow
*win
);
48 virtual ~wxClientDCImpl(void);
51 virtual bool CocoaLockFocus();
52 virtual bool CocoaUnlockFocus();
55 class WXDLLIMPEXP_CORE wxPaintDCImpl
: public wxWindowDCImpl
57 DECLARE_DYNAMIC_CLASS(wxPaintDCImpl
)
59 wxPaintDCImpl(wxDC
*owner
);
60 // Create a DC corresponding to a window
61 wxPaintDCImpl(wxDC
*owner
, wxWindow
*win
);
62 virtual ~wxPaintDCImpl(void);
65 virtual bool CocoaLockFocus();
66 virtual bool CocoaUnlockFocus();
70 // __WX_COCOA_DCCLIENT_H__