]> git.saurik.com Git - wxWidgets.git/blobdiff - include/wx/mac/carbon/dcmemory.h
reverted wxSocket changes of rev 48723 as they broke linking under non-Unix systems
[wxWidgets.git] / include / wx / mac / carbon / dcmemory.h
index 0d8b1402bbb9a54efa6b78d40298bbc1e096c34e..d2eb3d4acc3527d585dd444a0b339da2cca5c60a 100644 (file)
@@ -6,30 +6,38 @@
 // Created:     1998-01-01
 // RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
 // Created:     1998-01-01
 // RCS-ID:      $Id$
 // Copyright:   (c) Stefan Csomor
-// Licence:     wxWidgets licence
+// Licence:     wxWindows licence
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_DCMEMORY_H_
 #define _WX_DCMEMORY_H_
 
 /////////////////////////////////////////////////////////////////////////////
 
 #ifndef _WX_DCMEMORY_H_
 #define _WX_DCMEMORY_H_
 
-#if defined(__GNUG__) && !defined(NO_GCC_PRAGMA)
-#pragma interface "dcmemory.h"
-#endif
-
 #include "wx/dcclient.h"
 
 #include "wx/dcclient.h"
 
-class WXDLLEXPORT wxMemoryDC: public wxPaintDC
+class WXDLLEXPORT wxMemoryDC: public wxPaintDC, public wxMemoryDCBase
 {
   DECLARE_DYNAMIC_CLASS(wxMemoryDC)
 
 {
   DECLARE_DYNAMIC_CLASS(wxMemoryDC)
 
-  public:
-    wxMemoryDC(void);
+public:
+    wxMemoryDC() { Init(); }
+    wxMemoryDC(wxBitmap& bitmap) { Init(); SelectObject(bitmap); }
     wxMemoryDC( wxDC *dc ); // Create compatible DC
     wxMemoryDC( wxDC *dc ); // Create compatible DC
-    ~wxMemoryDC(void);
-    virtual void SelectObject( const wxBitmap& bitmap );
+    virtual ~wxMemoryDC(void);
+
+    const wxBitmap& GetSelectedBitmap() const { return m_selected; }
+    wxBitmap    GetSelectedBitmap() { return m_selected; }
+
+       wxBitmap    GetSelectedObject() { return GetSelectedBitmap() ; }
+
+protected:
     virtual void DoGetSize( int *width, int *height ) const;
     virtual void DoGetSize( int *width, int *height ) const;
-        wxBitmap    GetSelectedObject() { return m_selected ; }
-  private:
+    virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const 
+    { return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
+    virtual void DoSelect(const wxBitmap& bitmap);
+
+private:
+    void Init();
+
     wxBitmap  m_selected;
 };
 
     wxBitmap  m_selected;
 };