]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cocoa/dcclient.h
added wxDebugContext::SetShutdownNotifyFunction() (patch 1887210)
[wxWidgets.git] / include / wx / cocoa / dcclient.h
index 0c6c3eee387f40cc023e1072e275f9689e17d824..d3b9beda71466f71c14f0e4bc369c06066a25211 100644 (file)
@@ -1,53 +1,70 @@
 /////////////////////////////////////////////////////////////////////////////
 // Name:        wx/cocoa/dcclient.h
-// Purpose:     wxClientDC, wxPaintDC and wxWindowDC classes
+// Purpose:     wxClientDCImpl, wxPaintDCImpl and wxWindowDCImpl classes
 // Author:      David Elliott
 // Modified by:
 // Created:     2003/04/01
 // RCS-ID:      $Id$
 // Copyright:   (c) 2003 David Elliott
-// Licence:    wxWindows license
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef __WX_COCOA_DCCLIENT_H__
 #define __WX_COCOA_DCCLIENT_H__
 
-#include "wx/dc.h"
+#include "wx/cocoa/dc.h"
 
 // DFE: A while ago I stumbled upon the fact that retrieving the parent
 // NSView of the content view seems to return the entire window rectangle
 // (including decorations).  Of course, that is not at all part of the
 // Cocoa or OpenStep APIs, but it might be a neat hack.
-class wxWindowDC: public wxDC
+class WXDLLIMPEXP_CORE wxWindowDCImpl: public wxCocoaDCImpl
 {
-    DECLARE_DYNAMIC_CLASS(wxWindowDC)
+    DECLARE_DYNAMIC_CLASS(wxWindowDCImpl)
 public:
-    wxWindowDC(void);
+    wxWindowDCImpl(wxDC *owner);
     // Create a DC corresponding to a window
-    wxWindowDC(wxWindow *win);
-    ~wxWindowDC(void);
+    wxWindowDCImpl(wxDC *owner, wxWindow *win);
+    virtual ~wxWindowDCImpl(void);
+
 protected:
     wxWindow *m_window;
+    WX_NSView m_lockedNSView;
+// DC stack
+    virtual bool CocoaLockFocus();
+    virtual bool CocoaUnlockFocus();
+    bool CocoaLockFocusOnNSView(WX_NSView nsview);
+    bool CocoaUnlockFocusOnNSView();
+    virtual bool CocoaGetBounds(void *rectData);
 };
 
-class wxClientDC: public wxWindowDC
+class WXDLLIMPEXP_CORE wxClientDCImpl: public wxWindowDCImpl
 {
-    DECLARE_DYNAMIC_CLASS(wxClientDC)
+    DECLARE_DYNAMIC_CLASS(wxClientDCImpl)
 public:
-    wxClientDC(void);
+    wxClientDCImpl(wxDC *owner);
     // Create a DC corresponding to a window
-    wxClientDC(wxWindow *win);
-    ~wxClientDC(void);
+    wxClientDCImpl(wxDC *owner, wxWindow *win);
+    virtual ~wxClientDCImpl(void);
+protected:
+// DC stack
+    virtual bool CocoaLockFocus();
+    virtual bool CocoaUnlockFocus();
 };
 
-class wxPaintDC: public wxWindowDC
+class WXDLLIMPEXP_CORE wxPaintDCImpl: public wxWindowDCImpl
 {
-    DECLARE_DYNAMIC_CLASS(wxPaintDC)
+    DECLARE_DYNAMIC_CLASS(wxPaintDCImpl)
 public:
-    wxPaintDC(void);
+    wxPaintDCImpl(wxDC *owner);
     // Create a DC corresponding to a window
-    wxPaintDC(wxWindow *win);
-    ~wxPaintDC(void);
+    wxPaintDCImpl(wxDC *owner, wxWindow *win);
+    virtual ~wxPaintDCImpl(void);
+protected:
+// DC stack
+    virtual bool CocoaLockFocus();
+    virtual bool CocoaUnlockFocus();
 };
 
-#endif // __WX_COCOA_DCCLIENT_H__
+#endif
+    // __WX_COCOA_DCCLIENT_H__