diff --git a/include/wx/generic/dvrenderers.h b/include/wx/generic/dvrenderers.h index 6f80c773a5..60d431f84e 100644 --- a/include/wx/generic/dvrenderers.h +++ b/include/wx/generic/dvrenderers.h @@ -50,8 +50,8 @@ public: wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); - bool SetValue( const wxVariant &value ); - bool GetValue( wxVariant &value ) const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; virtual bool Render(wxRect cell, wxDC *dc, int state); virtual wxSize GetSize() const; @@ -80,11 +80,11 @@ public: wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); - bool SetValue( const wxVariant &value ); - bool GetValue( wxVariant &value ) const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; - bool Render( wxRect cell, wxDC *dc, int state ); - wxSize GetSize() const; + virtual bool Render( wxRect cell, wxDC *dc, int state ); + virtual wxSize GetSize() const; private: wxIcon m_icon; @@ -105,11 +105,11 @@ public: wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); - bool SetValue( const wxVariant &value ); - bool GetValue( wxVariant &value ) const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; - bool Render( wxRect cell, wxDC *dc, int state ); - wxSize GetSize() const; + virtual bool Render( wxRect cell, wxDC *dc, int state ); + virtual wxSize GetSize() const; // Implementation only, don't use nor override virtual bool WXActivateCell(const wxRect& cell, @@ -136,8 +136,8 @@ public: wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); - bool SetValue( const wxVariant &value ); - bool GetValue( wxVariant& value ) const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant& value ) const; virtual bool Render(wxRect cell, wxDC *dc, int state); virtual wxSize GetSize() const; @@ -161,8 +161,8 @@ public: wxDataViewCellMode mode = wxDATAVIEW_CELL_INERT, int align = wxDVR_DEFAULT_ALIGNMENT ); - bool SetValue( const wxVariant &value ); - bool GetValue( wxVariant &value ) const; + virtual bool SetValue( const wxVariant &value ); + virtual bool GetValue( wxVariant &value ) const; virtual bool Render(wxRect cell, wxDC *dc, int state); virtual wxSize GetSize() const; diff --git a/include/wx/stream.h b/include/wx/stream.h index 9af5bac9ad..b8432607bd 100644 --- a/include/wx/stream.h +++ b/include/wx/stream.h @@ -308,9 +308,9 @@ public: wxFilterInputStream(wxInputStream *stream); virtual ~wxFilterInputStream(); - char Peek() { return m_parent_i_stream->Peek(); } + virtual char Peek() { return m_parent_i_stream->Peek(); } - wxFileOffset GetLength() const { return m_parent_i_stream->GetLength(); } + virtual wxFileOffset GetLength() const { return m_parent_i_stream->GetLength(); } wxInputStream *GetFilterInputStream() const { return m_parent_i_stream; } @@ -330,7 +330,7 @@ public: wxFilterOutputStream(wxOutputStream *stream); virtual ~wxFilterOutputStream(); - wxFileOffset GetLength() const { return m_parent_o_stream->GetLength(); } + virtual wxFileOffset GetLength() const { return m_parent_o_stream->GetLength(); } wxOutputStream *GetFilterOutputStream() const { return m_parent_o_stream; } @@ -561,13 +561,13 @@ public: virtual ~wxBufferedInputStream(); - char Peek(); - wxInputStream& Read(void *buffer, size_t size); + virtual char Peek(); + virtual wxInputStream& Read(void *buffer, size_t size); // Position functions - wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart); - wxFileOffset TellI() const; - bool IsSeekable() const { return m_parent_i_stream->IsSeekable(); } + virtual wxFileOffset SeekI(wxFileOffset pos, wxSeekMode mode = wxFromStart); + virtual wxFileOffset TellI() const; + virtual bool IsSeekable() const { return m_parent_i_stream->IsSeekable(); } // the buffer given to the stream will be deleted by it void SetInputStreamBuffer(wxStreamBuffer *buffer); @@ -604,17 +604,17 @@ public: virtual ~wxBufferedOutputStream(); - wxOutputStream& Write(const void *buffer, size_t size); + virtual wxOutputStream& Write(const void *buffer, size_t size); // Position functions - wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); - wxFileOffset TellO() const; - bool IsSeekable() const { return m_parent_o_stream->IsSeekable(); } + virtual wxFileOffset SeekO(wxFileOffset pos, wxSeekMode mode = wxFromStart); + virtual wxFileOffset TellO() const; + virtual bool IsSeekable() const { return m_parent_o_stream->IsSeekable(); } void Sync(); bool Close(); - wxFileOffset GetLength() const; + virtual wxFileOffset GetLength() const; // the buffer given to the stream will be deleted by it void SetOutputStreamBuffer(wxStreamBuffer *buffer); diff --git a/include/wx/wfstream.h b/include/wx/wfstream.h index 613b4c273b..488d964d62 100644 --- a/include/wx/wfstream.h +++ b/include/wx/wfstream.h @@ -35,20 +35,20 @@ public: wxFileInputStream(int fd); virtual ~wxFileInputStream(); - wxFileOffset GetLength() const; + virtual wxFileOffset GetLength() const; bool Ok() const { return IsOk(); } virtual bool IsOk() const; - bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + virtual bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } wxFile* GetFile() const { return m_file; } protected: wxFileInputStream(); - size_t OnSysRead(void *buffer, size_t size); - wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); - wxFileOffset OnSysTell() const; + virtual size_t OnSysRead(void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; protected: wxFile *m_file; @@ -67,20 +67,20 @@ public: void Sync(); bool Close() { return m_file_destroy ? m_file->Close() : true; } - wxFileOffset GetLength() const; + virtual wxFileOffset GetLength() const; bool Ok() const { return IsOk(); } virtual bool IsOk() const; - bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + virtual bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } wxFile* GetFile() const { return m_file; } protected: wxFileOutputStream(); - size_t OnSysWrite(const void *buffer, size_t size); - wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); - wxFileOffset OnSysTell() const; + virtual size_t OnSysWrite(const void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; protected: wxFile *m_file; @@ -99,14 +99,14 @@ public: WXDLLIMPEXP_INLINE_BASE virtual bool Commit() { return m_file->Commit(); } WXDLLIMPEXP_INLINE_BASE virtual void Discard() { m_file->Discard(); } - wxFileOffset GetLength() const { return m_file->Length(); } - bool IsSeekable() const { return true; } + virtual wxFileOffset GetLength() const { return m_file->Length(); } + virtual bool IsSeekable() const { return true; } protected: - size_t OnSysWrite(const void *buffer, size_t size); - wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode) + virtual size_t OnSysWrite(const void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode) { return m_file->Seek(pos, mode); } - wxFileOffset OnSysTell() const { return m_file->Tell(); } + virtual wxFileOffset OnSysTell() const { return m_file->Tell(); } private: wxTempFile *m_file; @@ -166,20 +166,20 @@ public: wxFFileInputStream(FILE *file); virtual ~wxFFileInputStream(); - wxFileOffset GetLength() const; + virtual wxFileOffset GetLength() const; bool Ok() const { return IsOk(); } virtual bool IsOk() const; - bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + virtual bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } wxFFile* GetFile() const { return m_file; } protected: wxFFileInputStream(); - size_t OnSysRead(void *buffer, size_t size); - wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); - wxFileOffset OnSysTell() const; + virtual size_t OnSysRead(void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; protected: wxFFile *m_file; @@ -198,20 +198,20 @@ public: void Sync(); bool Close() { return m_file_destroy ? m_file->Close() : true; } - wxFileOffset GetLength() const; + virtual wxFileOffset GetLength() const; bool Ok() const { return IsOk(); } virtual bool IsOk() const; - bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } + virtual bool IsSeekable() const { return m_file->GetKind() == wxFILE_KIND_DISK; } wxFFile* GetFile() const { return m_file; } protected: wxFFileOutputStream(); - size_t OnSysWrite(const void *buffer, size_t size); - wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); - wxFileOffset OnSysTell() const; + virtual size_t OnSysWrite(const void *buffer, size_t size); + virtual wxFileOffset OnSysSeek(wxFileOffset pos, wxSeekMode mode); + virtual wxFileOffset OnSysTell() const; protected: wxFFile *m_file;