#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,
{
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;
*returnValue = ret;
return true;
}
-
+
void AddField( const wxString &name, void* initialValue = NULL )
{
wxShadowObjectFields::iterator it = m_fields.find( name );
else
it->second = initialValue;
}
-
+
void SetField( const wxString &name, void* value )
{
wxShadowObjectFields::iterator it = m_fields.find( name );
return;
it->second = value;
}
-
+
void* GetField( const wxString &name, void *defaultValue = NULL )
{
wxShadowObjectFields::iterator it = m_fields.find( name );
return defaultValue;
return it->second;
}
-
+
private:
wxShadowObjectMethods m_methods;
wxShadowObjectFields m_fields;
};
-#endif // wxABI_VERSION
// ----------------------------------------------------------------------------
};
-// 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
wxClientDataDictionaryPairVector m_vec;
};
-#endif // __WXMOTIF__
-
-// ----------------------------------------------------------------------------
-#endif
+#endif // _WX_CLNTDATAH__
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); }
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?
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
// ----------------------------------------------------------------------------
#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 */
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)
#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) \
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))
#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) \
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))
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:
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);
// 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; }
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
void Clear();
int GetSelection() const;
-#if wxABI_VERSION >= 20602
int GetCurrentSelection() const { return GetSelection(); }
-#endif
void SetSelection( int n );
virtual int GetCount() const;
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;
void Clear();
int GetSelection() const;
-#if wxABI_VERSION >= 20602
int GetCurrentSelection() const { return GetSelection(); }
-#endif
void SetSelection( int n );
virtual int GetCount() const;
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;
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
double saturation;
double value;
};
-#endif // wxABI_VERSION >= 2.6.2
wxImage(){}
wxImage( int width, int height, bool clear = true );
// 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)
{
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:
// "trivial" derivations of wxLog
// ----------------------------------------------------------------------------
-#if wxABI_VERSION > 20601
-
// log everything to a buffer
class WXDLLIMPEXP_BASE wxLogBuffer : public wxLog
{
DECLARE_NO_COPY_CLASS(wxLogBuffer)
};
-#endif // wxABI_VERSION
// log everything to a "FILE *", stderr by default
class WXDLLIMPEXP_BASE wxLogStderr : public wxLog
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
return (long)m_lo;
}
-#if wxABI_VERSION >= 20602
// convert to double
double ToDouble() const;
-#endif // ABI >= 2.6.2
// operations
// addition
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);
{ return Load(wxURI(fileName)); }
bool LoadURIWithProxy(const wxString& fileName, const wxString& proxy)
{ return Load(wxURI(fileName), wxURI(proxy)); }
-#endif
+
protected:
static wxClassInfo* NextBackend();
//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&);
//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
// otherwise; unlike wxMessageOutputMessageBox this class is always safe to use
// ----------------------------------------------------------------------------
-#if wxABI_VERSION > 20601
-
class WXDLLIMPEXP_BASE wxMessageOutputBest : public wxMessageOutput
{
public:
virtual void Printf(const wxChar* format, ...) ATTRIBUTE_PRINTF_2;
};
-#endif // wxABI_VERSION
-
// ----------------------------------------------------------------------------
// implementation which sends output to stderr
// ----------------------------------------------------------------------------
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;
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;
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:
#endif // wxUSE_ON_FATAL_EXCEPTION
-#if wxABI_VERSION >= 20601
-
// flags for wxLaunchDefaultBrowser
enum
{
// Launch url in the user's default internet browser
WXDLLIMPEXP_BASE bool wxLaunchDefaultBrowser(const wxString& url, int flags = 0);
-#endif
// ----------------------------------------------------------------------------
// Environment variables
/* 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 */
/* ---------------------------------------------------------------------------- */
// 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()
{
// 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
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
static bool IsArchive(const wxString& filename);
#endif // wxUSE_FILESYSTEM
-#endif // wxABI_VERSION
-
private:
long m_version;