From: Mattia Barbon Date: Sun, 15 Oct 2006 15:45:13 +0000 (+0000) Subject: Added wxRTTI macros to buffered DCs. X-Git-Url: https://git.saurik.com/wxWidgets.git/commitdiff_plain/653752be8a1d2a2e14da6aa225f0ce3e393909ad Added wxRTTI macros to buffered DCs. Fix a signed/unsigned warning. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42032 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- diff --git a/include/wx/dcbuffer.h b/include/wx/dcbuffer.h index 6916ff7eef..85f5f6cef4 100644 --- a/include/wx/dcbuffer.h +++ b/include/wx/dcbuffer.h @@ -37,7 +37,7 @@ // does not prepare the window DC #define wxBUFFER_CLIENT_AREA 0x02 -class wxBufferedDC : public wxMemoryDC +class WXDLLEXPORT wxBufferedDC : public wxMemoryDC { public: // Default ctor, must subsequently call Init for two stage construction. @@ -148,6 +148,7 @@ private: // the buffering style int m_style; + DECLARE_DYNAMIC_CLASS(wxBufferedDC) DECLARE_NO_COPY_CLASS(wxBufferedDC) }; @@ -158,7 +159,7 @@ private: // Creates a double buffered wxPaintDC, optionally allowing the // user to specify their own buffer to use. -class wxBufferedPaintDC : public wxBufferedDC +class WXDLLEXPORT wxBufferedPaintDC : public wxBufferedDC { public: // If no bitmap is supplied by the user, a temporary one will be created. @@ -198,6 +199,7 @@ public: private: wxPaintDC m_paintdc; + DECLARE_ABSTRACT_CLASS(wxBufferedPaintDC) DECLARE_NO_COPY_CLASS(wxBufferedPaintDC) }; diff --git a/src/common/dcbase.cpp b/src/common/dcbase.cpp index 980db2b7b3..84ac42aa3c 100644 --- a/src/common/dcbase.cpp +++ b/src/common/dcbase.cpp @@ -25,6 +25,7 @@ #endif #include "wx/dc.h" +#include "wx/dcbuffer.h" // for IMPLEMENT_DYNAMIC_CLASS #ifndef WX_PRECOMP #include "wx/math.h" @@ -38,6 +39,9 @@ IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject) // implementation // ============================================================================ +IMPLEMENT_DYNAMIC_CLASS(wxBufferedDC, wxMemoryDC) +IMPLEMENT_ABSTRACT_CLASS(wxBufferedPaintDC, wxBufferedDC) + #if WXWIN_COMPATIBILITY_2_6 void wxDCBase::BeginDrawing() { diff --git a/src/common/stream.cpp b/src/common/stream.cpp index a0ce91c79d..18bcc6f518 100644 --- a/src/common/stream.cpp +++ b/src/common/stream.cpp @@ -670,7 +670,7 @@ wxStreamBase::~wxStreamBase() size_t wxStreamBase::GetSize() const { wxFileOffset length = GetLength(); - if ( length == wxInvalidOffset ) + if ( length == (wxFileOffset)wxInvalidOffset ) return 0; const size_t len = wx_truncate_cast(size_t, length);