This ensures that the value returned from GetFieldRect() is always up to date,
even when this method is called from the user-defined wxEVT_SIZE handler, i.e.
before our own OnSize() could run.
Also remove the now unneeded hack with calling the base class OnSize() from
the statbar sample.
Closes#14268.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71365 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
wxFileCtrl -- which can be #define'd as wxGenericFileCtrl -- is documented to
inherit from wxControl and does derive from it in the native GTK version, so
do it for the generic version too.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71362 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Explain that catching mouse events directly doesn't work.
Also make it clear that double clicking an item can be caught by processing
wxEVT_COMMAND_DATAVIEW_ITEM_ACTIVATED.
See #14111.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71361 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't put statements before variable declaration in C source file. This fixes
compilation with non C99-compliant C compilers such as MSVC.
See #14224.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71359 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It is wrong to use dir.GetName()+"/" to obtain a slash-terminated directory
name as this results in (usually harmless but at best ugly) double slashes at
at the beginning of the string for the root directory. Add GetNameWithSep() to
obtain the correct result in all cases.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71355 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
For some reason (rename of the old wxTHICK_FRAME to wxRESIZE_BORDER?) we
tested for wxRESIZE_BORDER twice in a couple of places. Don't do it for
clarity.
Closes#14264.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71345 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
When using comctl32.dll versions older than 6.0 toolbar icons would not have their background drawn. Fix this in a rough way by always completely erasing the background like was done before. Regression since r62971.
Closes#13512.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71341 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Have an explicit per-column dirty flag and use that to determine whether
we need to call wxHeaderCtrl::UpdateColumn(). Previously, the lack of
computed best width was used as an indicator, but this didn't work
correctly if some code called GetWidth() after invalidation but before
wxDataViewCtrl::UpdateColWidths() was called at idle time. This resulted
in header's column widths getting out of sync with the control itself.
Fixes#14167.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71335 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The best column widths are computed from "realized" items that are
available as rows in wxDataViewCtrl. This information changes when a
previously collapsed node is expanded and new items become available for
column width calculation.
Fixes#14167.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71334 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Changes of r71304 broke the event loop termination under MSW, limit them to
only the case in which they were really needed, i.e. when loop is really
exited by a pending event handler.
This is only a temporary solution, we need something better in longer term.
See #14250.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71329 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Add wxDataViewCtrlInternal::ShouldBeSorted() helper instead of testing for
both IsSorted() and wxDataViewModel::HasDefaultCompare() in several places.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71327 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This change doesn't actually change anything for the "normal" ports as it only
affects wxGTK/MSW which is not officially supported yet, so the make/project
files are unchanged by it.
Closes#14249.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71325 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow specifying the drag operation flags and retrieving the drop effect when
it's over for wxDataViewCtrl drag-and-drop.
Currently this is only implemented in the generic version.
Closes#12583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71324 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Allow wxEVT_COMMAND_DATAVIEW_ITEM_DROP_POSSIBLE handler to examine the data
being dragged by setting not only the pointer to it but also its size, as
otherwise it's impossible to do anything with it.
See #12583.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71323 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
They were mentioned in DoDragDrop() documentation but not documented on their
own. Do it now to be able to refer to them from elsewhere.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71322 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
SetDataXXX() methods are only meant to be used by wxDataViewCtrl itself, so
don't document them as part of public API. Their documentation was pretty
useless anyhow as it didn't say anything not already contained in the method
name.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71321 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The wxID_PREVIEW labels were accidentally removed in r68641 and added back
with a wrong/different label later. Restore the same one (or almost, just add
an ellipsis at the end) that was used in 2.8.
Closes#13906.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71320 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
There is a problem with the native header control still having the mouse
capture when the grid is destroyed in wxGTK and this resulted in asserts when
destroying the grid, nested asserts due to an exception being thrown from a
dtor and finally abort that prevented the rest of the tests from running.
As I failed to find the real reason for this problem, just forcefully ensure
that we don't have the mouse capture when destroying the grid. This at least
allows the complete test suite to run.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71319 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
If an assert occurred while handling an exception generated by a previous
assert handler, the information about the original assert was lost even if
though it was more important than the secondary assert. Do preserve and show
the original assert message in this case now.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71318 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Due to a bug in wxDateTime::ParseFormat(), calling it with wxString::c_str()
currently just crashes, so don't do this in generic wxDateTimePickerCtrl code.
The real fix is, of course, to correct the bug in wxDateTime itself but for
now this at least prevents the crash when executing the test suite. And using
c_str() here is unnecessary anyhow.
See #14214.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71317 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This does the same thing as r70018 did for wxMSW but for wxGTK, i.e. it keeps
the combo box item selected when its text is modified.
This fixes [Bitmap]ComboBox unit tests under wxGTK.
See #13769.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71316 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was disabled because it wasn't implemented for wxGTK at some time in the
past -- but it is implemented now, so there is no reason to not allow testing
it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71315 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Replace the changes of r69938 with an alternative and simpler solution:
instead of playing games with gs_pendingFocus, which could break down if its
old value became invalid while the menu was shown as happened if one of the
menu commands resulted in this window being destroyed, just take the currently
shown popup menu into account in DoFindFocus() itself.
This should be safer as there is no danger of any dangling pointers here and
is also simpler and more obviously correct.
Closes#14103.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71313 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
It was impossible to specify the flags when creating wxNotificationMessage in
wxMSW, cotrary to the other ports and the documentation.
Fix this by adding the missing argument to the ctor and simply passing it to
the base class one, we don't have to do anything else as the existing code
already calls GetFlags() later so it should respect these flags without any
more changes.
Closes#14245.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71312 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This resulted in keeping a dangling pointer to the group line in
wxFileConfigGroup and any attempt to use it after this resulted in a crash.
Fix this by explicitly resetting the last line in this case.
Also add a unit test for this scenario.
Closes#14243.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71311 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use typedef for these classes as it makes it impossible to
forward-declare them, just use #define instead as we already do for
wxListbookEvent and wxNotebookEvent. This allows forward declaration and is
also more consistent.
Closes#12242.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71310 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The native GTK implementation is not used in wxUniv/GTK, so don't exclude the
generic one as well.
Notice that the same should be done for wxMSW and wxOSX too but we currently
seem to use the native version even in wxUniv there. It would be better to
consistently use the generic version in all wxUniv ports.
Closes#14236.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71309 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is not only unnecessary but also can result in a kind of infinite loop
when wxTextEntry::SetValue() is called from wxEVT_IDLE handler as really
modifying the text results in another wxEVT_IDLE being generated and another
call to SetValue() and so on while not doing it in the first place completely
works around the problem and is also more efficient.
Closes#13936.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71308 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Some of the tests that were previously ran for single or multi-line controls
only actually apply to both of them, so run them for both kinds of control to
test that both of them work correctly.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@71307 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775