]> git.saurik.com Git - wxWidgets.git/blame_incremental - include/wx/cocoa/dcclient.h
Oops, I left an extra { in there.
[wxWidgets.git] / include / wx / cocoa / dcclient.h
... / ...
CommitLineData
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.
21class wxWindowDC: public wxDC
22{
23 DECLARE_DYNAMIC_CLASS(wxWindowDC)
24public:
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();
32protected:
33 wxWindow *m_window;
34 WX_NSView m_lockedNSView;
35// DC stack
36 virtual bool CocoaLockFocus();
37 virtual bool CocoaUnlockFocus();
38 bool CocoaLockFocusOnNSView(WX_NSView nsview);
39 bool CocoaUnlockFocusOnNSView();
40};
41
42class wxClientDC: public wxWindowDC
43{
44 DECLARE_DYNAMIC_CLASS(wxClientDC)
45public:
46 wxClientDC(void);
47 // Create a DC corresponding to a window
48 wxClientDC(wxWindow *win);
49 ~wxClientDC(void);
50protected:
51// DC stack
52 virtual bool CocoaLockFocus();
53 virtual bool CocoaUnlockFocus();
54};
55
56class wxPaintDC: public wxWindowDC
57{
58 DECLARE_DYNAMIC_CLASS(wxPaintDC)
59public:
60 wxPaintDC(void);
61 // Create a DC corresponding to a window
62 wxPaintDC(wxWindow *win);
63 ~wxPaintDC(void);
64protected:
65// DC stack
66 virtual bool CocoaLockFocus();
67 virtual bool CocoaUnlockFocus();
68};
69
70#endif // __WX_COCOA_DCCLIENT_H__