]>
Commit | Line | Data |
---|---|---|
a24aff65 | 1 | ///////////////////////////////////////////////////////////////////////////// |
6c342f3f | 2 | // Name: wx/cocoa/dcclient.h |
938156b2 | 3 | // Purpose: wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes |
6c342f3f | 4 | // Author: David Elliott |
a24aff65 | 5 | // Modified by: |
6c342f3f | 6 | // Created: 2003/04/01 |
a24aff65 | 7 | // RCS-ID: $Id$ |
6c342f3f | 8 | // Copyright: (c) 2003 David Elliott |
1b88201f | 9 | // Licence: wxWindows licence |
a24aff65 DE |
10 | ///////////////////////////////////////////////////////////////////////////// |
11 | ||
6c342f3f DE |
12 | #ifndef __WX_COCOA_DCCLIENT_H__ |
13 | #define __WX_COCOA_DCCLIENT_H__ | |
a24aff65 | 14 | |
938156b2 | 15 | #include "wx/cocoa/dc.h" |
a24aff65 | 16 | |
6c342f3f DE |
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. | |
938156b2 | 21 | class WXDLLIMPEXP_CORE wxWindowDCImpl: public wxCocoaDCImpl |
a24aff65 | 22 | { |
938156b2 | 23 | DECLARE_DYNAMIC_CLASS(wxWindowDCImpl) |
6c342f3f | 24 | public: |
938156b2 | 25 | wxWindowDCImpl(wxDC *owner); |
6c342f3f | 26 | // Create a DC corresponding to a window |
938156b2 DE |
27 | wxWindowDCImpl(wxDC *owner, wxWindow *win); |
28 | virtual ~wxWindowDCImpl(void); | |
9d180f3a | 29 | |
fcc9de54 DE |
30 | protected: |
31 | wxWindow *m_window; | |
b66e9853 DE |
32 | WX_NSView m_lockedNSView; |
33 | // DC stack | |
34 | virtual bool CocoaLockFocus(); | |
35 | virtual bool CocoaUnlockFocus(); | |
36 | bool CocoaLockFocusOnNSView(WX_NSView nsview); | |
37 | bool CocoaUnlockFocusOnNSView(); | |
3e21fc05 | 38 | virtual bool CocoaGetBounds(void *rectData); |
a24aff65 DE |
39 | }; |
40 | ||
938156b2 | 41 | class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl |
a24aff65 | 42 | { |
938156b2 | 43 | DECLARE_DYNAMIC_CLASS(wxClientDCImpl) |
6c342f3f | 44 | public: |
938156b2 | 45 | wxClientDCImpl(wxDC *owner); |
6c342f3f | 46 | // Create a DC corresponding to a window |
938156b2 DE |
47 | wxClientDCImpl(wxDC *owner, wxWindow *win); |
48 | virtual ~wxClientDCImpl(void); | |
fe8f7943 DE |
49 | protected: |
50 | // DC stack | |
51 | virtual bool CocoaLockFocus(); | |
52 | virtual bool CocoaUnlockFocus(); | |
a24aff65 DE |
53 | }; |
54 | ||
938156b2 | 55 | class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl |
a24aff65 | 56 | { |
938156b2 | 57 | DECLARE_DYNAMIC_CLASS(wxPaintDCImpl) |
6c342f3f | 58 | public: |
938156b2 | 59 | wxPaintDCImpl(wxDC *owner); |
6c342f3f | 60 | // Create a DC corresponding to a window |
938156b2 DE |
61 | wxPaintDCImpl(wxDC *owner, wxWindow *win); |
62 | virtual ~wxPaintDCImpl(void); | |
fe8f7943 DE |
63 | protected: |
64 | // DC stack | |
65 | virtual bool CocoaLockFocus(); | |
66 | virtual bool CocoaUnlockFocus(); | |
a24aff65 DE |
67 | }; |
68 | ||
1b88201f WS |
69 | #endif |
70 | // __WX_COCOA_DCCLIENT_H__ |