]> git.saurik.com Git - wxWidgets.git/blame - docs/changes.txt
IsSubMenu() not listed - bug #921648.
[wxWidgets.git] / docs / changes.txt
CommitLineData
c4839ccf
JS
1------------------------
2wxWidgets 2.5 Change Log
3------------------------
d643b80e
VZ
4
5INCOMPATIBLE CHANGES SINCE 2.4.x
6================================
7
e441e1f4
VZ
8 Please take a few minutes to read the following list, especially
9 paying attention to the most important changes which are marked
10 with '!' in the first column.
11
12 Also please note that you should ensure that WXWIN_COMPATIBILITY_2_4
13 is defined to 1 if you wish to retain maximal compatibility with 2.4
14 series.
15
16! windows are no longer fully repainted when resized, use new style
44db04e4 17 wxFULL_REPAINT_ON_RESIZE to force this (wxNO_FULL_REPAINT_ON_RESIZE still
e441e1f4
VZ
18 exists but doesn't do anything any more, this behaviour is default now)
19
a2bd1520 20! wxWindow::m_font and m_backgroundColour/m_foregroundColour are no longer
495f877d
RD
21 always set, use GetFont(), GetBack/ForegroundColour() to access
22 them, and they will be dynamically determined if necessary.
23
24
25! The Sizers have had some fundamental internal changes in the 2.5.2
26 and 2.5.3 releases intended to make them do more of the "Right
27 Thing" but also be as backwards compatible as possible. First a bit
28 about how things used to work:
29
30 * The size that a window had when Add()ed to the sizer was assumed
31 to be its minimal size, and that size would always be used by
32 default when calculating layout size and positions, and the
33 sizer itself would keep track of that minimal size.
34
35 * If the window item was Add()ed with the wxADJUST_MINSIZE flag
36 then when layout was calculated the item's GetBestSize would be
37 used to reset the minimal size that the sizer used.
38
39 The main thrust of the new Sizer changes was to make behaviour like
40 wxADJUST_MINSIZE be the default, and also to push the tracking of
41 the minimal size to the window itself (since it knows its own needs)
42 instead of having the sizer take care of it. Consequently these
43 changes were made:
44
45 * The wxFIXED_MINSIZE flag was added to allow for the old
46 behaviour. When this flag is used the size a window has when
47 Add()ed to the sizer will be treated as its minimal size and it
48 will not be readjusted on each layout.
49
50 * The min size stored in wxWindow and settable with SetSizeHints or
51 SetMinSize will by default be used by the sizer (if it was set)
52 as the minimal size of the sizer item. If the minsize was not
53 set (or was only partially set) then the window's best size is
54 fetched and it is used instead of (or blended with) the minsize.
55 wxWindow:GetBestFittingSize was added to facilitate getting the
56 size to be used by the sizers.
57
58 * The best size of a window is cached so it doesn't need to
dbd94b75 59 recalculated on every layout. wxWindow::InvalidateBestSize was
495f877d
RD
60 added and should be called (usually just internally in control
61 methods) whenever something is done that would make the best
62 size change.
63
64 * All wxControls were changed to set the minsize to what is passed
65 to the constructor or Create method, and also to set the real
66 size of the control to the blending of the minsize and bestsize.
67 wxWindow::SetBestFittingSize was added to help with this,
68 although most controls don't need to call it directly because it
69 is called indirectly via the SetInitialSize called in the base
70 classes.
71
72 At this time, the only situation known not to work the same as
73 before is the following:
74
f5e0b4bc
WS
75 win = new SomeWidget(parent);
76 win->SetSize(SomeNonDefaultSize);
77 sizer->Add(win);
495f877d
RD
78
79 In this case the old code would have used the new size as the
80 minimum, but now the sizer will use the default size as the minimum
81 rather than the size set later. It is an easy fix though, just move
82 the specification of the size to the constructor (assuming that
83 SomeWidget will set its minsize there like the rest of the controls
84 do) or call SetMinSize instead of SetSize.
85
86 In order to fit well with this new scheme of things, all wxControls
87 or custom controls should do the following things. (Depending on
88 how they are used you may also want to do the same thing for
89 non-control custom windows.)
90
91 * Either override or inherit a meaningful DoGetBestSize method
92 that calculates whatever size is "best" for the control. Once
93 that size is calculated then there should normally be a call to
94 CacheBestSize to save it for later use, unless for some reason
95 you want the best size to be recalculated on every layout.
96
97 * Any method that changes the attributes of the control such that
98 the best size will change should call InvalidateBestSize so it
99 will be recalculated the next time it is needed.
100
101 * The control's constructor and/or Create method should ensure
102 that the minsize is set to the size passed in, and that the
103 control is sized to a blending of the min size and best size.
104 This can be done by calling SetBestFittingSize.
105
459c6212 106! wxURL has undergone some radical changes.
a2bd1520 107
459c6212 108 * Many accessors of wxURL - GetHostName, GetProtocolName, and GetPath,
997ba01b
RN
109 have been replaced by its parent's (wxURI) counterparts - GetServer,
110 GetScheme, and GetPath, respectively.
459c6212 111
997ba01b
RN
112 * ConvertToValidURI has been replaced by wxURI. Do not use
113 ConvertToValidURI for future applications.
e441e1f4 114
459c6212
RN
115 * ConvertFromURI has been replaced by wxURI::Unescape.
116
9b9d4651
VZ
117- no initialization/cleanup can be done in wxApp/~wxApp because they are
118 now called much earlier/later than before; please move any exiting code
119 from there to wxApp::OnInit()/OnExit()
fba61bdf 120- also, OnExit() is not called if OnInit() fails
527bbb39 121- finally the program exit code is OnRun() return value, not OnExit() one
26ab89ad 122- wxTheApp can't be assigned to any longer, use wxApp::SetInstance() instead
32b38f99 123- wxFileType::GetIcon() returns wxIconLocation, not wxIcon
bfdc04a9 124- wxColourDatabase is not a wxList any more, use AddColour to add new colours
5da0803c 125- wxWindow::Clear() is now called ClearBackground()
480e5897 126- pointer returned by wxFont::GetNativeFontInfo() must not be deleted now
bfdc04a9 127- wxMouseEvent::Moving() doesn't return true if mouse is being dragged any more
bfdc04a9
VZ
128- (most) controls now inherit parents colours by default, override
129 ShouldInheritColours() to return false if you don't want this to happen
dfcb9d7c 130- wxApp::SendIdleEvent() now takes 2 arguments
d366db96
MB
131- wxTabView::GetLayers() changed return type from wxList& to wxTabLayerList&
132 (when WXWIN_COMPATIBILITY_2_4 == 0)
6e76b35d 133- wxID_SEPARATOR (id used for the menu separators) value changed from -1 to -2
25959b95 134- wxGetNumberFromUser() is now in separate wx/numdlg.h, not wx/textdlg.h
d99957b6
VZ
135- wxChoice and wxCombobox now handle their size in the same way as in all the
136 other ports under MSW, new code is actually correct but different from weird
137 stuff they were doing before so the behaviour of your programs might change
1e6d9c20
VS
138- wxTaskBarIcon objects must now be destroyed before the application can exit.
139 Previously, the application terminated if there were no top level windows;
140 now it terminates if there are no top level windows or taskbar icons left.
4c68a102 141- wxZlibInputStream is not by default compatible with the output of the
dbd94b75 142 2.4.x version of wxZlibOutputStream. However, there is a compatibility mode,
4c68a102 143 switched on by passing wxZLIB_24COMPATIBLE to the constructor.
6e86701b
MB
144- when WXWIN_COMPATIBILITY_2_4 == 0 wxHashTable uses a new implementation
145 not using wxList keyed interface (the same used when wxUSE_STL == 1),
146 the only incompatibility being that Next() returns a wxHashTable::Node*
147 instead of a wxNode*.
55e9fa68 148- non-const wxDC methods GetBackground(), GetBrush(), GetFont() and GetPen()
90287048
VS
149 as well as wxWindow methods GetFont() and GetCursor() don't exist any more,
150 please fix your code -- it never worked correctly anyhow if you modified the
151 objects returned by these methods so you should simply switch to using const
152 methods.
87fb0be4 153- wxWindow::GetFont() now returns wxFont object instead of reference
e1633ef9
VS
154- EVT_XXX macros are now type-safe; code that uses wrong type for event
155 handler's argument will no longer compile.
daf32463
WS
156- Identical functionality of wxFileDialog::ParseWildcard,
157 wxGenericDirCtrl::ParseFilter, Motif and MSW parsing native dialogs
158 is now accessible in ::wxParseCommonDialogsFilter
0f9dff88 159- wxNotebookSizer and wxBookCtrlSizer are now deprecated -- they are no longer
adbf2d73
VS
160 needed, you can treat wxNotebook as any other control and put it directly
161 into the sizer that was wxNotebookSizer's parent sizer in old code.
93e0db9a
VZ
162- wxFile methods now return either wxFileOffset or wxFileSize_t which may be a
163 64 bit integer type, even on 32 bit platforms, instead of off_t and so the
164 return value of wxFile::Length(), for example, shouldn't be assigned to off_t
165 variable any more (the compiler might warn you about this)
0d01dd51
VZ
166- wxListItem::m_data is now of type wxUIntPtr, not long, for compatibility
167 with 64 bit systems
56eee37f
WS
168- wxSizer::Add/Insert returns pointer to wxSizerItem just added so conditions
169 writeen with if(Add(..)==true) will not work. Use if(Add(..)) instead.
5e2ab1ea 170
09c6a817 171
9b9d4651
VZ
172DEPRECATED METHODS SINCE 2.4.x
173==============================
09c6a817 174
fc2171bd 175Deprecated methods may still be used but will disappear in future wxWidgets
09c6a817
VZ
176versions, please update your code to not use them.
177
459c6212
RN
178- wxURL::GetInputStream() and similar functionality has been depreciated in
179 favor of other ways of connecting, such as though sockets or wxFileSystem.
7af6b69e 180- wxDocManager::GetNoHistoryFiles() renamed to GetHistoryFilesCount()
09c6a817
VZ
181- wxSizer::Remove(wxWindow *), use Detach() instead [it is more clear]
182- wxSizer::Set/GetOption(): use Set/GetProportion() instead
183- wxKeyEvent::KeyCode(): use GetKeyCode instead
184- wxList::Number, First, Last, Nth: use GetCount, GetFirst/Last, Item instead
185- wxNode::Next, Previous, Data: use GetNext, GetPrevious, GetData instead
186- wxListBase::operator wxList&(): use typesafe lists instead
ba8c1601
MB
187- wxTheFontMapper: use wxFontMapper::Get() instead
188- wxStringHashTable: use wxHashMap instead
189- wxHashTableLong: use wxHashMap instead
fc2171bd 190- wxArrayString::GetStringArray: use wxCArrayString or alternative wxWidgets
584ad2a3 191 methods taking wxArrayString
ba8c1601 192- wxArrayString::Remove(index, count): use RemoveAt instead
df3b5898 193- wxTreeItemId conversion to long is deprecated and shouldn't be used
207e6243
VZ
194- wxTreeCtrl::GetFirst/NextChild() 2nd argument now has type wxTreeItemIdValue
195 and not long, please change declarations of "cookie"s in your code
196 accordingly -- otherwise your code won't work on 64 bit platforms
35821d8f
VZ
197- [MSW only] wxWindow::GetUseCtl3D(), GetTransparentBackground() and
198 SetTransparent() as well as wxNO_3D and wxUSER_COLOURS styles
080a7b20 199- wxList keyed interface: use wxHashMap instead
dfcb9d7c 200- wxColourDatabase::FindColour(): use Find() instead (NB: different ret type)
d366db96
MB
201- wxHashTable::Next: use wxHashTable::Node* or
202 wxHashTable::compatibility_iterator to store the return
203 value
4a3990e2 204- wxWave class; use wxSound instead
ba443432
JS
205- The wxHIDE_READONLY flag for wxFileDialog was not implemented
206 and has now been removed
6bba4b8a 207- wxTaskBarIcon::OnXXX() virtual methods: use events instead
8e254d94 208- obsolete and not used wxUSE_GENERIC_DIALOGS_IN_MSW has been removed
b4e0b521 209- wxDbTable::wxDbTable with wxChar* deprecated, same with wxString& instead
dfcb9d7c 210
7af6b69e 211
d643b80e
VZ
212OTHER CHANGES
213=============
214
19b65a30
VZ
2152.5.4
216-----
217
a22d4c5c
VZ
218All:
219
c4e05385 220