]> git.saurik.com Git - wxWidgets.git/blame_incremental - docs/changes.txt
more PCH-less build fix
[wxWidgets.git] / docs / changes.txt
... / ...
CommitLineData
1-------------------------------------------------------------------------------
2 wxWidgets Change Log
3-------------------------------------------------------------------------------
4
5INCOMPATIBLE CHANGES SINCE 2.8.x
6================================
7
8
9 Notice that these changes are described in more details in
10 the "Changes Since wxWidgets 2.8" section of the manual,
11 please read it if the explanation here is too cryptic.
12
13
14Unicode-related changes
15-----------------------
16
17The biggest changes in wxWidgets 3.0 are the changes due to the merge of the
18old ANSI and Unicode build modes in a single build. See the Unicode overview
19in the manual for more details but here are the most important incompatible
20changes:
21
22- Many wxWidgets functions taking "const wxChar *" have been changed to take
23 either "const wxString&" (so that they accept both Unicode and ANSI strings;
24 the argument can't be NULL anymore in this case) or "const char *" (if the
25 strings are always ANSI; may still be NULL). This change is normally
26 backwards compatible except:
27
28 a) Virtual functions: derived classes versions must be modified to take
29 "const wxString&" as well to make sure that they continue to override the
30 base class version.
31
32 b) Passing NULL as argument: as NULL can't be unambiguously converted to
33 wxString, in many cases code using it won't compile any more and NULL
34 should be replaced with an empty string.
35
36- Functions returning "const wxChar *" were changed as well. Mostly they now
37 return wxString which is then transparently convertible to either "const char
38 *" or "const wchar_t *" but in some cases, notably wxDateTime::ParseXXX(),
39 the returned string could be NULL and so a separate helper class is used. If
40 you obtain compilation errors because of this, you can always correct them by
41 explicitly assigning the function return value to a variable of wanted type.
42 A slightly more intrusive but better solution is to use ParseXXX() version
43 with wxString::const_iterator output parameter which simply returns bool to
44 indicate the parsing success.
45
46- Some structure fields which used to be of type "const wxChar *" (such as
47 wxCmdLineEntryDesc::shortName, longName and description fields) are now of
48 type "const char *", you need to remove wxT() or _T() around the values used
49 to initialize them (which should normally always be ASCII).
50
51- wxIPC classes didn't work correctly in Unicode build before, this was fixed
52 but at a price of breaking backwards compatibility: many methods which used
53 to work with "wxChar *" before use "void *" now (some int parameters were
54 also changed to size_t). While wxIPC_TEXT can still be used to transfer 7
55 bit text, the new wxIPC_UTF8TEXT format is used for transferring wxStrings.
56 Also notice that connection classes should change the parameter types of
57 their overridden OnExecute() or override a more convenient OnExec() instead.
58
59
60wxODBC and contrib libraries removal
61------------------------------------
62
63wxODBC library was unmaintained since several years and we couldn't continue
64supporting it any longer so it was removed. Please use any of the other open
65source ODBC libraries in the future projects.
66
67Also the "applet", "deprecated", "fl", "mmedia" and "plot" contrib libraries
68were removed as they were unmaintained and broken since several years.
69The "gizmos", "ogl", "net" and "foldbar" contribs have been moved to
70wxCode (see http://wxcode.sourceforge.net/complist.php); they are now
71open for futher development by volunteers.
72
73The "stc" and "svg" contribs instead have been moved respectively into a new
74"official" library stc and in the core lib.
75
76
77Changes in behaviour not resulting in compilation errors, please read this!
78---------------------------------------------------------------------------
79
80- Default location of wxFileConfig files has changed under Windows, you will
81 need to update your code if you access these files directly.
82
83- wxWindow::IsEnabled() now returns false if a window parent (and not
84 necessarily the window itself) is disabled, new function IsThisEnabled()
85 with the same behaviour as old IsEnabled() was added.
86
87- Generating wxNavigationKeyEvent events doesn't work any more under wxGTK (and
88 other platforms in the future), use wxWindow::Navigate() or NavigateIn()
89 instead.
90
91- Sizers distribute only the extra space between the stretchable items
92 according to their proportions and not all available space. We believe the
93 new behaviour corresponds better to user expectations but if you did rely
94 on the old behaviour you will have to update your code to set the minimal
95 sizes of the sizer items to be in the same proportion as the items
96 proportions to return to the old behaviour.
97
98- wxWindow::Freeze/Thaw() are not virtual any more, if you overrode them in
99 your code you need to override DoFreeze/Thaw() instead now.
100
101- wxCalendarCtrl has native implementation in wxGTK, but it has less features
102 than the generic one. The native implementation is used by default, but you
103 can still use wxGenericCalendarCtrl instead of wxCalendarCtrl in your code if
104 you need the extra features.
105
106- wxDocument::FileHistoryLoad() and wxFileHistory::Load() now take const
107 reference to wxConfigBase argument and not just a reference, please update
108 your code if you overrode these functions and change the functions in the
109 derived classes to use const reference as well.
110
111- Under MSW wxExecute() arguments are now always properly quoted, as under
112 Unix, and so shouldn't contain quotes unless they are part of the argument.
113
114- wxDocument::OnNewDocument() doesn't call OnCloseDocument() any more.
115
116- If you use wxScrolledWindow::SetTargetWindow() you must implement its
117 GetSizeAvailableForScrollTarget() method, please see its documentation for
118 more details.
119
120- Processing of pending events now requires a running event loop.
121 Thus initialization code (e.g. showing a dialog) previously done in wxApp::OnRun()
122 or equivalent function should now be done into wxApp::OnEventLoopEnter().
123 See wxApp::OnEventLoopEnter() and wxApp::OnEventLoopExit() docs for more info.
124
125
126Changes in behaviour which may result in compilation errors
127-----------------------------------------------------------
128
129- WXWIN_COMPATIBILITY_2_4 doesn't exist any more, please update your code if
130 you still relied on features deprecated since version 2.4
131
132- wxDC classes hierarchy has changed, if you derived any classes from wxDC you
133 need to review them as wxDC doesn't have any virtual methods any longer and
134 uses delegation instead of inheritance to present different behaviours.
135
136- wxWindow::ProcessEvent() (and other wxEvtHandler methods inherited by wxWindow)
137 has been made protected to prevent wrongly using it instead of correct
138 GetEventHandler()->ProcessEvent().
139 New ProcessWindowEvent() was added for convenience.
140
141- Return type of wxString::operator[] and wxString::iterator::operator* is no
142 longer wxChar (i.e. char or wchar_t), but wxUniChar. This is not a problem
143 in vast majority of cases because of conversion operators, but it can break
144 code that depends on the result being wxChar.
145
146- The value returned by wxString::c_str() cannot be casted to non-const char*
147 or wchar_t* anymore. The solution is to use newly added wxString methods
148 char_str() (which returns a buffer convertible to char*) or wchar_str()
149 (which returns a buffer convertible to wchar_t*). These methods are
150 available in wxWidgets 2.8 series beginning with 2.8.4 as well.
151
152- The value returned by wxString::operator[] or wxString::iterator cannot be
153 used in switch statements anymore, because it's a class instance. Code like
154 this won't compile:
155 switch (str[i]) { ... }
156 and has to be replaced with this:
157 switch (str[i].GetValue()) { ... }
158
159- Return type of wxString::c_str() is now a helper wxCStrData struct and not
160 const wxChar*. wxCStrData is implicitly convertible to both "const char *"
161 and "const wchar_t *", so this only presents a problem if the compiler cannot
162 apply the conversion. This can happen in 2 cases:
163
164 + There is an ambiguity because the function being called is overloaded to
165 take both "const char *" and "const wchar_t *" as the compiler can't choose
166 between them. In this case you may use s.wx_str() to call the function
167 matching the current build (Unicode or not) or s.mb_str() or s.wc_str() to
168 explicitly select narrow or wide version of it.
169
170 Notice that such functions are normally not very common but unfortunately
171 Microsoft decided to extend their STL with standard-incompatible overloads
172 of some functions accepting "const wchar_t *" so you may need to replace
173 some occurrences of c_str() with wx_str() when using MSVC 8 or later.
174
175 + Some compilers, notably Borland C++ and DigitalMars, don't correctly
176 convert operator?: operands to the same type and fail with compilation
177 error instead. This can be worked around by explicitly casting to const
178 wxChar*: wxLogError(_("error: %s"), !err.empty() ? (const wxChar*)err.c_str() : "")
179
180- wxCtime() and wxAsctime() return char*; this is incompatible with Unicode
181 build in wxWidgets 2.8 that returned wchar_t*.
182
183- DigitalMars compiler has a bug that prevents it from using
184 wxUniChar::operator bool in conditions and it erroneously reports type
185 conversion ambiguity in expressions such as this:
186 for ( wxString::const_iterator p = s.begin(); *p; ++p )
187 This can be worked around by explicitly casting to bool:
188 for ( wxString::const_iterator p = s.begin(); (bool)*p; ++p )
189
190- Virtual wxHtmlParser::AddText() takes wxString, not wxChar*, argument now.
191
192- Functions that took wxChar* arguments that could by NULL in wxWidgets 2.8
193 are deprecated and passing NULL to them won't compile anymore, wxEmptyString
194 must be used instead.
195
196- wxTmemxxx() functions take either wxChar* or char*, not void*: use memxxx()
197 with void pointers.
198
199- Removed insecure wxGets() and wxTmpnam() functions.
200
201- Removed global GetLine() function from wx/protocol/protocol.h, use
202 wxProtocol::ReadLine() instead.
203
204- wxVariant no longer derives from wxObject. wxVariantData also no longer
205 derives from wxObject; instead of using wxDynamicCast with wxVariantData you
206 can use the macro wxDynamicCastVariantData with the same arguments.
207
208- wxWindow::Next/PrevControlId() don't exist any more as they couldn't be
209 implemented correctly any longer because automatically generated ids are not
210 necessarily allocated consecutively now. Use GetChildren() to find the
211 next/previous control sibling instead.
212
213- Calling wxConfig::Write() with an enum value will fail to compile because
214 wxConfig now tries to convert all unknown types to wxString automatically.
215 The simplest solution is to cast the enum value to int.
216
217- Several wxImage methods which previously had "long bitmaptype" parameters
218 have been changed to accept "wxBitmapType bitmaptype", please use enum
219 wxBitmapType in your code.
220
221- wxGridCellEditor::EndEdit() signature has changed and it was split in two
222 functions, one still called EndEdit() and ApplyEdit(). See the documentation
223 of the new functions for more details about how grid editors should be
224 written now.
225
226- wxEVT_GRID_CELL_CHANGE event renamed to wxEVT_GRID_CELL_CHANGED and shouldn't
227 be vetoed any more, use the new wxEVT_GRID_CELL_CHANGING event to do it.
228
229- Now wxWidgets at startup in debug builds checks if all wxEvent-derived classes
230 correctly implement the Clone() function, logging a warning if they don't.
231 A correct implementation for MyCustomEventClass::Clone() is simply:
232 virtual wxEvent *Clone() const { return new MyCustomEventClass(*this); }
233
234- Global wxPendingEvents and wxPendingEventsLocker objects were removed.
235 You may use wxEventLoopBase::SuspendProcessingOfPendingEvents instead of
236 locking wxPendingEventsLocker now.
237
238
239Deprecated methods and their replacements
240-----------------------------------------
241
242- wxCreateGreyedImage() deprecated, use wxImage::ConvertToGreyscale() instead.
243- wxString::GetWriteBuf() and UngetWriteBuf() deprecated, using wxStringBuffer
244 or wxStringBufferLength instead.
245- wxDIRCTRL_SHOW_FILTERS style is deprecated, filters are alwsys shown if
246 specified so this style should simply be removed
247- wxDocManager::MakeDefaultName() replaced by MakeNewDocumentName() and
248 wxDocument::GetPrintableName() with GetUserReadableName() which are simpler
249 to use
250- wxXmlProperty class was renamed to wxXmlAttribute in order to use standard
251 terminology. Corresponding wxXmlNode methods were renamed to use
252 "Attribute" instead of "Property" or "Prop" in their names.
253- wxConnection::OnExecute() is not formally deprecated yet but new code should
254 use simpler OnExec() version which is called with wxString argument
255- Various wxMenuItem methods were deprecated in favour of more consisently
256 named new versions:
257 . GetLabel() is now GetItemLabelText()
258 . GetText() is not GetItemLabel()
259 . GetLabelFromText() is now GetLabelText()
260 . SetText() is now SetItemLabel()
261- wxBrush's, wxPen's SetStyle() and GetStyle() as well as the wxBrush/wxPen
262 ctor now take respectively a wxBrushStyle and a wxPenStyle value instead of a
263 plain "int style"; use the new wxBrush/wxPen style names (wxBRUSHSTYLE_XXX
264 and wxPENSTYLE_XXX) instead of the old deprecated wxXXX styles.
265- EVT_GRID_CELL_CHANGE was deprecated, use EVT_GRID_CELL_CHANGED instead if you
266 don't veto the event in its handler and EVT_GRID_CELL_CHANGING if you do.
267- EVT_CALENDAR_DAY event has been deprecated, use EVT_CALENDAR_SEL_CHANGED.
268- EVT_CALENDAR_MONTH and EVT_CALENDAR_YEAR events are deprecated,
269 use EVT_CALENDAR_PAGE_CHANGED which replaces both of them.
270- wxCalendarCtrl::EnableYearChange() and wxCAL_NO_YEAR_CHANGE are deprecated.
271 There is no replacement for this functionality, it is being dropped as it is
272 not available in native wxCalendarCtrl implementations.
273- wxDC::SetClippingRegion(const wxRegion&) overload is deprecated as it used
274 different convention from the other SetClippingRegion() overloads: wxRegion
275 passed to it was interpreted in physical, not logical, coordinates. Replace
276 it with SetDeviceClippingRegion() if this was the correct thing to do in your
277 code.
278- wxTE_AUTO_SCROLL style is deprecated as it's always on by default anyhow.
279- wxThreadHelper::Create() has been renamed to CreateThread which has a better
280 name for a mix-in class, and allows setting the thread type.
281- wxDos2UnixFilename, wxUnix2DosFilename, wxStripExtension, wxGetTempFileName,
282 wxExpandPath, wxContractPath, wxRealPath, wxCopyAbsolutePath, wxSplitPath
283 were deprecated in favour of wxFileName methods. See docs for more info.
284- wxEvtHandler::TryValidator/Parent() are deprecated, override the new and
285 documented TryBefore/After() methods if you used to override these ones.
286- wxGetMultipleChoices() is deprecated, use wxGetSelectedChoices() which has
287 the same signature but returns -1 and not 0 if the dialog was cancelled.
288
289Major new features in this release
290----------------------------------
291
292- wxWidgets is now always built with Unicode support but provides the same
293 simple (i.e. "char *"-tolerant) API as was available in ANSI build in the
294 past.
295
296- wxWidgets may now use either wchar_t (UTF-16/32) or UTF-8 internally,
297 depending on what is optimal for the target platform.
298
299- New propgrid library containing wxPropertyGrid and related classes.
300
301- Many enhancements to wxDataViewCtrl.
302
303- Event loops, timers and sockets can now be used in wxBase, without GUI.
304
305- Events can now be connected to any functor, not necessarily a method of
306 wxEvtHandler-derived class. The compile-time safety was also improved.
307
308- Documentation for wxWidgets has been converted from LaTex to C++ headers
309 with Doxygen comments and significantly improved in the process (screenshots
310 of various controls were added, more identifiers are now linked to their
311 definition &c). Any reports about inaccuracies in the documentation are
312 welcome (and due to using the simple Doxygen syntax it is now easier than
313 ever to submit patches correcting them! :-)
314
315- Support for persistent objects automatically saving and restoring their state
316 was added.
317
318
3192.9.0
320-----
321
322All:
323
324- Added (experimental) IPv6 support to wxSocket (Arcen).
325- Cleaned up wxURI and made it Unicode-friendly.
326- Add support for wxExecute(wxEXEC_ASYNC) in wxBase (Lukasz Michalski).
327- Added wxXLocale class and xlocale-like functions using it.
328- Allow loading message catalogs from wxFileSystem (Axel Gembe).
329- Added wxMessageQueue class for inter-thread communications
330- Use UTF-8 for Unicode data in wxIPC classes (Anders Larsen)
331- Added support for user-defined types to wxConfig (Marcin Wojdyr).
332- Added numeric options support to wxCmdLineParser (crjjrc)
333- Added wxJoin() and wxSplit() functions (Francesco Montorsi).
334- Added wxDateTime::FormatISOCombined() and ParseISODate/Time/Combined()
335- Added wxMutex::LockTimeout() (Aleksandr Napylov).
336- Added wxMemoryInputStream(wxInputStream&) ctor (Stas Sergeev).
337- Implemented wxMemoryInputStream::CanRead().
338- Implemented wxMemoryFSHandler::FindFirst/Next().
339- Added wxEventLoop::DispatchTimeout().
340- Added wxZlibStream::SetDictionary() (Axel Gembe).
341- Added wxEXEC_BLOCK flag (Hank Schultz).
342- Add support for wxStream-derived classes to wxRTTI (Stas Sergeev).
343- Added wxStreamBuffer::Truncate() (Stas Sergeev).
344- Allow using wxEventLoop in console applications (Lukasz Michalski).
345- Added functions for Base64 en/decoding (Charles Reimers).
346- Added support for binary data to wxConfig (Charles Reimers).
347- Added functions for atomically inc/decrementing integers (Armel Asselin).
348- wxLogInterposer has been added to replace wxLogPassThrough and new
349 wxLogInterposerTemp was added.
350- Added support for broadcasting to UDP sockets (Andrew Vincent).
351- Documentation now includes the wx library in which each class is defined.
352- wxrc --gettext now generates references to source .xrc files (Heikki
353 Linnakangas).
354- wxVariant::Unshare allows exclusive allocation of data that must be shared,
355 if the wxVariantData::Clone function is implemented.
356- Added wxWeakRef<T>, wxScopedPtr<T>, wxScopedArray<T>, wxSharedPtr<T> templates
357 and renamed old wx/ptr_{scpd,shrd}.h headers to wx/scoped{ptr,array}.h and
358 wx/sharedptr.h (but old headers are still provided for compatibility).
359- Added wxVector<T> class templates
360- Added wxON_BLOCK_EXIT_SET() and wxON_BLOCK_EXIT_NULL() to wx/scopeguard.h.
361- Added wxEvtHandler::QueueEvent() replacing AddPendingEvent() and
362 wxQueueEvent() replacing wxPostEvent().
363- wxString now uses std::[w]string internally by default, meaning that it is
364 now thread-safe if the standard library provided with your compiler is.
365- Added wxCmdLineParser::AddUsageText() (Marcin 'Malcom' Malich).
366- Fix reading/writing UTF-7-encoded text streams.
367- Corrected bug in wxTimeSpan::IsShorterThan() for equal time spans.
368- Use std::unordered_{map,set} for wxHashMap/Set if available (Jan van Dijk).
369- Added wxString::Capitalize() and MakeCapitalized().
370- Added wxArray::swap().
371- Added wxSHUTDOWN_LOGOFF and wxSHUTDOWN_FORCE wxShutdown() flags (troelsk).
372- Added wxSocket::ShutdownOutput().
373- Handle exceptions thrown from overridden wxView::OnCreate() gracefully.
374- Added wxPATH_RMDIR_FULL/RECURSIVE wxFileName::Rmdir() flags (Marcin Malich).
375- Added wxStandardPaths::GetAppDocumentsDir().
376- Added wx-prefixed versions of DECLARE_NO_{COPY,ASSIGN}_CLASS macros.
377- Added wxFileName::ReplaceEnvVariable and wxFileName::ReplaceHomeDir.
378- Added wxProtocol::SetDefaultTimeout(); the default timeout for both wxHTTP and wxFTP
379 protocols is 60 seconds.
380- Added wxStrnlen() for safe computation of string length.
381- Added wxImage::Clear() (troelsk).
382- Added wxLog::Log().
383- Added wxProtocolLog and use it in wxFTP.
384- Added wxXmlResource::GetResourceNode().
385- Optimize wxString::Replace() to use an O(N) algorithm (Kuang-che Wu).
386- Added support of %l format specifier to wxDateTime::ParseFormat().
387- wxImage handlers can now support multiple extensions (Ivan Krestinin).
388- Added wxFileName::StripExtension() (troelsk).
389- Added wxLOCALE_DATE/TIME_FMT support to wxLocale::GetInfo().
390
391All (Unix):
392
393- Added wx-config --optional-libs command line option (John Labenski).
394- Noticeably (by a factor of ~150) improve wxIPC classes performance.
395- Configure options --with-opengl and --enable-mediactrl now default to "auto":
396 if OpenGL and GStreamer libraries are available the "gl" and "media" wx libraries
397 are automatically built.
398
399All (GUI):
400
401- Added wxDataViewCtrl class and helper classes.
402- Integrated wxPropertyGrid in wxWidgets itself (Jaakko Salli).
403- Provide native implementation of wxCalendarCtrl under wxMSW and wxGTK.
404- Added wxHeaderCtrl and allow using it in wxGrid.
405- Added wxRearrangeList, wxRearrangeCtrl and wxRearrangeDialog.
406- Added {wxTextCtrl,wxComboBox}::AutoComplete() and AutoCompleteFileNames().
407- Added wxH[V]ScrolledWindow (Brad Anderson, Bryan Petty).
408- Added wxNotificationMessage class for non-intrusive notifications.
409- Added wxWindow::Show/HideWithEffect().
410- Added wxWrapSizer (Arne Steinarson).
411- Added wxSpinCtrlDouble (John Labenski).
412- Support custom labels in wxMessageDialog (Gareth Simpson for wxMac version).
413- Added wxScrolledWindow::ShowScrollbars().
414- Also added wxCANCEL_DEFAULT to wxMessageDialog.
415- Allow copying text in the log dialogs.
416- Added multisample (anti-aliasing) support to wxGLCanvas (Olivier Playez).
417- Added wxEVT_COMMAND_COMBOBOX_DROPDOWN/CLOSEUP events (Igor Korot).
418