INCOMPATIBLE CHANGES SINCE 2.8.x
================================
+
+ Notice that these changes are described in more details in
+ the "Changes Since wxWidgets 2.8" section of the manual,
+ please read it if the explanation here is too cryptic.
+
+
Unicode-related changes
-----------------------
changes:
- Many wxWidgets functions taking "const wxChar *" have been changed to take
- either "const wxString&" so that they accept both Unicode and ANSI strings.
- and the argument can't be NULL or "const char *" if the strings are always
- ANSI but may be NULL. This change is normally backwards compatible except:
+ either "const wxString&" (so that they accept both Unicode and ANSI strings;
+ the argument can't be NULL anymore in this case) or "const char *" (if the
+ strings are always ANSI; may still be NULL). This change is normally
+ backwards compatible except:
a) Virtual functions: derived classes versions must be modified to take
"const wxString&" as well to make sure that they continue to override the
to work with "wxChar *" before use "void *" now (some int parameters were
also changed to size_t). While wxIPC_TEXT can still be used to transfer 7
bit text, the new wxIPC_UTF8TEXT format is used for transferring wxStrings.
+ Also notice that connection classes should change the parameter types of
+ their overridden OnExecute() or override a more convenient OnExec() instead.
wxODBC and contrib libraries removal
can still use wxGenericCalendarCtrl instead of wxCalendarCtrl in your code if
you need the extra features.
+- wxDocument::FileHistoryLoad() and wxFileHistory::Load() now take const
+ reference to wxConfigBase argument and not just a reference, please update
+ your code if you overrode these functions and change the functions in the
+ derived classes to use const reference as well.
+
Changes in behaviour which may result in compilation errors
-----------------------------------------------------------
and has to be replaced with this:
switch (str[i].GetValue()) { ... }
-- Return type of wxString::c_str() is now wxCStrData struct and not
- const wxChar*. wxCStrData is implicitly convertible to const char* and
- const wchar_t*, so this only presents a problem if the compiler cannot
- convert the type. In particular, Borland C++ and DigitalMars compilers
- don't correctly convert operator?: operands to the same type and fail with
- compilation error instead. This can be worked around by explicitly casting
- to const wxChar*:
- wxLogError(_("error: %s"), !err.empty() ? (const wxChar*)err.c_str() : "")
+- Return type of wxString::c_str() is now a helper wxCStrData struct and not
+ const wxChar*. wxCStrData is implicitly convertible to both "const char *"
+ and "const wchar_t *", so this only presents a problem if the compiler cannot
+ apply the conversion. This can happen in 2 cases:
+
+ + There is an ambiguity because the function being called is overloaded to
+ take both "const char *" and "const wchar_t *" as the compiler can't choose
+ between them. In this case you may use s.wx_str() to call the function
+ matching the current build (Unicode or not) or s.mb_str() or s.wc_str() to
+ explicitly select narrow or wide version of it.
+
+ Notice that such functions are normally not very common but unfortunately
+ Microsoft decided to extend their STL with standard-incompatible overloads
+ of some functions accepting "const wchar_t *" so you may need to replace
+ some occurrences of c_str() with wx_str() when using MSVC 8 or later.
+
+ + Some compilers, notably Borland C++ and DigitalMars, don't correctly
+ convert operator?: operands to the same type and fail with compilation
+ error instead. This can be worked around by explicitly casting to const
+ wxChar*: wxLogError(_("error: %s"), !err.empty() ? (const wxChar*)err.c_str() : "")
- wxCtime() and wxAsctime() return char*; this is incompatible with Unicode
build in wxWidgets 2.8 that returned wchar_t*.
- Virtual wxHtmlParser::AddText() takes wxString, not wxChar*, argument now.
-- Functions that took wxChar* arguments that could by NULL in wxWidgets 2.8.
+- Functions that took wxChar* arguments that could by NULL in wxWidgets 2.8
are deprecated and passing NULL to them won't compile anymore, wxEmptyString
must be used instead.
necessarily allocated consecutively any more. Use GetChildren() to find the
next/previous control sibling instead.
+- Calling wxConfig::Write() with an enum value will fail to compile because
+ wxConfig now tries to convert all unknown types to wxString automatically.
+ The simplest solution is to cast the enum value to int.
+
+- Several wxImage methods which previously had "long bitmaptype" parameters
+ have been changed to accept "wxBitmapType bitmaptype", please use enum
+ wxBitmapType in your code.
Deprecated methods and their replacements
-----------------------------------------
- EVT_CALENDAR_MONTH and EVT_CALENDAR_YEAR events are deprecated,
use EVT_CALENDAR_PAGE_CHANGED which replaces both of them.
- wxCalendarCtrl::EnableYearChange() and wxCAL_NO_YEAR_CHANGE are deprecated.
+ There is no replacement for this functionality, it is being dropped as it is
+ not available in native wxCalendarCtrl implementations.
+- wxDC::SetClippingRegion(const wxRegion&) overload is deprecated as it used
+ different convention from the other SetClippingRegion() overloads: wxRegion
+ passed to it was interpreted in physical, not logical, coordinates. Replace
+ it with SetDeviceClippingRegion() if this was the correct thing to do in your
+ code.
- Added wxWeakRef<T>, wxScopedPtr<T>, wxSharedPtr<T> class templates
- Added wxVector<T> class templates
- Added wxON_BLOCK_EXIT_SET() and wxON_BLOCK_EXIT_NULL() to wx/scopeguard.h.
+- Added wxEvtHandler::QueueEvent() replacing AddPendingEvent() and
+ wxQueueEvent() replacing wxPostEvent().
+- wxString now uses std::[w]string internally by default, meaning that it is
+ now thread-safe if the standard library provided with your compiler is.
+- Added wxCmdLineParser::AddUsageText() (Marcin 'Malcom' Malich).
+- Fix reading/writing UTF-7-encoded text streams.
+- Corrected bug in wxTimeSpan::IsShorterThan() for equal time spans.
All (Unix):
All (GUI):
- Added wxDataViewCtrl class and helper classes
+- Provide native implementation of wxCalendarCtrl under wxMSW and wxGTK
- Added {wxTextCtrl,wxComboBox}::AutoComplete() and AutoCompleteFileNames()
- Added wxH[V]ScrolledWindow (Brad Anderson, Bryan Petty).
- Added wxNotificationMessage class for non-intrusive notifications
- Added wxWindow::Show/HideWithEffect()
- Added wxWrapSizer (Arne Steinarson)
- Added wxSpinCtrlDouble (John Labenski)
+- Added multisample (anti-aliasing) support to wxGLCanvas (Olivier Playez).
- Added wxNativeContainerWindow to allow embedding wx into native windows
- Added custom controls support to wxFileDialog (Diaa Sami and Marcin Wojdyr)
- Added wxDC::StretchBlit() for wxMac and wxMSW (Vince Harron).
- Added support for labels for toolbar controls (Vince Harron).
- Added wxMessageDialog::SetMessage() and SetExtendedMessage().
- Added wxListCtrl::Set/GetColumnsOrder() (Yury Voronov)
+- Made wxLogWindow thread-safe (Barbara Maren Winkler).
- Added wxWindow::AlwaysShowScrollbars() (Julian Scheid)
- Added wxMouseEvent::GetClickCount() (Julian Scheid)
- Added wxBG_STYLE_TRANSPARENT background style (Julian Scheid)
- Added wxApp::SetNativeTheme() (Stefan H.).
- Made wxSpinCtrl::Reparent() in MSW and generic versions (Angelo Mottola).
- Freeze() and Thaw() now recursively freeze/thaw the children too.
+- Generalized wxScrolledWindow into wxScrolled<T> template that can derive
+ from any window class, not just wxPanel.
+- Allow having menu separators with ids != wxID_SEPARATOR (Jeff Tupper)
+- Fix appending items to sorted wxComboCtrl after creation (Jaakko Salli)
+- Don't blit area larger than necessary in wxBufferedDC::UnMask (Liang Jian)
+- Fixed wxPixelData<wxImage> compilation (Leonardo Fernandes).
+- Added wxImage::GetType() (troelsk).
wxGTK:
- Pass current control text to EVT_TEXT handler for wxSpinCtrl (John Ratliff).
- Added gtk.tlw.can-set-transparency system option.
- Added support for GTK+ print backend
+- Fix changing font/colour of label in buttons with images (Marcin Wojdyr).
wxMac:
- Allow tooltips longer than 64 (up to 128) characters in wxTaskBarIcon
- Fix centering wxFileDialog and allow positioning it
- Allow centering wxMessageDialog on its parent window (troelsk)
+- Show resize gripper on resizeable dialogs (Kolya Kosenko)
- Implement support for display enumeration under WinCE (Vince Harron)
+- Use different Win32 class names in different wx instances (Thomas Hauk)
+- Support multiline labels for wxCheckBox.
wxX11: