correct access for virtuals

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@43843 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Paul Cornett
2006-12-07 05:44:44 +00:00
parent 4fe9ce473e
commit 3498362ed5
6 changed files with 44 additions and 66 deletions

View File

@@ -12,7 +12,6 @@
#ifndef _WX_DCMEMORY_H_BASE_ #ifndef _WX_DCMEMORY_H_BASE_
#define _WX_DCMEMORY_H_BASE_ #define _WX_DCMEMORY_H_BASE_
#include "wx/defs.h"
#include "wx/bitmap.h" #include "wx/bitmap.h"
// NOTE: different native implementations of wxMemoryDC will derive from // NOTE: different native implementations of wxMemoryDC will derive from
@@ -45,6 +44,7 @@ public:
DoSelect(bmp); DoSelect(bmp);
} }
protected:
virtual void DoSelect(const wxBitmap& bmp) = 0; virtual void DoSelect(const wxBitmap& bmp) = 0;
}; };

View File

@@ -7,18 +7,11 @@
// Licence: wxWindows licence // Licence: wxWindows licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef __GTKDCMEMORYH__ #ifndef _WX_GTK_DCMEMORY_H_
#define __GTKDCMEMORYH__ #define _WX_GTK_DCMEMORY_H_
#include "wx/defs.h"
#include "wx/dcclient.h" #include "wx/dcclient.h"
//-----------------------------------------------------------------------------
// classes
//-----------------------------------------------------------------------------
class WXDLLIMPEXP_CORE wxMemoryDC;
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
// wxMemoryDC // wxMemoryDC
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
@@ -48,15 +41,13 @@ public:
protected: protected:
void DoGetSize( int *width, int *height ) const; void DoGetSize( int *width, int *height ) const;
virtual void DoSelect(const wxBitmap& bitmap); virtual void DoSelect(const wxBitmap& bitmap);
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
{ return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
private: private:
void Init(); void Init();
virtual wxBitmap DoGetAsBitmap(const wxRect *subrect) const
{ return subrect == NULL ? GetSelectedBitmap() : GetSelectedBitmap().GetSubBitmap(*subrect); }
DECLARE_DYNAMIC_CLASS(wxMemoryDC) DECLARE_DYNAMIC_CLASS(wxMemoryDC)
}; };
#endif #endif // _WX_GTK_DCMEMORY_H_
// __GTKDCMEMORYH__

View File

@@ -8,10 +8,8 @@
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef __gprint_H__ #ifndef _WX_GTK_GPRINT_H_
#define __gprint_H__ #define _WX_GTK_GPRINT_H_
// Include wxWindows' headers
#include "wx/defs.h" #include "wx/defs.h"
@@ -50,7 +48,6 @@ private:
GnomePrintConfig *m_config; GnomePrintConfig *m_config;
GnomePrintJob *m_job; GnomePrintJob *m_job;
private:
DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData) DECLARE_DYNAMIC_CLASS(wxGnomePrintNativeData)
}; };
@@ -116,7 +113,7 @@ public:
virtual bool TransferDataToWindow(); virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow(); virtual bool TransferDataFromWindow();
private: protected:
// Implement some base class methods to do nothing to avoid asserts and // Implement some base class methods to do nothing to avoid asserts and
// GTK warnings, since this is not a real wxDialog. // GTK warnings, since this is not a real wxDialog.
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
@@ -125,10 +122,10 @@ private:
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height)) {} int WXUNUSED(width), int WXUNUSED(height)) {}
private:
void Init(); void Init();
wxPrintDialogData m_printDialogData; wxPrintDialogData m_printDialogData;
private:
DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog) DECLARE_DYNAMIC_CLASS(wxGnomePrintDialog)
}; };
@@ -151,7 +148,7 @@ public:
virtual bool TransferDataToWindow(); virtual bool TransferDataToWindow();
virtual bool TransferDataFromWindow(); virtual bool TransferDataFromWindow();
private: protected:
// Implement some base class methods to do nothing to avoid asserts and // Implement some base class methods to do nothing to avoid asserts and
// GTK warnings, since this is not a real wxDialog. // GTK warnings, since this is not a real wxDialog.
virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y), virtual void DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
@@ -160,9 +157,9 @@ private:
virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y), virtual void DoMoveWindow(int WXUNUSED(x), int WXUNUSED(y),
int WXUNUSED(width), int WXUNUSED(height)) {} int WXUNUSED(width), int WXUNUSED(height)) {}
private:
wxPageSetupDialogData m_pageDialogData; wxPageSetupDialogData m_pageDialogData;
private:
DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog) DECLARE_DYNAMIC_CLASS(wxGnomePageSetupDialog)
}; };
@@ -207,6 +204,32 @@ public:
bool Ok() const { return IsOk(); } bool Ok() const { return IsOk(); }
bool IsOk() const; bool IsOk() const;
bool CanDrawBitmap() const { return true; }
void Clear();
void SetFont( const wxFont& font );
void SetPen( const wxPen& pen );
void SetBrush( const wxBrush& brush );
void SetLogicalFunction( int function );
void SetBackground( const wxBrush& brush );
void DestroyClippingRegion();
bool StartDoc(const wxString& message);
void EndDoc();
void StartPage();
void EndPage();
wxCoord GetCharHeight() const;
wxCoord GetCharWidth() const;
bool CanGetTextExtent() const { return true; }
wxSize GetPPI() const;
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
void SetLogicalOrigin( wxCoord x, wxCoord y );
void SetDeviceOrigin( wxCoord x, wxCoord y );
virtual int GetDepth() const { return 24; }
void SetBackgroundMode(int WXUNUSED(mode)) { }
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
static void SetResolution(int ppi);
static int GetResolution();
protected:
bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE ); bool DoFloodFill(wxCoord x1, wxCoord y1, const wxColour &col, int style=wxFLOOD_SURFACE );
bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const; bool DoGetPixel(wxCoord x1, wxCoord y1, wxColour *col) const;
void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2); void DoDrawLine(wxCoord x1, wxCoord y1, wxCoord x2, wxCoord y2);
@@ -223,59 +246,25 @@ public:
#if wxUSE_SPLINES #if wxUSE_SPLINES
void DoDrawSpline(wxList *points); void DoDrawSpline(wxList *points);
#endif // wxUSE_SPLINES #endif // wxUSE_SPLINES
bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height, bool DoBlit(wxCoord xdest, wxCoord ydest, wxCoord width, wxCoord height,
wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false, wxDC *source, wxCoord xsrc, wxCoord ysrc, int rop = wxCOPY, bool useMask = false,
wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord); wxCoord xsrcMask = wxDefaultCoord, wxCoord ysrcMask = wxDefaultCoord);
void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y ); void DoDrawIcon( const wxIcon& icon, wxCoord x, wxCoord y );
void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false ); void DoDrawBitmap( const wxBitmap& bitmap, wxCoord x, wxCoord y, bool useMask = false );
bool CanDrawBitmap() const { return true; }
void DoDrawText(const wxString& text, wxCoord x, wxCoord y ); void DoDrawText(const wxString& text, wxCoord x, wxCoord y );
void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle); void DoDrawRotatedText(const wxString& text, wxCoord x, wxCoord y, double angle);
void Clear();
void SetFont( const wxFont& font );
void SetPen( const wxPen& pen );
void SetBrush( const wxBrush& brush );
void SetLogicalFunction( int function );
void SetBackground( const wxBrush& brush );
void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height); void DoSetClippingRegion(wxCoord x, wxCoord y, wxCoord width, wxCoord height);
void DestroyClippingRegion();
void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { } void DoSetClippingRegionAsRegion( const wxRegion &WXUNUSED(clip) ) { }
bool StartDoc(const wxString& message);
void EndDoc();
void StartPage();
void EndPage();
wxCoord GetCharHeight() const;
wxCoord GetCharWidth() const;
bool CanGetTextExtent() const { return true; }
void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y, void DoGetTextExtent(const wxString& string, wxCoord *x, wxCoord *y,
wxCoord *descent = (wxCoord *) NULL, wxCoord *descent = (wxCoord *) NULL,
wxCoord *externalLeading = (wxCoord *) NULL, wxCoord *externalLeading = (wxCoord *) NULL,
wxFont *theFont = (wxFont *) NULL ) const; wxFont *theFont = (wxFont *) NULL ) const;
void DoGetSize(int* width, int* height) const; void DoGetSize(int* width, int* height) const;
void DoGetSizeMM(int *width, int *height) const; void DoGetSizeMM(int *width, int *height) const;
wxSize GetPPI() const;
void SetAxisOrientation( bool xLeftRight, bool yBottomUp );
void SetLogicalOrigin( wxCoord x, wxCoord y );
void SetDeviceOrigin( wxCoord x, wxCoord y );
virtual int GetDepth() const { return 24; }
void SetBackgroundMode(int WXUNUSED(mode)) { }
void SetPalette(const wxPalette& WXUNUSED(palette)) { }
wxPrintData& GetPrintData() { return m_printData; } wxPrintData& GetPrintData() { return m_printData; }
void SetPrintData(const wxPrintData& data) { m_printData = data; } void SetPrintData(const wxPrintData& data) { m_printData = data; }
static void SetResolution(int ppi);
static int GetResolution();
private: private:
static float ms_PSScaleFactor; static float ms_PSScaleFactor;

View File

@@ -8,10 +8,8 @@
// Licence: wxWindows Licence // Licence: wxWindows Licence
///////////////////////////////////////////////////////////////////////////// /////////////////////////////////////////////////////////////////////////////
#ifndef __gvfs_H__ #ifndef _WX_GTK_GVFS_H_
#define __gvfs_H__ #define _WX_GTK_GVFS_H_
// Include wxWindows' headers
#include "wx/defs.h" #include "wx/defs.h"
@@ -29,6 +27,7 @@ class wxGnomeVFSMimeTypesManagerImpl: public wxMimeTypesManagerImpl
public: public:
wxGnomeVFSMimeTypesManagerImpl() { } wxGnomeVFSMimeTypesManagerImpl() { }
protected:
virtual bool DoAssociation(const wxString& strType, virtual bool DoAssociation(const wxString& strType,
const wxString& strIcon, const wxString& strIcon,
wxMimeTypeCommands *entry, wxMimeTypeCommands *entry,

View File

@@ -34,10 +34,10 @@ public:
bool verbose = true, int index = -1); bool verbose = true, int index = -1);
virtual bool SaveFile(wxImage* image, wxOutputStream& stream, virtual bool SaveFile(wxImage* image, wxOutputStream& stream,
bool verbose = true); bool verbose = true);
protected:
virtual bool DoCanRead(wxInputStream& stream); virtual bool DoCanRead(wxInputStream& stream);
#endif // wxUSE_STREAMS #endif // wxUSE_STREAMS
private:
DECLARE_DYNAMIC_CLASS(wxTGAHandler) DECLARE_DYNAMIC_CLASS(wxTGAHandler)
}; };

View File

@@ -248,8 +248,6 @@ public:
// do the window-specific processing after processing the update event // do the window-specific processing after processing the update event
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ; virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
protected:
// a different API for SetSizeHints // a different API for SetSizeHints
virtual void SetMinSize(const wxSize& minSize); virtual void SetMinSize(const wxSize& minSize);
virtual void SetMaxSize(const wxSize& maxSize); virtual void SetMaxSize(const wxSize& maxSize);
@@ -259,6 +257,7 @@ protected:
int maxW = wxDefaultCoord, int maxH = wxDefaultCoord, int maxW = wxDefaultCoord, int maxH = wxDefaultCoord,
int incW = wxDefaultCoord, int incH = wxDefaultCoord ); int incW = wxDefaultCoord, int incH = wxDefaultCoord );
protected:
// the frame client to screen translation should take account of the // the frame client to screen translation should take account of the
// toolbar which may shift the origin of the client area // toolbar which may shift the origin of the client area
virtual void DoClientToScreen(int *x, int *y) const; virtual void DoClientToScreen(int *x, int *y) const;