removed WXWIN_COMPATIBILITY and WXWIN_COMPATIBILITY_2

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@22966 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Václav Slavík
2003-08-17 12:50:53 +00:00
parent 4a93ea29b5
commit a3bf7524f3
79 changed files with 12 additions and 2012 deletions

View File

@@ -52,16 +52,6 @@
#endif
// WXWIN_COMPATIBILITY macros affect presence of virtual functions
#if WXWIN_COMPATIBILITY
#define __WX_BO_WXWIN_COMPAT_1_68 ",compatible with 1.68"
#else
#define __WX_BO_WXWIN_COMPAT_1_68
#endif
#if WXWIN_COMPATIBILITY_2
#define __WX_BO_WXWIN_COMPAT_2_0 ",compatible with 2.0"
#else
#define __WX_BO_WXWIN_COMPAT_2_0
#endif
#if WXWIN_COMPATIBILITY_2_2
#define __WX_BO_WXWIN_COMPAT_2_2 ",compatible with 2.2"
#else
@@ -79,7 +69,6 @@
__WX_BO_VERSION(wxMAJOR_VERSION, wxMINOR_VERSION, wxRELEASE_NUMBER) \
" (" __WX_BO_DEBUG "," __WX_BO_UNICODE \
__WX_BO_COMPILER \
__WX_BO_WXWIN_COMPAT_1_68 __WX_BO_WXWIN_COMPAT_2_0 \
__WX_BO_WXWIN_COMPAT_2_2 __WX_BO_WXWIN_COMPAT_2_4 \
")"

View File

@@ -59,35 +59,8 @@ public:
// Calls the callback and appropriate event handlers
bool ProcessCommand(wxCommandEvent& event);
#if WXWIN_COMPATIBILITY
virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
wxColour* GetButtonColour() const { return NULL; }
inline virtual void SetLabelFont(const wxFont& font);
inline virtual void SetButtonFont(const wxFont& font);
inline wxFont& GetLabelFont() const;
inline wxFont& GetButtonFont() const;
// Adds callback
inline void Callback(const wxFunction function);
wxFunction GetCallback() { return m_callback; }
protected:
wxFunction m_callback; // Callback associated with the window
#endif // WXWIN_COMPATIBILITY
protected:
virtual wxSize DoGetBestSize() const;
};
#if WXWIN_COMPATIBILITY
inline void wxControl::Callback(const wxFunction f) { m_callback = f; };
inline wxFont& wxControl::GetLabelFont() const { return GetFont(); }
inline wxFont& wxControl::GetButtonFont() const { return GetFont(); }
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
#endif // WXWIN_COMPATIBILITY
#endif // __WX_COCOA_CONTROL_H__

View File

@@ -636,16 +636,6 @@ public:
}
#endif // !Win16
#if WXWIN_COMPATIBILITY
void GetTextExtent(const wxString& string, float *x, float *y,
float *descent = NULL, float *externalLeading = NULL,
wxFont *theFont = NULL, bool use16bit = FALSE) const ;
void GetSize(float* width, float* height) const { int w, h; GetSize(& w, & h); *width = w; *height = h; }
void GetSizeMM(float *width, float *height) const { int w, h; GetSizeMM(& w, & h); *width = (float) w; *height = (float) h; }
#endif // WXWIN_COMPATIBILITY
protected:
// the pure virtual functions which should be implemented by wxDC
virtual bool DoFloodFill(wxCoord x, wxCoord y, const wxColour& col,

View File

@@ -1179,10 +1179,6 @@ enum wxBorder
#define wxFRAME_NO_WINDOW_MENU 0x0100
#if WXWIN_COMPATIBILITY
#define wxDEFAULT_FRAME wxDEFAULT_FRAME_STYLE
#endif
#define wxDEFAULT_FRAME_STYLE \
(wxSYSTEM_MENU | wxRESIZE_BORDER | \
wxMINIMIZE_BOX | wxMAXIMIZE_BOX | wxCLOSE_BOX | \

View File

@@ -202,11 +202,6 @@ public:
// Override to do cleanup/veto close
virtual bool OnClose(bool deleteWindow);
#if WXWIN_COMPATIBILITY
// Defeat compiler warning
bool OnClose() { return wxEvtHandler::OnClose(); }
#endif
// Extend event processing to search the document's event table
virtual bool ProcessEvent(wxEvent& event);

View File

@@ -292,50 +292,6 @@ END_DECLARE_EVENT_TYPES()
extern const wxEventType WXDLLIMPEXP_CORE wxEVT_COMMAND_TEXT_UPDATED;
#endif
#if WXWIN_COMPATIBILITY
#define wxEVENT_TYPE_BUTTON_COMMAND wxEVT_COMMAND_BUTTON_CLICKED
#define wxEVENT_TYPE_CHECKBOX_COMMAND wxEVT_COMMAND_CHECKBOX_CLICKED
#define wxEVENT_TYPE_CHOICE_COMMAND wxEVT_COMMAND_CHOICE_SELECTED
#define wxEVENT_TYPE_LISTBOX_COMMAND wxEVT_COMMAND_LISTBOX_SELECTED
#define wxEVENT_TYPE_LISTBOX_DCLICK_COMMAND wxEVT_COMMAND_LISTBOX_DOUBLECLICKED
#define wxEVENT_TYPE_TEXT_COMMAND wxEVT_COMMAND_TEXT_UPDATED
#define wxEVENT_TYPE_MULTITEXT_COMMAND wxEVT_COMMAND_TEXT_UPDATED
#define wxEVENT_TYPE_MENU_COMMAND wxEVT_COMMAND_MENU_SELECTED
#define wxEVENT_TYPE_SLIDER_COMMAND wxEVT_COMMAND_SLIDER_UPDATED
#define wxEVENT_TYPE_RADIOBOX_COMMAND wxEVT_COMMAND_RADIOBOX_SELECTED
#define wxEVENT_TYPE_RADIOBUTTON_COMMAND wxEVT_COMMAND_RADIOBUTTON_SELECTED
#define wxEVENT_TYPE_TEXT_ENTER_COMMAND wxEVT_COMMAND_TEXT_ENTER
#define wxEVENT_TYPE_SET_FOCUS wxEVT_SET_FOCUS
#define wxEVENT_TYPE_KILL_FOCUS wxEVT_KILL_FOCUS
#define wxEVENT_TYPE_SCROLLBAR_COMMAND wxEVT_COMMAND_SCROLLBAR_UPDATED
#define wxEVENT_TYPE_VIRT_LISTBOX_COMMAND wxEVT_COMMAND_VLBOX_SELECTED
#define wxEVENT_TYPE_COMBOBOX_COMMAND wxEVT_COMMAND_COMBOBOX_SELECTED
#define wxEVENT_TYPE_LEFT_DOWN wxEVT_LEFT_DOWN
#define wxEVENT_TYPE_LEFT_UP wxEVT_LEFT_UP
#define wxEVENT_TYPE_MIDDLE_DOWN wxEVT_MIDDLE_DOWN
#define wxEVENT_TYPE_MIDDLE_UP wxEVT_MIDDLE_UP
#define wxEVENT_TYPE_RIGHT_DOWN wxEVT_RIGHT_DOWN
#define wxEVENT_TYPE_RIGHT_UP wxEVT_RIGHT_UP
#define wxEVENT_TYPE_MOTION wxEVT_MOTION
#define wxEVENT_TYPE_ENTER_WINDOW wxEVT_ENTER_WINDOW
#define wxEVENT_TYPE_LEAVE_WINDOW wxEVT_LEAVE_WINDOW
#define wxEVENT_TYPE_LEFT_DCLICK wxEVT_LEFT_DCLICK
#define wxEVENT_TYPE_MIDDLE_DCLICK wxEVT_MIDDLE_DCLICK
#define wxEVENT_TYPE_RIGHT_DCLICK wxEVT_RIGHT_DCLICK
#define wxEVENT_TYPE_CHAR wxEVT_CHAR
#define wxEVENT_TYPE_SCROLL_TOP wxEVT_SCROLL_TOP
#define wxEVENT_TYPE_SCROLL_BOTTOM wxEVT_SCROLL_BOTTOM
#define wxEVENT_TYPE_SCROLL_LINEUP wxEVT_SCROLL_LINEUP
#define wxEVENT_TYPE_SCROLL_LINEDOWN wxEVT_SCROLL_LINEDOWN
#define wxEVENT_TYPE_SCROLL_PAGEUP wxEVT_SCROLL_PAGEUP
#define wxEVENT_TYPE_SCROLL_PAGEDOWN wxEVT_SCROLL_PAGEDOWN
#define wxEVENT_TYPE_SCROLL_THUMBTRACK wxEVT_SCROLL_THUMBTRACK
#define wxEVENT_TYPE_SCROLL_ENDSCROLL wxEVT_SCROLL_ENDSCROLL
#endif // WXWIN_COMPATIBILITY
// the predefined constants for the number of times we propagate event
// upwards window child-parent chain
enum Propagation_state
@@ -554,10 +510,6 @@ public:
virtual wxEvent *Clone() const { return new wxCommandEvent(*this); }
#if WXWIN_COMPATIBILITY_2
bool Checked() const { return IsChecked(); }
#endif // WXWIN_COMPATIBILITY_2
public:
wxString m_commandString; // String event argument
int m_commandInt;
@@ -801,22 +753,6 @@ public:
// Find the logical position of the event given the DC
wxPoint GetLogicalPosition(const wxDC& dc) const;
// Compatibility
#if WXWIN_COMPATIBILITY
void Position(long *xpos, long *ypos) const
{
if (xpos)
*xpos = (long)m_x;
if (ypos)
*ypos = (long)m_y;
}
void Position(float *xpos, float *ypos) const
{
*xpos = (float) m_x; *ypos = (float) m_y;
}
#endif // WXWIN_COMPATIBILITY
// Get X position
wxCoord GetX() const { return m_x; }
@@ -1312,22 +1248,13 @@ public:
: wxEvent(winid, type),
m_loggingOff(TRUE),
m_veto(FALSE), // should be FALSE by default
m_canVeto(TRUE)
{
#if WXWIN_COMPATIBILITY
m_force = FALSE;
#endif // WXWIN_COMPATIBILITY
}
m_canVeto(TRUE) {}
wxCloseEvent(const wxCloseEvent & event)
: wxEvent(event),
m_loggingOff(event.m_loggingOff),
m_veto(event.m_veto),
m_canVeto(event.m_canVeto)
{
#if WXWIN_COMPATIBILITY
m_force = event.m_force;
#endif // WXWIN_COMPATIBILITY
}
m_canVeto(event.m_canVeto) {}
void SetLoggingOff(bool logOff) { m_loggingOff = logOff; }
bool GetLoggingOff() const { return m_loggingOff; }
@@ -1345,24 +1272,12 @@ public:
bool CanVeto() const { return m_canVeto; }
bool GetVeto() const { return m_canVeto && m_veto; }
#if WXWIN_COMPATIBILITY
// This is probably obsolete now, since we use CanVeto instead, in
// both OnCloseWindow and OnQueryEndSession.
// m_force == ! m_canVeto i.e., can't veto means we must force it to close.
void SetForce(bool force) { m_force = force; }
bool GetForce() const { return m_force; }
#endif
virtual wxEvent *Clone() const { return new wxCloseEvent(*this); }
protected:
bool m_loggingOff;
bool m_veto, m_canVeto;
#if WXWIN_COMPATIBILITY
bool m_force;
#endif
private:
DECLARE_DYNAMIC_CLASS_NO_ASSIGN(wxCloseEvent)
@@ -2299,24 +2214,6 @@ public:
};
#endif
// old stuff
#if WXWIN_COMPATIBILITY_2
virtual void OnCommand(wxWindow& WXUNUSED(win),
wxCommandEvent& WXUNUSED(event))
{
wxFAIL_MSG(wxT("shouldn't be called any more"));
}
// Called if child control has no callback function
virtual long Default()
{ return GetNextHandler() ? GetNextHandler()->Default() : 0; };
#endif // WXWIN_COMPATIBILITY_2
#if WXWIN_COMPATIBILITY
virtual bool OnClose();
#endif
private:
static const wxEventTableEntry sm_eventTableEntries[];

View File

@@ -271,16 +271,6 @@ WXDLLIMPEXP_BASE bool wxRmdir(const wxString& dir, int flags = 0);
// compatibility defines, don't use in new code
#define wxDirExists wxPathExists
#if WXWIN_COMPATIBILITY_2
#define FileExists wxFileExists
#define DirExists wxDirExists
#define IsAbsolutePath wxIsAbsolutePath
#define FileNameFromPath wxFileNameFromPath
#define PathOnly wxPathOnly
#define Dos2UnixFilename wxDos2UnixFilename
#define Unix2DosFilename wxUnix2DosFilename
#endif
// ----------------------------------------------------------------------------
// separators in file names
// ----------------------------------------------------------------------------

View File

@@ -275,11 +275,6 @@ public:
wxPoint& operator-=(const wxPoint& p) { x -= p.x; y -= p.y; return *this; }
};
#if WXWIN_COMPATIBILITY
#define wxIntPoint wxPoint
#define wxRectangle wxRect
#endif // WXWIN_COMPATIBILITY
// ---------------------------------------------------------------------------
// wxRect
// ---------------------------------------------------------------------------

View File

@@ -107,25 +107,6 @@ public:
void OnOK(wxCommandEvent& event);
void OnListBoxDClick(wxCommandEvent& event);
// old, deprecated methods
#if WXWIN_COMPATIBILITY_2
wxSingleChoiceDialog(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxStringList& choices,
char **clientData = (char **)NULL,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
bool Create(wxWindow *parent,
const wxString& message,
const wxString& caption,
const wxStringList& choices,
char **clientData = (char **)NULL,
long style = wxCHOICEDLG_STYLE,
const wxPoint& pos = wxDefaultPosition);
#endif // WXWIN_COMPATIBILITY_2
protected:
int m_selection;
wxString m_stringSelection;
@@ -269,45 +250,5 @@ WXDLLEXPORT size_t wxGetMultipleChoices(wxArrayInt& selections,
int width = wxCHOICE_WIDTH,
int height = wxCHOICE_HEIGHT);
// ----------------------------------------------------------------------------
// these methods are for backwards compatibility only, not documented and
// deprecated
// ----------------------------------------------------------------------------
#if WXWIN_COMPATIBILITY_2
WXDLLEXPORT wxString wxGetSingleChoice(const wxString& message,
const wxString& caption,
int n, wxChar *choices[],
wxWindow *parent = (wxWindow *) NULL,
int x = -1,
int y = -1,
bool centre = TRUE,
int width = wxCHOICE_WIDTH,
int height = wxCHOICE_HEIGHT);
WXDLLEXPORT int wxGetSingleChoiceIndex(const wxString& message,
const wxString& caption,
int n, wxChar *choices[],
wxWindow *parent = (wxWindow *) NULL,
int x = -1,
int y = -1,
bool centre = TRUE,
int width = wxCHOICE_WIDTH,
int height = wxCHOICE_HEIGHT);
WXDLLEXPORT void* wxGetSingleChoiceData(const wxString& message,
const wxString& caption,
int n, wxChar **choices,
void **client_data,
wxWindow *parent = (wxWindow *) NULL,
int x = -1, int y = -1,
bool centre = TRUE,
int width = wxCHOICE_WIDTH,
int height = wxCHOICE_HEIGHT);
#endif // WXWIN_COMPATIBILITY_2
#endif // __CHOICEDLGH_G__

View File

@@ -71,17 +71,6 @@ public:
virtual void DoSetVirtualSize(int x, int y);
#if WXWIN_COMPATIBILITY
virtual void GetScrollUnitsPerPage(int *x_page, int *y_page) const;
virtual void CalcUnscrolledPosition(int x, int y, float *xx, float *yy) const;
// Need to do this otherwise the compiler gets confuced
// between float and int calls to this function.
void CalcUnscrolledPosition(int x, int y, int *xx, int *yy) const
{ wxScrollHelper::CalcScrolledPosition(x, y, xx, yy); }
wxPoint CalcUnscrolledPosition(const wxPoint& pt) const
{ return wxScrollHelper::CalcScrolledPosition(pt); }
#endif // WXWIN_COMPATIBILITY
protected:
// this is needed for wxEVT_PAINT processing hack described in
// wxScrollHelperEvtHandler::ProcessEvent()

View File

@@ -126,32 +126,5 @@
#define wxHTML_FONT_SIZE_7 32
#endif
#if WXWIN_COMPATIBILITY_2
#define HTML_ALIGN_LEFT wxHTML_ALIGN_LEFT
#define HTML_ALIGN_RIGHT wxHTML_ALIGN_RIGHT
#define HTML_ALIGN_TOP wxHTML_ALIGN_TOP
#define HTML_ALIGN_BOTTOM wxHTML_ALIGN_BOTTOM
#define HTML_ALIGN_CENTER wxHTML_ALIGN_CENTER
#define HTML_CLR_FOREGROUND wxHTML_CLR_FOREGROUND
#define HTML_CLR_BACKGROUND wxHTML_CLR_BACKGROUND
#define HTML_UNITS_PIXELS wxHTML_UNITS_PIXELS
#define HTML_UNITS_PERCENT wxHTML_UNITS_PERCENT
#define HTML_INDENT_LEFT wxHTML_INDENT_LEFT
#define HTML_INDENT_RIGHT wxHTML_INDENT_RIGHT
#define HTML_INDENT_TOP wxHTML_INDENT_TOP
#define HTML_INDENT_BOTTOM wxHTML_INDENT_BOTTOM
#define HTML_INDENT_HORIZONTAL wxHTML_INDENT_HORIZONTAL
#define HTML_INDENT_VERTICAL wxHTML_INDENT_VERTICAL
#define HTML_INDENT_ALL wxHTML_INDENT_ALL
#define HTML_COND_ISANCHOR wxHTML_COND_ISANCHOR
#define HTML_COND_ISIMAGEMAP wxHTML_COND_ISIMAGEMAP
#define HTML_COND_USER wxHTML_COND_USER
#endif
#endif
#endif

View File

@@ -62,11 +62,6 @@ public:
// accessors
bool Ok() const {return m_isInit; }
// Let's remove this inelegant function
#if WXWIN_COMPATIBILITY
void Get(unsigned char *r, unsigned char *g, unsigned char *b) const;
#endif
unsigned char Red() const { return m_red; }
unsigned char Green() const { return m_green; }
unsigned char Blue() const { return m_blue; }

View File

@@ -84,16 +84,6 @@ public:
virtual void Refresh(bool eraseBack = TRUE, const wxRect *rect = NULL) ;
WXWidget GetMacControl() { return m_macControl ;}
#if WXWIN_COMPATIBILITY
virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
wxColour* GetButtonColour() const { return NULL; }
inline virtual void SetLabelFont(const wxFont& font);
inline virtual void SetButtonFont(const wxFont& font);
inline wxFont& GetLabelFont() const;
inline wxFont& GetButtonFont() const;
#endif // WXWIN_COMPATIBILITY
protected:
// For controls like radiobuttons which are really composite
WXWidget m_macControl ;
@@ -110,13 +100,6 @@ private:
};
#if WXWIN_COMPATIBILITY
inline wxFont& wxControl::GetLabelFont() const { return GetFont(); }
inline wxFont& wxControl::GetButtonFont() const { return GetFont(); }
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
#endif // WXWIN_COMPATIBILITY
wxControl *wxFindControlFromMacControl(WXWidget inControl ) ;
void wxAssociateControlWithMacControl(WXWidget inControl, wxControl *control) ;
void wxRemoveMacControlAssociation(wxControl *control) ;

View File

@@ -79,10 +79,6 @@ public:
// returns TRUE if we're in a modal loop
bool IsModalShowing() const;
#if WXWIN_COMPATIBILITY
bool Iconized() const { return IsIconized(); };
#endif
// implementation
// --------------

View File

@@ -123,15 +123,6 @@ public:
virtual void SetLabelTop( size_t pos, const wxString& label );
virtual wxString GetLabelTop( size_t pos ) const;
// compatibility: these functions are deprecated
#if WXWIN_COMPATIBILITY
void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
wxEvtHandler *GetEventHandler() { return m_eventHandler; }
bool Enabled(int id) const { return IsEnabled(id); }
bool Checked(int id) const { return IsChecked(id); }
#endif // WXWIN_COMPATIBILITY
// implementation from now on
WXHMENU Create();
int FindMenu(const wxString& title);
@@ -164,10 +155,6 @@ protected:
void Init();
wxWindow *m_invokingWindow;
#if WXWIN_COMPATIBILITY
wxEvtHandler *m_eventHandler;
#endif // WXWIN_COMPATIBILITY
wxArrayString m_titles;
private:

View File

@@ -26,24 +26,6 @@
// compatibility settings
// ----------------------------------------------------------------------------
// This setting determines the compatibility with 1.68 API:
// Level 0: no backward compatibility, all new features
// Level 1: some extra methods are defined for compatibility.
//
// Default is 0.
//
// Recommended setting: 0 (in fact the compatibility code is now very minimal
// so there is little advantage to setting it to 1.
#define WXWIN_COMPATIBILITY 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//
// Default is 0.
//
// Recommended setting: 0 (please update your code instead!)
#define WXWIN_COMPATIBILITY_2 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//

View File

@@ -115,33 +115,6 @@ public:
// Accept files for dragging
virtual void DragAcceptFiles(bool accept);
#if WXWIN_COMPATIBILITY
// Set/get scroll attributes
virtual void SetScrollRange(int orient, int range, bool refresh = TRUE);
virtual void SetScrollPage(int orient, int page, bool refresh = TRUE);
virtual int OldGetScrollRange(int orient) const;
virtual int GetScrollPage(int orient) const;
// event handlers
// Handle a control command
virtual void OnCommand(wxWindowMac& win, wxCommandEvent& event);
// Override to define new behaviour for default action (e.g. double
// clicking on a listbox)
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
#endif // WXWIN_COMPATIBILITY
#if wxUSE_CARET && WXWIN_COMPATIBILITY
// caret manipulation (old MSW only functions, see wxCaret class for the
// new API)
void CreateCaret(int w, int h);
void CreateCaret(const wxBitmap *bitmap);
void DestroyCaret();
void ShowCaret(bool show);
void SetCaretPos(int x, int y);
void GetCaretPos(int *x, int *y) const;
#endif // wxUSE_CARET
// Native resource loading (implemented in src/msw/nativdlg.cpp)
// FIXME: should they really be all virtual?
wxWindowMac* GetWindowChild1(wxWindowID id);
@@ -197,20 +170,9 @@ public:
// MSW only: TRUE if this control is part of the main control
virtual bool ContainsHWND(WXHWND WXUNUSED(hWnd)) const { return FALSE; };
#if WXWIN_COMPATIBILITY
wxObject *GetChild(int number) const;
virtual void MSWDeviceToLogical(float *x, float *y) const;
#endif // WXWIN_COMPATIBILITY
// Setup background and foreground colours correctly
virtual void SetupColours();
#if WXWIN_COMPATIBILITY
void SetShowing(bool show) { (void)Show(show); }
bool IsUserEnabled() const { return IsEnabled(); }
#endif // WXWIN_COMPATIBILITY
public:
static bool MacGetWindowFromPoint( const wxPoint &point , wxWindowMac** outWin ) ;
virtual bool MacGetWindowFromPointSub( const wxPoint &point , wxWindowMac** outWin ) ;

View File

@@ -330,16 +330,6 @@ public:
Insert(0u, itemid, text, help, isCheckable);
}
#if WXWIN_COMPATIBILITY
bool Enabled(int itemid) const { return IsEnabled(itemid); }
bool Checked(int itemid) const { return IsChecked(itemid); }
wxMenuItem* FindItemForId(int itemId, wxMenu **itemMenu) const
{ return FindItem(itemId, itemMenu); }
wxList& GetItems() const { return (wxList &)m_items; }
#endif // WXWIN_COMPATIBILITY
protected:
// virtuals to override in derived classes
// ---------------------------------------
@@ -482,18 +472,6 @@ public:
// don't want menu bars to accept the focus by tabbing to them
virtual bool AcceptsFocusFromKeyboard() const { return FALSE; }
// compatibility only: these functions are deprecated, use the new ones
// instead
#if WXWIN_COMPATIBILITY
bool Enabled(int itemid) const { return IsEnabled(itemid); }
bool Checked(int itemid) const { return IsChecked(itemid); }
wxMenuItem* FindMenuItemById(int itemid) const
{ return FindItem(itemid); }
wxMenuItem* FindItemForId(int itemid, wxMenu **menu = NULL) const
{ return FindItem(itemid, menu); }
#endif // WXWIN_COMPATIBILITY
protected:
// the list of all our menus
wxMenuList m_menus;

View File

@@ -54,11 +54,6 @@ public:
// accessors
bool Ok() const { return m_isInit; }
// Let's remove this inelegant function
#if WXWIN_COMPATIBILITY
void Get(unsigned char *r, unsigned char *g, unsigned char *b) const;
#endif
unsigned char Red() const { return m_red; }
unsigned char Green() const { return m_green; }
unsigned char Blue() const { return m_blue; }

View File

@@ -89,16 +89,6 @@ public:
// Accept files for dragging
virtual void DragAcceptFiles(bool accept);
#if WXWIN_COMPATIBILITY
// event handlers
// Handle a control command
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
// Override to define new behaviour for default action (e.g. double
// clicking on a listbox)
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
#endif // WXWIN_COMPATIBILITY
virtual WXWidget GetHandle() const { return m_wnd; }
void SetMGLwindow_t(struct window_t *wnd);

View File

@@ -26,19 +26,6 @@ class WXDLLEXPORT wxDialog : public wxDialogBase
public:
wxDialog();
#if WXWIN_COMPATIBILITY_2
// Constructor with a modal flag, but no window id - the old convention
wxDialog(wxWindow *parent,
const wxString& title, bool modal,
int x = -1, int y= -1, int width = 500, int height = 500,
long style = wxDEFAULT_DIALOG_STYLE,
const wxString& name = wxDialogNameStr)
{
long modalStyle = modal ? wxDIALOG_MODAL : wxDIALOG_MODELESS ;
Create(parent, -1, title, wxPoint(x, y), wxSize(width, height), style|modalStyle, name);
}
#endif
// Constructor with no modal flag - the new convention.
wxDialog(wxWindow *parent, wxWindowID id,
const wxString& title,

View File

@@ -162,17 +162,6 @@ public:
wxDEPRECATED( void SetQuality(int quality) );
#endif // WXWIN_COMPATIBILITY_2_4
#if WXWIN_COMPATIBILITY_2
void SetOk(bool isOk);
#endif // WXWIN_COMPATIBILITY_2
#if WXWIN_COMPATIBILITY
#if wxUSE_PALETTE
wxPalette *GetColourMap() const { return GetPalette(); }
void SetColourMap(wxPalette *cmap) { SetPalette(*cmap); };
#endif // wxUSE_PALETTE
#endif // WXWIN_COMPATIBILITY
// implementation only from now on
// -------------------------------

View File

@@ -47,10 +47,6 @@ public:
const wxValidator& validator = wxDefaultValidator,
const wxString& name = wxButtonNameStr);
#if WXWIN_COMPATIBILITY
wxBitmap *GetBitmap() const { return (wxBitmap *) &GetBitmapLabel(); }
#endif
// Implementation
virtual void SetDefault();
virtual bool MSWOnDraw(WXDRAWITEMSTRUCT *item);

View File

@@ -58,11 +58,6 @@ public:
// accessors
bool Ok() const {return m_isInit; }
// Let's remove this inelegant function
#if WXWIN_COMPATIBILITY
void Get(unsigned char *r, unsigned char *g, unsigned char *b) const;
#endif
unsigned char Red() const { return m_red; }
unsigned char Green() const { return m_green; }
unsigned char Blue() const { return m_blue; }

View File

@@ -65,16 +65,6 @@ public:
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
#if WXWIN_COMPATIBILITY
virtual void SetButtonColour(const wxColour& WXUNUSED(col)) { }
wxColour* GetButtonColour() const { return NULL; }
virtual void SetLabelFont(const wxFont& font);
virtual void SetButtonFont(const wxFont& font);
wxFont& GetLabelFont() const;
wxFont& GetButtonFont() const;
#endif // WXWIN_COMPATIBILITY
protected:
// choose the default border for this window
virtual wxBorder GetDefaultBorder() const;
@@ -123,13 +113,5 @@ private:
DECLARE_EVENT_TABLE()
};
#if WXWIN_COMPATIBILITY
inline wxFont& wxControl::GetLabelFont() const { return (wxFont &)GetFont(); }
inline wxFont& wxControl::GetButtonFont() const { return (wxFont &)GetFont(); }
inline void wxControl::SetLabelFont(const wxFont& font) { SetFont(font); }
inline void wxControl::SetButtonFont(const wxFont& font) { SetFont(font); }
#endif // WXWIN_COMPATIBILITY
#endif
// _WX_CONTROL_H_

View File

@@ -63,11 +63,6 @@ public:
// overriden base class virtuals
virtual bool AcceptsFocus() const { return FALSE; }
// Backward compatibility
#if WXWIN_COMPATIBILITY
void SetButtonColour(const wxColour& col) { SetForegroundColour(col); }
#endif
virtual void Command(wxCommandEvent& WXUNUSED(event)) {} ;
protected:

View File

@@ -42,10 +42,6 @@ public:
m_width = m_height = m_depth = 0;
m_handle = 0;
#if WXWIN_COMPATIBILITY_2
m_ok = FALSE;
#endif // WXWIN_COMPATIBILITY_2
}
// accessors
@@ -72,14 +68,6 @@ public:
WXHICON m_hIcon;
WXHCURSOR m_hCursor;
};
// this filed is redundant and using it is error prone but keep it for
// backwards compatibility
#if WXWIN_COMPATIBILITY_2
void SetOk() { m_ok = m_handle != 0; }
bool m_ok;
#endif // WXWIN_COMPATIBILITY_2
};
// ----------------------------------------------------------------------------

View File

@@ -145,15 +145,6 @@ public:
virtual void SetLabelTop( size_t pos, const wxString& label );
virtual wxString GetLabelTop( size_t pos ) const;
// compatibility: these functions are deprecated
#if WXWIN_COMPATIBILITY
void SetEventHandler(wxEvtHandler *handler) { m_eventHandler = handler; }
wxEvtHandler *GetEventHandler() { return m_eventHandler; }
bool Enabled(int id) const { return IsEnabled(id); }
bool Checked(int id) const { return IsChecked(id); }
#endif // WXWIN_COMPATIBILITY
// implementation from now on
WXHMENU Create();
virtual void Detach();
@@ -188,10 +179,6 @@ protected:
// common part of all ctors
void Init();
#if WXWIN_COMPATIBILITY
wxEvtHandler *m_eventHandler;
#endif // WXWIN_COMPATIBILITY
wxArrayString m_titles;
WXHMENU m_hMenu;

View File

@@ -48,37 +48,17 @@ public:
virtual void SetScrollbar(int position, int thumbSize, int range, int pageSize,
bool refresh = TRUE);
#if WXWIN_COMPATIBILITY
// Backward compatibility
int GetValue() const { return GetThumbPosition(); }
void SetValue(int viewStart) { SetThumbPosition(viewStart); }
void GetValues(int *viewStart, int *viewLength, int *objectLength,
int *pageLength) const ;
int GetViewLength() const { return m_viewSize; }
int GetObjectLength() const { return m_objectSize; }
void SetPageSize(int pageLength);
void SetObjectLength(int objectLength);
void SetViewLength(int viewLength);
#endif
void Command(wxCommandEvent& event);
virtual WXHBRUSH OnCtlColor(WXHDC pDC, WXHWND pWnd, WXUINT nCtlColor,
WXUINT message, WXWPARAM wParam, WXLPARAM lParam);
virtual bool MSWOnScroll(int orientation, WXWORD wParam,
WXWORD pos, WXHWND control);
#if WXWIN_COMPATIBILITY
// Backward compatibility: generate an old-style scroll command
void OnScroll(wxScrollEvent& event);
#endif // WXWIN_COMPATIBILITY
protected:
int m_pageSize;
int m_viewSize;
int m_objectSize;
DECLARE_EVENT_TABLE()
DECLARE_DYNAMIC_CLASS_NO_COPY(wxScrollBar)
};

View File

@@ -26,24 +26,6 @@
// compatibility settings
// ----------------------------------------------------------------------------
// This setting determines the compatibility with 1.68 API:
// Level 0: no backward compatibility, all new features
// Level 1: some extra methods are defined for compatibility.
//
// Default is 0.
//
// Recommended setting: 0 (in fact the compatibility code is now very minimal
// so there is little advantage to setting it to 1.
#define WXWIN_COMPATIBILITY 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//
// Default is 0.
//
// Recommended setting: 0 (please update your code instead!)
#define WXWIN_COMPATIBILITY_2 0
// This setting determines the compatibility with 2.2 API: set it to 1 to
// enable it but please consider updating your code instead.
//

View File

@@ -28,24 +28,6 @@
// compatibility settings
// ----------------------------------------------------------------------------
// This setting determines the compatibility with 1.68 API:
// Level 0: no backward compatibility, all new features
// Level 1: some extra methods are defined for compatibility.
//
// Default is 0.
//
// Recommended setting: 0 (in fact the compatibility code is now very minimal
// so there is little advantage to setting it to 1.
#define WXWIN_COMPATIBILITY 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//
// Default is 0.
//
// Recommended setting: 0 (please update your code instead!)
#define WXWIN_COMPATIBILITY_2 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//

View File

@@ -26,24 +26,6 @@
// compatibility settings
// ----------------------------------------------------------------------------
// This setting determines the compatibility with 1.68 API:
// Level 0: no backward compatibility, all new features
// Level 1: some extra methods are defined for compatibility.
//
// Default is 0.
//
// Recommended setting: 0 (in fact the compatibility code is now very minimal
// so there is little advantage to setting it to 1.
#define WXWIN_COMPATIBILITY 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//
// Default is 0.
//
// Recommended setting: 0 (please update your code instead!)
#define WXWIN_COMPATIBILITY_2 0
// This setting determines the compatibility with 2.2 API: set it to 1 to
// enable it but please consider updating your code instead.
//

View File

@@ -140,33 +140,6 @@ public:
wxDEPRECATED( void SetTransparent(bool t = TRUE) );
#endif // WXWIN_COMPATIBILITY_2_4
#if WXWIN_COMPATIBILITY
// Set/get scroll attributes
virtual void SetScrollRange(int orient, int range, bool refresh = TRUE);
virtual void SetScrollPage(int orient, int page, bool refresh = TRUE);
virtual int OldGetScrollRange(int orient) const;
virtual int GetScrollPage(int orient) const;
// event handlers
// Handle a control command
virtual void OnCommand(wxWindow& win, wxCommandEvent& event);
// Override to define new behaviour for default action (e.g. double
// clicking on a listbox)
virtual void OnDefaultAction(wxControl * WXUNUSED(initiatingItem)) { }
#endif // WXWIN_COMPATIBILITY
#if wxUSE_CARET && WXWIN_COMPATIBILITY
// caret manipulation (old MSW only functions, see wxCaret class for the
// new API)
void CreateCaret(int w, int h);
void CreateCaret(const wxBitmap *bitmap);
void DestroyCaret();
void ShowCaret(bool show);
void SetCaretPos(int x, int y);
void GetCaretPos(int *x, int *y) const;
#endif // wxUSE_CARET
#ifndef __WXUNIVERSAL__
// Native resource loading (implemented in src/msw/nativdlg.cpp)
// FIXME: should they really be all virtual?
@@ -260,11 +233,6 @@ public:
virtual bool MSWCommand(WXUINT param, WXWORD id);
#if WXWIN_COMPATIBILITY
wxObject *GetChild(int number) const;
virtual void MSWDeviceToLogical(float *x, float *y) const;
#endif // WXWIN_COMPATIBILITY
#ifndef __WXUNIVERSAL__
// Create an appropriate wxWindow from a HWND
virtual wxWindow* CreateWindowFromHWND(wxWindow* parent, WXHWND hWnd);
@@ -408,11 +376,6 @@ public:
WXWPARAM wParam,
WXLPARAM lParam);
#if WXWIN_COMPATIBILITY
void SetShowing(bool show) { (void)Show(show); }
bool IsUserEnabled() const { return IsEnabled(); }
#endif // WXWIN_COMPATIBILITY
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& event);

View File

@@ -194,19 +194,6 @@ public:
inline bool operator!=(const wxBitmap& rBitmap) const
{ return m_refData != rBitmap.m_refData; }
#if WXWIN_COMPATIBILITY_2
void SetOk(bool bIsOk);
#endif // WXWIN_COMPATIBILITY_2
#if WXWIN_COMPATIBILITY
inline wxPalette* GetColourMap() const
{ return GetPalette(); }
inline void SetColourMap(wxPalette* pCmap)
{ SetPalette(*pCmap); };
#endif // WXWIN_COMPATIBILITY
// Implementation
public:
inline void SetHBITMAP(WXHBITMAP hBmp)

View File

@@ -62,13 +62,6 @@ public:
SetBitmapLabel(rBitmap);
}
#if WXWIN_COMPATIBILITY
wxBitmap* GetBitmap(void) const
{
return (wxBitmap *)&m_buttonBitmap;
}
#endif
//
// Implementation
//

View File

@@ -83,16 +83,6 @@ public:
//
bool Ok(void) const {return m_bIsInit; }
//
// Let's remove this inelegant function
//
#if WXWIN_COMPATIBILITY
void Get( unsigned char* pRed
,unsigned char* pGreen
,unsigned char* pBlue
) const;
#endif
unsigned char Red(void) const { return m_cRed; }
unsigned char Green(void) const { return m_cGreen; }
unsigned char Blue(void) const { return m_cBlue; }

View File

@@ -81,16 +81,6 @@ public:
,WXLPARAM lParam
);
#if WXWIN_COMPATIBILITY
virtual void SetButtonColour(const wxColour& WXUNUSED(rCol)) { }
wxColour* GetButtonColour(void) const { return NULL; }
inline virtual void SetLabelFont(const wxFont& rFont);
inline virtual void SetButtonFont(const wxFont& rFont);
inline wxFont& GetLabelFont(void) const;
inline wxFont& GetButtonFont(void) const;
#endif // WXWIN_COMPATIBILITY
public:
//
// For controls like radiobuttons which are really composite
@@ -138,12 +128,5 @@ private:
DECLARE_EVENT_TABLE()
}; // end of wxControl
#if WXWIN_COMPATIBILITY
inline wxFont& wxControl::GetLabelFont(void) const { return GetFont(); }
inline wxFont& wxControl::GetButtonFont(void) const { return GetFont(); }
inline void wxControl::SetLabelFont(const wxFont& rFont) { SetFont(rFont); }
inline void wxControl::SetButtonFont(const wxFont& rFont) { SetFont(rFont); }
#endif // WXWIN_COMPATIBILITY
#endif // _WX_CONTROL_H_

View File

@@ -40,10 +40,6 @@ public:
m_nWidth = m_nHeight = m_nDepth = 0;
m_hHandle = 0;
#if WXWIN_COMPATIBILITY_2
m_bOk = FALSE;
#endif // WXWIN_COMPATIBILITY_2
}
// accessors
@@ -80,13 +76,6 @@ public:
WXHCURSOR m_hCursor;
};
// this filed is redundant and using it is error prone but keep it for
// backwards compatibility
#if WXWIN_COMPATIBILITY_2
void SetOk() { m_bOk = m_hHandle != 0; }
bool m_bOk;
#endif // WXWIN_COMPATIBILITY_2
UINT m_uId;
};

View File

@@ -230,16 +230,6 @@ public:
);
virtual wxString GetLabelTop(size_t nPos) const;
//
// Compatibility: these functions are deprecated
//
#if WXWIN_COMPATIBILITY
void SetEventHandler(wxEvtHandler* pHandler) { m_pEventHandler = pHandler; }
wxEvtHandler* GetEventHandler(void) { return m_pEventHandler; }
bool Enabled(int nId) const { return IsEnabled(nId); }
bool Checked(int nId) const { return IsChecked(nId); }
#endif // WXWIN_COMPATIBILITY
//
// Implementation from now on
//
@@ -275,10 +265,6 @@ protected:
//
void Init(void);
#if WXWIN_COMPATIBILITY
wxEvtHandler* m_pEventHandler;
#endif // WXWIN_COMPATIBILITY
wxArrayString m_titles;
WXHMENU m_hMenu;

View File

@@ -152,47 +152,6 @@ public:
// Accept files for dragging
virtual void DragAcceptFiles(bool bAccept);
#if WXWIN_COMPATIBILITY
// Set/get scroll attributes
virtual void SetScrollRange( int nOrient
,int nRange
,bool bRefresh = TRUE
);
virtual void SetScrollPage( int nOrient
,int nPage
,bool bRefresh = TRUE
);
virtual int OldGetScrollRange(int nOrient) const;
virtual int GetScrollPage(int nOrient) const;
//
// event handlers
//
// Handle a control command
virtual void OnCommand( wxWindow& rWin
,wxCommandEvent& rEvent
);
// Override to define new behaviour for default action (e.g. double
// clicking on a listbox)
virtual void OnDefaultAction(wxControl* WXUNUSED(pInitiatingItem)) { }
#endif // WXWIN_COMPATIBILITY
#if wxUSE_CARET && WXWIN_COMPATIBILITY
void CreateCaret( int nWidth
,int nHeight
);
void CreateCaret(const wxBitmap* pBitmap);
void DestroyCaret(void);
void ShowCaret(bool bShow);
void SetCaretPos( int nX
,int nY
);
void GetCaretPos( int* pX
,int* pY
) const;
#endif // wxUSE_CARET
#ifndef __WXUNIVERSAL__
// Native resource loading (implemented in src/os2/nativdlg.cpp)
// FIXME: should they really be all virtual?
@@ -293,13 +252,6 @@ public:
,WXWORD nId
);
#if WXWIN_COMPATIBILITY
wxObject* GetChild(int nNumber) const;
virtual void OS2DeviceToLogical( float* pfX
,float* pfY
) const;
#endif // WXWIN_COMPATIBILITY
#ifndef __WXUNIVERSAL__
// Create an appropriate wxWindow from a HWND
virtual wxWindow* CreateWindowFromHWND( wxWindow* pParent
@@ -469,11 +421,6 @@ public:
,WXLPARAM lParam
);
#if WXWIN_COMPATIBILITY
void SetShowing(bool bShow) { (void)Show(show); }
bool IsUserEnabled(void) const { return IsEnabled(); }
#endif // WXWIN_COMPATIBILITY
// Responds to colour changes: passes event on to children.
void OnSysColourChanged(wxSysColourChangedEvent& rEvent);

View File

@@ -120,11 +120,6 @@ public:
const wxString& wildcard = wxEmptyString,
bool details = FALSE);
#if WXWIN_COMPATIBILITY_2
// deprecated
wxList *GetList(const wxString& wildcard, bool details = FALSE);
#endif // WXWIN_COMPATIBILITY_2
protected:
// this executes a simple ftp command with the given argument and returns
// TRUE if it its return code starts with '2'

View File

@@ -95,11 +95,6 @@ enum wxSocketType
typedef int wxSocketFlags;
#if WXWIN_COMPATIBILITY
typedef wxSocketType wxSockType;
typedef wxSocketFlags wxSockFlags;
#endif // WXWIN_COMPATIBILITY
// --------------------------------------------------------------------------
// wxSocketBase
@@ -109,29 +104,6 @@ class WXDLLIMPEXP_NET wxSocketBase : public wxObject
{
DECLARE_CLASS(wxSocketBase)
public:
#if WXWIN_COMPATIBILITY
enum
{
NONE = wxSOCKET_NONE,
NOWAIT = wxSOCKET_NOWAIT,
WAITALL = wxSOCKET_WAITALL,
SPEED = wxSOCKET_BLOCK
};
enum
{
SOCK_UNINIT = wxSOCKET_UNINIT,
SOCK_CLIENT = wxSOCKET_CLIENT,
SOCK_SERVER = wxSOCKET_SERVER,
SOCK_INTERNAL = wxSOCKET_BASE,
SOCK_DATAGRAM = wxSOCKET_DATAGRAM
};
typedef void (*wxSockCbk)(wxSocketBase& sock, wxSocketNotify evt, char *cdata);
#endif // WXWIN_COMPATIBILITY
public:
// Public interface
@@ -191,12 +163,6 @@ public:
static bool Initialize();
static void Shutdown();
// callbacks are deprecated, use events instead
#if WXWIN_COMPATIBILITY
wxSockCbk Callback(wxSockCbk cbk_);
char *CallbackData(char *data);
#endif // WXWIN_COMPATIBILITY
// Implementation from now on
// --------------------------
@@ -256,12 +222,6 @@ private:
// the initialization count, GSocket is initialized if > 0
static size_t m_countInit;
// callbacks are deprecated, use events instead
#if WXWIN_COMPATIBILITY
wxSockCbk m_cbk; // callback
char *m_cdata; // callback data
#endif // WXWIN_COMPATIBILITY
DECLARE_NO_COPY_CLASS(wxSocketBase)
};
@@ -349,12 +309,6 @@ public:
wxSocketBase *GetSocket() const { return (wxSocketBase *) GetEventObject(); }
void *GetClientData() const { return m_clientData; }
// backwards compatibility
#if WXWIN_COMPATIBILITY_2
wxSocketNotify SocketEvent() const { return m_event; }
wxSocketBase *Socket() const { return (wxSocketBase *) GetEventObject(); }
#endif // WXWIN_COMPATIBILITY_2
virtual wxEvent *Clone() const { return new wxSocketEvent(*this); }
public:

View File

@@ -506,17 +506,6 @@ public:
// more deprecated functions
// -------------------------
#if WXWIN_COMPATIBILITY
void SetDefaultSize(int w, int h) { SetDefaultSize(wxSize(w, h)); }
long GetDefaultWidth() const { return m_defaultWidth; }
long GetDefaultHeight() const { return m_defaultHeight; }
int GetDefaultButtonWidth() const { return (int) GetDefaultButtonSize().x; };
int GetDefaultButtonHeight() const { return (int) GetDefaultButtonSize().y; };
virtual void SetDefaultSize(const wxSize& size) { SetToolBitmapSize(size); }
virtual wxSize GetDefaultSize() const { return GetToolBitmapSize(); }
virtual wxSize GetDefaultButtonSize() const { return GetToolSize(); }
#endif // WXWIN_COMPATIBILITY
// use GetToolMargins() instead
wxSize GetMargins() const { return GetToolMargins(); }

View File

@@ -337,11 +337,6 @@ public:
// do the window-specific processing after processing the update event
virtual void DoUpdateWindowUI(wxUpdateUIEvent& event) ;
// obsolete functions
#if WXWIN_COMPATIBILITY
bool Modified() const { return IsModified(); }
#endif
protected:
// the name of the last file loaded with LoadFile() which will be used by
// SaveFile() by default

View File

@@ -90,12 +90,6 @@ public:
// return TRUE if the timer is one shot
bool IsOneShot() const { return m_oneShot; }
#if WXWIN_COMPATIBILITY_2
// deprecated functions
int Interval() const { return GetInterval(); };
bool OneShot() const { return IsOneShot(); }
#endif // WXWIN_COMPATIBILITY_2
protected:
// common part of all ctors
void Init() { m_oneShot = FALSE; m_milli = 0; }

View File

@@ -113,11 +113,6 @@ public:
// operation is successful.)
virtual bool SetShape(const wxRegion& WXUNUSED(region)) { return FALSE; }
// old functions, use the new ones instead!
#if WXWIN_COMPATIBILITY_2
bool Iconized() const { return IsIconized(); }
#endif // WXWIN_COMPATIBILITY_2
// implementation only from now on
// -------------------------------

View File

@@ -26,24 +26,6 @@
// compatibility settings
// ----------------------------------------------------------------------------
// This setting determines the compatibility with 1.68 API:
// Level 0: no backward compatibility, all new features
// Level 1: some extra methods are defined for compatibility.
//
// Default is 0.
//
// Recommended setting: 0 (in fact the compatibility code is now very minimal
// so there is little advantage to setting it to 1.
#define WXWIN_COMPATIBILITY 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//
// Default is 0.
//
// Recommended setting: 0 (please update your code instead!)
#define WXWIN_COMPATIBILITY_2 0
// This setting determines the compatibility with 2.0 API: set it to 1 to
// enable it
//

View File

@@ -63,11 +63,6 @@ class WXDLLIMPEXP_BASE wxPoint;
WXDLLIMPEXP_BASE wxChar* copystring(const wxChar *s);
#endif
#if WXWIN_COMPATIBILITY_2
// Matches string one within string two regardless of case
WXDLLIMPEXP_BASE bool StringMatch(const wxChar *one, const wxChar *two, bool subString = TRUE, bool exact = FALSE);
#endif
// A shorter way of using strcmp
#define wxStringEq(s1, s2) (s1 && s2 && (wxStrcmp(s1, s2) == 0))
@@ -106,15 +101,9 @@ WXDLLEXPORT bool wxSetDetectableAutoRepeat( bool flag );
// Generate a unique ID
WXDLLEXPORT long wxNewId();
#if !defined(NewId) && defined(WXWIN_COMPATIBILITY)
#define NewId wxNewId
#endif
// Ensure subsequent IDs don't clash with this one
WXDLLEXPORT void wxRegisterId(long id);
#if !defined(RegisterId) && defined(WXWIN_COMPATIBILITY)
#define RegisterId wxRegisterId
#endif
// Return the current ID
WXDLLEXPORT long wxGetCurrentId();

View File

@@ -862,17 +862,6 @@ public:
wxAccessible* GetOrCreateAccessible() ;
#endif
// backward compatibility
// ----------------------
#if WXWIN_COMPATIBILITY
bool Enabled() const { return IsEnabled(); }
void SetButtonFont(const wxFont& font) { SetFont(font); }
void SetLabelFont(const wxFont& font) { SetFont(font); }
wxFont& GetLabelFont() { return GetFont(); };
wxFont& GetButtonFont() { return GetFont(); };
#endif // WXWIN_COMPATIBILITY
// implementation
// --------------