Just use the native ::MapWindowPoints() to do the coordinate transformation
instead of doing it ourselves: we did it wrongly by inheriting the layout
direction from wxTheApp instead of from the parent window, so fix this in the
best possible way by not doing it at all and just relying on Windows to do it
for us.
In particular, this corrects the display of wxStatusBar in RTL frames.
Closes#15031.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76980 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
The keyboard handling code could decide to activate a button which wasn't
currently visible at all, e.g. because it was on a non-current, and hence
hidden, page of a wxBookCtrl. This didn't make any sense, so check for the
button visibility before activating it.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76978 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Ensure that the table pointer inside wxGrid is updated before initializing the
native column header as it uses wxGrid::GetColLabelValue() which doesn't work
correctly without a valid table pointer.
Closes#16399.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76975 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Contrary to the documentation, wxEventBlocker always behaved as if the
event type to block was wxEVT_ANY: while it returned false for events
not on the blacklist, it never actually called the existing event
handler as it was meant to.
Fix by calling wxEvtHandler::ProcessEvent() in this case.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76973 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't rely on the static global gs_perfCounter being already initialized when
wxStopWatch::DoStart() is called, this may not be the case if wxStopWatch
variable is global.
Work around this by wrapping the variable inside a function to ensure that it
is initialized before being used.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76959 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Update the bounding box in all the methods drawing something. This wasn't
done before in many of them, resulting in the bounding box remaining empty,
but it is updated now and a new test checking that it is was added.
Closes#12904.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76954 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Handle WM_CTLCOLOR correctly for them, this wasn't done before because the
code assumed that sub-windows (i.e. HWNDs which belong to the same logical wx
control) were always children of the main window, but they could also be its
siblings (like in at least the two above mentioned cases).
Account for this case in wxControl::DoMSWControlColor() too now.
Closes#12271.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76950 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Repair (too late?) the ABI breakage for all the language constants following
wxLANGUAGE_KABYLE in alphabetical order by adding this enum element at the end
of the enum instead of in the middle.
Also add wxLANGUAGE_KABYLE to langtabl.txt so that it doesn't disappear when
the generated fragments are updated by running misc/languages/genlang.py the
next time.
This corrects/supersedes r75753.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76871 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This is similar to r76093 for wxGenericTreeCtrl and fixes a similar problem:
clicking in a wxListCtrl inside wxNotebook confused GtkNotebook mouse tracking
logic because it didn't get some events.
Closes#16365.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76822 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This fixes problems with parallel builds in Visual Studio 2012 or 2013 IDE as
multiple projects may try to copy setup.h file at once, resulting in errors.
Use _custom_build project as a common dependency to ensure that the copy step
is done only once.
This is a backport of r76419 from trunk, see #16177.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76819 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Amend the changes of r76803 to only avoid QuickTime framework when using
Cocoa, under Carbon it's needed by wxSound too, and not only wxMediaCtrl, and
there is no real reason to avoid it in the first place anyhow.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76816 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Check for the length of the buffer to determine whether the conversion failed
instead of checking whether it's NULL because this is currently never the case
because of the code in wxString::AsCharBuf() which returns "" and not NULL in
case of conversion failure.
This at least eliminates silent data loss when saving data that can't be
converted to the current locale encoding.
Closes#16348.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76793 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
We already have the length of the string, either in the buffer if we actually
converted the string from Unicode to multi-byte, or in the string itself in
non-Unicode build.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76792 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This doesn't work if the global C++ locale had been changed and we can't call
imbue(locale::classic()) to ensure that the stream we use here uses the C
locale because imbue() is hopelessly broken in some implementations.
So just get rid of this code and keep only the hack replacing the decimal
separator with the dot explicitly. This is ugly but should always work in
practice and is also consistent with ToCDouble().
Closes#16343.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76791 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Don't use "size" variable unnecessarily under non-Mac platforms, this also
fixes a warning about reassigning it immediately after assigning a previous
values to it under Mac.
Closes#16353.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76788 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Fix warnings appearing when building with --disable-debug under Unix by
either referencing the parameters or variables which become unused then,
because wxLogTrace() calls are compiled out, or by not compiling the code
whose only purpose is to call wxLogTrace() at all.
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76787 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
Back in #8101 I made fixes for wxStaticBox and right-to-left handling under Windows.
While this worked fine in wx2.8, the old patch has some unfortunate consequences on wx3:
* Since the box is always set to LTR, its children also inherit LTR
* Text was always right-aligned
This follow-up patch removes the RTL-specific code from wxStaticBox. Instead, the wxMemoryDC in wxStaticBox::OnPaint is made to inherit attributes from the wxPaintDC.
Tested on XP (both XP and classic theme), Windows 7 and 8.1
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/branches/WX_3_0_BRANCH@76782 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775