removed WXWIN_COMPATIBILITY_2_4 from common and wxMSW files (patch 1675546)

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44625 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-07 11:35:04 +00:00
parent a0369cb367
commit c1dc9f8394
73 changed files with 22 additions and 2085 deletions

View File

@@ -11,6 +11,9 @@ Changes in behaviour not resulting in compilation errors, please read this!
Changes in behaviour which may result in compilation errors Changes in behaviour which may result in compilation errors
----------------------------------------------------------- -----------------------------------------------------------
- WXWIN_COMPATIBILITY_2_4 doesn't exist any more, please update your code if
you still relied on features deprecated since version 2.4
Deprecated methods and their replacements Deprecated methods and their replacements
----------------------------------------- -----------------------------------------

View File

@@ -173,23 +173,6 @@ public:
// allows us to abstract the differences behind the common fa<66>ade // allows us to abstract the differences behind the common fa<66>ade
wxAppTraits *GetTraits(); wxAppTraits *GetTraits();
// the functions below shouldn't be used now that we have wxAppTraits
#if WXWIN_COMPATIBILITY_2_4
#if wxUSE_LOG
// override this function to create default log target of arbitrary
// user-defined class (default implementation creates a wxLogGui
// object) -- this log object is used by default by all wxLogXXX()
// functions.
wxDEPRECATED( virtual wxLog *CreateLogTarget() );
#endif // wxUSE_LOG
// similar to CreateLogTarget() but for the global wxMessageOutput
// object
wxDEPRECATED( virtual wxMessageOutput *CreateMessageOutput() );
#endif // WXWIN_COMPATIBILITY_2_4
// event processing functions // event processing functions
// -------------------------- // --------------------------
@@ -267,9 +250,6 @@ public:
// options of the library and abort if it doesn't // options of the library and abort if it doesn't
static bool CheckBuildOptions(const char *optionsSignature, static bool CheckBuildOptions(const char *optionsSignature,
const char *componentName); const char *componentName);
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( static bool CheckBuildOptions(const wxBuildOptions& buildOptions) );
#endif
// implementation only from now on // implementation only from now on
// ------------------------------- // -------------------------------

View File

@@ -167,13 +167,6 @@ public:
return Item(Count() - 1); return Item(Count() - 1);
} }
// return a wxString[], useful for the controls which
// take one in their ctor. You must delete[] it yourself
// once you are done with it. Will return NULL if the
// ArrayString was empty.
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( wxString* GetStringArray() const );
#endif
// item management // item management
// Search the element in the array, starting from the beginning if // Search the element in the array, starting from the beginning if
@@ -191,9 +184,6 @@ public:
// remove first item matching this value // remove first item matching this value
void Remove(const wxChar *sz); void Remove(const wxChar *sz);
// remove item by index // remove item by index
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( void Remove(size_t nIndex, size_t nRemove = 1) );
#endif
void RemoveAt(size_t nIndex, size_t nRemove = 1); void RemoveAt(size_t nIndex, size_t nRemove = 1);
// sorting // sorting

View File

@@ -77,16 +77,16 @@
#endif #endif
// WXWIN_COMPATIBILITY macros affect presence of virtual functions // WXWIN_COMPATIBILITY macros affect presence of virtual functions
#if WXWIN_COMPATIBILITY_2_4
#define __WX_BO_WXWIN_COMPAT_2_4 ",compatible with 2.4"
#else
#define __WX_BO_WXWIN_COMPAT_2_4
#endif
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
#define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6" #define __WX_BO_WXWIN_COMPAT_2_6 ",compatible with 2.6"
#else #else
#define __WX_BO_WXWIN_COMPAT_2_6 #define __WX_BO_WXWIN_COMPAT_2_6
#endif #endif
#if WXWIN_COMPATIBILITY_2_8
#define __WX_BO_WXWIN_COMPAT_2_8 ",compatible with 2.8"
#else
#define __WX_BO_WXWIN_COMPAT_2_8
#endif
// deriving wxWin containers from STL ones changes them completely: // deriving wxWin containers from STL ones changes them completely:
#if wxUSE_STL #if wxUSE_STL
@@ -101,7 +101,7 @@
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \ " (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
__WX_BO_COMPILER \ __WX_BO_COMPILER \
__WX_BO_STL \ __WX_BO_STL \
__WX_BO_WXWIN_COMPAT_2_4 __WX_BO_WXWIN_COMPAT_2_6 \ __WX_BO_WXWIN_COMPAT_2_6 __WX_BO_WXWIN_COMPAT_2_8 \
")" ")"
@@ -122,28 +122,4 @@
} gs_buildOptionsCheck; } gs_buildOptionsCheck;
#if WXWIN_COMPATIBILITY_2_4
// ----------------------------------------------------------------------------
// wxBuildOptions
// ----------------------------------------------------------------------------
// NB: Don't use this class in new code, it relies on the ctor being always
// inlined. WX_BUILD_OPTIONS_SIGNATURE always works.
class wxBuildOptions
{
public:
// the ctor must be inline to get the compilation settings of the code
// which included this header
wxBuildOptions() : m_signature(WX_BUILD_OPTIONS_SIGNATURE) {}
private:
const char *m_signature;
// actually only CheckBuildOptions() should be our friend but well...
friend class wxAppConsole;
};
#endif // WXWIN_COMPATIBILITY_2_4
#endif // _WX_BUILD_H_ #endif // _WX_BUILD_H_

View File

@@ -972,16 +972,16 @@
check consistency of the settings check consistency of the settings
*/ */
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_6
# if !WXWIN_COMPATIBILITY_2_6 # if !WXWIN_COMPATIBILITY_2_8
# ifdef wxABORT_ON_CONFIG_ERROR # ifdef wxABORT_ON_CONFIG_ERROR
# error "2.4.X compatibility requires 2.6.X compatibility" # error "2.6.X compatibility requires 2.8.X compatibility"
# else # else
# undef WXWIN_COMPATIBILITY_2_6 # undef WXWIN_COMPATIBILITY_2_8
# define WXWIN_COMPATIBILITY_2_6 1 # define WXWIN_COMPATIBILITY_2_8 1
# endif # endif
# endif # endif
#endif /* WXWIN_COMPATIBILITY_2_4 */ #endif /* WXWIN_COMPATIBILITY_2_6 */
#if wxUSE_ARCHIVE_STREAMS #if wxUSE_ARCHIVE_STREAMS
# if !wxUSE_DATETIME # if !wxUSE_DATETIME

View File

@@ -220,29 +220,6 @@ public:
void SetPrivData( char *privData, int len ); void SetPrivData( char *privData, int len );
#if WXWIN_COMPATIBILITY_2_4
// PostScript-specific data
wxString GetPrinterCommand() const;
wxString GetPrinterOptions() const;
wxString GetPreviewCommand() const;
wxString GetFontMetricPath() const;
double GetPrinterScaleX() const;
double GetPrinterScaleY() const;
long GetPrinterTranslateX() const;
long GetPrinterTranslateY() const;
void SetPrinterCommand(const wxString& command);
void SetPrinterOptions(const wxString& options);
void SetPreviewCommand(const wxString& command);
void SetFontMetricPath(const wxString& path);
void SetPrinterScaleX(double x);
void SetPrinterScaleY(double y);
void SetPrinterScaling(double x, double y);
void SetPrinterTranslateX(long x);
void SetPrinterTranslateY(long y);
void SetPrinterTranslation(long x, long y);
#endif
// Convert between wxPrintData and native data // Convert between wxPrintData and native data
void ConvertToNative(); void ConvertToNative();
void ConvertFromNative(); void ConvertFromNative();
@@ -301,9 +278,7 @@ public:
bool GetSelection() const { return m_printSelection; }; bool GetSelection() const { return m_printSelection; };
bool GetCollate() const { return m_printCollate; }; bool GetCollate() const { return m_printCollate; };
bool GetPrintToFile() const { return m_printToFile; }; bool GetPrintToFile() const { return m_printToFile; };
#if WXWIN_COMPATIBILITY_2_4
bool GetSetupDialog() const { return m_printSetupDialog; };
#endif
void SetFromPage(int v) { m_printFromPage = v; }; void SetFromPage(int v) { m_printFromPage = v; };
void SetToPage(int v) { m_printToPage = v; }; void SetToPage(int v) { m_printToPage = v; };
void SetMinPage(int v) { m_printMinPage = v; }; void SetMinPage(int v) { m_printMinPage = v; };
@@ -313,9 +288,7 @@ public:
void SetSelection(bool flag) { m_printSelection = flag; }; void SetSelection(bool flag) { m_printSelection = flag; };
void SetCollate(bool flag) { m_printCollate = flag; }; void SetCollate(bool flag) { m_printCollate = flag; };
void SetPrintToFile(bool flag) { m_printToFile = flag; }; void SetPrintToFile(bool flag) { m_printToFile = flag; };
#if WXWIN_COMPATIBILITY_2_4
void SetSetupDialog(bool flag) { m_printSetupDialog = flag; };
#endif
void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; }; void EnablePrintToFile(bool flag) { m_printEnablePrintToFile = flag; };
void EnableSelection(bool flag) { m_printEnableSelection = flag; }; void EnableSelection(bool flag) { m_printEnableSelection = flag; };
void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; }; void EnablePageNumbers(bool flag) { m_printEnablePageNumbers = flag; };
@@ -350,9 +323,6 @@ private:
bool m_printEnablePageNumbers; bool m_printEnablePageNumbers;
bool m_printEnableHelp; bool m_printEnableHelp;
bool m_printEnablePrintToFile; bool m_printEnablePrintToFile;
#if WXWIN_COMPATIBILITY_2_4
bool m_printSetupDialog;
#endif
wxPrintData m_printData; wxPrintData m_printData;
private: private:

View File

@@ -180,14 +180,6 @@ public:
const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY, const wxString &qryTblName=wxEmptyString, bool qryOnly = !wxDB_QUERY_ONLY,
const wxString &tblPath=wxEmptyString); const wxString &tblPath=wxEmptyString);
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED(
wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
const wxChar *qryTblName, bool qryOnly,
const wxString &tblPath)
);
#endif // WXWIN_COMPATIBILITY_2_4
virtual ~wxDbTable(); virtual ~wxDbTable();
bool Open(bool checkPrivileges=false, bool checkTableExists=true); bool Open(bool checkPrivileges=false, bool checkTableExists=true);

View File

@@ -577,11 +577,6 @@ public:
virtual int GetLogicalFunction() const { return m_logicalFunction; } virtual int GetLogicalFunction() const { return m_logicalFunction; }
virtual void SetLogicalFunction(int function) = 0; virtual void SetLogicalFunction(int function) = 0;
#if WXWIN_COMPATIBILITY_2_4
virtual void SetOptimization(bool WXUNUSED(opt)) { }
virtual bool GetOptimization() { return false; }
#endif
// bounding box // bounding box
// ------------ // ------------
@@ -749,13 +744,6 @@ protected:
virtual void DoSetClippingRegion(wxCoord x, wxCoord y, virtual void DoSetClippingRegion(wxCoord x, wxCoord y,
wxCoord width, wxCoord height) = 0; wxCoord width, wxCoord height) = 0;
#if WXWIN_COMPATIBILITY_2_4
// this was only for confusing people, use DoGetClippingBox only
virtual void DoGetClippingRegion(wxCoord *x, wxCoord *y,
wxCoord *w, wxCoord *h)
{ DoGetClippingBox(x, y, w, h); }
#endif
virtual void DoGetClippingBox(wxCoord *x, wxCoord *y, virtual void DoGetClippingBox(wxCoord *x, wxCoord *y,
wxCoord *w, wxCoord *h) const wxCoord *w, wxCoord *h) const
{ {

View File

@@ -384,11 +384,7 @@ public:
m_propagationLevel = propagationLevel; m_propagationLevel = propagationLevel;
} }
#if WXWIN_COMPATIBILITY_2_4
public:
#else
protected: protected:
#endif
wxObject* m_eventObject; wxObject* m_eventObject;
wxEventType m_eventType; wxEventType m_eventType;
long m_timeStamp; long m_timeStamp;
@@ -406,11 +402,7 @@ protected:
// backwards compatibility as it is new // backwards compatibility as it is new
int m_propagationLevel; int m_propagationLevel;
#if WXWIN_COMPATIBILITY_2_4
public:
#else
protected: protected:
#endif
bool m_skipped; bool m_skipped;
bool m_isCommandEvent; bool m_isCommandEvent;
@@ -492,26 +484,6 @@ private:
wxEVT_COMMAND_TOGGLEBUTTON_CLICKED wxEVT_COMMAND_TOGGLEBUTTON_CLICKED
*/ */
#if WXWIN_COMPATIBILITY_2_4
// Backwards compatibility for wxCommandEvent::m_commandString, will lead to compilation errors in some cases of usage
class WXDLLIMPEXP_CORE wxCommandEvent;
class WXDLLIMPEXP_CORE wxCommandEventStringHelper
{
public:
wxCommandEventStringHelper(wxCommandEvent * evt)
: m_evt(evt)
{ }
void operator=(const wxString &str);
operator wxString();
const wxChar* c_str() const;
private:
wxCommandEvent* m_evt;
};
#endif
class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent class WXDLLIMPEXP_CORE wxCommandEvent : public wxEvent
{ {
public: public:
@@ -519,9 +491,6 @@ public:
wxCommandEvent(const wxCommandEvent& event) wxCommandEvent(const wxCommandEvent& event)
: wxEvent(event), : wxEvent(event),
#if WXWIN_COMPATIBILITY_2_4
m_commandString(this),
#endif
m_cmdString(event.m_cmdString), m_cmdString(event.m_cmdString),
m_commandInt(event.m_commandInt), m_commandInt(event.m_commandInt),
m_extraLong(event.m_extraLong), m_extraLong(event.m_extraLong),
@@ -558,12 +527,7 @@ public:
virtual wxEvent *Clone() const { return new wxCommandEvent(*this); } virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
#if WXWIN_COMPATIBILITY_2_4
public:
wxCommandEventStringHelper m_commandString;
#else
protected: protected:
#endif
wxString m_cmdString; // String event argument wxString m_cmdString; // String event argument
int m_commandInt; int m_commandInt;
long m_extraLong; // Additional information (e.g. select/deselect) long m_extraLong; // Additional information (e.g. select/deselect)
@@ -574,23 +538,6 @@ private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent) DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCommandEvent)
}; };
#if WXWIN_COMPATIBILITY_2_4
inline void wxCommandEventStringHelper::operator=(const wxString &str)
{
m_evt->SetString(str);
}
inline wxCommandEventStringHelper::operator wxString()
{
return m_evt->GetString();
}
inline const wxChar* wxCommandEventStringHelper::c_str() const
{
return m_evt->GetString().c_str();
}
#endif
// this class adds a possibility to react (from the user) code to a control // this class adds a possibility to react (from the user) code to a control
// notification: allow or veto the operation being reported. // notification: allow or veto the operation being reported.
class WXDLLIMPEXP_CORE wxNotifyEvent : public wxCommandEvent class WXDLLIMPEXP_CORE wxNotifyEvent : public wxCommandEvent
@@ -682,11 +629,7 @@ public:
virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); } virtual wxEvent *Clone() const { return new wxScrollWinEvent(*this); }
#if WXWIN_COMPATIBILITY_2_4
public:
#else
protected: protected:
#endif
int m_commandInt; int m_commandInt;
long m_extraLong; long m_extraLong;
@@ -1148,11 +1091,7 @@ public:
virtual wxEvent *Clone() const { return new wxMoveEvent(*this); } virtual wxEvent *Clone() const { return new wxMoveEvent(*this); }
#if WXWIN_COMPATIBILITY_2_4
public:
#else
protected: protected:
#endif
wxPoint m_pos; wxPoint m_pos;
wxRect m_rect; wxRect m_rect;
@@ -1240,11 +1179,7 @@ public:
virtual wxEvent *Clone() const { return new wxEraseEvent(*this); } virtual wxEvent *Clone() const { return new wxEraseEvent(*this); }
#if WXWIN_COMPATIBILITY_2_4
public:
#else
protected: protected:
#endif
wxDC *m_dc; wxDC *m_dc;
private: private:
@@ -1530,11 +1465,7 @@ enum
class WXDLLIMPEXP_CORE wxJoystickEvent : public wxEvent class WXDLLIMPEXP_CORE wxJoystickEvent : public wxEvent
{ {
#if WXWIN_COMPATIBILITY_2_4
public:
#else
protected: protected:
#endif
wxPoint m_pos; wxPoint m_pos;
int m_zPosition; int m_zPosition;
int m_buttonChange; // Which button changed? int m_buttonChange; // Which button changed?
@@ -2641,13 +2572,6 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
typedef void (wxEvtHandler::*wxMouseCaptureLostEventFunction)(wxMouseCaptureLostEvent&); typedef void (wxEvtHandler::*wxMouseCaptureLostEventFunction)(wxMouseCaptureLostEvent&);
typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&); typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&);
// these typedefs don't have the same name structure as the others, keep for
// backwards compatibility only
#if WXWIN_COMPATIBILITY_2_4
typedef wxSysColourChangedEventFunction wxSysColourChangedFunction;
typedef wxDisplayChangedEventFunction wxDisplayChangedFunction;
#endif // WXWIN_COMPATIBILITY_2_4
#define wxCommandEventHandler(func) \ #define wxCommandEventHandler(func) \
(wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func) (wxObjectEventFunction)(wxEventFunction)wxStaticCastEvent(wxCommandEventFunction, &func)
@@ -3086,12 +3010,6 @@ typedef void (wxEvtHandler::*wxClipboardTextEventFunction)(wxClipboardTextEvent&
#define EVT_JOY_MOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_MOVE, wxJoystickEventHandler(func)) #define EVT_JOY_MOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_MOVE, wxJoystickEventHandler(func))
#define EVT_JOY_ZMOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_ZMOVE, wxJoystickEventHandler(func)) #define EVT_JOY_ZMOVE(func) wx__DECLARE_EVT0(wxEVT_JOY_ZMOVE, wxJoystickEventHandler(func))
// These are obsolete, see _BUTTON_ events
#if WXWIN_COMPATIBILITY_2_4
#define EVT_JOY_DOWN(func) EVT_JOY_BUTTON_DOWN(func)
#define EVT_JOY_UP(func) EVT_JOY_BUTTON_UP(func)
#endif // WXWIN_COMPATIBILITY_2_4
// All joystick events // All joystick events
#define EVT_JOYSTICK_EVENTS(func) \ #define EVT_JOYSTICK_EVENTS(func) \
EVT_JOY_BUTTON_DOWN(func) \ EVT_JOY_BUTTON_DOWN(func) \

View File

@@ -50,9 +50,6 @@ enum
wxOPEN = wxFD_OPEN, wxOPEN = wxFD_OPEN,
wxSAVE = wxFD_SAVE, wxSAVE = wxFD_SAVE,
wxOVERWRITE_PROMPT = wxFD_OVERWRITE_PROMPT, wxOVERWRITE_PROMPT = wxFD_OVERWRITE_PROMPT,
#if WXWIN_COMPATIBILITY_2_4
wxHIDE_READONLY = 0x0008,
#endif
wxFILE_MUST_EXIST = wxFD_FILE_MUST_EXIST, wxFILE_MUST_EXIST = wxFD_FILE_MUST_EXIST,
wxMULTIPLE = wxFD_MULTIPLE, wxMULTIPLE = wxFD_MULTIPLE,
wxCHANGE_DIR = wxFD_CHANGE_DIR wxCHANGE_DIR = wxFD_CHANGE_DIR
@@ -118,17 +115,6 @@ public:
// Utility functions // Utility functions
#if WXWIN_COMPATIBILITY_2_4
// Parses the wildCard, returning the number of filters.
// Returns 0 if none or if there's a problem,
// The arrays will contain an equal number of items found before the error.
// wildCard is in the form:
// "All files (*)|*|Image Files (*.jpeg *.png)|*.jpg;*.png"
wxDEPRECATED( static int ParseWildcard(const wxString& wildCard,
wxArrayString& descriptions,
wxArrayString& filters) );
#endif // WXWIN_COMPATIBILITY_2_4
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
wxDEPRECATED( long GetStyle() const ); wxDEPRECATED( long GetStyle() const );

View File

@@ -149,11 +149,6 @@ public:
// Helper // Helper
virtual void SetupSections(); virtual void SetupSections();
#if WXWIN_COMPATIBILITY_2_4
// Parse the filter into an array of filters and an array of descriptions
virtual int ParseFilter(const wxString& filterStr, wxArrayString& filters, wxArrayString& descriptions);
#endif // WXWIN_COMPATIBILITY_2_4
// Find the child that matches the first part of 'path'. // Find the child that matches the first part of 'path'.
// E.g. if a child path is "/usr" and 'path' is "/usr/include" // E.g. if a child path is "/usr" and 'path' is "/usr/include"
// then the child for /usr is returned. // then the child for /usr is returned.

View File

@@ -102,11 +102,7 @@ public:
virtual ~wxTabView(); virtual ~wxTabView();
inline int GetNumberOfLayers() const { return m_layers.GetCount(); } inline int GetNumberOfLayers() const { return m_layers.GetCount(); }
#if WXWIN_COMPATIBILITY_2_4
inline wxList& GetLayers() { return *(wxList *)&m_layers; }
#else
inline wxTabLayerList& GetLayers() { return m_layers; } inline wxTabLayerList& GetLayers() { return m_layers; }
#endif
inline void SetWindow(wxWindow* wnd) { m_window = wnd; } inline void SetWindow(wxWindow* wnd) { m_window = wnd; }
inline wxWindow* GetWindow(void) const { return m_window; } inline wxWindow* GetWindow(void) const { return m_window; }

View File

@@ -185,21 +185,6 @@ public:
void Edit( const wxTreeItemId& item ) { EditLabel(item); } void Edit( const wxTreeItemId& item ) { EditLabel(item); }
#endif // WXWIN_COMPATIBILITY_2_6 #endif // WXWIN_COMPATIBILITY_2_6
#if WXWIN_COMPATIBILITY_2_4
// deprecated functions: use Set/GetItemImage directly
wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& item) const );
wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& item, int image) );
// use the versions taking wxTreeItemIdValue cookies (note that
// GetNextChild() is not inside wxDEPRECATED on purpose, as otherwise we
// get twice as many warnings without any added benefit: it is always used
// with GetFirstChild() anyhow)
wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item,
long& cookie) const );
wxTreeItemId GetNextChild(const wxTreeItemId& item,
long& cookie) const;
#endif // WXWIN_COMPATIBILITY_2_4
// implementation only from now on // implementation only from now on
// overridden base class virtuals // overridden base class virtuals

View File

@@ -14,11 +14,7 @@
#include "wx/defs.h" #include "wx/defs.h"
#if !wxUSE_STL && WXWIN_COMPATIBILITY_2_4 #define wxUSE_OLD_HASH_TABLE 0
#define wxUSE_OLD_HASH_TABLE 1
#else
#define wxUSE_OLD_HASH_TABLE 0
#endif
#if !wxUSE_STL #if !wxUSE_STL
#include "wx/object.h" #include "wx/object.h"
@@ -28,9 +24,6 @@
#if wxUSE_OLD_HASH_TABLE #if wxUSE_OLD_HASH_TABLE
#include "wx/list.h" #include "wx/list.h"
#endif #endif
#if WXWIN_COMPATIBILITY_2_4
#include "wx/dynarray.h"
#endif
// the default size of the hash // the default size of the hash
#define wxHASH_SIZE_DEFAULT (1000) #define wxHASH_SIZE_DEFAULT (1000)
@@ -225,85 +218,6 @@ private:
#endif // wxUSE_OLD_HASH_TABLE #endif // wxUSE_OLD_HASH_TABLE
#if !wxUSE_STL
#if WXWIN_COMPATIBILITY_2_4
// ----------------------------------------------------------------------------
// a hash table which stores longs
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxHashTableLong : public wxObject
{
public:
wxHashTableLong(size_t size = wxHASH_SIZE_DEFAULT)
{ Init(size); }
virtual ~wxHashTableLong();
void Create(size_t size = wxHASH_SIZE_DEFAULT);
void Destroy();
size_t GetSize() const { return m_hashSize; }
size_t GetCount() const { return m_count; }
void Put(long key, long value);
long Get(long key) const;
long Delete(long key);
protected:
void Init(size_t size);
private:
wxArrayLong **m_values,
**m_keys;
// the size of array above
size_t m_hashSize;
// the total number of elements in the hash
size_t m_count;
// not implemented yet
DECLARE_NO_COPY_CLASS(wxHashTableLong)
};
// ----------------------------------------------------------------------------
// wxStringHashTable: a hash table which indexes strings with longs
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxStringHashTable : public wxObject
{
public:
wxStringHashTable(size_t sizeTable = wxHASH_SIZE_DEFAULT);
virtual ~wxStringHashTable();
// add a string associated with this key to the table
void Put(long key, const wxString& value);
// get the string from the key: if not found, an empty string is returned
// and the wasFound is set to false if not NULL
wxString Get(long key, bool *wasFound = NULL) const;
// remove the item, returning true if the item was found and deleted
bool Delete(long key) const;
// clean up
void Destroy();
private:
wxArrayLong **m_keys;
wxArrayString **m_values;
// the size of array above
size_t m_hashSize;
DECLARE_NO_COPY_CLASS(wxStringHashTable)
};
#endif // WXWIN_COMPATIBILITY_2_4
#endif // !wxUSE_STL
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// for compatibility only // for compatibility only
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -97,29 +97,6 @@ struct WXDLLIMPEXP_HTML wxHtmlHelpDataItem
WX_DECLARE_USER_EXPORTED_OBJARRAY(wxHtmlHelpDataItem, wxHtmlHelpDataItems, WX_DECLARE_USER_EXPORTED_OBJARRAY(wxHtmlHelpDataItem, wxHtmlHelpDataItems,
WXDLLIMPEXP_HTML); WXDLLIMPEXP_HTML);
#if WXWIN_COMPATIBILITY_2_4
// old interface to contents and index:
struct wxHtmlContentsItem
{
wxHtmlContentsItem();
wxHtmlContentsItem(const wxHtmlHelpDataItem& d);
wxHtmlContentsItem& operator=(const wxHtmlContentsItem& d);
~wxHtmlContentsItem();
int m_Level;
int m_ID;
wxChar *m_Name;
wxChar *m_Page;
wxHtmlBookRecord *m_Book;
// returns full filename of m_Page, i.e. with book's basePath prepended
wxString GetFullPath() const { return m_Book->GetFullPath(m_Page); }
private:
bool m_autofree;
};
#endif
//------------------------------------------------------------------------------ //------------------------------------------------------------------------------
// wxHtmlSearchEngine // wxHtmlSearchEngine
@@ -168,9 +145,6 @@ public:
const wxString& GetName() { return m_Name; } const wxString& GetName() { return m_Name; }
const wxHtmlHelpDataItem *GetCurItem() const { return m_CurItem; } const wxHtmlHelpDataItem *GetCurItem() const { return m_CurItem; }
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( wxHtmlContentsItem* GetContentsItem() );
#endif
private: private:
wxHtmlHelpData* m_Data; wxHtmlHelpData* m_Data;
@@ -223,14 +197,6 @@ public:
const wxHtmlHelpDataItems& GetContentsArray() const { return m_contents; } const wxHtmlHelpDataItems& GetContentsArray() const { return m_contents; }
const wxHtmlHelpDataItems& GetIndexArray() const { return m_index; } const wxHtmlHelpDataItems& GetIndexArray() const { return m_index; }
#if WXWIN_COMPATIBILITY_2_4
// deprecated interface, new interface is arrays-based (see above)
wxDEPRECATED( wxHtmlContentsItem* GetContents() );
wxDEPRECATED( int GetContentsCnt() );
wxDEPRECATED( wxHtmlContentsItem* GetIndex() );
wxDEPRECATED( int GetIndexCnt() );
#endif
protected: protected:
wxString m_tempPath; wxString m_tempPath;
@@ -240,15 +206,6 @@ protected:
wxHtmlHelpDataItems m_contents; // list of all available books and pages wxHtmlHelpDataItems m_contents; // list of all available books and pages
wxHtmlHelpDataItems m_index; // list of index itesm wxHtmlHelpDataItems m_index; // list of index itesm
#if WXWIN_COMPATIBILITY_2_4
// deprecated data structures, set only if GetContents(), GetIndex()
// called
wxHtmlContentsItem* m_cacheContents;
wxHtmlContentsItem* m_cacheIndex;
private:
void CleanCompatibilityData();
#endif
protected: protected:
// Imports .hhp files (MS HTML Help Workshop) // Imports .hhp files (MS HTML Help Workshop)
bool LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, bool LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,

View File

@@ -458,9 +458,7 @@ public:
const wxMouseEvent& event); const wxMouseEvent& event);
virtual wxHtmlCell* GetFirstChild() const { return m_Cells; } virtual wxHtmlCell* GetFirstChild() const { return m_Cells; }
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( wxHtmlCell* GetFirstCell() const );
#endif
// returns last child cell: // returns last child cell:
wxHtmlCell* GetLastChild() const { return m_LastCell; } wxHtmlCell* GetLastChild() const { return m_LastCell; }
@@ -519,12 +517,6 @@ protected:
DECLARE_NO_COPY_CLASS(wxHtmlContainerCell) DECLARE_NO_COPY_CLASS(wxHtmlContainerCell)
}; };
#if WXWIN_COMPATIBILITY_2_4
inline wxHtmlCell* wxHtmlContainerCell::GetFirstCell() const
{ return GetFirstChild(); }
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@@ -21,13 +21,6 @@
#define wxIMAGE_OPTION_CUR_HOTSPOT_X wxT("HotSpotX") #define wxIMAGE_OPTION_CUR_HOTSPOT_X wxT("HotSpotX")
#define wxIMAGE_OPTION_CUR_HOTSPOT_Y wxT("HotSpotY") #define wxIMAGE_OPTION_CUR_HOTSPOT_Y wxT("HotSpotY")
#if WXWIN_COMPATIBILITY_2_4
// Do not use these macros, they are deprecated
#define wxBMP_FORMAT wxIMAGE_OPTION_BMP_FORMAT
#define wxCUR_HOTSPOT_X wxIMAGE_OPTION_CUR_HOTSPOT_X
#define wxCUR_HOTSPOT_Y wxIMAGE_OPTION_CUR_HOTSPOT_Y
#endif
enum enum
{ {

View File

@@ -369,11 +369,6 @@ private:
#else // if !wxUSE_STL #else // if !wxUSE_STL
// due to circular header dependencies this function has to be declared here
// (normally it's found in utils.h which includes itself list.h...)
#if WXWIN_COMPATIBILITY_2_4
extern WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s);
#endif
// undef it to get rid of old, deprecated functions // undef it to get rid of old, deprecated functions
#define wxLIST_COMPATIBILITY #define wxLIST_COMPATIBILITY

View File

@@ -429,10 +429,7 @@ BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT, 703) DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT, 703)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM, 704) DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM, 704)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, 705) DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS, 705)
#if WXWIN_COMPATIBILITY_2_4
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO, 706)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO, 707)
#endif
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED, 708) DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED, 708)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED, 709) DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED, 709)
DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN, 710) DECLARE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN, 710)
@@ -482,10 +479,5 @@ typedef void (wxEvtHandler::*wxListEventFunction)(wxListEvent&);
#define EVT_LIST_CACHE_HINT(id, fn) wx__DECLARE_LISTEVT(CACHE_HINT, id, fn) #define EVT_LIST_CACHE_HINT(id, fn) wx__DECLARE_LISTEVT(CACHE_HINT, id, fn)
#if WXWIN_COMPATIBILITY_2_4
#define EVT_LIST_GET_INFO(id, fn) wx__DECLARE_LISTEVT(GET_INFO, id, fn)
#define EVT_LIST_SET_INFO(id, fn) wx__DECLARE_LISTEVT(SET_INFO, id, fn)
#endif
#endif #endif
// _WX_LISTCTRL_H_BASE_ // _WX_LISTCTRL_H_BASE_

View File

@@ -50,13 +50,6 @@ public:
virtual bool OnExceptionInMainLoop(); virtual bool OnExceptionInMainLoop();
#endif // wxUSE_EXCEPTIONS #endif // wxUSE_EXCEPTIONS
// deprecated functions, use wxEventLoop directly instead
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( void DoMessage(WXMSG *pMsg) );
wxDEPRECATED( bool DoMessage() );
wxDEPRECATED( bool ProcessMessage(WXMSG* pMsg) );
#endif // WXWIN_COMPATIBILITY_2_4
protected: protected:
int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT int m_printMode; // wxPRINT_WINDOWS, wxPRINT_POSTSCRIPT

View File

@@ -143,13 +143,6 @@ public:
bool HasAlpha() const; bool HasAlpha() const;
void UseAlpha(); void UseAlpha();
#if WXWIN_COMPATIBILITY_2_4
// these functions do nothing and are only there for backwards
// compatibility
wxDEPRECATED( int GetQuality() const );
wxDEPRECATED( void SetQuality(int quality) );
#endif // WXWIN_COMPATIBILITY_2_4
// implementation only from now on // implementation only from now on
// ------------------------------- // -------------------------------

View File

@@ -27,14 +27,6 @@
// compatibility settings // compatibility settings
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// This setting determines the compatibility with 2.4 API: set it to 1 to
// enable it but please consider updating your code instead.
//
// Default is 0
//
// Recommended setting: 0 (please update your code)
#define WXWIN_COMPATIBILITY_2_4 0
// This setting determines the compatibility with 2.6 API: set it to 0 to // This setting determines the compatibility with 2.6 API: set it to 0 to
// flag all cases of using deprecated functions. // flag all cases of using deprecated functions.
// //

View File

@@ -34,19 +34,6 @@ public:
bool RemoveIcon(void); bool RemoveIcon(void);
bool PopupMenu(wxMenu *menu); //, int x, int y); bool PopupMenu(wxMenu *menu); //, int x, int y);
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( bool IsOK() const );
// Overridables
virtual void OnMouseMove(wxEvent&);
virtual void OnLButtonDown(wxEvent&);
virtual void OnLButtonUp(wxEvent&);
virtual void OnRButtonDown(wxEvent&);
virtual void OnRButtonUp(wxEvent&);
virtual void OnLButtonDClick(wxEvent&);
virtual void OnRButtonDClick(wxEvent&);
#endif
// Implementation // Implementation
protected: protected:
friend class wxTaskBarIconWindow; friend class wxTaskBarIconWindow;
@@ -60,23 +47,7 @@ protected:
wxIcon m_icon; wxIcon m_icon;
wxString m_strTooltip; wxString m_strTooltip;
#if WXWIN_COMPATIBILITY_2_4
// non-virtual default event handlers to forward events to the virtuals
void _OnMouseMove(wxTaskBarIconEvent&);
void _OnLButtonDown(wxTaskBarIconEvent&);
void _OnLButtonUp(wxTaskBarIconEvent&);
void _OnRButtonDown(wxTaskBarIconEvent&);
void _OnRButtonUp(wxTaskBarIconEvent&);
void _OnLButtonDClick(wxTaskBarIconEvent&);
void _OnRButtonDClick(wxTaskBarIconEvent&);
DECLARE_EVENT_TABLE()
#endif
}; };
#if WXWIN_COMPATIBILITY_2_4
inline bool wxTaskBarIcon::IsOK() const { return IsOk(); }
#endif
#endif #endif
// _TASKBAR_H_ // _TASKBAR_H_

View File

@@ -180,34 +180,6 @@ public:
wxRect& rect, wxRect& rect,
bool textOnly = false) const; bool textOnly = false) const;
// deprecated
// ----------
#if WXWIN_COMPATIBILITY_2_4
// these methods are deprecated and will be removed in future versions of
// wxWidgets, they're here for compatibility only, don't use them in new
// code (the comments indicate why these methods are now useless and how to
// replace them)
// use Expand, Collapse, CollapseAndReset or Toggle
wxDEPRECATED( void ExpandItem(const wxTreeItemId& item, int action) );
// use Set/GetImageList and Set/GetStateImageList
// Use base class GetImageList()
wxDEPRECATED( void SetImageList(wxImageList *imageList, int) );
// use Set/GetItemImage directly
wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& item) const );
wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& item, int image) );
// use the versions taking wxTreeItemIdValue cookies
wxDEPRECATED( wxTreeItemId GetFirstChild(const wxTreeItemId& item,
long& cookie) const );
wxDEPRECATED( wxTreeItemId GetNextChild(const wxTreeItemId& item,
long& cookie) const );
#endif // WXWIN_COMPATIBILITY_2_4
// implementation // implementation
// -------------- // --------------

View File

@@ -27,14 +27,6 @@
// compatibility settings // compatibility settings
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// This setting determines the compatibility with 2.4 API: set it to 1 to
// enable it but please consider updating your code instead.
//
// Default is 0
//
// Recommended setting: 0 (please update your code)
#define WXWIN_COMPATIBILITY_2_4 0
// This setting determines the compatibility with 2.6 API: set it to 0 to // This setting determines the compatibility with 2.6 API: set it to 0 to
// flag all cases of using deprecated functions. // flag all cases of using deprecated functions.
// //

View File

@@ -17,15 +17,6 @@
// constants // constants
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_4
// they're unused by wxWidgets...
enum
{
wxKEY_SHIFT = 1,
wxKEY_CTRL = 2
};
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// wxWindow declaration for MSW // wxWindow declaration for MSW
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -124,12 +115,6 @@ public:
// Accept files for dragging // Accept files for dragging
virtual void DragAcceptFiles(bool accept); virtual void DragAcceptFiles(bool accept);
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( bool GetUseCtl3D() const );
wxDEPRECATED( bool GetTransparentBackground() const );
wxDEPRECATED( void SetTransparent(bool t = true) );
#endif // WXWIN_COMPATIBILITY_2_4
#ifndef __WXUNIVERSAL__ #ifndef __WXUNIVERSAL__
// Native resource loading (implemented in src/msw/nativdlg.cpp) // Native resource loading (implemented in src/msw/nativdlg.cpp)
// FIXME: should they really be all virtual? // FIXME: should they really be all virtual?
@@ -545,14 +530,6 @@ private:
// inline functions // inline functions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_4
inline bool wxWindowMSW::GetUseCtl3D() const { return false; }
inline bool wxWindowMSW::GetTransparentBackground() const { return false; }
inline void wxWindowMSW::SetTransparent(bool WXUNUSED(t)) { }
#endif // WXWIN_COMPATIBILITY_2_4
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// global functions // global functions
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
@@ -580,11 +557,7 @@ public:
#include "wx/hash.h" #include "wx/hash.h"
// pseudo-template HWND <-> wxWindow hash table // pseudo-template HWND <-> wxWindow hash table
#if WXWIN_COMPATIBILITY_2_4
WX_DECLARE_HASH(wxWindow, wxWindowList, wxWinHashTable);
#else
WX_DECLARE_HASH(wxWindowMSW, wxWindowList, wxWinHashTable); WX_DECLARE_HASH(wxWindowMSW, wxWindowList, wxWinHashTable);
#endif
extern wxWinHashTable *wxWinHandleHash; extern wxWinHashTable *wxWinHandleHash;

View File

@@ -56,10 +56,6 @@ typedef wxWindow wxNotebookPage; // so far, any window can be a page
extern WXDLLEXPORT_DATA(const wxChar) wxNotebookNameStr[]; extern WXDLLEXPORT_DATA(const wxChar) wxNotebookNameStr[];
#if WXWIN_COMPATIBILITY_2_4
#define wxNOTEBOOK_NAME wxNotebookNameStr
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// wxNotebookBase: define wxNotebook interface // wxNotebookBase: define wxNotebook interface
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -94,13 +94,6 @@ public:
( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) ); ( m_baseInfo2 && m_baseInfo2->IsKindOf(info) ) );
} }
#if WXWIN_COMPATIBILITY_2_4
// Initializes parent pointers and hash table for fast searching.
wxDEPRECATED( static void InitializeClasses() );
// Cleans up hash table used for fast searching.
wxDEPRECATED( static void CleanUpClasses() );
#endif
public: public:
const wxChar *m_className; const wxChar *m_className;
int m_objectSize; int m_objectSize;
@@ -135,11 +128,6 @@ protected:
WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxChar *name); WXDLLIMPEXP_BASE wxObject *wxCreateDynamicObject(const wxChar *name);
#if WXWIN_COMPATIBILITY_2_4
inline void wxClassInfo::InitializeClasses() {}
inline void wxClassInfo::CleanUpClasses() {}
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Dynamic class macros // Dynamic class macros
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -48,11 +48,6 @@ public:
#include "wx/os2/palette.h" #include "wx/os2/palette.h"
#endif #endif
#if WXWIN_COMPATIBILITY_2_4
#define wxColorMap wxPalette
#define wxColourMap wxPalette
#endif
#endif // wxUSE_PALETTE #endif // wxUSE_PALETTE
#endif #endif

View File

@@ -84,14 +84,6 @@ public:
} }
// deprecated functions
// --------------------
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( int GetNumberOfRowsOrCols() const );
wxDEPRECATED( void SetNumberOfRowsOrCols(int n) );
#endif // WXWIN_COMPATIBILITY_2_4
protected: protected:
wxRadioBoxBase() wxRadioBoxBase()
{ {

View File

@@ -198,13 +198,6 @@ public:
// Value // Value
static wxSystemScreenType ms_screen; static wxSystemScreenType ms_screen;
#if WXWIN_COMPATIBILITY_2_4
// the backwards compatible versions of wxSystemSettingsNative functions,
// don't use these methods in the new code!
wxDEPRECATED(static wxColour GetSystemColour(int index));
wxDEPRECATED(static wxFont GetSystemFont(int index));
wxDEPRECATED(static int GetSystemMetric(int index));
#endif
}; };
#endif #endif

View File

@@ -23,14 +23,6 @@
// compatibility settings // compatibility settings
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// This setting determines the compatibility with 2.4 API: set it to 1 to
// enable it but please consider updating your code instead.
//
// Default is 0
//
// Recommended setting: 0 (please update your code)
#define WXWIN_COMPATIBILITY_2_4 0
// This setting determines the compatibility with 2.6 API: set it to 0 to // This setting determines the compatibility with 2.6 API: set it to 0 to
// flag all cases of using deprecated functions. // flag all cases of using deprecated functions.
// //

View File

@@ -843,70 +843,6 @@ private:
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON
#if WXWIN_COMPATIBILITY_2_4
// NB: wxBookCtrlSizer and wxNotebookSizer are deprecated, they
// don't do anything. wxBookCtrlBase::DoGetBestSize does the job now.
// ----------------------------------------------------------------------------
// wxBookCtrlSizer
// ----------------------------------------------------------------------------
#if wxUSE_BOOKCTRL
// this sizer works with wxNotebook/wxListbook/... and sizes the control to
// fit its pages
class WXDLLEXPORT wxBookCtrlBase;
class WXDLLEXPORT wxBookCtrlSizer : public wxSizer
{
public:
#if WXWIN_COMPATIBILITY_2_6
wxDEPRECATED( wxBookCtrlSizer(wxBookCtrlBase *bookctrl) );
#endif // WXWIN_COMPATIBILITY_2_6
wxBookCtrlBase *GetControl() const { return m_bookctrl; }
virtual void RecalcSizes();
virtual wxSize CalcMin();
protected:
// this protected ctor lets us mark the real one above as deprecated
// and still have warning-free build of the library itself:
wxBookCtrlSizer() {}
wxBookCtrlBase *m_bookctrl;
private:
DECLARE_CLASS(wxBookCtrlSizer)
DECLARE_NO_COPY_CLASS(wxBookCtrlSizer)
};
#if wxUSE_NOTEBOOK
// before wxBookCtrlBase we only had wxNotebookSizer, keep it for backwards
// compatibility
class WXDLLEXPORT wxNotebook;
class WXDLLEXPORT wxNotebookSizer : public wxBookCtrlSizer
{
public:
#if WXWIN_COMPATIBILITY_2_6
wxDEPRECATED( wxNotebookSizer(wxNotebook *nb) );
#endif // WXWIN_COMPATIBILITY_2_6
wxNotebook *GetNotebook() const { return (wxNotebook *)m_bookctrl; }
private:
DECLARE_CLASS(wxNotebookSizer)
DECLARE_NO_COPY_CLASS(wxNotebookSizer)
};
#endif // wxUSE_NOTEBOOK
#endif // wxUSE_BOOKCTRL
#endif // WXWIN_COMPATIBILITY_2_4
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// inline functions implementation // inline functions implementation

View File

@@ -126,9 +126,6 @@ private:
#include "wx/univ/slider.h" #include "wx/univ/slider.h"
#elif defined(__WXMSW__) #elif defined(__WXMSW__)
#include "wx/msw/slider95.h" #include "wx/msw/slider95.h"
#if WXWIN_COMPATIBILITY_2_4
#define wxSlider95 wxSlider
#endif
#elif defined(__WXMOTIF__) #elif defined(__WXMOTIF__)
#include "wx/motif/slider.h" #include "wx/motif/slider.h"
#elif defined(__WXGTK20__) #elif defined(__WXGTK20__)

View File

@@ -46,9 +46,6 @@ public:
_T("sound can only be looped asynchronously") ); _T("sound can only be looped asynchronously") );
return DoPlay(flags); return DoPlay(flags);
} }
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( bool Play(bool async, bool looped = false) const );
#endif
// Plays sound from filename: // Plays sound from filename:
static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC); static bool Play(const wxString& filename, unsigned flags = wxSOUND_ASYNC);
@@ -83,16 +80,6 @@ inline bool wxSoundBase::Play(const wxString& filename, unsigned flags)
return snd.IsOk() ? snd.Play(flags) : false; return snd.IsOk() ? snd.Play(flags) : false;
} }
#if WXWIN_COMPATIBILITY_2_4
inline bool wxSoundBase::Play(bool async, bool looped) const
{
unsigned flags = 0;
if (async) flags |= wxSOUND_ASYNC;
if (looped) flags |= wxSOUND_LOOP | wxSOUND_ASYNC;
return DoPlay(flags);
}
#endif
#endif // wxUSE_SOUND #endif // wxUSE_SOUND
#endif // _WX_SOUND_H_BASE_ #endif // _WX_SOUND_H_BASE_

View File

@@ -1384,11 +1384,6 @@ wxString WXDLLIMPEXP_BASE operator+(const wxString& string, const wxChar *psz);
wxString WXDLLIMPEXP_BASE operator+(const wxChar *psz, const wxString& string); wxString WXDLLIMPEXP_BASE operator+(const wxChar *psz, const wxString& string);
// define wxArrayString, for compatibility
#if WXWIN_COMPATIBILITY_2_4 && !wxUSE_STL
#include "wx/arrstr.h"
#endif
#if wxUSE_STL #if wxUSE_STL
// return an empty wxString (not very useful with wxUSE_STL == 1) // return an empty wxString (not very useful with wxUSE_STL == 1)
inline const wxString wxGetEmptyString() { return wxString(); } inline const wxString wxGetEmptyString() { return wxString(); }

View File

@@ -39,11 +39,6 @@
#define wxHAS_TEXT_WINDOW_STREAM 0 #define wxHAS_TEXT_WINDOW_STREAM 0
#endif #endif
#if WXWIN_COMPATIBILITY_2_4 && !wxHAS_TEXT_WINDOW_STREAM
// define old flag if one could use it somewhere
#define NO_TEXT_WINDOW_STREAM
#endif
class WXDLLEXPORT wxTextCtrl; class WXDLLEXPORT wxTextCtrl;
class WXDLLEXPORT wxTextCtrlBase; class WXDLLEXPORT wxTextCtrlBase;

View File

@@ -14,10 +14,5 @@
#include "wx/generic/textdlgg.h" #include "wx/generic/textdlgg.h"
#if WXWIN_COMPATIBILITY_2_4
// for wxGetNumberFromUser()
#include "wx/numdlg.h"
#endif // WXWIN_COMPATIBILITY_2_4
#endif // _WX_TEXTDLG_H_BASE_ #endif // _WX_TEXTDLG_H_BASE_

View File

@@ -70,13 +70,7 @@ public:
// invalidate the item // invalidate the item
void Unset() { m_pItem = 0; } void Unset() { m_pItem = 0; }
#if WXWIN_COMPATIBILITY_2_4
// deprecated: only for compatibility, don't work on 64 bit archs
wxTreeItemId(long item) { m_pItem = wxUIntToPtr(item); }
operator long() const { return (long)wxPtrToUInt(m_pItem); }
#else // !WXWIN_COMPATIBILITY_2_4
operator bool() const { return IsOk(); } operator bool() const { return IsOk(); }
#endif // WXWIN_COMPATIBILITY_2_4/!WXWIN_COMPATIBILITY_2_4
wxTreeItemIdValue m_pItem; wxTreeItemIdValue m_pItem;
}; };

View File

@@ -71,22 +71,6 @@ public:
void SetProxy(const wxString& url_proxy); void SetProxy(const wxString& url_proxy);
#endif // wxUSE_PROTOCOL_HTTP #endif // wxUSE_PROTOCOL_HTTP
#if WXWIN_COMPATIBILITY_2_4
//Use the proper wxURI accessors instead
wxDEPRECATED( wxString GetProtocolName() const );
wxDEPRECATED( wxString GetHostName() const );
wxDEPRECATED( wxString GetPath() const );
//Use wxURI instead - this does not work that well
wxDEPRECATED( static wxString ConvertToValidURI(
const wxString& uri,
const wxChar* delims = wxT(";/?:@&=+$,")
) );
//Use wxURI::Unescape instead
wxDEPRECATED( static wxString ConvertFromURI(const wxString& uri) );
#endif
protected: protected:
static wxProtoInfo *ms_protocols; static wxProtoInfo *ms_protocols;

View File

@@ -72,11 +72,6 @@ class WXDLLIMPEXP_CORE wxWindowList;
// String functions (deprecated, use wxString) // String functions (deprecated, use wxString)
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Make a copy of this string using 'new'
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s) );
#endif
// A shorter way of using strcmp // A shorter way of using strcmp
#define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0)) #define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
@@ -292,23 +287,6 @@ WXDLLEXPORT long wxGetCurrentId();
// Various conversions // Various conversions
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// these functions are deprecated, use wxString methods instead!
#if WXWIN_COMPATIBILITY_2_4
extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxFloatToStringStr;
extern WXDLLIMPEXP_DATA_BASE(const wxChar*) wxDoubleToStringStr;
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToFloat(const wxChar *s, float *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* FloatToString(float number, const wxChar *fmt = wxFloatToStringStr) );
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToDouble(const wxChar *s, double *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* DoubleToString(double number, const wxChar *fmt = wxDoubleToStringStr) );
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToInt(const wxChar *s, int *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE void StringToLong(const wxChar *s, long *number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* IntToString(int number) );
wxDEPRECATED( WXDLLIMPEXP_BASE wxChar* LongToString(long number) );
#endif // WXWIN_COMPATIBILITY_2_4
// Convert 2-digit hex number to decimal // Convert 2-digit hex number to decimal
WXDLLIMPEXP_BASE int wxHexToDec(const wxString& buf); WXDLLIMPEXP_BASE int wxHexToDec(const wxString& buf);

View File

@@ -60,16 +60,6 @@ public:
inline long GetStyle() const { return m_validatorStyle; } inline long GetStyle() const { return m_validatorStyle; }
inline void SetStyle(long style) { m_validatorStyle = style; } inline void SetStyle(long style) { m_validatorStyle = style; }
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( void SetIncludeList(const wxStringList& list) );
wxDEPRECATED( wxStringList& GetIncludeList() );
wxDEPRECATED( void SetExcludeList(const wxStringList& list) );
wxDEPRECATED( wxStringList& GetExcludeList() );
wxDEPRECATED( bool IsInCharIncludeList(const wxString& val) );
wxDEPRECATED( bool IsNotInCharExcludeList(const wxString& val) );
#endif
void SetIncludes(const wxArrayString& includes) { m_includes = includes; } void SetIncludes(const wxArrayString& includes) { m_includes = includes; }
inline wxArrayString& GetIncludes() { return m_includes; } inline wxArrayString& GetIncludes() { return m_includes; }
@@ -89,10 +79,6 @@ DECLARE_EVENT_TABLE()
protected: protected:
long m_validatorStyle; long m_validatorStyle;
wxString * m_stringValue; wxString * m_stringValue;
#if WXWIN_COMPATIBILITY_2_4
wxStringList m_includeList;
wxStringList m_excludeList;
#endif
wxArrayString m_includes; wxArrayString m_includes;
wxArrayString m_excludes; wxArrayString m_excludes;

View File

@@ -255,14 +255,6 @@ public:
wxObject* GetWxObjectPtr() const; wxObject* GetWxObjectPtr() const;
#if WXWIN_COMPATIBILITY_2_4
wxDEPRECATED( wxVariant(const wxStringList& val, const wxString& name = wxEmptyString) );
wxDEPRECATED( bool operator== (const wxStringList& value) const );
wxDEPRECATED( bool operator!= (const wxStringList& value) const );
wxDEPRECATED( void operator= (const wxStringList& value) );
wxDEPRECATED( wxStringList& GetStringList() const );
#endif
// ------------------------------ // ------------------------------
// list operations // list operations
// ------------------------------ // ------------------------------

View File

@@ -517,13 +517,6 @@ public:
Backward compatibility macros. Do *NOT* use, they may disappear in future Backward compatibility macros. Do *NOT* use, they may disappear in future
versions of the XRC library! versions of the XRC library!
------------------------------------------------------------------------- */ ------------------------------------------------------------------------- */
#if WXWIN_COMPATIBILITY_2_4
#define ADD_STYLE XRC_ADD_STYLE
#define wxTheXmlResource wxXmlResource::Get()
#define XMLID XRCID
#define XMLCTRL XRCCTRL
#define GetXMLID GetXRCID
#endif
#endif // wxUSE_XRC #endif // wxUSE_XRC

View File

@@ -1719,12 +1719,6 @@ public:
// gets the streaming callback from this class or any superclass // gets the streaming callback from this class or any superclass
wxObjectStreamingCallback GetStreamingCallback() const ; wxObjectStreamingCallback GetStreamingCallback() const ;
#if WXWIN_COMPATIBILITY_2_4
// Initializes parent pointers and hash table for fast searching.
wxDEPRECATED( static void InitializeClasses() );
// Cleans up hash table used for fast searching.
wxDEPRECATED( static void CleanUpClasses() );
#endif
static void CleanUp(); static void CleanUp();
// returns the first property // returns the first property

View File

@@ -27,9 +27,6 @@ enum {
// Flags // Flags
enum { enum {
#if WXWIN_COMPATIBILITY_2_4
wxZLIB_24COMPATIBLE = 4, // read v2.4.x data without error
#endif
wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum wxZLIB_NO_HEADER = 0, // raw deflate stream, no header or checksum
wxZLIB_ZLIB = 1, // zlib header and checksum wxZLIB_ZLIB = 1, // zlib header and checksum
wxZLIB_GZIP = 2, // gzip header and checksum, requires zlib 1.2.1+ wxZLIB_GZIP = 2, // gzip header and checksum, requires zlib 1.2.1+
@@ -59,9 +56,6 @@ class WXDLLIMPEXP_BASE wxZlibInputStream: public wxFilterInputStream {
unsigned char *m_z_buffer; unsigned char *m_z_buffer;
struct z_stream_s *m_inflate; struct z_stream_s *m_inflate;
wxFileOffset m_pos; wxFileOffset m_pos;
#if WXWIN_COMPATIBILITY_2_4
bool m_24compatibilty;
#endif
DECLARE_NO_COPY_CLASS(wxZlibInputStream) DECLARE_NO_COPY_CLASS(wxZlibInputStream)
}; };

View File

@@ -237,27 +237,6 @@ wxAppTraits *wxAppConsole::GetTraits()
return m_traits; return m_traits;
} }
// we must implement CreateXXX() in wxApp itself for backwards compatibility
#if WXWIN_COMPATIBILITY_2_4
#if wxUSE_LOG
wxLog *wxAppConsole::CreateLogTarget()
{
wxAppTraits *traits = GetTraits();
return traits ? traits->CreateLogTarget() : NULL;
}
#endif // wxUSE_LOG
wxMessageOutput *wxAppConsole::CreateMessageOutput()
{
wxAppTraits *traits = GetTraits();
return traits ? traits->CreateMessageOutput() : NULL;
}
#endif // WXWIN_COMPATIBILITY_2_4
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// event processing // event processing
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -453,15 +432,6 @@ void wxAppConsole::OnAssert(const wxChar *file,
#endif // __WXDEBUG__ #endif // __WXDEBUG__
#if WXWIN_COMPATIBILITY_2_4
bool wxAppConsole::CheckBuildOptions(const wxBuildOptions& buildOptions)
{
return CheckBuildOptions(buildOptions.m_signature, "your program");
}
#endif
// ============================================================================ // ============================================================================
// other classes implementations // other classes implementations
// ============================================================================ // ============================================================================

View File

@@ -266,171 +266,6 @@ bool wxPrintData::IsOk() const
return m_nativeData->Ok(); return m_nativeData->Ok();
} }
// What should happen here? wxPostScriptPrintNativeData is not
// defined unless all this is true on MSW.
#if WXWIN_COMPATIBILITY_2_4 && wxUSE_PRINTING_ARCHITECTURE && (!defined(__WXMSW__) || wxUSE_POSTSCRIPT_ARCHITECTURE_IN_MSW)
#include "wx/generic/prntdlgg.h"
#if wxUSE_POSTSCRIPT
#define WXUNUSED_WITHOUT_PS(name) name
#else
#define WXUNUSED_WITHOUT_PS(name) WXUNUSED(name)
#endif
wxString wxPrintData::GetPrinterCommand() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetPrinterCommand();
#endif
return wxEmptyString;
}
wxString wxPrintData::GetPrinterOptions() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetPrinterOptions();
#endif
return wxEmptyString;
}
wxString wxPrintData::GetPreviewCommand() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetPreviewCommand();
#endif
return wxEmptyString;
}
wxString wxPrintData::GetFontMetricPath() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetFontMetricPath();
#endif
return wxEmptyString;
}
double wxPrintData::GetPrinterScaleX() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetPrinterScaleX();
#endif
return 1.0;
}
double wxPrintData::GetPrinterScaleY() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetPrinterScaleY();
#endif
return 1.0;
}
long wxPrintData::GetPrinterTranslateX() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetPrinterTranslateX();
#endif
return 0;
}
long wxPrintData::GetPrinterTranslateY() const
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
return ((wxPostScriptPrintNativeData*)m_nativeData)->GetPrinterTranslateY();
#endif
return 0;
}
void wxPrintData::SetPrinterCommand(const wxString& WXUNUSED_WITHOUT_PS(command))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterCommand( command );
#endif
}
void wxPrintData::SetPrinterOptions(const wxString& WXUNUSED_WITHOUT_PS(options))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterOptions( options );
#endif
}
void wxPrintData::SetPreviewCommand(const wxString& WXUNUSED_WITHOUT_PS(command))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPreviewCommand( command );
#endif
}
void wxPrintData::SetFontMetricPath(const wxString& WXUNUSED_WITHOUT_PS(path))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetFontMetricPath( path );
#endif
}
void wxPrintData::SetPrinterScaleX(double WXUNUSED_WITHOUT_PS(x))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterScaleX( x );
#endif
}
void wxPrintData::SetPrinterScaleY(double WXUNUSED_WITHOUT_PS(y))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterScaleY( y );
#endif
}
void wxPrintData::SetPrinterScaling(double WXUNUSED_WITHOUT_PS(x), double WXUNUSED_WITHOUT_PS(y))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterScaling( x, y );
#endif
}
void wxPrintData::SetPrinterTranslateX(long WXUNUSED_WITHOUT_PS(x))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterTranslateX( x );
#endif
}
void wxPrintData::SetPrinterTranslateY(long WXUNUSED_WITHOUT_PS(y))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterTranslateY( y );
#endif
}
void wxPrintData::SetPrinterTranslation(long WXUNUSED_WITHOUT_PS(x), long WXUNUSED_WITHOUT_PS(y))
{
#if wxUSE_POSTSCRIPT
if (m_nativeData && wxIsKindOf(m_nativeData,wxPostScriptPrintNativeData))
((wxPostScriptPrintNativeData*)m_nativeData)->SetPrinterTranslation( x, y );
#endif
}
#endif
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// Print dialog data // Print dialog data
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
@@ -453,9 +288,6 @@ wxPrintDialogData::wxPrintDialogData()
m_printEnablePrintToFile = ! factory->HasOwnPrintToFile(); m_printEnablePrintToFile = ! factory->HasOwnPrintToFile();
m_printEnableHelp = false; m_printEnableHelp = false;
#if WXWIN_COMPATIBILITY_2_4
m_printSetupDialog = false;
#endif
} }
wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData) wxPrintDialogData::wxPrintDialogData(const wxPrintDialogData& dialogData)
@@ -479,9 +311,6 @@ wxPrintDialogData::wxPrintDialogData(const wxPrintData& printData)
m_printEnablePageNumbers = true; m_printEnablePageNumbers = true;
m_printEnablePrintToFile = true; m_printEnablePrintToFile = true;
m_printEnableHelp = false; m_printEnableHelp = false;
#if WXWIN_COMPATIBILITY_2_4
m_printSetupDialog = false;
#endif
m_printData = printData; m_printData = printData;
} }
@@ -504,9 +333,6 @@ void wxPrintDialogData::operator=(const wxPrintDialogData& data)
m_printEnablePageNumbers = data.m_printEnablePageNumbers; m_printEnablePageNumbers = data.m_printEnablePageNumbers;
m_printEnableHelp = data.m_printEnableHelp; m_printEnableHelp = data.m_printEnableHelp;
m_printEnablePrintToFile = data.m_printEnablePrintToFile; m_printEnablePrintToFile = data.m_printEnablePrintToFile;
#if WXWIN_COMPATIBILITY_2_4
m_printSetupDialog = data.m_printSetupDialog;
#endif
m_printData = data.m_printData; m_printData = data.m_printData;
} }

View File

@@ -107,19 +107,6 @@ wxDbTable::wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumn
} // wxDbTable::wxDbTable() } // wxDbTable::wxDbTable()
/***** DEPRECATED: use wxDbTable::wxDbTable() format above *****/
#if WXWIN_COMPATIBILITY_2_4
wxDbTable::wxDbTable(wxDb *pwxDb, const wxString &tblName, const UWORD numColumns,
const wxChar *qryTblName, bool qryOnly, const wxString &tblPath)
{
wxString tempQryTblName;
tempQryTblName = qryTblName;
if (!initialize(pwxDb, tblName, numColumns, tempQryTblName, qryOnly, tblPath))
cleanup();
} // wxDbTable::wxDbTable()
#endif // WXWIN_COMPATIBILITY_2_4
/********** wxDbTable::~wxDbTable() **********/ /********** wxDbTable::~wxDbTable() **********/
wxDbTable::~wxDbTable() wxDbTable::~wxDbTable()
{ {

View File

@@ -380,9 +380,6 @@ wxEvent::wxEvent(const wxEvent &src)
wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId) wxCommandEvent::wxCommandEvent(wxEventType commandType, int theId)
: wxEvent(theId, commandType) : wxEvent(theId, commandType)
#if WXWIN_COMPATIBILITY_2_4
, m_commandString(this)
#endif
{ {
m_clientData = (char *) NULL; m_clientData = (char *) NULL;
m_clientObject = (wxClientData *) NULL; m_clientObject = (wxClientData *) NULL;

View File

@@ -102,18 +102,6 @@ bool wxFileDialogBase::Create(wxWindow *parent,
return true; return true;
} }
#if WXWIN_COMPATIBILITY_2_4
// Parses the filterStr, returning the number of filters.
// Returns 0 if none or if there's a problem.
// filterStr is in the form: "All files (*.*)|*.*|JPEG Files (*.jpeg)|*.jpg"
int wxFileDialogBase::ParseWildcard(const wxString& filterStr,
wxArrayString& descriptions,
wxArrayString& filters)
{
return ::wxParseCommonDialogsFilter(filterStr, descriptions, filters);
}
#endif // WXWIN_COMPATIBILITY_2_4
#if WXWIN_COMPATIBILITY_2_6 #if WXWIN_COMPATIBILITY_2_6
long wxFileDialogBase::GetStyle() const long wxFileDialogBase::GetStyle() const
{ {

View File

@@ -116,225 +116,6 @@ wxNodeBase *wxHashTableBase::GetNode(long key, long value) const
return node; return node;
} }
#if WXWIN_COMPATIBILITY_2_4
// ----------------------------------------------------------------------------
// wxHashTableLong
// ----------------------------------------------------------------------------
wxHashTableLong::~wxHashTableLong()
{
Destroy();
}
void wxHashTableLong::Init(size_t size)
{
m_hashSize = size;
m_values = new wxArrayLong *[size];
m_keys = new wxArrayLong *[size];
for ( size_t n = 0; n < m_hashSize; n++ )
{
m_values[n] =
m_keys[n] = (wxArrayLong *)NULL;
}
m_count = 0;
}
void wxHashTableLong::Create(size_t size)
{
Init(size);
}
void wxHashTableLong::Destroy()
{
for ( size_t n = 0; n < m_hashSize; n++ )
{
delete m_values[n];
delete m_keys[n];
}
delete [] m_values;
delete [] m_keys;
m_hashSize = 0;
m_count = 0;
}
void wxHashTableLong::Put(long key, long value)
{
wxCHECK_RET( m_hashSize, _T("must call Create() first") );
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
if ( !m_keys[slot] )
{
m_keys[slot] = new wxArrayLong;
m_values[slot] = new wxArrayLong;
}
m_keys[slot]->Add(key);
m_values[slot]->Add(value);
m_count++;
}
long wxHashTableLong::Get(long key) const
{
wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") );
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
wxArrayLong *keys = m_keys[slot];
if ( keys )
{
size_t count = keys->GetCount();
for ( size_t n = 0; n < count; n++ )
{
if ( keys->Item(n) == key )
{
return m_values[slot]->Item(n);
}
}
}
return wxNOT_FOUND;
}
long wxHashTableLong::Delete(long key)
{
wxCHECK_MSG( m_hashSize, wxNOT_FOUND, _T("must call Create() first") );
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
wxArrayLong *keys = m_keys[slot];
if ( keys )
{
size_t count = keys->GetCount();
for ( size_t n = 0; n < count; n++ )
{
if ( keys->Item(n) == key )
{
long val = m_values[slot]->Item(n);
keys->RemoveAt(n);
m_values[slot]->RemoveAt(n);
m_count--;
return val;
}
}
}
return wxNOT_FOUND;
}
// ----------------------------------------------------------------------------
// wxStringHashTable: more efficient than storing strings in a list
// ----------------------------------------------------------------------------
wxStringHashTable::wxStringHashTable(size_t sizeTable)
{
m_keys = new wxArrayLong *[sizeTable];
m_values = new wxArrayString *[sizeTable];
m_hashSize = sizeTable;
for ( size_t n = 0; n < m_hashSize; n++ )
{
m_values[n] = (wxArrayString *)NULL;
m_keys[n] = (wxArrayLong *)NULL;
}
}
wxStringHashTable::~wxStringHashTable()
{
Destroy();
}
void wxStringHashTable::Destroy()
{
for ( size_t n = 0; n < m_hashSize; n++ )
{
delete m_values[n];
delete m_keys[n];
}
delete [] m_values;
delete [] m_keys;
m_hashSize = 0;
}
void wxStringHashTable::Put(long key, const wxString& value)
{
wxCHECK_RET( m_hashSize, _T("must call Create() first") );
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
if ( !m_keys[slot] )
{
m_keys[slot] = new wxArrayLong;
m_values[slot] = new wxArrayString;
}
m_keys[slot]->Add(key);
m_values[slot]->Add(value);
}
wxString wxStringHashTable::Get(long key, bool *wasFound) const
{
wxCHECK_MSG( m_hashSize, wxEmptyString, _T("must call Create() first") );
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
wxArrayLong *keys = m_keys[slot];
if ( keys )
{
size_t count = keys->GetCount();
for ( size_t n = 0; n < count; n++ )
{
if ( keys->Item(n) == key )
{
if ( wasFound )
*wasFound = true;
return m_values[slot]->Item(n);
}
}
}
if ( wasFound )
*wasFound = false;
return wxEmptyString;
}
bool wxStringHashTable::Delete(long key) const
{
wxCHECK_MSG( m_hashSize, false, _T("must call Create() first") );
size_t slot = (size_t)abs((int)(key % (long)m_hashSize));
wxArrayLong *keys = m_keys[slot];
if ( keys )
{
size_t count = keys->GetCount();
for ( size_t n = 0; n < count; n++ )
{
if ( keys->Item(n) == key )
{
keys->RemoveAt(n);
m_values[slot]->RemoveAt(n);
return true;
}
}
}
return false;
}
#endif // WXWIN_COMPATIBILITY_2_4
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// old not type safe wxHashTable // old not type safe wxHashTable
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -32,10 +32,6 @@ DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_BEGIN_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT) DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_END_LABEL_EDIT)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM) DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ITEM)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS) DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_DELETE_ALL_ITEMS)
#if WXWIN_COMPATIBILITY_2_4
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_GET_INFO)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_SET_INFO)
#endif
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_SELECTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED) DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_ITEM_DESELECTED)
DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN) DEFINE_EVENT_TYPE(wxEVT_COMMAND_LIST_KEY_DOWN)

View File

@@ -277,18 +277,4 @@ wxString wxRadioBoxBase::DoGetHelpTextAtPoint(const wxWindow *derived,
#endif // wxUSE_HELP #endif // wxUSE_HELP
#if WXWIN_COMPATIBILITY_2_4
// these functions are deprecated and don't do anything
int wxRadioBoxBase::GetNumberOfRowsOrCols() const
{
return 1;
}
void wxRadioBoxBase::SetNumberOfRowsOrCols(int WXUNUSED(n))
{
}
#endif // WXWIN_COMPATIBILITY_2_4
#endif // wxUSE_RADIOBOX #endif // wxUSE_RADIOBOX

View File

@@ -67,22 +67,3 @@ void wxSystemSettings::SetScreenType( wxSystemScreenType screen )
{ {
ms_screen = screen; ms_screen = screen;
} }
#if WXWIN_COMPATIBILITY_2_4
wxColour wxSystemSettings::GetSystemColour(int index)
{
return GetColour((wxSystemColour)index);
}
wxFont wxSystemSettings::GetSystemFont(int index)
{
return GetFont((wxSystemFont)index);
}
int wxSystemSettings::GetSystemMetric(int index)
{
return GetMetric((wxSystemMetric)index);
}
#endif // WXWIN_COMPATIBILITY_2_4

View File

@@ -33,9 +33,6 @@
#include "wx/listimpl.cpp" #include "wx/listimpl.cpp"
#if WXWIN_COMPATIBILITY_2_4
#include "wx/notebook.h"
#endif
//--------------------------------------------------------------------------- //---------------------------------------------------------------------------
@@ -2107,88 +2104,3 @@ void wxStdDialogButtonSizer::Realize()
} }
#endif // wxUSE_BUTTON #endif // wxUSE_BUTTON
#if WXWIN_COMPATIBILITY_2_4
// ----------------------------------------------------------------------------
// wxNotebookSizer
// ----------------------------------------------------------------------------
#if wxUSE_BOOKCTRL
IMPLEMENT_CLASS(wxBookCtrlSizer, wxSizer)
#if wxUSE_NOTEBOOK
IMPLEMENT_CLASS(wxNotebookSizer, wxBookCtrlSizer)
#endif // wxUSE_NOTEBOOK
#endif // wxUSE_BOOKCTRL
#if wxUSE_BOOKCTRL
#if WXWIN_COMPATIBILITY_2_6
wxBookCtrlSizer::wxBookCtrlSizer(wxBookCtrlBase *bookctrl)
: m_bookctrl(bookctrl)
{
wxASSERT_MSG( bookctrl, wxT("wxBookCtrlSizer needs a control") );
}
#endif // WXWIN_COMPATIBILITY_2_6
void wxBookCtrlSizer::RecalcSizes()
{
m_bookctrl->SetSize( m_position.x, m_position.y, m_size.x, m_size.y );
}
wxSize wxBookCtrlSizer::CalcMin()
{
wxSize sizeBorder = m_bookctrl->CalcSizeFromPage(wxSize(0,0));
sizeBorder.x += 5;
sizeBorder.y += 5;
if ( m_bookctrl->GetPageCount() == 0 )
{
return wxSize(sizeBorder.x + 10, sizeBorder.y + 10);
}
int maxX = 0;
int maxY = 0;
wxWindowList::compatibility_iterator
node = m_bookctrl->GetChildren().GetFirst();
while (node)
{
wxWindow *item = node->GetData();
wxSizer *itemsizer = item->GetSizer();
if (itemsizer)
{
wxSize subsize( itemsizer->CalcMin() );
if (subsize.x > maxX)
maxX = subsize.x;
if (subsize.y > maxY)
maxY = subsize.y;
}
node = node->GetNext();
}
return wxSize( maxX, maxY ) + sizeBorder;
}
#if wxUSE_NOTEBOOK
#if WXWIN_COMPATIBILITY_2_6
wxNotebookSizer::wxNotebookSizer(wxNotebook *nb)
{
wxASSERT_MSG( nb, wxT("wxNotebookSizer needs a control") );
m_bookctrl = nb;
}
#endif // WXWIN_COMPATIBILITY_2_6
#endif // wxUSE_NOTEBOOOK
#endif // wxUSE_BOOKCTRL
#endif // WXWIN_COMPATIBILITY_2_4

View File

@@ -2231,30 +2231,6 @@ void wxArrayString::Shrink()
} }
} }
#if WXWIN_COMPATIBILITY_2_4
// return a wxString[] as required for some control ctors.
wxString* wxArrayString::GetStringArray() const
{
wxString *array = 0;
if( m_nCount > 0 )
{
array = new wxString[m_nCount];
for( size_t i = 0; i < m_nCount; i++ )
array[i] = m_pItems[i];
}
return array;
}
void wxArrayString::Remove(size_t nIndex, size_t nRemove)
{
RemoveAt(nIndex, nRemove);
}
#endif // WXWIN_COMPATIBILITY_2_4
// searches the array for an item (forward or backwards) // searches the array for an item (forward or backwards)
int wxArrayString::Index(const wxChar *sz, bool bCase, bool bFromEnd) const int wxArrayString::Index(const wxChar *sz, bool bCase, bool bFromEnd) const
{ {

View File

@@ -441,84 +441,5 @@ void wxURLModule::OnExit()
#endif // wxUSE_SOCKETS #endif // wxUSE_SOCKETS
// ---------------------------------------------------------------------------
//
// wxURL Compatibility
//
// ---------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_4
#include "wx/url.h"
wxString wxURL::GetProtocolName() const
{
return m_scheme;
}
wxString wxURL::GetHostName() const
{
return m_server;
}
wxString wxURL::GetPath() const
{
return m_path;
}
//Note that this old code really doesn't convert to a URI that well and looks
//more like a dirty hack than anything else...
wxString wxURL::ConvertToValidURI(const wxString& uri, const wxChar* delims)
{
wxString out_str;
wxString hexa_code;
size_t i;
for (i = 0; i < uri.Len(); i++)
{
wxChar c = uri.GetChar(i);
if (c == wxT(' '))
{
// GRG, Apr/2000: changed to "%20" instead of '+'
out_str += wxT("%20");
}
else
{
// GRG, Apr/2000: modified according to the URI definition (RFC 2396)
//
// - Alphanumeric characters are never escaped
// - Unreserved marks are never escaped
// - Delimiters must be escaped if they appear within a component
// but not if they are used to separate components. Here we have
// no clear way to distinguish between these two cases, so they
// are escaped unless they are passed in the 'delims' parameter
// (allowed delimiters).
static const wxChar marks[] = wxT("-_.!~*()'");
if ( !wxIsalnum(c) && !wxStrchr(marks, c) && !wxStrchr(delims, c) )
{
hexa_code.Printf(wxT("%%%02X"), c);
out_str += hexa_code;
}
else
{
out_str += c;
}
}
}
return out_str;
}
wxString wxURL::ConvertFromURI(const wxString& uri)
{
return wxURI::Unescape(uri);
}
#endif //WXWIN_COMPATIBILITY_2_4
#endif // wxUSE_URL #endif // wxUSE_URL

View File

@@ -109,97 +109,6 @@
// implementation // implementation
// ============================================================================ // ============================================================================
#if WXWIN_COMPATIBILITY_2_4
wxChar *
copystring (const wxChar *s)
{
if (s == NULL) s = wxEmptyString;
size_t len = wxStrlen (s) + 1;
wxChar *news = new wxChar[len];
memcpy (news, s, len * sizeof(wxChar)); // Should be the fastest
return news;
}
#endif // WXWIN_COMPATIBILITY_2_4
// ----------------------------------------------------------------------------
// String <-> Number conversions (deprecated)
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_4
WXDLLIMPEXP_DATA_BASE(const wxChar *) wxFloatToStringStr = wxT("%.2f");
WXDLLIMPEXP_DATA_BASE(const wxChar *) wxDoubleToStringStr = wxT("%.2f");
void
StringToFloat (const wxChar *s, float *number)
{
if (s && *s && number)
*number = (float) wxStrtod (s, (wxChar **) NULL);
}
void
StringToDouble (const wxChar *s, double *number)
{
if (s && *s && number)
*number = wxStrtod (s, (wxChar **) NULL);
}
wxChar *
FloatToString (float number, const wxChar *fmt)
{
static wxChar buf[256];
wxSprintf (buf, fmt, number);
return buf;
}
wxChar *
DoubleToString (double number, const wxChar *fmt)
{
static wxChar buf[256];
wxSprintf (buf, fmt, number);
return buf;
}
void
StringToInt (const wxChar *s, int *number)
{
if (s && *s && number)
*number = (int) wxStrtol (s, (wxChar **) NULL, 10);
}
void
StringToLong (const wxChar *s, long *number)
{
if (s && *s && number)
*number = wxStrtol (s, (wxChar **) NULL, 10);
}
wxChar *
IntToString (int number)
{
static wxChar buf[20];
wxSprintf (buf, wxT("%d"), number);
return buf;
}
wxChar *
LongToString (long number)
{
static wxChar buf[20];
wxSprintf (buf, wxT("%ld"), number);
return buf;
}
#endif // WXWIN_COMPATIBILITY_2_4
// Array used in DecToHex conversion routine. // Array used in DecToHex conversion routine.
static wxChar hexArray[] = wxT("0123456789ABCDEF"); static wxChar hexArray[] = wxT("0123456789ABCDEF");

View File

@@ -211,63 +211,6 @@ bool wxTextValidator::TransferFromWindow(void)
return true; return true;
} }
#if WXWIN_COMPATIBILITY_2_4
inline void wxCopyStringListToArrayString(wxArrayString& to, const wxStringList& from)
{
to.Clear();
for ( wxStringList::compatibility_iterator pNode = from.GetFirst();
pNode;
pNode = pNode->GetNext() )
{
to.Add(pNode->GetData());
}
}
inline void wxCopyArrayStringToStringList(wxStringList& to, const wxArrayString& from)
{
to.Clear();
for(size_t i = 0; i < from.GetCount(); ++i)
to.Add(from[i]);
}
wxStringList& wxTextValidator::GetIncludeList()
{
wxCopyArrayStringToStringList(m_includeList, m_includes);
return m_includeList;
}
wxStringList& wxTextValidator::GetExcludeList()
{
wxCopyArrayStringToStringList(m_excludeList, m_excludes);
return m_excludeList;
}
void wxTextValidator::SetIncludeList(const wxStringList& list)
{
wxCopyStringListToArrayString(m_includes, list);
}
void wxTextValidator::SetExcludeList(const wxStringList& list)
{
wxCopyStringListToArrayString(m_excludes, list);
}
bool wxTextValidator::IsInCharIncludeList(const wxString& val)
{
return IsInCharIncludes(val);
}
bool wxTextValidator::IsNotInCharExcludeList(const wxString& val)
{
return IsNotInCharExcludes(val);
}
#endif //compat 2.4
bool wxTextValidator::IsInCharIncludes(const wxString& val) bool wxTextValidator::IsInCharIncludes(const wxString& val)
{ {
size_t i; size_t i;

View File

@@ -1701,165 +1701,10 @@ void wxVariant::ClearList()
} }
} }
#if WXWIN_COMPATIBILITY_2_4
// ----------------------------------------------------------------------------
// wxVariantDataStringList
// ----------------------------------------------------------------------------
class WXDLLIMPEXP_BASE wxVariantDataStringList: public wxVariantData
{
DECLARE_DYNAMIC_CLASS(wxVariantDataStringList)
public:
wxVariantDataStringList() {}
wxVariantDataStringList(const wxStringList& list) { m_value = list; }
wxStringList& GetValue() const { return (wxStringList&) m_value; }
void SetValue(const wxStringList& value);
virtual bool Eq(wxVariantData& data) const;
#if wxUSE_STD_IOSTREAM
virtual bool Write(wxSTD ostream& str) const;
#endif
virtual bool Write(wxString& str) const;
#if wxUSE_STD_IOSTREAM
virtual bool Read(wxSTD istream& str);
#endif
virtual bool Read(wxString& str);
virtual wxString GetType() const { return wxT("stringlist"); };
protected:
wxStringList m_value;
};
IMPLEMENT_DYNAMIC_CLASS(wxVariantDataStringList, wxVariantData)
void wxVariantDataStringList::SetValue(const wxStringList& value)
{
m_value = value;
}
bool wxVariantDataStringList::Eq(wxVariantData& data) const
{
wxASSERT_MSG( (data.GetType() == wxT("stringlist")), wxT("wxVariantDataStringList::Eq: argument mismatch") );
wxVariantDataStringList& listData = (wxVariantDataStringList&) data;
wxStringList::compatibility_iterator node1 = m_value.GetFirst();
wxStringList::compatibility_iterator node2 = listData.GetValue().GetFirst();
while (node1 && node2)
{
wxString str1 ( node1->GetData() );
wxString str2 ( node2->GetData() );
if (str1 != str2)
return false;
node1 = node1->GetNext();
node2 = node2->GetNext();
}
if (node1 || node2) return false;
return true;
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataStringList::Write(wxSTD ostream& str) const
{
wxString s;
Write(s);
str << (const char*) s.mb_str();
return true;
}
#endif
bool wxVariantDataStringList::Write(wxString& str) const
{
str.Empty();
wxStringList::compatibility_iterator node = m_value.GetFirst();
while (node)
{
const wxChar* s = node->GetData();
if (node != m_value.GetFirst())
str += wxT(" ");
str += s;
node = node->GetNext();
}
return true;
}
#if wxUSE_STD_IOSTREAM
bool wxVariantDataStringList::Read(wxSTD istream& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// TODO
return false;
}
#endif
bool wxVariantDataStringList::Read(wxString& WXUNUSED(str))
{
wxFAIL_MSG(wxT("Unimplemented"));
// TODO
return false;
}
#endif //2.4 compat
#if WXWIN_COMPATIBILITY_2_4
wxVariant::wxVariant(const wxStringList& val, const wxString& name)
{
m_data = new wxVariantDataStringList(val);
m_name = name;
}
bool wxVariant::operator== (const wxStringList& value) const
{
wxASSERT_MSG( (GetType() == wxT("stringlist")), wxT("Invalid type for == operator") );
wxVariantDataStringList other(value);
return (GetData()->Eq(other));
}
bool wxVariant::operator!= (const wxStringList& value) const
{
wxASSERT_MSG( (GetType() == wxT("stringlist")), wxT("Invalid type for == operator") );
wxVariantDataStringList other(value);
return !(GetData()->Eq(other));
}
void wxVariant::operator= (const wxStringList& value)
{
if (GetType() == wxT("stringlist") &&
m_data->GetRefCount() == 1)
{
((wxVariantDataStringList*)GetData())->SetValue(value);
}
else
{
UnRef();
m_data = new wxVariantDataStringList(value);
}
}
// wxVariant
wxStringList& wxVariant::GetStringList() const
{
wxASSERT( (GetType() == wxT("stringlist")) );
return (wxStringList&) ((wxVariantDataStringList*) m_data)->GetValue();
}
#endif
// Treat a list variant as an array // Treat a list variant as an array
wxVariant wxVariant::operator[] (size_t idx) const wxVariant wxVariant::operator[] (size_t idx) const
{ {
#if WXWIN_COMPATIBILITY_2_4
wxASSERT_MSG( (GetType() == wxT("list") || GetType() == wxT("stringlist")), wxT("Invalid type for array operator") );
#else
wxASSERT_MSG( GetType() == wxT("list"), wxT("Invalid type for array operator") ); wxASSERT_MSG( GetType() == wxT("list"), wxT("Invalid type for array operator") );
#endif
if (GetType() == wxT("list")) if (GetType() == wxT("list"))
{ {
@@ -1867,17 +1712,6 @@ wxVariant wxVariant::operator[] (size_t idx) const
wxASSERT_MSG( (idx < data->GetValue().GetCount()), wxT("Invalid index for array") ); wxASSERT_MSG( (idx < data->GetValue().GetCount()), wxT("Invalid index for array") );
return * (wxVariant*) (data->GetValue().Item(idx)->GetData()); return * (wxVariant*) (data->GetValue().Item(idx)->GetData());
} }
#if WXWIN_COMPATIBILITY_2_4
else if (GetType() == wxT("stringlist"))
{
wxVariantDataStringList* data = (wxVariantDataStringList*) m_data;
wxASSERT_MSG( (idx < data->GetValue().GetCount()), wxT("Invalid index for array") );
wxString str( (const wxChar*) (data->GetValue().Item(idx)->GetData()) );
wxVariant variant( str );
return variant;
}
#endif
return wxNullVariant; return wxNullVariant;
} }
@@ -1897,24 +1731,13 @@ wxVariant& wxVariant::operator[] (size_t idx)
// Return the number of elements in a list // Return the number of elements in a list
size_t wxVariant::GetCount() const size_t wxVariant::GetCount() const
{ {
#if WXWIN_COMPATIBILITY_2_4
wxASSERT_MSG( (GetType() == wxT("list") || GetType() == wxT("stringlist")), wxT("Invalid type for GetCount()") );
#else
wxASSERT_MSG( GetType() == wxT("list"), wxT("Invalid type for GetCount()") ); wxASSERT_MSG( GetType() == wxT("list"), wxT("Invalid type for GetCount()") );
#endif
if (GetType() == wxT("list")) if (GetType() == wxT("list"))
{ {
wxVariantDataList* data = (wxVariantDataList*) m_data; wxVariantDataList* data = (wxVariantDataList*) m_data;
return data->GetValue().GetCount(); return data->GetValue().GetCount();
} }
#if WXWIN_COMPATIBILITY_2_4
else if (GetType() == wxT("stringlist"))
{
wxVariantDataStringList* data = (wxVariantDataStringList*) m_data;
return data->GetValue().GetCount();
}
#endif
return 0; return 0;
} }

View File

@@ -132,13 +132,6 @@ void wxZlibInputStream::Init(int flags)
m_z_size = ZSTREAM_BUFFER_SIZE; m_z_size = ZSTREAM_BUFFER_SIZE;
m_pos = 0; m_pos = 0;
#if WXWIN_COMPATIBILITY_2_4
// treat compatibility mode as auto
m_24compatibilty = flags == wxZLIB_24COMPATIBLE;
if (m_24compatibilty)
flags = wxZLIB_AUTO;
#endif
// if gzip is asked for but not supported... // if gzip is asked for but not supported...
if ((flags == wxZLIB_GZIP || flags == wxZLIB_AUTO) && !CanHandleGZip()) { if ((flags == wxZLIB_GZIP || flags == wxZLIB_AUTO) && !CanHandleGZip()) {
if (flags == wxZLIB_AUTO) { if (flags == wxZLIB_AUTO) {
@@ -231,11 +224,6 @@ size_t wxZlibInputStream::OnSysRead(void *buffer, size_t size)
// by the parent strean, // by the parent strean,
m_lasterror = wxSTREAM_READ_ERROR; m_lasterror = wxSTREAM_READ_ERROR;
if (m_parent_i_stream->Eof()) if (m_parent_i_stream->Eof())
#if WXWIN_COMPATIBILITY_2_4
if (m_24compatibilty)
m_lasterror = wxSTREAM_EOF;
else
#endif
wxLogError(_("Can't read inflate stream: unexpected EOF in underlying stream.")); wxLogError(_("Can't read inflate stream: unexpected EOF in underlying stream."));
break; break;

View File

@@ -1205,15 +1205,6 @@ bool wxGenericDirCtrl::ExtractWildcard(const wxString& filterStr, int n, wxStrin
return false; return false;
} }
#if WXWIN_COMPATIBILITY_2_4
// Parses the global filter, returning the number of filters.
// Returns 0 if none or if there's a problem.
// filterStr is in the form: "All files (*.*)|*.*|JPEG Files (*.jpeg)|*.jpg"
int wxGenericDirCtrl::ParseFilter(const wxString& filterStr, wxArrayString& filters, wxArrayString& descriptions)
{
return wxParseCommonDialogsFilter(filterStr, descriptions, filters );
}
#endif // WXWIN_COMPATIBILITY_2_4
void wxGenericDirCtrl::DoResize() void wxGenericDirCtrl::DoResize()
{ {

View File

@@ -1214,36 +1214,6 @@ wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item,
} }
} }
#if WXWIN_COMPATIBILITY_2_4
wxTreeItemId wxGenericTreeCtrl::GetFirstChild(const wxTreeItemId& item,
long& cookie) const
{
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
cookie = 0;
return GetNextChild(item, cookie);
}
wxTreeItemId wxGenericTreeCtrl::GetNextChild(const wxTreeItemId& item,
long& cookie) const
{
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
wxArrayGenericTreeItems& children = ((wxGenericTreeItem*) item.m_pItem)->GetChildren();
if ( (size_t)cookie < children.Count() )
{
return children.Item((size_t)cookie++);
}
else
{
// there are no more of them
return wxTreeItemId();
}
}
#endif // WXWIN_COMPATIBILITY_2_4
wxTreeItemId wxGenericTreeCtrl::GetLastChild(const wxTreeItemId& item) const wxTreeItemId wxGenericTreeCtrl::GetLastChild(const wxTreeItemId& item) const
{ {
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
@@ -3625,20 +3595,6 @@ wxGenericTreeCtrl::GetClassDefaultAttributes(wxWindowVariant WXUNUSED(variant))
#endif #endif
} }
#if WXWIN_COMPATIBILITY_2_4
int wxGenericTreeCtrl::GetItemSelectedImage(const wxTreeItemId& item) const
{
return GetItemImage(item, wxTreeItemIcon_Selected);
}
void wxGenericTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
{
SetItemImage(item, image, wxTreeItemIcon_Selected);
}
#endif // WXWIN_COMPATIBILITY_2_4
void wxGenericTreeCtrl::DoDirtyProcessing() void wxGenericTreeCtrl::DoDirtyProcessing()
{ {
if (m_freezeCount) if (m_freezeCount)

View File

@@ -265,17 +265,10 @@ IMPLEMENT_DYNAMIC_CLASS(wxHtmlHelpData, wxObject)
wxHtmlHelpData::wxHtmlHelpData() wxHtmlHelpData::wxHtmlHelpData()
{ {
#if WXWIN_COMPATIBILITY_2_4
m_cacheContents = NULL;
m_cacheIndex = NULL;
#endif
} }
wxHtmlHelpData::~wxHtmlHelpData() wxHtmlHelpData::~wxHtmlHelpData()
{ {
#if WXWIN_COMPATIBILITY_2_4
CleanCompatibilityData();
#endif
} }
bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys, bool wxHtmlHelpData::LoadMSProject(wxHtmlBookRecord *book, wxFileSystem& fsys,
@@ -703,10 +696,6 @@ bool wxHtmlHelpData::AddBook(const wxString& book)
title, contents, index, start, fsys.GetPath()); title, contents, index, start, fsys.GetPath());
delete fi; delete fi;
#if WXWIN_COMPATIBILITY_2_4
CleanCompatibilityData();
#endif
return rtval; return rtval;
} }
@@ -779,90 +768,6 @@ wxString wxHtmlHelpData::FindPageById(int id)
return wxEmptyString; return wxEmptyString;
} }
#if WXWIN_COMPATIBILITY_2_4
wxHtmlContentsItem::wxHtmlContentsItem()
: m_Level(0), m_ID(wxID_ANY), m_Name(NULL), m_Page(NULL), m_Book(NULL),
m_autofree(false)
{
}
wxHtmlContentsItem::wxHtmlContentsItem(const wxHtmlHelpDataItem& d)
{
m_autofree = true;
m_Level = d.level;
m_ID = d.id;
m_Name = wxStrdup(d.name.c_str());
m_Page = wxStrdup(d.page.c_str());
m_Book = d.book;
}
wxHtmlContentsItem& wxHtmlContentsItem::operator=(const wxHtmlContentsItem& d)
{
if (m_autofree)
{
free(m_Name);
free(m_Page);
}
m_autofree = true;
m_Level = d.m_Level;
m_ID = d.m_ID;
m_Name = d.m_Name ? wxStrdup(d.m_Name) : NULL;
m_Page = d.m_Page ? wxStrdup(d.m_Page) : NULL;
m_Book = d.m_Book;
return *this;
}
wxHtmlContentsItem::~wxHtmlContentsItem()
{
if (m_autofree)
{
free(m_Name);
free(m_Page);
}
}
wxHtmlContentsItem* wxHtmlHelpData::GetContents()
{
if (!m_cacheContents && !m_contents.empty())
{
size_t len = m_contents.size();
m_cacheContents = new wxHtmlContentsItem[len];
for (size_t i = 0; i < len; i++)
m_cacheContents[i] = m_contents[i];
}
return m_cacheContents;
}
int wxHtmlHelpData::GetContentsCnt()
{
return m_contents.size();
}
wxHtmlContentsItem* wxHtmlHelpData::GetIndex()
{
if (!m_cacheContents && !m_index.empty())
{
size_t len = m_index.size();
m_cacheContents = new wxHtmlContentsItem[len];
for (size_t i = 0; i < len; i++)
m_cacheContents[i] = m_index[i];
}
return m_cacheContents;
}
int wxHtmlHelpData::GetIndexCnt()
{
return m_index.size();
}
void wxHtmlHelpData::CleanCompatibilityData()
{
delete[] m_cacheContents;
m_cacheContents = NULL;
delete[] m_cacheIndex;
m_cacheIndex = NULL;
}
#endif // WXWIN_COMPATIBILITY_2_4
//---------------------------------------------------------------------------------- //----------------------------------------------------------------------------------
// wxHtmlSearchStatus functions // wxHtmlSearchStatus functions
@@ -900,15 +805,6 @@ wxHtmlSearchStatus::wxHtmlSearchStatus(wxHtmlHelpData* data, const wxString& key
m_Active = (m_CurIndex < m_MaxIndex); m_Active = (m_CurIndex < m_MaxIndex);
} }
#if WXWIN_COMPATIBILITY_2_4
wxHtmlContentsItem* wxHtmlSearchStatus::GetContentsItem()
{
static wxHtmlContentsItem it;
it = wxHtmlContentsItem(*m_CurItem);
return &it;
}
#endif
bool wxHtmlSearchStatus::Search() bool wxHtmlSearchStatus::Search()
{ {
wxFSFile *file; wxFSFile *file;

View File

@@ -769,30 +769,3 @@ terminate the program,\r\n\
} }
#endif // wxUSE_EXCEPTIONS #endif // wxUSE_EXCEPTIONS
// ----------------------------------------------------------------------------
// deprecated event loop functions
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_4
void wxApp::DoMessage(WXMSG *pMsg)
{
wxEventLoop *evtLoop = wxEventLoop::GetActive();
if ( evtLoop )
evtLoop->ProcessMessage(pMsg);
}
bool wxApp::DoMessage()
{
wxEventLoop *evtLoop = wxEventLoop::GetActive();
return evtLoop ? evtLoop->Dispatch() : false;
}
bool wxApp::ProcessMessage(WXMSG* pMsg)
{
wxEventLoop *evtLoop = wxEventLoop::GetActive();
return evtLoop && evtLoop->PreProcessMessage(pMsg);
}
#endif // WXWIN_COMPATIBILITY_2_4

View File

@@ -1164,15 +1164,6 @@ wxDC *wxBitmap::GetSelectedInto() const
#endif #endif
#if WXWIN_COMPATIBILITY_2_4
int wxBitmap::GetQuality() const
{
return 0;
}
#endif // WXWIN_COMPATIBILITY_2_4
void wxBitmap::UseAlpha() void wxBitmap::UseAlpha()
{ {
if ( GetBitmapData() ) if ( GetBitmapData() )
@@ -1216,14 +1207,6 @@ void wxBitmap::SetMask(wxMask *mask)
GetBitmapData()->SetMask(mask); GetBitmapData()->SetMask(mask);
} }
#if WXWIN_COMPATIBILITY_2_4
void wxBitmap::SetQuality(int WXUNUSED(quality))
{
}
#endif // WXWIN_COMPATIBILITY_2_4
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// raw bitmap access support // raw bitmap access support
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------

View File

@@ -276,13 +276,7 @@ int wxFileDialog::ShowModal()
*fileNameBuffer = wxT('\0'); *fileNameBuffer = wxT('\0');
*titleBuffer = wxT('\0'); *titleBuffer = wxT('\0');
#if WXWIN_COMPATIBILITY_2_4
long msw_flags = 0;
if ( HasFdFlag(wxHIDE_READONLY) || HasFdFlag(wxFD_SAVE) )
msw_flags |= OFN_HIDEREADONLY;
#else
long msw_flags = OFN_HIDEREADONLY; long msw_flags = OFN_HIDEREADONLY;
#endif
if ( HasFdFlag(wxFD_FILE_MUST_EXIST) ) if ( HasFdFlag(wxFD_FILE_MUST_EXIST) )
msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST; msw_flags |= OFN_PATHMUSTEXIST | OFN_FILEMUSTEXIST;

View File

@@ -2038,16 +2038,6 @@ bool wxListCtrl::MSWOnNotify(int idCtrl, WXLPARAM lParam, WXLPARAM *result)
wxDeleteInternalData(this, iItem); wxDeleteInternalData(this, iItem);
break; break;
#if WXWIN_COMPATIBILITY_2_4
case LVN_SETDISPINFO:
{
eventType = wxEVT_COMMAND_LIST_SET_INFO;
LV_DISPINFO *info = (LV_DISPINFO *)lParam;
wxConvertFromMSWListItem(GetHwnd(), event.m_item, info->item);
}
break;
#endif
case LVN_INSERTITEM: case LVN_INSERTITEM:
eventType = wxEVT_COMMAND_LIST_INSERT_ITEM; eventType = wxEVT_COMMAND_LIST_INSERT_ITEM;
event.m_itemIndex = iItem; event.m_itemIndex = iItem;

View File

@@ -753,10 +753,6 @@ bool wxWindowsPrintDialog::ConvertToNative( wxPrintDialogData &data )
pd->Flags |= PD_PAGENUMS; pd->Flags |= PD_PAGENUMS;
if ( data.GetEnableHelp() ) if ( data.GetEnableHelp() )
pd->Flags |= PD_SHOWHELP; pd->Flags |= PD_SHOWHELP;
#if WXWIN_COMPATIBILITY_2_4
if ( data.GetSetupDialog() )
pd->Flags |= PD_PRINTSETUP;
#endif
return true; return true;
} }
@@ -812,9 +808,7 @@ bool wxWindowsPrintDialog::ConvertFromNative( wxPrintDialogData &data )
data.EnableSelection( ((pd->Flags & PD_NOSELECTION) != PD_NOSELECTION) ); data.EnableSelection( ((pd->Flags & PD_NOSELECTION) != PD_NOSELECTION) );
data.EnablePageNumbers( ((pd->Flags & PD_NOPAGENUMS) != PD_NOPAGENUMS) ); data.EnablePageNumbers( ((pd->Flags & PD_NOPAGENUMS) != PD_NOPAGENUMS) );
data.EnableHelp( ((pd->Flags & PD_SHOWHELP) == PD_SHOWHELP) ); data.EnableHelp( ((pd->Flags & PD_SHOWHELP) == PD_SHOWHELP) );
#if WXWIN_COMPATIBILITY_2_4
data.SetSetupDialog( ((pd->Flags & PD_PRINTSETUP) == PD_PRINTSETUP) );
#endif
return true; return true;
} }

View File

@@ -39,18 +39,6 @@
UINT gs_msgTaskbar = 0; UINT gs_msgTaskbar = 0;
UINT gs_msgRestartTaskbar = 0; UINT gs_msgRestartTaskbar = 0;
#if WXWIN_COMPATIBILITY_2_4
BEGIN_EVENT_TABLE(wxTaskBarIcon, wxTaskBarIconBase)
EVT_TASKBAR_MOVE (wxTaskBarIcon::_OnMouseMove)
EVT_TASKBAR_LEFT_DOWN (wxTaskBarIcon::_OnLButtonDown)
EVT_TASKBAR_LEFT_UP (wxTaskBarIcon::_OnLButtonUp)
EVT_TASKBAR_RIGHT_DOWN (wxTaskBarIcon::_OnRButtonDown)
EVT_TASKBAR_RIGHT_UP (wxTaskBarIcon::_OnRButtonUp)
EVT_TASKBAR_LEFT_DCLICK (wxTaskBarIcon::_OnLButtonDClick)
EVT_TASKBAR_RIGHT_DCLICK (wxTaskBarIcon::_OnRButtonDClick)
END_EVENT_TABLE()
#endif
IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler) IMPLEMENT_DYNAMIC_CLASS(wxTaskBarIcon, wxEvtHandler)
@@ -219,32 +207,6 @@ bool wxTaskBarIcon::PopupMenu(wxMenu *menu)
return rval; return rval;
} }
#if WXWIN_COMPATIBILITY_2_4
// Overridables
void wxTaskBarIcon::OnMouseMove(wxEvent& e) { e.Skip(); }
void wxTaskBarIcon::OnLButtonDown(wxEvent& e) { e.Skip(); }
void wxTaskBarIcon::OnLButtonUp(wxEvent& e) { e.Skip(); }
void wxTaskBarIcon::OnRButtonDown(wxEvent& e) { e.Skip(); }
void wxTaskBarIcon::OnRButtonUp(wxEvent& e) { e.Skip(); }
void wxTaskBarIcon::OnLButtonDClick(wxEvent& e) { e.Skip(); }
void wxTaskBarIcon::OnRButtonDClick(wxEvent& e) { e.Skip(); }
void wxTaskBarIcon::_OnMouseMove(wxTaskBarIconEvent& e)
{ OnMouseMove(e); }
void wxTaskBarIcon::_OnLButtonDown(wxTaskBarIconEvent& e)
{ OnLButtonDown(e); }
void wxTaskBarIcon::_OnLButtonUp(wxTaskBarIconEvent& e)
{ OnLButtonUp(e); }
void wxTaskBarIcon::_OnRButtonDown(wxTaskBarIconEvent& e)
{ OnRButtonDown(e); }
void wxTaskBarIcon::_OnRButtonUp(wxTaskBarIconEvent& e)
{ OnRButtonUp(e); }
void wxTaskBarIcon::_OnLButtonDClick(wxTaskBarIconEvent& e)
{ OnLButtonDClick(e); }
void wxTaskBarIcon::_OnRButtonDClick(wxTaskBarIconEvent& e)
{ OnRButtonDClick(e); }
#endif
void wxTaskBarIcon::RegisterWindowMessages() void wxTaskBarIcon::RegisterWindowMessages()
{ {
static bool s_registered = false; static bool s_registered = false;

View File

@@ -1316,36 +1316,6 @@ wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& WXUNUSED(item),
return item; return item;
} }
#if WXWIN_COMPATIBILITY_2_4
wxTreeItemId wxTreeCtrl::GetFirstChild(const wxTreeItemId& item,
long& cookie) const
{
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
cookie = (long)TreeView_GetChild(GetHwnd(), HITEM(item));
return wxTreeItemId((void *)cookie);
}
wxTreeItemId wxTreeCtrl::GetNextChild(const wxTreeItemId& WXUNUSED(item),
long& cookie) const
{
wxTreeItemId fromCookie((void *)cookie);
HTREEITEM hitem = HITEM(fromCookie);
hitem = TreeView_GetNextSibling(GetHwnd(), hitem);
wxTreeItemId item(hitem);
cookie = (long)item.m_pItem;
return item;
}
#endif // WXWIN_COMPATIBILITY_2_4
wxTreeItemId wxTreeCtrl::GetLastChild(const wxTreeItemId& item) const wxTreeItemId wxTreeCtrl::GetLastChild(const wxTreeItemId& item) const
{ {
wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") ); wxCHECK_MSG( item.IsOk(), wxTreeItemId(), wxT("invalid tree item") );
@@ -1507,26 +1477,6 @@ wxTreeItemId wxTreeCtrl::DoInsertAfter(const wxTreeItemId& parent,
return wxTreeItemId(id); return wxTreeItemId(id);
} }
// for compatibility only
#if WXWIN_COMPATIBILITY_2_4
void wxTreeCtrl::SetImageList(wxImageList *imageList, int)
{
SetImageList(imageList);
}
int wxTreeCtrl::GetItemSelectedImage(const wxTreeItemId& item) const
{
return GetItemImage(item, wxTreeItemIcon_Selected);
}
void wxTreeCtrl::SetItemSelectedImage(const wxTreeItemId& item, int image)
{
SetItemImage(item, image, wxTreeItemIcon_Selected);
}
#endif // WXWIN_COMPATIBILITY_2_4
wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text, wxTreeItemId wxTreeCtrl::AddRoot(const wxString& text,
int image, int selectedImage, int image, int selectedImage,
wxTreeItemData *data) wxTreeItemData *data)
@@ -1685,15 +1635,6 @@ void wxTreeCtrl::Toggle(const wxTreeItemId& item)
DoExpand(item, TVE_TOGGLE); DoExpand(item, TVE_TOGGLE);
} }
#if WXWIN_COMPATIBILITY_2_4
void wxTreeCtrl::ExpandItem(const wxTreeItemId& item, int action)
{
DoExpand(item, action);
}
#endif
void wxTreeCtrl::Unselect() void wxTreeCtrl::Unselect()
{ {
wxASSERT_MSG( !(m_windowStyle & wxTR_MULTIPLE), wxASSERT_MSG( !(m_windowStyle & wxTR_MULTIPLE),

View File

@@ -44,16 +44,8 @@ wxCheckListBoxXmlHandler::wxCheckListBoxXmlHandler()
wxObject *wxCheckListBoxXmlHandler::DoCreateResource() wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
{ {
if (m_class == wxT("wxCheckListBox") if (m_class == wxT("wxCheckListBox"))
#if WXWIN_COMPATIBILITY_2_4
|| m_class == wxT("wxCheckList")
#endif
)
{ {
#if WXWIN_COMPATIBILITY_2_4
if (m_class == wxT("wxCheckList"))
wxLogDebug(wxT("'wxCheckList' name is deprecated, use 'wxCheckListBox' instead."));
#endif
// need to build the list of strings from children // need to build the list of strings from children
m_insideBox = true; m_insideBox = true;
CreateChildrenPrivately(NULL, GetParamNode(wxT("content"))); CreateChildrenPrivately(NULL, GetParamNode(wxT("content")));
@@ -112,9 +104,6 @@ wxObject *wxCheckListBoxXmlHandler::DoCreateResource()
bool wxCheckListBoxXmlHandler::CanHandle(wxXmlNode *node) bool wxCheckListBoxXmlHandler::CanHandle(wxXmlNode *node)
{ {
return (IsOfClass(node, wxT("wxCheckListBox")) || return (IsOfClass(node, wxT("wxCheckListBox")) ||
#if WXWIN_COMPATIBILITY_2_4
IsOfClass(node, wxT("wxCheckList")) ||
#endif
(m_insideBox && node->GetName() == wxT("item"))); (m_insideBox && node->GetName() == wxT("item")));
} }