git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@42713
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
20 files changed:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Streams for archive formats
// Author: Mike Wetherell
// RCS-ID: $Id$
// Purpose: Streams for archive formats
// Author: Mike Wetherell
// RCS-ID: $Id$
virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
virtual void SetName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE) = 0;
virtual void SetIsReadOnly(bool isReadOnly = true) = 0;
virtual void SetName(const wxString& name,
wxPathFormat format = wxPATH_NATIVE) = 0;
wxArchiveEntry *Clone() const { return DoClone(); }
void SetNotifier(wxArchiveNotifier& notifier);
wxArchiveEntry *Clone() const { return DoClone(); }
void SetNotifier(wxArchiveNotifier& notifier);
typedef wxArchiveEntry entry_type;
virtual ~wxArchiveInputStream() { }
typedef wxArchiveEntry entry_type;
virtual ~wxArchiveInputStream() { }
virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
virtual bool CloseEntry() = 0;
wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); }
virtual char Peek() { return wxInputStream::Peek(); }
virtual bool OpenEntry(wxArchiveEntry& entry) = 0;
virtual bool CloseEntry() = 0;
wxArchiveEntry *GetNextEntry() { return DoGetNextEntry(); }
virtual char Peek() { return wxInputStream::Peek(); }
protected:
wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv);
wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv);
protected:
wxArchiveInputStream(wxInputStream& stream, wxMBConv& conv);
wxArchiveInputStream(wxInputStream *stream, wxMBConv& conv);
//
// Only one entry can be open for output at a time; another call to
// PutNextEntry closes the current entry and begins the next.
//
// Only one entry can be open for output at a time; another call to
// PutNextEntry closes the current entry and begins the next.
// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership
// of the entry object.
// The overload 'bool PutNextEntry(wxArchiveEntry *entry)' takes ownership
// of the entry object.
if (m_rep)
m_rep->AddRef();
}
if (m_rep)
m_rep->AddRef();
}
~wxArchiveIterator() {
if (m_rep)
m_rep->UnRef();
~wxArchiveIterator() {
if (m_rep)
m_rep->UnRef();
typename Arc::entry_type* m_entry;
T m_value;
int m_ref;
typename Arc::entry_type* m_entry;
T m_value;
int m_ref;
public:
Rep(Arc& arc, typename Arc::entry_type* entry)
: m_arc(arc), m_entry(entry), m_value(), m_ref(1) { }
~Rep()
{ delete m_entry; }
public:
Rep(Arc& arc, typename Arc::entry_type* entry)
: m_arc(arc), m_entry(entry), m_value(), m_ref(1) { }
~Rep()
{ delete m_entry; }
void AddRef() {
m_ref++;
}
void AddRef() {
m_ref++;
}
return NULL;
}
if (m_ref > 1) {
return NULL;
}
if (m_ref > 1) {
return new Rep(m_arc, entry);
}
delete m_entry;
return new Rep(m_arc, entry);
}
delete m_entry;
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: wxArtProvider class
// Author: Vaclav Slavik
// Modified by:
// Purpose: wxArtProvider class
// Author: Vaclav Slavik
// Modified by:
const wxArtClient& client = wxART_OTHER,
const wxSize& size = wxDefaultSize);
const wxArtClient& client = wxART_OTHER,
const wxSize& size = wxDefaultSize);
- // Get the size hint of an icon from a specific wxArtClient, queries
+ // Get the size hint of an icon from a specific wxArtClient, queries
// the topmost provider if platform_dependent = false
static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
// the topmost provider if platform_dependent = false
static wxSize GetSizeHint(const wxArtClient& client, bool platform_dependent = false);
static void CleanUpProviders();
// Get the default size of an icon for a specific client
static void CleanUpProviders();
// Get the default size of an icon for a specific client
- virtual wxSize DoGetSizeHint(const wxArtClient& client)
+ virtual wxSize DoGetSizeHint(const wxArtClient& client)
{
return GetSizeHint(client, true);
}
{
return GetSizeHint(client, true);
}
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Purpose: wxCaretBase class - the interface of wxCaret
// Author: Vadim Zeitlin
// Modified by:
// Purpose: wxCaretBase class - the interface of wxCaret
// Author: Vadim Zeitlin
// Modified by:
#endif // wxUSE_CARET
#endif // _WX_CARET_H_BASE_
#endif // wxUSE_CARET
#endif // _WX_CARET_H_BASE_
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Common GDI data classes
// Author: Julian Smart and others
// Modified by:
// Purpose: Common GDI data classes
// Author: Julian Smart and others
// Modified by:
wxString GetFilename() const { return m_filename; }
void SetFilename( const wxString &filename ) { m_filename = filename; }
wxString GetFilename() const { return m_filename; }
void SetFilename( const wxString &filename ) { m_filename = filename; }
void operator=(const wxPrintData& data);
char* GetPrivData() const { return m_privData; }
int GetPrivDataLen() const { return m_privDataLen; }
void SetPrivData( char *privData, int len );
void operator=(const wxPrintData& data);
char* GetPrivData() const { return m_privData; }
int GetPrivDataLen() const { return m_privDataLen; }
void SetPrivData( char *privData, int len );
#if WXWIN_COMPATIBILITY_2_4
// PostScript-specific data
#if WXWIN_COMPATIBILITY_2_4
// PostScript-specific data
wxPrintQuality m_printQuality;
wxPaperSize m_paperId;
wxSize m_paperSize;
wxPrintQuality m_printQuality;
wxPaperSize m_paperId;
wxSize m_paperSize;
char* m_privData;
int m_privDataLen;
char* m_privData;
int m_privDataLen;
wxPrintNativeDataBase *m_nativeData;
private:
wxPrintNativeDataBase *m_nativeData;
private:
///////////////////////////////////////////////////////////////////////////////
///////////////////////////////////////////////////////////////////////////////
// Purpose: auto-resizable (i.e. dynamic) array support
// Author: Vadim Zeitlin
// Modified by:
// Purpose: auto-resizable (i.e. dynamic) array support
// Author: Vadim Zeitlin
// Modified by:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/fileback.h
// Purpose: Back an input stream with memory or a file
// Author: Mike Wetherell
// RCS-ID: $Id$
// Purpose: Back an input stream with memory or a file
// Author: Mike Wetherell
// RCS-ID: $Id$
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: class for opening files - virtual file system
// Author: Vaclav Slavik
// Copyright: (c) 1999 Vaclav Slavik
// Purpose: class for opening files - virtual file system
// Author: Vaclav Slavik
// Copyright: (c) 1999 Vaclav Slavik
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Archive file system
// Author: Vaclav Slavik, Mike Wetherell
// Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
// Purpose: Archive file system
// Author: Vaclav Slavik, Mike Wetherell
// Copyright: (c) 1999 Vaclav Slavik, (c) 2006 Mike Wetherell
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Filter file system handler
// Author: Mike Wetherell
// Copyright: (c) 2006 Mike Wetherell
// Purpose: Filter file system handler
// Author: Mike Wetherell
// Copyright: (c) 2006 Mike Wetherell
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
-// Name: include/wx/fs_zip.h
// Purpose: wxZipFSHandler typedef for compatibility
// Author: Mike Wetherell
// Copyright: (c) 2006 Mike Wetherell
// Purpose: wxZipFSHandler typedef for compatibility
// Author: Mike Wetherell
// Copyright: (c) 2006 Mike Wetherell
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation
// Author: Guillermo Rodriguez Garcia <guille@iies.es>
// Version: 3.02
// Purpose: wxGIFDecoder, GIF reader for wxImage and wxAnimation
// Author: Guillermo Rodriguez Garcia <guille@iies.es>
// Version: 3.02
#endif // wxUSE_STREAM && wxUSE_GIF
#endif // _WX_GIFDECOD_H
#endif // wxUSE_STREAM && wxUSE_GIF
#endif // _WX_GIFDECOD_H
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: wxImage BMP, ICO, CUR and ANI handlers
// Author: Robert Roebling, Chris Elliott
// RCS-ID: $Id$
// Purpose: wxImage BMP, ICO, CUR and ANI handlers
// Author: Robert Roebling, Chris Elliott
// RCS-ID: $Id$
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: wxImage TGA handler
// Author: Seth Jackson
// RCS-ID: $Id$
// Purpose: wxImage TGA handler
// Author: Seth Jackson
// RCS-ID: $Id$
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Base classes for printing framework
// Author: Julian Smart
// Modified by:
// Purpose: Base classes for printing framework
// Author: Julian Smart
// Modified by:
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: wxProcess class
// Author: Guilhem Lavaux
// Modified by: Vadim Zeitlin to check error codes, added Detach() method
// Purpose: wxProcess class
// Author: Guilhem Lavaux
// Modified by: Vadim Zeitlin to check error codes, added Detach() method
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: provide wxSizer class for layout
// Author: Robert Roebling and Robin Dunn
// Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags)
// Purpose: provide wxSizer class for layout
// Author: Robert Roebling and Robin Dunn
// Modified by: Ron Lee, Vadim Zeitlin (wxSizerFlags)
wxSizerItem* PrependStretchSpacer(int prop = 1);
// set (or possibly unset if window is NULL) or get the window this sizer
wxSizerItem* PrependStretchSpacer(int prop = 1);
// set (or possibly unset if window is NULL) or get the window this sizer
void SetContainingWindow(wxWindow *window);
wxWindow *GetContainingWindow() const { return m_containingWindow; }
void SetContainingWindow(wxWindow *window);
wxWindow *GetContainingWindow() const { return m_containingWindow; }
virtual bool Detach( wxSizer *sizer );
virtual bool Detach( int index );
virtual bool Detach( wxSizer *sizer );
virtual bool Detach( int index );
- virtual bool Replace( wxWindow *oldwin, wxWindow *newwin, bool recursive = false );
- virtual bool Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive = false );
- virtual bool Replace( size_t index, wxSizerItem *newitem );
+ virtual bool Replace( wxWindow *oldwin, wxWindow *newwin, bool recursive = false );
+ virtual bool Replace( wxSizer *oldsz, wxSizer *newsz, bool recursive = false );
+ virtual bool Replace( size_t index, wxSizerItem *newitem );
virtual void Clear( bool delete_windows = false );
virtual void DeleteWindows();
virtual void Clear( bool delete_windows = false );
virtual void DeleteWindows();
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Streams for Tar files
// Author: Mike Wetherell
// RCS-ID: $Id$
// Purpose: Streams for Tar files
// Author: Mike Wetherell
// RCS-ID: $Id$
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap
// Author: Vaclav Slavik
// CVS-ID: $Id$
// Purpose: wxXPMDecoder, XPM reader for wxImage and wxBitmap
// Author: Vaclav Slavik
// CVS-ID: $Id$
#endif // wxUSE_IMAGE && wxUSE_XPM
#endif // _WX_XPM_H_
#endif // wxUSE_IMAGE && wxUSE_XPM
#endif // _WX_XPM_H_
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Streams for Zip files
// Author: Mike Wetherell
// RCS-ID: $Id$
// Purpose: Streams for Zip files
// Author: Mike Wetherell
// RCS-ID: $Id$
|| !defined __GNUC_MINOR__ \
|| !defined __GNUC_PATCHLEVEL__ \
|| __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 30402)
|| !defined __GNUC_MINOR__ \
|| !defined __GNUC_PATCHLEVEL__ \
|| __GNUC__ * 10000 + __GNUC_MINOR__ * 100 + __GNUC_PATCHLEVEL__ < 30402)
-#define WXZIPFIX WXDLLIMPEXP_BASE
+#define WXZIPFIX WXDLLIMPEXP_BASE
#else
#define WXZIPFIX
#endif
#else
#define WXZIPFIX
#endif
};
// Originating File-System.
};
// Originating File-System.
// These are Pkware's values. Note that Info-zip disagree on some of them,
// most notably NTFS.
//
// These are Pkware's values. Note that Info-zip disagree on some of them,
// most notably NTFS.
//
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
WX_DECLARE_LIST_WITH_DECL(wxZipEntry, wxZipEntryList_, class WXDLLIMPEXP_BASE);
WX_DECLARE_LIST_WITH_DECL(wxZipEntry, wxZipEntryList_, class WXDLLIMPEXP_BASE);
int GetLevel() const { return m_level; }
void WXZIPFIX SetLevel(int level);
int GetLevel() const { return m_level; }
void WXZIPFIX SetLevel(int level);
protected:
virtual size_t WXZIPFIX OnSysWrite(const void *buffer, size_t size);
virtual wxFileOffset OnSysTell() const { return m_entrySize; }
protected:
virtual size_t WXZIPFIX OnSysWrite(const void *buffer, size_t size);
virtual wxFileOffset OnSysTell() const { return m_entrySize; }
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
class WXDLLIMPEXP_BASE wxZipInputStream : public wxArchiveInputStream
{
class WXDLLIMPEXP_BASE wxZipInputStream : public wxArchiveInputStream
{
wxUint32 ReadSignature();
bool FindEndRecord();
bool LoadEndRecord();
wxUint32 ReadSignature();
bool FindEndRecord();
bool LoadEndRecord();
bool AtHeader() const { return m_headerSize == 0; }
bool AfterHeader() const { return m_headerSize > 0 && !m_decomp; }
bool IsOpened() const { return m_decomp != NULL; }
bool AtHeader() const { return m_headerSize == 0; }
bool AfterHeader() const { return m_headerSize > 0 && !m_decomp; }
bool IsOpened() const { return m_decomp != NULL; }
/////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////////
// Purpose: Memory stream classes
// Author: Guilhem Lavaux
// Modified by: Mike Wetherell
// Purpose: Memory stream classes
// Author: Guilhem Lavaux
// Modified by: Mike Wetherell