+// this is an ABC: use one of the derived classes to create a DC associated
+// with a window, screen, printer and so on
+class WXDLLIMPEXP_CORE wxPMDCImpl : public wxDCImpl
+{
+ DECLARE_DYNAMIC_CLASS(wxDC)
+
+public:
+ wxPMDCImpl(wxDC *owner, WXHDC hDC);
+ virtual ~wxPMDCImpl();
+
+ // implement base class pure virtuals
+ // ----------------------------------
+
+ virtual void Clear();
+
+ virtual bool StartDoc(const wxString& rsMessage);
+ virtual void EndDoc();
+
+ virtual void StartPage();
+ virtual void EndPage();
+
+ virtual void SetFont(const wxFont& rFont);
+ virtual void SetPen(const wxPen& rPen);
+ virtual void SetBrush(const wxBrush& rBrush);
+ virtual void SetBackground(const wxBrush& rBrush);
+ virtual void SetBackgroundMode(int nMode);
+ virtual void SetPalette(const wxPalette& rPalette);
+
+ virtual void DestroyClippingRegion();
+
+ virtual wxCoord GetCharHeight() const;
+ virtual wxCoord GetCharWidth() const;
+
+ virtual bool CanDrawBitmap() const;
+ virtual bool CanGetTextExtent() const;
+ virtual int GetDepth() const;
+ virtual wxSize GetPPI() const;
+
+ virtual void SetMapMode(wxMappingMode nMode);
+ virtual void SetUserScale( double dX
+ ,double dY
+ );
+ virtual void SetLogicalScale( double dX
+ ,double dY
+ );
+ virtual void SetLogicalOrigin( wxCoord vX
+ ,wxCoord vY
+ );
+ virtual void SetDeviceOrigin( wxCoord vX
+ ,wxCoord vY
+ );
+ virtual void SetAxisOrientation( bool bXLeftRight
+ ,bool bYBottomUp
+ );
+ virtual void SetLogicalFunction(wxRasterOperationMode nFunction);
+
+ // implementation from now on
+ // --------------------------
+
+ virtual void SetRop(WXHDC hCdc);
+ virtual void SelectOldObjects(WXHDC hDc);
+
+ wxWindow* GetWindow() const { return m_pCanvas; }
+ void SetWindow(wxWindow* pWin) { m_pCanvas = pWin; }
+
+ WXHDC GetHDC() const { return m_hDC; }
+ void SetHDC( WXHDC hDc
+ ,bool bOwnsDC = FALSE
+ )
+ {
+ m_hDC = hDc;
+ m_bOwnsDC = bOwnsDC;
+ }
+
+ HPS GetHPS() const { return m_hPS; }
+ void SetHPS(HPS hPS)
+ {
+ m_hPS = hPS;
+ }
+ const wxBitmap& GetSelectedBitmap() const { return m_vSelectedBitmap; }
+ wxBitmap& GetSelectedBitmap() { return m_vSelectedBitmap; }
+
+ void UpdateClipBox();
+
+#if wxUSE_DC_CACHEING
+ static wxDCCacheEntry* FindBitmapInCache( HPS hPS
+ ,int nWidth
+ ,int nHeight
+ );
+ static wxDCCacheEntry* FindDCInCache( wxDCCacheEntry* pNotThis
+ ,HPS hPS
+ );
+
+ static void AddToBitmapCache(wxDCCacheEntry* pEntry);
+ static void AddToDCCache(wxDCCacheEntry* pEntry);
+ static void ClearCache();