LoadFile( name, type );
}
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
wxImage::wxImage( wxInputStream& stream, long type )
{
LoadFile( stream, type );
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
wxImage::wxImage( const wxImage& image )
{
bool wxImage::LoadFile( const wxString& filename, long type )
{
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
if (wxFileExists(filename))
{
wxFileInputStream stream(filename);
return FALSE;
}
-#else // !wxUSE_STREAM
+#else // !wxUSE_STREAMS
return FALSE;
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
}
bool wxImage::SaveFile( const wxString& filename, int type )
{
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
wxFileOutputStream stream(filename);
if ( stream.LastError() == wxStream_NOERROR )
return SaveFile(stream, type);
else
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
return FALSE;
}
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxImage::LoadFile( wxInputStream& stream, long type )
{
UnRef();
return handler->SaveFile( this, stream );
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
void wxImage::AddHandler( wxImageHandler *handler )
{
IMPLEMENT_DYNAMIC_CLASS(wxImageHandler,wxObject)
#endif
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxImageHandler::LoadFile( wxImage *WXUNUSED(image), wxInputStream& WXUNUSED(stream) )
{
return FALSE;
{
return FALSE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
//-----------------------------------------------------------------------------
// wxPNGHandler
#endif
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
static void _PNG_stream_reader( png_structp png_ptr, png_bytep data, png_size_t length )
{
((wxInputStream*) png_get_io_ptr( png_ptr )) -> Read(data, length);
}
return TRUE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
#endif
IMPLEMENT_DYNAMIC_CLASS(wxBMPHandler,wxImageHandler)
#endif
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxBMPHandler::LoadFile( wxImage *image, wxInputStream& stream )
{
unsigned char *data, *ptr;
return TRUE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
#ifdef __WXMSW__
virtual bool Read(istream& str);
virtual bool Write(ostream& str) const;
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
virtual bool Write(wxOutputStream &str) const;
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
virtual wxString GetType() const { return "long"; };
return TRUE;
}
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxVariantDataLong::Write(wxOutputStream& str) const
{
str << m_value;
str >> m_value;
return TRUE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
bool wxVariantDataLong::Read(wxString& str)
{
virtual bool Write(ostream& str) const;
virtual bool Write(wxString& str) const;
virtual bool Read(istream& str);
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
virtual bool Write(wxOutputStream &str) const;
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
virtual wxString GetType() const { return "double"; };
protected:
return TRUE;
}
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxVariantDataReal::Write(wxOutputStream& str) const
{
str << m_value;
str >> (float&)m_value;
return TRUE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
bool wxVariantDataReal::Read(wxString& str)
{
virtual bool Write(wxString& str) const;
virtual bool Read(wxString& str);
virtual bool Read(istream& str);
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
virtual bool Write(wxOutputStream& str) const;
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
virtual wxString GetType() const { return "bool"; };
protected:
return FALSE;
}
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxVariantDataBool::Write(wxOutputStream& str) const
{
str << (char)m_value;
str >> (char&)m_value;
return TRUE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
bool wxVariantDataBool::Read(wxString& str)
{
virtual bool Write(ostream& str) const;
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
virtual bool Write(wxOutputStream& str) const;
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
virtual wxString GetType() const { return "char"; };
protected:
return FALSE;
}
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxVariantDataChar::Write(wxOutputStream& str) const
{
str << m_value;
str >> m_value;
return TRUE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
bool wxVariantDataChar::Read(wxString& str)
{
virtual bool Read(wxString& str);
virtual bool Write(wxString& str) const;
virtual bool Read(istream& str);
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
virtual bool Read(wxInputStream& str);
virtual bool Write(wxOutputStream& str) const;
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
virtual wxString GetType() const { return "string"; };
protected:
return TRUE;
}
-#if wxUSE_STREAM
+#if wxUSE_STREAMS
bool wxVariantDataString::Write(wxOutputStream& str) const
{
str << (const char*) m_value;
str >> m_value;
return TRUE;
}
-#endif // wxUSE_STREAM
+#endif // wxUSE_STREAMS
bool wxVariantDataString::Read(wxString& str)
{