removed WXWIN_COMPATIBILITY_2_4 in non-MSW code

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44627 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2007-03-07 11:48:53 +00:00
parent 56c6fc01a9
commit 39b61aa3eb
22 changed files with 2226 additions and 8309 deletions

10118
configure vendored

File diff suppressed because it is too large Load Diff

View File

@@ -937,7 +937,6 @@ WX_ARG_ENABLE(no_deps, [ --enable-no_deps create code without depe
WX_ARG_ENABLE(vararg_macros, [ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS) WX_ARG_ENABLE(vararg_macros, [ --disable-vararg_macros don't use vararg macros, even if they are supported], wxUSE_VARARG_MACROS)
WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary[=SDK] create Mac PowerPC and Intel Universal binary (not yet working)]], wxUSE_UNIVERSAL_BINARY) WX_ARG_ENABLE_PARAM(universal_binary, [[ --enable-universal_binary[=SDK] create Mac PowerPC and Intel Universal binary (not yet working)]], wxUSE_UNIVERSAL_BINARY)
WX_ARG_ENABLE(compat24, [ --enable-compat24 enable wxWidgets 2.4 compatibility], WXWIN_COMPATIBILITY_2_4, enable)
WX_ARG_ENABLE(compat26, [ --enable-compat26 enable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6, enable) WX_ARG_ENABLE(compat26, [ --enable-compat26 enable wxWidgets 2.6 compatibility], WXWIN_COMPATIBILITY_2_6, enable)
WX_ARG_ENABLE(compat28, [ --disable-compat28 disable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8, disable) WX_ARG_ENABLE(compat28, [ --disable-compat28 disable wxWidgets 2.8 compatibility], WXWIN_COMPATIBILITY_2_8, disable)
@@ -5552,12 +5551,6 @@ dnl ---------------------------------------------------------------------------
dnl compatibility level dnl compatibility level
dnl --------------------------------------------------------------------------- dnl ---------------------------------------------------------------------------
if test "x$WXWIN_COMPATIBILITY_2_4" = "xyes"; then
AC_DEFINE(WXWIN_COMPATIBILITY_2_4)
WXWIN_COMPATIBILITY_2_6="yes"
fi
if test "x$WXWIN_COMPATIBILITY_2_6" = "xyes"; then if test "x$WXWIN_COMPATIBILITY_2_6" = "xyes"; then
AC_DEFINE(WXWIN_COMPATIBILITY_2_6) AC_DEFINE(WXWIN_COMPATIBILITY_2_6)
@@ -8132,7 +8125,6 @@ echo " Should wxWidgets be linked as a shared library? ${wxUSE_SHARED:-
echo " Should wxWidgets be compiled in Unicode mode? ${wxUSE_UNICODE:-no}" echo " Should wxWidgets be compiled in Unicode mode? ${wxUSE_UNICODE:-no}"
echo " What level of wxWidgets compatibility should be enabled?" echo " What level of wxWidgets compatibility should be enabled?"
echo " wxWidgets 2.4 ${WXWIN_COMPATIBILITY_2_4:-no}"
echo " wxWidgets 2.6 ${WXWIN_COMPATIBILITY_2_6:-no}" echo " wxWidgets 2.6 ${WXWIN_COMPATIBILITY_2_6:-no}"
echo " wxWidgets 2.8 ${WXWIN_COMPATIBILITY_2_8:-yes}" echo " wxWidgets 2.8 ${WXWIN_COMPATIBILITY_2_8:-yes}"

View File

@@ -1283,9 +1283,7 @@ enum wxStretch
wxTILE = 0xc000, wxTILE = 0xc000,
/* for compatibility only, default now, don't use explicitly any more */ /* for compatibility only, default now, don't use explicitly any more */
#if WXWIN_COMPATIBILITY_2_4 #if WXWIN_COMPATIBILITY_2_6
wxADJUST_MINSIZE = 0x00100000
#else
wxADJUST_MINSIZE = 0 wxADJUST_MINSIZE = 0
#endif #endif
}; };
@@ -1890,12 +1888,6 @@ enum
wxCAP_BUTT wxCAP_BUTT
}; };
#if WXWIN_COMPATIBILITY_2_4
#define IS_HATCH(s) ((s)>=wxFIRST_HATCH && (s)<=wxLAST_HATCH)
#else
/* use wxBrush::IsHatch() instead thought wxMotif still uses it in src/motif/dcclient.cpp */
#endif
/* Logical ops */ /* Logical ops */
typedef enum typedef enum
{ {

View File

@@ -144,13 +144,6 @@ public:
void SetDepth(int d); void SetDepth(int d);
void SetOk(bool isOk); void SetOk(bool isOk);
#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
#if wxUSE_PALETTE #if wxUSE_PALETTE
wxPalette* GetPalette() const; wxPalette* GetPalette() const;
void SetPalette(const wxPalette& palette); void SetPalette(const wxPalette& palette);

View File

@@ -126,11 +126,6 @@ public:
virtual bool CanSetTransparent(); virtual bool CanSetTransparent();
virtual wxByte GetTransparent() const ; virtual wxByte GetTransparent() const ;
#if WXWIN_COMPATIBILITY_2_4
bool GetTransparentBackground() const { return m_backgroundTransparent; }
void SetTransparent(bool t = true) { m_backgroundTransparent = t; }
#endif
// event handlers // event handlers
// -------------- // --------------
void OnSetFocus( wxFocusEvent& event ); void OnSetFocus( wxFocusEvent& event );
@@ -318,10 +313,6 @@ protected:
void MacPropagateEnabledStateChanged() ; void MacPropagateEnabledStateChanged() ;
void MacPropagateHiliteChanged() ; void MacPropagateHiliteChanged() ;
#if WXWIN_COMPATIBILITY_2_4
bool m_backgroundTransparent ;
#endif
// implement the base class pure virtuals // implement the base class pure virtuals
virtual wxSize DoGetBestSize() const; virtual wxSize DoGetBestSize() const;
virtual wxSize DoGetSizeFromClientSize( const wxSize & size ) const; virtual wxSize DoGetSizeFromClientSize( const wxSize & size ) const;

View File

@@ -28,14 +28,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

@@ -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

@@ -28,14 +28,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

@@ -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

@@ -506,70 +506,6 @@ public:
,bool bTextOnly = false ,bool bTextOnly = false
) const; ) 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& rItem
,int nAction
) );
//
// Use AddRoot, PrependItem or AppendItem
//
wxDEPRECATED( wxTreeItemId InsertItem( const wxTreeItemId& pParent
,const wxString& rsText
,int nImage = -1
,int nSelImage = -1
,long lInsertAfter = wxTREE_INSERT_LAST
) );
//
// Use Set/GetImageList and Set/GetStateImageList
//
wxDEPRECATED( wxImageList* GetImageList(int nVal) const );
wxDEPRECATED( void SetImageList(wxImageList* pImageList, int nVal) );
//
// Use Set/GetItemImage directly
//
wxDEPRECATED( int GetItemSelectedImage(const wxTreeItemId& rItem) const );
wxDEPRECATED( void SetItemSelectedImage(const wxTreeItemId& rItem, int nImage) );
//
// For this enumeration function you must pass in a "cookie" parameter
// which is opaque for the application but is necessary for the library
// to make these functions reentrant (i.e. allow more than one
// enumeration on one and the same object simultaneously). Of course,
// the "cookie" passed to GetFirstChild() and GetNextChild() should be
// the same!
//
//
// Get the first child of this item
//
wxDEPRECATED( wxTreeItemId GetFirstChild( const wxTreeItemId& rItem
,long& rCookie
) const );
//
// Get the next child
//
wxDEPRECATED( wxTreeItemId GetNextChild( const wxTreeItemId& rItem
,long& rCookie
) const );
#endif // WXWIN_COMPATIBILITY_2_4
// //
// Implementation // Implementation
// -------------- // --------------

View File

@@ -36,19 +36,6 @@
class WXDLLEXPORT wxButton; class WXDLLEXPORT wxButton;
// ---------------------------------------------------------------------------
// constants
// ---------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2_4
// they're unused by wxWidgets...
enum
{
wxKEY_SHIFT = 1,
wxKEY_CTRL = 2
};
#endif
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------
// wxWindow declaration for OS/2 PM // wxWindow declaration for OS/2 PM
// --------------------------------------------------------------------------- // ---------------------------------------------------------------------------

View File

@@ -14,10 +14,6 @@
#ifndef _WX_PALMOS_CHKCONF_H_ #ifndef _WX_PALMOS_CHKCONF_H_
#define _WX_PALMOS_CHKCONF_H_ #define _WX_PALMOS_CHKCONF_H_
#if WXWIN_COMPATIBILITY_2_4
#error "wxPalmOS port was introduced after 2.4.X"
#endif
/* /*
* disable the settings which are not implemented yet * disable the settings which are not implemented yet
*/ */

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

@@ -24,12 +24,9 @@
// Flags for wxSound::Play // Flags for wxSound::Play
// NB: We can't use enum because there would be ambiguity between the // NB: We can't use enum with some compilers, because they keep reporting
// two Play() prototypes when called without explicit parameters // nonexistent ambiguities between Play(unsigned) and static Play(const
// if WXWIN_COMPATIBILITY_2_4. // wxString&, unsigned).
// We can't use enum with some compilers either, because they
// keep reporting nonexistent ambiguities between
// Play(unsigned) and static Play(const wxString&, unsigned).
#define wxSOUND_SYNC ((unsigned)0) #define wxSOUND_SYNC ((unsigned)0)
#define wxSOUND_ASYNC ((unsigned)1) #define wxSOUND_ASYNC ((unsigned)1)
#define wxSOUND_LOOP ((unsigned)2) #define wxSOUND_LOOP ((unsigned)2)

View File

@@ -26,14 +26,6 @@
// compatibility settings // compatibility settings
// ---------------------------------------------------------------------------- // ----------------------------------------------------------------------------
// This setting determines the compatibility with 2.4 API: set it to 1 to
// enable it
//
// Default is 0.
//
// Recommended setting: 0 (please update your code instead!)
#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

@@ -148,8 +148,6 @@
#endif #endif
#define WXWIN_COMPATIBILITY_2_4 0
#define WXWIN_COMPATIBILITY_2_6 0 #define WXWIN_COMPATIBILITY_2_6 0
#define WXWIN_COMPATIBILITY_2_8 0 #define WXWIN_COMPATIBILITY_2_8 0

View File

@@ -1286,17 +1286,6 @@ int wxBitmap::GetDepth() const
return M_BITMAPDATA->GetDepth(); return M_BITMAPDATA->GetDepth();
} }
#if WXWIN_COMPATIBILITY_2_4
int wxBitmap::GetQuality() const
{
return 0;
}
void wxBitmap::SetQuality(int WXUNUSED(quality))
{
}
#endif
wxMask *wxBitmap::GetMask() const wxMask *wxBitmap::GetMask() const
{ {
wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") ); wxCHECK_MSG( Ok(), (wxMask *) NULL, wxT("invalid bitmap") );

View File

@@ -937,10 +937,6 @@ void wxWindowMac::Init()
m_frozenness = 0 ; m_frozenness = 0 ;
m_macAlpha = 255 ; m_macAlpha = 255 ;
#if WXWIN_COMPATIBILITY_2_4
m_backgroundTransparent = false;
#endif
#if wxMAC_USE_CORE_GRAPHICS #if wxMAC_USE_CORE_GRAPHICS
m_cgContextRef = NULL ; m_cgContextRef = NULL ;
#endif #endif

View File

@@ -88,11 +88,7 @@ IMPLEMENT_DYNAMIC_CLASS(wxClientDC, wxWindowDC)
IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC) IMPLEMENT_DYNAMIC_CLASS(wxPaintDC, wxWindowDC)
IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC) IMPLEMENT_DYNAMIC_CLASS(wxWindowDC, wxDC)
#ifndef IS_HATCH #define IS_HATCH(s) ((s)>=wxFIRST_HATCH && (s)<=wxLAST_HATCH)
// IS_HATCH exists for WXWIN_COMPATIBILITY_2_4 only
// but wxMotif needs it for its internals here
#define IS_HATCH(s) ((s)>=wxFIRST_HATCH && (s)<=wxLAST_HATCH)
#endif
// FIXME: left over after removal of wxDC::GetOptimization() // FIXME: left over after removal of wxDC::GetOptimization()
#define GET_OPTIMIZATION false #define GET_OPTIMIZATION false

View File

@@ -131,11 +131,6 @@ int wxFileDialog::ShowModal()
else else
lFlags = FDS_OPEN_DIALOG; lFlags = FDS_OPEN_DIALOG;
#if WXWIN_COMPATIBILITY_2_4
if (m_windowStyle & wxHIDE_READONLY)
lFlags |= FDS_SAVEAS_DIALOG;
#endif
if (m_windowStyle & wxFD_SAVE) if (m_windowStyle & wxFD_SAVE)
lFlags |= FDS_SAVEAS_DIALOG; lFlags |= FDS_SAVEAS_DIALOG;
if (m_windowStyle & wxFD_MULTIPLE) if (m_windowStyle & wxFD_MULTIPLE)

View File

@@ -62,9 +62,6 @@ bool wxOS2Printer::Setup(wxWindow *WXUNUSED(parent))
// TODO: // TODO:
/* /*
wxPrintDialog dialog(parent, & m_printData); wxPrintDialog dialog(parent, & m_printData);
#if WXWIN_COMPATIBILITY_2_4
dialog.GetPrintData().SetSetupDialog(true);
#endif
return (dialog.ShowModal() == wxID_OK); return (dialog.ShowModal() == wxID_OK);
*/ */
return false; return false;

View File

@@ -545,30 +545,6 @@ wxImageList* wxTreeCtrl::GetImageList () const
return m_pImageListNormal; return m_pImageListNormal;
} // end of wxTreeCtrl::GetImageList } // end of wxTreeCtrl::GetImageList
#if WXWIN_COMPATIBILITY_2_4
wxImageList* wxTreeCtrl::GetImageList(int nVal) const
{
return GetImageList();
}
void wxTreeCtrl::SetImageList(wxImageList* pImageList, int nVal)
{
SetImageList(pImageList);
}
int wxTreeCtrl::GetItemSelectedImage(const wxTreeItemId& rItem) const
{
return GetItemImage(rItem, wxTreeItemIcon_Selected);
}
void wxTreeCtrl::SetItemSelectedImage(const wxTreeItemId& rItem, int nImage)
{
SetItemImage(rItem, nImage, wxTreeItemIcon_Selected);
}
#endif // WXWIN_COMPATIBILITY_2_4
wxImageList* wxTreeCtrl::GetStateImageList () const wxImageList* wxTreeCtrl::GetStateImageList () const
{ {
return m_pImageListNormal; return m_pImageListNormal;
@@ -1503,28 +1479,6 @@ wxTreeItemId wxTreeCtrl::DoInsertItem (
return wxTreeItemId((long)pRecord->m_ulItemId); return wxTreeItemId((long)pRecord->m_ulItemId);
} }
#if WXWIN_COMPATIBILITY_2_4
// for compatibility only
wxTreeItemId wxTreeCtrl::InsertItem (
const wxTreeItemId& rParent
, const wxString& rsText
, int nImage
, int nSelImage
, long lInsertAfter
)
{
return DoInsertItem( rParent
,wxTreeItemId(lInsertAfter)
,rsText
,nImage
,nSelImage
,NULL
);
} // end of wxTreeCtrl::InsertItem
#endif // WXWIN_COMPATIBILITY_2_4
wxTreeItemId wxTreeCtrl::AddRoot ( wxTreeItemId wxTreeCtrl::AddRoot (
const wxString& rsText const wxString& rsText
, int nImage , int nImage
@@ -1765,20 +1719,6 @@ void wxTreeCtrl::Toggle (
); );
} // end of wxTreeCtrl::Toggle } // end of wxTreeCtrl::Toggle
#if WXWIN_COMPATIBILITY_2_4
void wxTreeCtrl::ExpandItem (
const wxTreeItemId& rItem
, int nAction
)
{
DoExpand( rItem
,nAction
);
} // end of wxTreeCtrl::ExpandItem
#endif // WXWIN_COMPATIBILITY_2_4
void wxTreeCtrl::Unselect () void wxTreeCtrl::Unselect ()
{ {
wxASSERT_MSG( !(m_windowStyle & wxTR_MULTIPLE), wxASSERT_MSG( !(m_windowStyle & wxTR_MULTIPLE),