]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mac/dc.h
Added project files for wxUniv under MSW
[wxWidgets.git] / include / wx / mac / dc.h
index e59e0164b9736159df27c2f7593204a22c947884..b98087e5d76f3abf9d4e532047aa11a0a527fef6 100644 (file)
@@ -48,6 +48,15 @@ extern int wxPageNumber;
 // wxDC
 //-----------------------------------------------------------------------------
 
+class WXDLLEXPORT wxMacPortSetter
+{
+public :
+       wxMacPortSetter( const wxDC* dc ) ;
+       ~wxMacPortSetter() ;
+private :
+       AGAPortHelper m_ph ;
+} ;
+
 class WXDLLEXPORT wxDC: public wxDCBase
 {
   DECLARE_DYNAMIC_CLASS(wxDC)
@@ -63,7 +72,7 @@ class WXDLLEXPORT wxDC: public wxDCBase
 
     virtual void Clear();
 
-    virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; };
+    virtual bool StartDoc( const wxString& WXUNUSED(message) ) { return TRUE; }
     virtual void EndDoc(void) {};
     
     virtual void StartPage(void) {};
@@ -226,21 +235,22 @@ protected:
                                wxCoord xoffset, wxCoord yoffset,
                                int fillStyle = wxODDEVEN_RULE);
 
-
-
-//
-
-  public:
-//begin wxmac
+  protected:
+    //begin wxmac
+    // Variables used for scaling
     double       m_mm_to_pix_x,m_mm_to_pix_y; 
-    bool         m_needComputeScaleX,m_needComputeScaleY;         // not yet used
-    long         m_internalDeviceOriginX,m_internalDeviceOriginY;   // If un-scrolled is non-zero or
-                                                                   // d.o. changes with scrolling.
-                                                                   // Set using SetInternalDeviceOrigin().
+    // not yet used
+    bool         m_needComputeScaleX,m_needComputeScaleY;         
+    // If un-scrolled is non-zero or d.o. changes with scrolling.
+       // Set using SetInternalDeviceOrigin().
+       long         m_internalDeviceOriginX,m_internalDeviceOriginY;  
+        // To be set by external classes such as wxScrolledWindow
+        // using SetDeviceOrigin()
+    long         m_externalDeviceOriginX,m_externalDeviceOriginY;  
+                                                                    
+    // Begin implementation for Mac
+    public:
                                                                    
-    long         m_externalDeviceOriginX,m_externalDeviceOriginY;   // To be set by external classes
-                                                                    // such as wxScrolledWindow
-                                                                   // using SetDeviceOrigin()
        GrafPtr                         m_macPort ;
        GWorldPtr                       m_macMask ;
 
@@ -255,15 +265,9 @@ protected:
        mutable bool    m_macPenInstalled ;
        mutable bool    m_macBrushInstalled ;
        
-       mutable long    m_macPortId ;
-       GrafPtr                         m_macOrigPort ;
        Rect                                    m_macClipRect ;
        Point                                   m_macLocalOrigin ;
-       mutable AGAPortHelper   m_macPortHelper ;
-       void                                    MacSetupPort() const ;
-       void                                    MacVerifySetup() const { if ( m_macPortId != m_macCurrentPortId ) MacSetupPort() ; } 
-       static void                             MacInvalidateSetup() { m_macCurrentPortId++ ; }
-       static long m_macCurrentPortId ;
+       void                                    MacSetupPort( AGAPortHelper* ph ) const ;
 };
 
 #endif