class WXDLLEXPORT wxDC : public wxDCBase
{
- DECLARE_DYNAMIC_CLASS(wxDC)
-
public:
wxDC();
~wxDC();
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);
// 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;
// Store all old GDI objects when do a SelectObject, so we can select them
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