]>
git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/dcclient.h
3 // Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
4 // Author: David Elliott
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef __WX_COCOA_DCCLIENT_H__
13 #define __WX_COCOA_DCCLIENT_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 wxWindowDC
: public wxDC
23 DECLARE_DYNAMIC_CLASS(wxWindowDC
)
26 // Create a DC corresponding to a window
27 wxWindowDC(wxWindow
*win
);
30 // NSView specific functions
34 WX_NSView m_lockedNSView
;
36 virtual bool CocoaLockFocus();
37 virtual bool CocoaUnlockFocus();
38 bool CocoaLockFocusOnNSView(WX_NSView nsview
);
39 bool CocoaUnlockFocusOnNSView();
42 class wxClientDC
: public wxWindowDC
44 DECLARE_DYNAMIC_CLASS(wxClientDC
)
47 // Create a DC corresponding to a window
48 wxClientDC(wxWindow
*win
);
52 virtual bool CocoaLockFocus();
53 virtual bool CocoaUnlockFocus();
56 class wxPaintDC
: public wxWindowDC
58 DECLARE_DYNAMIC_CLASS(wxPaintDC
)
61 // Create a DC corresponding to a window
62 wxPaintDC(wxWindow
*win
);
66 virtual bool CocoaLockFocus();
67 virtual bool CocoaUnlockFocus();
70 #endif // __WX_COCOA_DCCLIENT_H__