]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/cocoa/dc.h
tell user to define _USE_OLD_RW_STL for BC5.6 instead of refusing to compile with...
[wxWidgets.git] / include / wx / cocoa / dc.h
index ed39d574e9ba394cfea941e393fb40cf34d4de4d..2dbe2e32a172d32063e41bc454e57a94756b5453 100644 (file)
 
 DECLARE_WXCOCOA_OBJC_CLASS(NSAffineTransform);
 
-class WXDLLEXPORT wxDC;
-WX_DECLARE_LIST(wxDC, wxCocoaDCStack);
+#include "wx/dc.h"
+
+class WXDLLIMPEXP_FWD_CORE wxCocoaDCImpl;
+WX_DECLARE_LIST(wxCocoaDCImpl, wxCocoaDCStack);
 
 //=========================================================================
 // wxDC
 //=========================================================================
-class WXDLLEXPORT wxDC: public wxDCBase
+class WXDLLIMPEXP_CORE wxCocoaDCImpl: public wxDCImpl
 {
-    DECLARE_DYNAMIC_CLASS(wxDC)
-    DECLARE_NO_COPY_CLASS(wxDC)
+    DECLARE_ABSTRACT_CLASS(wxCocoaDCImpl)
+    DECLARE_NO_COPY_CLASS(wxCocoaDCImpl)
 //-------------------------------------------------------------------------
 // Initialization
 //-------------------------------------------------------------------------
 public:
-    wxDC();
-    ~wxDC();
+    wxCocoaDCImpl(wxDC *owner);
+    virtual ~wxCocoaDCImpl();
 
 //-------------------------------------------------------------------------
 // wxCocoa specifics
@@ -58,7 +60,12 @@ protected:
     void CocoaUnwindStackAndLoseFocus();
 // DC flipping/transformation
     void CocoaApplyTransformations();
+    void CocoaUnapplyTransformations();
     WX_NSAffineTransform m_cocoaWxToBoundsTransform;
+// Get bounds rect (for Clear())
+    // note: we use void * to mean NSRect * so that we can avoid
+    // putting NSRect in the headers.
+    virtual bool CocoaGetBounds(void *rectData);
 // Blitting
     virtual bool CocoaDoBlitOnFocusedDC(wxCoord xdest, wxCoord ydest,
         wxCoord width, wxCoord height, wxCoord xsrc, wxCoord ysrc,
@@ -78,7 +85,7 @@ public:
     virtual void StartPage(void) {};
     virtual void EndPage(void) {};
 
-    virtual void SetFont(const wxFont& font) {}
+    virtual void SetFont(const wxFont& font);
     virtual void SetPen(const wxPen& pen);
     virtual void SetBrush(const wxBrush& brush);
     virtual void SetBackground(const wxBrush& brush);
@@ -93,7 +100,7 @@ public:
                                  wxCoord *x, wxCoord *y,
                                  wxCoord *descent = NULL,
                                  wxCoord *externalLeading = NULL,
-                                 wxFont *theFont = NULL) const;
+                                 const wxFont *theFont = NULL) const;
 
     virtual bool CanDrawBitmap() const;
     virtual bool CanGetTextExtent() const;