]> git.saurik.com Git - wxWidgets.git/blob - include/wx/cocoa/dcclient.h
wxUSE_EXTENDED_RTTI as name
[wxWidgets.git] / include / wx / cocoa / dcclient.h
1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/cocoa/dcclient.h
3 // Purpose: wxClientDC, wxPaintDC and wxWindowDC classes
4 // Author: David Elliott
5 // Modified by:
6 // Created: 2003/04/01
7 // RCS-ID: $Id$
8 // Copyright: (c) 2003 David Elliott
9 // Licence: wxWindows license
10 /////////////////////////////////////////////////////////////////////////////
11
12 #ifndef __WX_COCOA_DCCLIENT_H__
13 #define __WX_COCOA_DCCLIENT_H__
14
15 #include "wx/dc.h"
16
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
22 {
23 DECLARE_DYNAMIC_CLASS(wxWindowDC)
24 public:
25 wxWindowDC(void);
26 // Create a DC corresponding to a window
27 wxWindowDC(wxWindow *win);
28 ~wxWindowDC(void);
29
30 // NSView specific functions
31 virtual void Clear();
32 protected:
33 wxWindow *m_window;
34 };
35
36 class wxClientDC: public wxWindowDC
37 {
38 DECLARE_DYNAMIC_CLASS(wxClientDC)
39 public:
40 wxClientDC(void);
41 // Create a DC corresponding to a window
42 wxClientDC(wxWindow *win);
43 ~wxClientDC(void);
44 protected:
45 // DC stack
46 virtual bool CocoaLockFocus();
47 virtual bool CocoaUnlockFocus();
48 };
49
50 class wxPaintDC: public wxWindowDC
51 {
52 DECLARE_DYNAMIC_CLASS(wxPaintDC)
53 public:
54 wxPaintDC(void);
55 // Create a DC corresponding to a window
56 wxPaintDC(wxWindow *win);
57 ~wxPaintDC(void);
58 protected:
59 // DC stack
60 virtual bool CocoaLockFocus();
61 virtual bool CocoaUnlockFocus();
62 };
63
64 #endif // __WX_COCOA_DCCLIENT_H__