wxWindows 2 Change Log ---------------------- INCOMPATIBLE CHANGES SINCE 2.2.x ================================ Please take a few minutes to read the following list, especially paying attention to the most important changes which are marked with '!' in the first column. Also please note that you should ensure that WXWIN_COMPATIBILITY_2_2 is defined to 1 if you wish to retain maximal compatibility with 2.2 series -- however you are also strongly encouraged to try to compile your code without this define as it won't be default any longer in 2.6 release. NB: if you want to build your program with different major versions of wxWindows you will probably find the wxCHECK_VERSION() macro (see the documentation) useful. wxBase: ! wxArray::Remove(size_t) has been removed to fix compilation problems under 64 bit architectures, please replace it with RemoveAt() in your code. ! wxArray macros have been changed to fix runtime problems under 64 bit architectures and as a side effect of this WX_DEFINE_ARRAY() can only be used now for the pointer types, WX_DEFINE_ARRAY_INT should be used for the arrays containing non-pointers. - wxObject::CopyObject() and Clone() methods were removed because they simply don't make sense for all objects - wxEvent now has a pure virtual Clone() method which must be implemented by all derived classes, if you have user-defined event classes please add "wxEvent *Clone() const { return new MyEvent(*this); }" line to them - small change to wxStopWatch::Pause() semantics, please see the documentation - unlikely but possible incompatibility: the definition of TRUE has changed from "1" to "(bool)1" (and the same thing for FALSE), so the code which could be erroneously compiled previously such as doing "return FALSE" from a function returning a pointer would stop compiling now (but this change is not supposed to have any effects on valid code) - another minor change: wxApp::OnAssert() has a new "cond" argument, you must modify YourApp::OnAssert() signature if you were using it to override the default assert handling. All (GUI): ! the event type constants are not constants any more but are dynamically allocated during run-time which means that they can't be used as case labels in the switch()es, you must rewrite them to use if()s instead You may also define WXWIN_COMPATIBILITY_EVENT_TYPES to get the old behaviour but this is strongly discouraged, please consider changing your code instead! ! wxDialog does not derive from wxPanel any longer - if you were using it in your code, please update it. The quick fix for the most cases is to replace the occurrences of wxPanel with wxWindow. ! if you handle (and don't skip) EVT_KEY_DOWN, the EVT_CHAR event is not generated at all, so you must call event.Skip() in your OnKeyDown() if you want to get OnChar() as well - in general, the key events sent for the various non ASCII key combinations have been changed to make them consistent over all supported platforms, please see the wxKeyEvent documentation for details - wxYES_NO is now wxYES | wxNO and the manifest values of both wxYES and wxNO have changed (to fix some unfortunate clashes), please check your code to ensure that no tests for wxYES or wxNO are broken: for example, the following will *NOT* work any longer: if ( flags & wxYES_NO ) ... do something ... if ( flags & wxYES ) ... do something else ... - static wxWizard::Create() doesn't exist any more, the wizards are created in the same way as all the other wxWindow objects, i.e. by directly using the ctor - wxGLCanvas now derives directly from wxWindow, not wxScrolledWindow - wxGridCellAttrProvider class API changed, you will need to update your code if you derived any classes from it - wxImage::ComputeHistogram()'s signature changed to unsigned long ComputeHistogram(wxImageHistogram&) const - wxEvtHandler cannot be copied/assigned any longer - this never worked but now it results in compile-time error instead of run-time crashes - WXK_NUMLOCK and WXK_SCROLL keys no longer result in EVT_CHAR() events, they only generate EVT_KEY_DOWN/UP() ones - the dialogs use wxApp::GetTopWindow() as the parent implicitly if the parent specified is NULL, use wxDIALOG_NO_PARENT style to prevent this from happening - several obsolete synonyms are only retained in WXWIN_COMPATIBILITY_2_2 mode: for example, use wxScrolledWindow::GetViewStart() now instead of ViewStart() and GetCount() instead of Number() in many classes - wxCmdLineParser does not use wxLog to output messages anymore. to obtain the previous behaviour, add wxMessageOutput::Set(new wxMessageOutputLog); to your program (you will need to #include ) wxMSW: ! build system changed: setup.h is not a static file in include/wx any more but is created as part of the build process under lib//wx where is of the form (msw|univ)[dll][u][d]. You'll need to update the include path in your make/project files appropriately. Furthermore, xpm.lib is no longer used by wxMSW, it was superseded by the wxXPMDecoder class. You'll need to remove all references to xpm.lib from your make/project files. Finally, the library names have changed as well and now use the following consistent naming convention: wxmsw[ver][u][d].(lib|dll) where 'u' appears for Unicode version, 'd' -- for the debug one and version is only present for the DLLs builds. - child frames appear in the taskbar by default now, use wxFRAME_NO_TASKBAR style to avoid it - all overloads of wxDC::SetClippingRegion() combine the given region with the previously selected one instead of replacing it - wxGetHomeDir() uses HOME environment variable and if it is set will not return the programs directory any longer but its value (this function has never been meant to return the programs directory anyhow) - wxHTML apps don't need to include wx/html/msw/wxhtml.rc in resources file anymore. The file was removed from wxMSW Unix ports: ! You should use `wx-config --cxxflags` in your makefiles instead of `wx-config --cflags` for compiling C++ files. CXXFLAGS contains CFLAGS and the compiler flags for C++ files only, CFLAGS should still be used to compile pure C files. wxThread and related classes: - The thread-related classes have been heavily changed since 2.2.x versions as the old code had many serious problems. This could have resulted in semantical changes other than those mentioned here, please review use of wxThread, wxMutex and wxCondition classes in your code. ! wxCondition now *must* be used with a mutex, please read the (updated) class documentation for details and revise your code accordingly: this change was unfortunately needed as it was impossible to ensure the correct behaviour (i.e. absense of race conditions) using the old API. - wxMutex is not recursive any more in POSIX implementation (it hasn't been recursive in 2.2.x but was in 2.3.1 and 2.3.2), please refer to the class documentation for the discussion of the recursive mutexes. - wxMutex::IsLocked() doesn't exist any more and should have never existed: this is was unique example of a thread-unsafe-by-design method. OTHER CHANGES ============= 2.4.1 ----- All: - fixed wxLANGUAGE_CHINESE_TAIWAN to use zh_TW catalogs - added missing wx/quantize.h to install - improved wxScrolledWindow/sizer interaction - fixed assert (and crash in debug) in wxFileConfigGroup::DeleteSubgroupByName - fix for deleting entries at root level in wxFileConfig - wxStopWatch::Start() didn't resume it contrary to the docs - accept '\r' as delimiter when parsing dates - fixed duplicate wxFontEncoding values - wxFileConfig now always uses UTF-8 to store settings in Unicode build; it will be possible to set different charset in wxWindows >= 2.5.0 - added wxFileName::MakeAbsolute - bugs in wxCalCtrl fixed (year not being updated) Unix (GUI): - fixed the "close" button of dialogs under KDE 3.1 - fixed memory leak in wxMimeTypesManager - use GNOME2's /usr/share/pixmaps/document-icons in wxMimeTypesManager wxBase - compilation with wxUSE_ODBC=1 fixed (dbkeyg.h file was missing in the archive) - bug in wxDateTime with timezones on systems with tm_gmtoff in struct tm fixed - fixed bug in wxArray::Shrink() (Seth Manley) - fixed bug with searching in sorted arrays (Jrgen Palm) - wxFileConfig parse bug fixed wxGTK: - added wxEVT_MENU_OPEN event generation - fixed bug in generic file selector causing incomplete file extensions to be appended to filenames with no extension - added SetSelection implementation for GTK+ 2 - fixed a memory leak in generic wxFileDialog - implemented wxTextCtrl::Remove/Replace() for GTK2 - improved X11 ShowFullScreen - added support for GTK2 label mnemonics wxMSW: - no longer take ampersand into account in wxStaticText::GetBestSize - set orientation for scrollbar events - fix for explicit keyword detection (VC++) - fix for sending event from wxCheckListBox::Check() - wxCaret::SetSize correction for showing caret - fix for wxTreeCtrl label editing in wxTR_MULTIPLE mode - wxFrame::Maximize(FALSE) would maximize the window if called before showing it - use ES_DISABLENOSCROLL to work around the vertical scrollbar bug in wxTE_RICH2 text control - fixes for wxLocale::Init and Borland C++ - fix for bug whereby owner-drawn buttons didn't draw multiline labels correctly - Alt-letter didn't switch focus to a spin ctrl following static control with hotkey - fix for multiple consecutive groups of radiobuttons - fix for incorrect display of tooltips in non English locales (Niki Spahiev) - fixed memory leak when setting new wxMask for wxBitmap - improved border handling so it no longer shows a thin and sunken border under XP - partial fix for wxNotebook pages looking bad under XP: wxUSE_UXTHEME enables XP theme engine code, and wxUSE_UXTHEME_AUTO tells wxWindows to use the theme tab colour for control backgrounds. Proper XP theme support is planned for 2.6 - disable wxNB_RIGHT, wxNB_LEFT, wxNB_BOTTOM notebook styles if the version of CommCtl doesn't support it (XP) wxMotif: - don't use stipples in DoDrawText wxUniv: - fixed refresh problem when message box is shown wxMac: - implement wxExecute with proper callback on Mac OS X wxHTML: - fixed parsing of CDATA tags (Bill Nalen) - content of