1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/dcclient.h
3 // Purpose: wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes
4 // Author: David Elliott
7 // Copyright: (c) 2003 David Elliott
8 // Licence: wxWindows licence
9 /////////////////////////////////////////////////////////////////////////////
11 #ifndef __WX_COCOA_DCCLIENT_H__
12 #define __WX_COCOA_DCCLIENT_H__
14 #include "wx/cocoa/dc.h"
16 // DFE: A while ago I stumbled upon the fact that retrieving the parent
17 // NSView of the content view seems to return the entire window rectangle
18 // (including decorations). Of course, that is not at all part of the
19 // Cocoa or OpenStep APIs, but it might be a neat hack.
20 class WXDLLIMPEXP_CORE wxWindowDCImpl
: public wxCocoaDCImpl
22 DECLARE_DYNAMIC_CLASS(wxWindowDCImpl
)
24 wxWindowDCImpl(wxDC
*owner
);
25 // Create a DC corresponding to a window
26 wxWindowDCImpl(wxDC
*owner
, wxWindow
*win
);
27 virtual ~wxWindowDCImpl(void);
31 WX_NSView m_lockedNSView
;
33 virtual bool CocoaLockFocus();
34 virtual bool CocoaUnlockFocus();
35 bool CocoaLockFocusOnNSView(WX_NSView nsview
);
36 bool CocoaUnlockFocusOnNSView();
37 virtual bool CocoaGetBounds(void *rectData
);
40 class WXDLLIMPEXP_CORE wxClientDCImpl
: public wxWindowDCImpl
42 DECLARE_DYNAMIC_CLASS(wxClientDCImpl
)
44 wxClientDCImpl(wxDC
*owner
);
45 // Create a DC corresponding to a window
46 wxClientDCImpl(wxDC
*owner
, wxWindow
*win
);
47 virtual ~wxClientDCImpl(void);
50 virtual bool CocoaLockFocus();
51 virtual bool CocoaUnlockFocus();
54 class WXDLLIMPEXP_CORE wxPaintDCImpl
: public wxWindowDCImpl
56 DECLARE_DYNAMIC_CLASS(wxPaintDCImpl
)
58 wxPaintDCImpl(wxDC
*owner
);
59 // Create a DC corresponding to a window
60 wxPaintDCImpl(wxDC
*owner
, wxWindow
*win
);
61 virtual ~wxPaintDCImpl(void);
64 virtual bool CocoaLockFocus();
65 virtual bool CocoaUnlockFocus();
69 // __WX_COCOA_DCCLIENT_H__