+// 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(void);
+
+ virtual bool StartDoc(const wxString& rsMessage);
+ virtual void EndDoc(void);
+
+ virtual void StartPage(void);
+ virtual void EndPage(void);
+
+ 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(void);
+
+ virtual wxCoord GetCharHeight(void) const;
+ virtual wxCoord GetCharWidth(void) const;
+
+ virtual bool CanDrawBitmap(void) const;
+ virtual bool CanGetTextExtent(void) const;
+ virtual int GetDepth(void) const;
+ virtual wxSize GetPPI(void) const;
+
+ virtual void SetMapMode(int 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(void) const { return m_pCanvas; }
+ void SetWindow(wxWindow* pWin) { m_pCanvas = pWin; }
+
+ WXHDC GetHDC(void) const { return m_hDC; }
+ void SetHDC( WXHDC hDc
+ ,bool bOwnsDC = FALSE
+ )
+ {
+ m_hDC = hDc;
+ m_bOwnsDC = bOwnsDC;
+ }
+
+ HPS GetHPS(void) const { return m_hPS; }
+ void SetHPS(HPS hPS)
+ {
+ m_hPS = hPS;
+ }
+ const wxBitmap& GetSelectedBitmap(void) const { return m_vSelectedBitmap; }
+ wxBitmap& GetSelectedBitmap(void) { 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(void);