X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/4b7f2165565bb33b149baf1272e28f9a61d579d3..442b35b53bf95f5c6c003ea9ddbefd17adbc2a00:/include/wx/msw/dc.h?ds=sidebyside diff --git a/include/wx/msw/dc.h b/include/wx/msw/dc.h index d9479093ea..9acfd0cad0 100644 --- a/include/wx/msw/dc.h +++ b/include/wx/msw/dc.h @@ -73,8 +73,6 @@ class WXDLLEXPORT wxDC : public wxDCBase { - DECLARE_DYNAMIC_CLASS(wxDC) - public: wxDC(); ~wxDC(); @@ -125,7 +123,6 @@ public: // -------------------------- virtual void SetRop(WXHDC cdc); - virtual void DoClipping(WXHDC cdc); virtual void SelectOldObjects(WXHDC dc); wxWindow *GetWindow() const { return m_canvas; } @@ -141,6 +138,9 @@ public: const wxBitmap& GetSelectedBitmap() const { return m_selectedBitmap; } wxBitmap& GetSelectedBitmap() { return m_selectedBitmap; } + // update the internal clip box variables + void UpdateClipBox(); + protected: virtual void DoFloodFill(wxCoord x, wxCoord y, const wxColour& col, int style = wxFLOOD_SURFACE); @@ -153,6 +153,8 @@ protected: virtual void DoDrawArc(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2, wxCoord xc, wxCoord yc); + virtual void DoDrawCheckMark(wxCoord x, wxCoord y, + wxCoord width, wxCoord height); virtual void DoDrawEllipticArc(wxCoord x, wxCoord y, wxCoord w, wxCoord h, double sa, double ea); @@ -196,9 +198,6 @@ protected: wxCoord xoffset, wxCoord yoffset, int fillStyle = wxODDEVEN_RULE); -#if wxUSE_SPLINES - virtual void DoDrawSpline(wxList *points); -#endif // wxUSE_SPLINES // common part of DoDrawText() and DoDrawRotatedText() void DrawAnyText(const wxString& text, wxCoord x, wxCoord y); @@ -215,10 +214,8 @@ protected: // TRUE => DeleteDC() in dtor, FALSE => only ReleaseDC() it bool m_bOwnsDC:1; - // our HDC and its usage count: we only free it when the usage count drops - // to 0 + // our HDC WXHDC m_hDC; - int m_hDCCount; // Store all old GDI objects when do a SelectObject, so we can select them // back in (this unselecting user's objects) so we can safely delete the @@ -228,6 +225,20 @@ protected: WXHBRUSH m_oldBrush; WXHFONT m_oldFont; WXHPALETTE m_oldPalette; + + DECLARE_DYNAMIC_CLASS(wxDC) +}; + +// ---------------------------------------------------------------------------- +// wxDCTemp: a wxDC which doesn't free the given HDC (used by wxWindows +// only/mainly) +// ---------------------------------------------------------------------------- + +class WXDLLEXPORT wxDCTemp : public wxDC +{ +public: + wxDCTemp(WXHDC hdc) { SetHDC(hdc); } + virtual ~wxDCTemp() { SetHDC((WXHDC)NULL); } }; #endif