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