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
This commit is contained in:
Mattia Barbon
2006-10-15 15:45:13 +00:00
parent 8db7faf281
commit 653752be8a
3 changed files with 9 additions and 3 deletions

View File

@@ -37,7 +37,7 @@
// does not prepare the window DC // does not prepare the window DC
#define wxBUFFER_CLIENT_AREA 0x02 #define wxBUFFER_CLIENT_AREA 0x02
class wxBufferedDC : public wxMemoryDC class WXDLLEXPORT wxBufferedDC : public wxMemoryDC
{ {
public: public:
// Default ctor, must subsequently call Init for two stage construction. // Default ctor, must subsequently call Init for two stage construction.
@@ -148,6 +148,7 @@ private:
// the buffering style // the buffering style
int m_style; int m_style;
DECLARE_DYNAMIC_CLASS(wxBufferedDC)
DECLARE_NO_COPY_CLASS(wxBufferedDC) DECLARE_NO_COPY_CLASS(wxBufferedDC)
}; };
@@ -158,7 +159,7 @@ private:
// Creates a double buffered wxPaintDC, optionally allowing the // Creates a double buffered wxPaintDC, optionally allowing the
// user to specify their own buffer to use. // user to specify their own buffer to use.
class wxBufferedPaintDC : public wxBufferedDC class WXDLLEXPORT wxBufferedPaintDC : public wxBufferedDC
{ {
public: public:
// If no bitmap is supplied by the user, a temporary one will be created. // If no bitmap is supplied by the user, a temporary one will be created.
@@ -198,6 +199,7 @@ public:
private: private:
wxPaintDC m_paintdc; wxPaintDC m_paintdc;
DECLARE_ABSTRACT_CLASS(wxBufferedPaintDC)
DECLARE_NO_COPY_CLASS(wxBufferedPaintDC) DECLARE_NO_COPY_CLASS(wxBufferedPaintDC)
}; };

View File

@@ -25,6 +25,7 @@
#endif #endif
#include "wx/dc.h" #include "wx/dc.h"
#include "wx/dcbuffer.h" // for IMPLEMENT_DYNAMIC_CLASS
#ifndef WX_PRECOMP #ifndef WX_PRECOMP
#include "wx/math.h" #include "wx/math.h"
@@ -38,6 +39,9 @@ IMPLEMENT_ABSTRACT_CLASS(wxDCBase, wxObject)
// implementation // implementation
// ============================================================================ // ============================================================================
IMPLEMENT_DYNAMIC_CLASS(wxBufferedDC, wxMemoryDC)
IMPLEMENT_ABSTRACT_CLASS(wxBufferedPaintDC, wxBufferedDC)
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
void wxDCBase::BeginDrawing() void wxDCBase::BeginDrawing()
{ {

View File

@@ -670,7 +670,7 @@ wxStreamBase::~wxStreamBase()
size_t wxStreamBase::GetSize() const size_t wxStreamBase::GetSize() const
{ {
wxFileOffset length = GetLength(); wxFileOffset length = GetLength();
if ( length == wxInvalidOffset ) if ( length == (wxFileOffset)wxInvalidOffset )
return 0; return 0;
const size_t len = wx_truncate_cast(size_t, length); const size_t len = wx_truncate_cast(size_t, length);