]> git.saurik.com Git - wxWidgets.git/blame - include/wx/cocoa/dcclient.h
Fix wxPropertyGrid::GetPropertyRect when the last item is collapsed.
[wxWidgets.git] / include / wx / cocoa / dcclient.h
CommitLineData
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
6c342f3f 7// Copyright: (c) 2003 David Elliott
1b88201f 8// Licence: wxWindows licence
a24aff65
DE
9/////////////////////////////////////////////////////////////////////////////
10
6c342f3f
DE
11#ifndef __WX_COCOA_DCCLIENT_H__
12#define __WX_COCOA_DCCLIENT_H__
a24aff65 13
938156b2 14#include "wx/cocoa/dc.h"
a24aff65 15
6c342f3f
DE
16// DFE: A while ago I stumbled upon the fact that retrieving the parent
17// NSView of the content view seems to return the entire window rectangle
18// (including decorations). Of course, that is not at all part of the
19// Cocoa or OpenStep APIs, but it might be a neat hack.
938156b2 20class WXDLLIMPEXP_CORE wxWindowDCImpl: public wxCocoaDCImpl
a24aff65 21{
938156b2 22 DECLARE_DYNAMIC_CLASS(wxWindowDCImpl)
6c342f3f 23public:
938156b2 24 wxWindowDCImpl(wxDC *owner);
6c342f3f 25 // Create a DC corresponding to a window
938156b2
DE
26 wxWindowDCImpl(wxDC *owner, wxWindow *win);
27 virtual ~wxWindowDCImpl(void);
9d180f3a 28
fcc9de54
DE
29protected:
30 wxWindow *m_window;
b66e9853
DE
31 WX_NSView m_lockedNSView;
32// DC stack
33 virtual bool CocoaLockFocus();
34 virtual bool CocoaUnlockFocus();
35 bool CocoaLockFocusOnNSView(WX_NSView nsview);
36 bool CocoaUnlockFocusOnNSView();
3e21fc05 37 virtual bool CocoaGetBounds(void *rectData);
a24aff65
DE
38};
39
938156b2 40class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl
a24aff65 41{
938156b2 42 DECLARE_DYNAMIC_CLASS(wxClientDCImpl)
6c342f3f 43public:
938156b2 44 wxClientDCImpl(wxDC *owner);
6c342f3f 45 // Create a DC corresponding to a window
938156b2
DE
46 wxClientDCImpl(wxDC *owner, wxWindow *win);
47 virtual ~wxClientDCImpl(void);
fe8f7943
DE
48protected:
49// DC stack
50 virtual bool CocoaLockFocus();
51 virtual bool CocoaUnlockFocus();
a24aff65
DE
52};
53
938156b2 54class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl
a24aff65 55{
938156b2 56 DECLARE_DYNAMIC_CLASS(wxPaintDCImpl)
6c342f3f 57public:
938156b2 58 wxPaintDCImpl(wxDC *owner);
6c342f3f 59 // Create a DC corresponding to a window
938156b2
DE
60 wxPaintDCImpl(wxDC *owner, wxWindow *win);
61 virtual ~wxPaintDCImpl(void);
fe8f7943
DE
62protected:
63// DC stack
64 virtual bool CocoaLockFocus();
65 virtual bool CocoaUnlockFocus();
a24aff65
DE
66};
67
1b88201f
WS
68#endif
69 // __WX_COCOA_DCCLIENT_H__