removed wxABI_VERSION checks

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@35690 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2005-09-25 20:23:30 +00:00
parent c6ece59558
commit 84006e65e8
23 changed files with 24 additions and 121 deletions

View File

@ -16,8 +16,6 @@
#include "wx/string.h"
#include "wx/hashmap.h"
#if wxABI_VERSION >= 20602
typedef int (*wxShadowObjectMethod)(void*, void*);
WX_DECLARE_STRING_HASH_MAP_WITH_DECL(
wxShadowObjectMethod,
@ -34,18 +32,18 @@ class WXDLLIMPEXP_BASE wxShadowObject
{
public:
wxShadowObject() { }
void AddMethod( const wxString &name, wxShadowObjectMethod method )
{
{
wxShadowObjectMethods::iterator it = m_methods.find( name );
if (it == m_methods.end())
m_methods[ name ] = method;
else
it->second = method;
}
bool InvokeMethod( const wxString &name, void* window, void* param, int* returnValue )
{
{
wxShadowObjectMethods::iterator it = m_methods.find( name );
if (it == m_methods.end())
return false;
@ -55,7 +53,7 @@ public:
*returnValue = ret;
return true;
}
void AddField( const wxString &name, void* initialValue = NULL )
{
wxShadowObjectFields::iterator it = m_fields.find( name );
@ -64,7 +62,7 @@ public:
else
it->second = initialValue;
}
void SetField( const wxString &name, void* value )
{
wxShadowObjectFields::iterator it = m_fields.find( name );
@ -72,7 +70,7 @@ public:
return;
it->second = value;
}
void* GetField( const wxString &name, void *defaultValue = NULL )
{
wxShadowObjectFields::iterator it = m_fields.find( name );
@ -80,13 +78,12 @@ public:
return defaultValue;
return it->second;
}
private:
wxShadowObjectMethods m_methods;
wxShadowObjectFields m_fields;
};
#endif // wxABI_VERSION
// ----------------------------------------------------------------------------
@ -162,10 +159,6 @@ protected:
};
// not Motif-specific, but currently used only under Motif,
// compiled to make wxMotif and wxGTK base libraries compatible
#if defined(__WXMOTIF__) || wxABI_VERSION >= 20602
#include "wx/vector.h"
struct WXDLLIMPEXP_BASE wxClientDataDictionaryPair
@ -276,8 +269,5 @@ private:
wxClientDataDictionaryPairVector m_vec;
};
#endif // __WXMOTIF__
// ----------------------------------------------------------------------------
#endif
#endif // _WX_CLNTDATAH__

View File

@ -769,12 +769,10 @@ public:
inline wxDateTime ToTimezone(const TimeZone& tz, bool noDST = false) const;
wxDateTime& MakeTimezone(const TimeZone& tz, bool noDST = false);
#if wxABI_VERSION >= 20602
// interpret current value as being in another timezone and transform
// it to local one
inline wxDateTime FromTimezone(const TimeZone& tz, bool noDST = false) const;
wxDateTime& MakeFromTimezone(const TimeZone& tz, bool noDST = false);
#endif // ABI >= 2.6.2
// transform to/from GMT/UTC
wxDateTime ToUTC(bool noDST = false) const { return ToTimezone(UTC, noDST); }
@ -783,12 +781,10 @@ public:
wxDateTime ToGMT(bool noDST = false) const { return ToUTC(noDST); }
wxDateTime& MakeGMT(bool noDST = false) { return MakeUTC(noDST); }
#if wxABI_VERSION >= 20602
wxDateTime FromUTC(bool noDST = false) const
{ return FromTimezone(UTC, noDST); }
wxDateTime& MakeFromUTC(bool noDST = false)
{ return MakeFromTimezone(UTC, noDST); }
#endif // ABI >= 2.6.2
// is daylight savings time in effect at this moment according to the
// rules of the specified country?
@ -1858,16 +1854,12 @@ wxDateTime::ToTimezone(const wxDateTime::TimeZone& tz, bool noDST) const
MODIFY_AND_RETURN( MakeTimezone(tz, noDST) );
}
#if wxABI_VERSION >= 20602
inline wxDateTime
wxDateTime::FromTimezone(const wxDateTime::TimeZone& tz, bool noDST) const
{
MODIFY_AND_RETURN( MakeFromTimezone(tz, noDST) );
}
#endif // ABI >= 2.6.2
// ----------------------------------------------------------------------------
// wxTimeSpan construction
// ----------------------------------------------------------------------------

View File

@ -1836,11 +1836,8 @@ enum wxHitTest
#define wxSIZE_ALLOW_MINUS_ONE 0x0004
/* Don't do parent client adjustments (for implementation only) */
#define wxSIZE_NO_ADJUSTMENTS 0x0008
#if wxABI_VERSION >= 20602
/* Change the window position even if it seems to be already correct */
#define wxSIZE_FORCE 0x0010
#endif // 2.6.2+
/* ---------------------------------------------------------------------------- */
/* GDI descriptions */

View File

@ -211,9 +211,7 @@ BEGIN_DECLARE_EVENT_TYPES()
DECLARE_EVENT_TYPE(wxEVT_SCROLL_PAGEDOWN, 305)
DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBTRACK, 306)
DECLARE_EVENT_TYPE(wxEVT_SCROLL_THUMBRELEASE, 307)
#if wxABI_VERSION >= 20601
DECLARE_EVENT_TYPE(wxEVT_SCROLL_CHANGED, 308)
#endif
// Scroll events from wxWindow
DECLARE_EVENT_TYPE(wxEVT_SCROLLWIN_TOP, 320)
@ -2772,12 +2770,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
#define EVT_SCROLL_PAGEDOWN(func) wx__DECLARE_EVT0(wxEVT_SCROLL_PAGEDOWN, wxScrollEventHandler(func))
#define EVT_SCROLL_THUMBTRACK(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBTRACK, wxScrollEventHandler(func))
#define EVT_SCROLL_THUMBRELEASE(func) wx__DECLARE_EVT0(wxEVT_SCROLL_THUMBRELEASE, wxScrollEventHandler(func))
#if wxABI_VERSION >= 20601
#define EVT_SCROLL_CHANGED(func) wx__DECLARE_EVT0(wxEVT_SCROLL_CHANGED, wxScrollEventHandler(func))
#define wx__EVT_SCROLL_CHANGED(func) EVT_SCROLL_CHANGED(func)
#else
#define wx__EVT_SCROLL_CHANGED(func)
#endif
#define EVT_SCROLL(func) \
EVT_SCROLL_TOP(func) \
@ -2788,7 +2781,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
EVT_SCROLL_PAGEDOWN(func) \
EVT_SCROLL_THUMBTRACK(func) \
EVT_SCROLL_THUMBRELEASE(func) \
wx__EVT_SCROLL_CHANGED(func)
EVT_SCROLL_CHANGED(func)
// Scrolling from wxSlider and wxScrollBar, with an id
#define EVT_COMMAND_SCROLL_TOP(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_TOP, winid, wxScrollEventHandler(func))
@ -2799,12 +2792,7 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
#define EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_PAGEDOWN, winid, wxScrollEventHandler(func))
#define EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBTRACK, winid, wxScrollEventHandler(func))
#define EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_THUMBRELEASE, winid, wxScrollEventHandler(func))
#if wxABI_VERSION >= 20601
#define EVT_COMMAND_SCROLL_CHANGED(winid, func) wx__DECLARE_EVT1(wxEVT_SCROLL_CHANGED, winid, wxScrollEventHandler(func))
#define wx__EVT_COMMAND_SCROLL_CHANGED(winid, func) EVT_COMMAND_SCROLL_CHANGED(winid, func)
#else
#define wx__EVT_COMMAND_SCROLL_CHANGED(winid, func)
#endif
#define EVT_COMMAND_SCROLL(winid, func) \
EVT_COMMAND_SCROLL_TOP(winid, func) \
@ -2815,20 +2803,12 @@ typedef void (wxEvtHandler::*wxMouseCaptureChangedEventFunction)(wxMouseCaptureC
EVT_COMMAND_SCROLL_PAGEDOWN(winid, func) \
EVT_COMMAND_SCROLL_THUMBTRACK(winid, func) \
EVT_COMMAND_SCROLL_THUMBRELEASE(winid, func) \
wx__EVT_COMMAND_SCROLL_CHANGED(winid, func)
EVT_COMMAND_SCROLL_CHANGED(winid, func)
// compatibility macros for the old name, to be deprecated in 2.8
//
// note that simply #defines suffice for the macro names as they're only
// present in the source code and macros are enough to maintain source
// backwards compatibility, but that we have to ensure that we also have
// wxEVT_SCROLL_ENDSCROLL inside the library for binary backwards compatibility
// and this is done in event.cpp
#if wxABI_VERSION >= 20601
#define wxEVT_SCROLL_ENDSCROLL wxEVT_SCROLL_CHANGED
#define EVT_COMMAND_SCROLL_ENDSCROLL EVT_COMMAND_SCROLL_CHANGED
#define EVT_SCROLL_ENDSCROLL EVT_SCROLL_CHANGED
#endif
// Convenience macros for commonly-used commands
#define EVT_CHECKBOX(winid, func) wx__DECLARE_EVT1(wxEVT_COMMAND_CHECKBOX_CLICKED, winid, wxCommandEventHandler(func))

View File

@ -33,9 +33,7 @@ class WXDLLIMPEXP_BASE wxZipFSHandler : public wxFileSystemHandler
virtual wxFSFile* OpenFile(wxFileSystem& fs, const wxString& location);
virtual wxString FindFirst(const wxString& spec, int flags = 0);
virtual wxString FindNext();
#if wxABI_VERSION >= 20602 /* 2.6.2+ only */
void Cleanup();
#endif
~wxZipFSHandler();
private:

View File

@ -114,10 +114,8 @@ public:
wxColour GetItemTextColour( long item ) const;
void SetItemBackgroundColour( long item, const wxColour &col);
wxColour GetItemBackgroundColour( long item ) const;
#if wxABI_VERSION >= 20602
void SetItemFont( long item, const wxFont &f);
wxFont GetItemFont( long item ) const;
#endif
int GetSelectedItemCount() const;
wxColour GetTextColour() const;
void SetTextColour(const wxColour& col);

View File

@ -66,6 +66,9 @@ public:
// this is app-overridable to, for example, set help and tooltip text
virtual void DoCreateControls();
protected:
void FinishLayout();
private:
// was the dialog really created?
bool WasCreated() const { return m_btnPrev != NULL; }
@ -82,12 +85,6 @@ private:
void AddBackNextPair(wxBoxSizer *buttonRow);
void AddButtonRow(wxBoxSizer *mainColumn);
#if wxABI_VERSION >= 20602
protected:
#endif
void FinishLayout();
private:
wxSize GetManualPageSize() const;
// the page size requested by user

View File

@ -66,9 +66,7 @@ public:
void Clear();
int GetSelection() const;
#if wxABI_VERSION >= 20602
int GetCurrentSelection() const { return GetSelection(); }
#endif
void SetSelection( int n );
virtual int GetCount() const;

View File

@ -85,9 +85,7 @@ public:
virtual int FindString( const wxString &item ) const;
int GetSelection() const;
#if wxABI_VERSION >= 20602
int GetCurrentSelection() const;
#endif
wxString GetString( int n ) const;
wxString GetStringSelection() const;
int GetCount() const;

View File

@ -66,9 +66,7 @@ public:
void Clear();
int GetSelection() const;
#if wxABI_VERSION >= 20602
int GetCurrentSelection() const { return GetSelection(); }
#endif
void SetSelection( int n );
virtual int GetCount() const;

View File

@ -85,9 +85,7 @@ public:
virtual int FindString( const wxString &item ) const;
int GetSelection() const;
#if wxABI_VERSION >= 20602
int GetCurrentSelection() const;
#endif
wxString GetString( int n ) const;
wxString GetStringSelection() const;
int GetCount() const;

View File

@ -153,7 +153,6 @@ public:
class WXDLLEXPORT wxImage: public wxObject
{
public:
#if wxABI_VERSION >= 20602
// red, green and blue are 8 bit unsigned integers in the range of 0..255
// We use the identifier RGBValue instead of RGB, since RGB is #defined
class RGBValue
@ -176,7 +175,6 @@ public:
double saturation;
double value;
};
#endif // wxABI_VERSION >= 2.6.2
wxImage(){}
wxImage( int width, int height, bool clear = true );
@ -358,11 +356,9 @@ public:
// Returned value: # of entries in the histogram
unsigned long ComputeHistogram( wxImageHistogram &h ) const;
#if wxABI_VERSION >= 20602
// Rotates the hue of each pixel of the image. angle is a double in the range
// -1.0..1.0 where -1.0 is -360 degrees and 1.0 is 360 degrees
void RotateHue(double angle);
#endif // wxABI_VERSION >= 2.6.2
wxImage& operator = (const wxImage& image)
{
@ -390,10 +386,8 @@ public:
static void CleanUpHandlers();
static void InitStandardHandlers();
#if wxABI_VERSION >= 20602
static HSVValue RGBtoHSV(const RGBValue& rgb);
static RGBValue HSVtoRGB(const HSVValue& hsv);
#endif // wxABI_VERSION >= 2.6.2
protected:

View File

@ -284,8 +284,6 @@ private:
// "trivial" derivations of wxLog
// ----------------------------------------------------------------------------
#if wxABI_VERSION > 20601
// log everything to a buffer
class WXDLLIMPEXP_BASE wxLogBuffer : public wxLog
{
@ -309,7 +307,6 @@ private:
DECLARE_NO_COPY_CLASS(wxLogBuffer)
};
#endif // wxABI_VERSION
// log everything to a "FILE *", stderr by default
class WXDLLIMPEXP_BASE wxLogStderr : public wxLog

View File

@ -160,10 +160,8 @@ public:
return wx_truncate_cast(long, m_ll);
}
#if wxABI_VERSION >= 20602
// convert to double
double ToDouble() const { return wx_truncate_cast(double, m_ll); }
#endif // ABI >= 2.6.2
// don't provide implicit conversion to wxLongLong_t or we will have an
// ambiguity for all arithmetic operations
@ -591,10 +589,8 @@ public:
return (long)m_lo;
}
#if wxABI_VERSION >= 20602
// convert to double
double ToDouble() const;
#endif // ABI >= 2.6.2
// operations
// addition

View File

@ -190,12 +190,9 @@ public:
wxFileOffset Tell(); //FIXME: This should be const
wxFileOffset Length(); //FIXME: This should be const
#if wxABI_VERSION >= 20601 /* 2.6.1+ only */
double GetPlaybackRate(); //All but MCI & GStreamer
bool SetPlaybackRate(double dRate); //All but MCI & GStreamer
#endif
#if wxABI_VERSION >= 20602 /* 2.6.2+ only */
bool Load(const wxURI& location);
bool Load(const wxURI& location, const wxURI& proxy);
@ -213,7 +210,7 @@ public:
{ return Load(wxURI(fileName)); }
bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy)
{ return Load(wxURI(fileName), wxURI(proxy)); }
#endif
protected:
static wxClassInfo* NextBackend();
@ -327,10 +324,12 @@ public:
//Event ID to give to our events
#define wxMEDIA_FINISHED_ID 13000
#define wxMEDIA_STOP_ID 13001
#define wxMEDIA_LOADED_ID 13002
//Define our event types - we need to call DEFINE_EVENT_TYPE(EVT) later
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_FINISHED, wxMEDIA_FINISHED_ID)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_STOP, wxMEDIA_STOP_ID)
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_LOADED, wxMEDIA_LOADED_ID)
//Function type(s) our events need
typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&);
@ -341,12 +340,7 @@ typedef void (wxEvtHandler::*wxMediaEventFunction)(wxMediaEvent&);
//Macro for usage with message maps
#define EVT_MEDIA_FINISHED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_FINISHED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
#define EVT_MEDIA_STOP(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_STOP, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
#if wxABI_VERSION >= 20602 /* 2.6.2+ only */
# define wxMEDIA_LOADED_ID 13002
DECLARE_EXPORTED_EVENT_TYPE(WXDLLIMPEXP_MEDIA, wxEVT_MEDIA_LOADED, wxMEDIA_LOADED_ID)
# define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
#endif
#define EVT_MEDIA_LOADED(winid, fn) DECLARE_EVENT_TABLE_ENTRY( wxEVT_MEDIA_LOADED, winid, wxID_ANY, wxMediaEventHandler(fn), (wxObject *) NULL ),
// ----------------------------------------------------------------------------
// common backend base class used by many other backends

View File

@ -49,8 +49,6 @@ private:
// otherwise; unlike wxMessageOutputMessageBox this class is always safe to use
// ----------------------------------------------------------------------------
#if wxABI_VERSION > 20601
class WXDLLIMPEXP_BASE wxMessageOutputBest : public wxMessageOutput
{
public:
@ -59,8 +57,6 @@ public:
virtual void Printf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
};
#endif // wxABI_VERSION
// ----------------------------------------------------------------------------
// implementation which sends output to stderr
// ----------------------------------------------------------------------------

View File

@ -74,9 +74,7 @@ public:
virtual int GetCount() const;
virtual int GetSelection() const;
#if wxABI_VERSION >= 20602
virtual int GetCurrentSelection() const;
#endif
virtual void SetSelection(int n);
virtual int FindString(const wxString& s) const;

View File

@ -196,11 +196,9 @@ public:
void SetItemBackgroundColour( long item, const wxColour &col);
wxColour GetItemBackgroundColour( long item ) const;
#if wxABI_VERSION >= 20602
// Font of an item.
void SetItemFont( long item, const wxFont &f);
wxFont GetItemFont( long item ) const;
#endif
// Gets the number of selected items in the list control
int GetSelectedItemCount() const;

View File

@ -250,13 +250,9 @@ protected:
bool m_isCurrent:1;
#ifdef __WXMSW__
#if wxABI_VERSION >= 20602
public:
#endif
protected:
// override MSWWindowProc() to process WM_NCHITTEST
WXLRESULT MSWWindowProc(WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
#endif // __WXMSW__
private:

View File

@ -325,8 +325,6 @@ WXDLLIMPEXP_BASE bool wxHandleFatalExceptions(bool doit = true);
#endif // wxUSE_ON_FATAL_EXCEPTION
#if wxABI_VERSION >= 20601
// flags for wxLaunchDefaultBrowser
enum
{
@ -335,7 +333,6 @@ enum
// Launch url in the user's default internet browser
WXDLLIMPEXP_BASE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
#endif
// ----------------------------------------------------------------------------
// Environment variables

View File

@ -20,10 +20,10 @@
/* NB: this file is parsed by Perl code in tmake templates in distrib/msw/tmake */
/* so don't change its format too much or they could break */
#define wxMAJOR_VERSION 2
#define wxMINOR_VERSION 6
#define wxRELEASE_NUMBER 2
#define wxSUBRELEASE_NUMBER 1
#define wxVERSION_STRING _T("wxWidgets 2.6.2")
#define wxMINOR_VERSION 7
#define wxRELEASE_NUMBER 0
#define wxSUBRELEASE_NUMBER 0
#define wxVERSION_STRING _T("wxWidgets 2.7.0")
/* nothing to update below this line when updating the version */
/* ---------------------------------------------------------------------------- */

View File

@ -76,9 +76,7 @@ public:
// wxNullBitmap from here - the default one will be used then.
virtual wxBitmap GetBitmap() const { return m_bitmap; }
// due to a typo in #if condition, the validation functions were disabled
// in 2.6.[01] releases so check for wxABI_VERSION here
#if wxUSE_VALIDATORS && (wxABI_VERSION >= 20602)
#if wxUSE_VALIDATORS
// Override the base functions to allow a validator to be assigned to this page.
virtual bool TransferDataToWindow()
{

View File

@ -120,10 +120,8 @@ public:
// This method understands VFS (see filesys.h).
bool Load(const wxString& filemask);
#if wxABI_VERSION > 20601
// Unload resource from the given XML file (wildcards not allowed)
bool Unload(const wxString& filename);
#endif // wxABI_VERSION
// Initialize handlers for all supported controls/windows. This will
// make the executable quite big because it forces linking against
@ -251,7 +249,6 @@ protected:
wxObject *instance = NULL,
wxXmlResourceHandler *handlerToUse = NULL);
#if wxABI_VERSION > 20601
// Helper of Load() and Unload(): returns the URL corresponding to the
// given file if it's indeed a file, otherwise returns the original string
// unmodified
@ -263,8 +260,6 @@ protected:
static bool IsArchive(const wxString& filename);
#endif // wxUSE_FILESYSTEM
#endif // wxABI_VERSION
private:
long m_version;