Use the same scaling function as elsewhere instead of using
ceil/floor().
Provide wxRescaleCoordWithFrom specialization for int to allow using it
with just single coordinates too.
They're probably not that useful in application code, which should just
use wxDPIChangedEvent::Scale() instead, so move them to a private
header instead of making them part of the public API.
This is more concise and less error-prone than multiplying/dividing DPI
values manually.
No real changes except, maybe, in wxSlider code where the rounding was
done differently before for some reason.
Using numbered lists with multiline items doesn't work in Markdown, so
remove it.
Also put the "IDE" part of the instructions before the "command line"
one, as it is probably use much more commonly.
No real changes to contents.
This wrapper simply combines the calls to MakeAbsolute() and
GetFullPath(), but using it results in shorter and more clear code, so
it seems to be worth having.
Using wxFileName::Normalize() with default flags could be surprising and
result in bugs in the code, as shown by our own wrong use of it in
wxFileSystemWatcher corrected in the previous commit.
Deprecate using it without any flags and recommend using MakeAbsolute()
instead.
Also improve the related parts of the documentation.
Unlike the parent commit, this one does change the behaviour by not
applying some normalizations any more, but these changes are correct,
i.e. we really don't need to call Normalize(), which expands environment
variables in the file names by default, here and just want to make the
file paths absolute.
In particular, this fixes the problem of mangling file names containing
dollar signs in wxFileSystemWatcher.
Closes#19214.
This gcc version claims support for this attribute, but actually doesn't
support it and returns unclear errors when it is used, e.g.
$ echo '[[deprecated]] int x;' | g++-5 -fsyntax-only -x c++ -
<stdin>:1:1: error: expected unqualified-id before ‘[’ token
so disable its use with gcc < 6.
Add yet another wxDEPRECATED_XXX macro, this one simply expanding to
C++14 [[deprecated]] attribute if it's available and nothing otherwise.
It's a bit ridiculous to have so many different macros for deprecating
things, but the new one is useful because the standard attribute can be
used to deprecated enum elements, which is impossible with MSVC-specific
__declspec(deprecated).
This is not necessary any longer since the changes of 1b76ff4887
(Disable wxWebRequest tests on CI platforms without Python 3,
2021-05-16) as we require Python 3 for httpbin anyhow.
In wxUniv wxComboBox does derive from wxComboCtrl, but its wxRTTI
doesn't use wxComboCtrl as the base class for consistency with the other
ports, meaning that wxDynamicCast() to wxComboCtrl fails.
Avoid this problem by storing wxComboCtrl in wxComboPopupWindow, as then
we can just use it later without any casts -- at the price of storing an
extra pointer in a transient object, i.e. without any real cost.
See https://github.com/wxWidgets/wxWidgets/pull/2418
This seems to work fine with current version of wxPopupTransientWindow
and wxPU_CONTAINS_CONTROLS style and allows to drastically simplify the
whole mess of preprocessor checks in wxComboCtrl code, reducing the
logic to just 2 cases: either wxUSE_POPUPWIN == 1 under any of the major
platforms and then we use wxPopupTransientWindow or wxUSE_POPUPWIN == 0
or we use some other platform and then a TLW-based fallback is used
instead.
In spite of the amount of changes, this should only modify behaviour
under MSW where wxPopupTransientWindow is used now instead of whatever
was used before.
Simplify the code by removing TEXTCTRL_TEXT_CENTERED, it was only set to
1 for "other" (i.e. not one of the main ones) platforms and if it's
really a problem for them, which is not even certain, the solution is to
fix them rather than to uglify common code.
This is not as much of a simplification as the previous two commits
because there is no simple replacement of EVT_MOUSE_EVENTS() using
Bind() and a loop over all mouse event types has to be written
explicitly, but it still avoids the need to allocate and delete a
separate object, so is still worth it.
There is no need to use a separate wxEvtHandler here when we can just
use Bind() to directly handle the child text control events in
wxComboCtrlBase itself, this code was a left over from pre-wx3 days.
No real changes, just make the code simpler and smaller (and also
marginally more efficient at run-time).
This function was always called after calling CreateTextCtrl() and
couldn't be called at any other moment, so it didn't make much sense to
have it as a separate function, just install the custom input handler
when (re)creating the text control.
This simplifies the derived classes code.
Don't use wxClientDC in WM_NCCALCSIZE handler as creating it results in
another WM_NCCALCSIZE in wxUniv due to the call to DoSetClippingRegion()
in its wxClientDCImpl::InitDC().
Using simple WindowHDC is also a small performance gain and is all that
we need as we just need some HDC for this window and should have
probably been done like this even back in a047aff270 (Added
wxBORDER_THEME..., 2007-08-07) in which handling WM_NCCALCSIZE was
added.
Closes#19221.
We don't need to cater for gcc < 3.1 any longer and can just use
-single_module option unconditionally.
This is simpler and avoids spurious errors about "unknown option" when
using -fsanitize=xxx in LDFLAGS from the script.