Added wxCountingStream for measuring the size of streamed data

Added wxBitmapObject for putting it on the clipboard


git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@3439 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling
1999-08-22 14:10:50 +00:00
parent ac2def68ed
commit e2acb9ae1c
12 changed files with 694 additions and 327 deletions

View File

@@ -136,6 +136,28 @@ class WXDLLEXPORT wxOutputStream: public wxStreamBase {
wxOutputStream& operator<<( __wxOutputManip func) { return func(*this); }
};
// ---------------------------------------------------------------------------
// A stream for measuring streamed output
// ---------------------------------------------------------------------------
class wxCountingOutputStream: public wxOutputStream {
public:
wxCountingOutputStream();
size_t GetSize() const;
bool Ok() const { return TRUE; }
protected:
size_t OnSysWrite(const void *buffer, size_t size);
off_t OnSysSeek(off_t pos, wxSeekMode mode);
off_t OnSysTell() const;
protected:
size_t m_currentPos;
};
// ---------------------------------------------------------------------------
// "Filter" streams
// ---------------------------------------------------------------------------