This results in a single intelligible error instead of a hundred of less
clear ones in case our code is compiled against an out of date SDK
version.
There doesn't seem to be any way to check the version directly, so just
check that the interface which hadn't been defined in the previous
version is defined now to check for it indirectly.
Instead of using a single test case, with multiple sections, generated
by CppUnit compatibility macros, use multiple independent test cases.
This makes it more convenient to run individual tests, simplifies the
code and allows to get rid of ugly "pseudo tests".
It is convenient to have this function if only in order to be able to
call GetGridColHeader() safely, i.e. without triggering an assert if
native header is not being used.
This is appropriate for single selection, where the selected item is
also always the focused one, but not in the multiple selection case.
And wxMSW native version already behaves like this, so this makes the
generic one consistent with it.
Closes#18691.
The behaviour of these functions for the tools containing controls is
counter-intuitive but changing it now would silently break existing code
working around the current semantics, so just document it instead.
See #16552.
When the bitmap is larger than the draw area, it should be resized. Do this by
providing the correct size parameters for ID2D1RenderTarget::DrawBitmap.
Also update DrawBitmap code guarded with wxD2D_DEVICE_CONTEXT_SUPPORTED so it
will compile successfully when enabled. However, the drawing behaviour is,
and was, different from the normal behaviour. It does not resize the bitmap.
Closes#18686
Since it appears it's not possible to create DirectWrite fonts with
IDWriteGdiInterop::CreateFontFromLOGFONT() for fonts registered with
AddFontResourceEx() as private ones (with FR_PRIVATE flag), we need to
maintain a custom DirectWrite font collection and use it as source of
font data if call to CreateFontFromLOGFONT() fails. This collection
consists of IDWriteFontFileEnumerator and IDWriteFontCollectionLoader
objects which are seeded with font data based on the private fonts list
taken from wxGetPrivateFontFileNames().
Closes https://github.com/wxWidgets/wxWidgets/pull/1753Closes#18687.
Avoid using plenty of intermediate macros, which made the code quite
difficult to understand and just wxDO_IF() helper directly instead.
This makes individual macros definitions slightly longer, but allows to
get rid of several helper macros, so the total number of lines is
actually smaller but, more importantly, the new code is much easier to
parse for a human reader.
This file is never compiled with wxUSE_GUI==1, so having these tests
here is not really useful.
It's unfortunately that the absence of warnings from wxLogStatus() is
not checked currently, but it doesn't seem worth recompiling the entire
test case or adding a new one just for this.
The comment suggested Get{First,Next,Prev,Last}Line() should be changed
to const functions once compilers understand the 'mutable' keyword.
Hopefully now, after 19 years, compilers do understand the 'mutable'
keyword, but regardless of that the functions should not be const, as
they very clearly modify the state of the object that is observable
through the public interface.
Closes https://github.com/wxWidgets/wxWidgets/pull/1750
Preserve the file mode when replacing it, this notably keeps
docs/doxygen/regen.sh executable when running misc/scripts/inc_year.
This uses GNU chmod --reference option which is not available on all
systems, but it shouldn't be a problem in practice.
This should fix builds that terminate due to: job exceeded the maximum
log length and generally make Xcode build logs more readable and useful.
Closes https://github.com/wxWidgets/wxWidgets/pull/1747
At least one WM (KDE's KWin) does not generate X11 configure events when dragging
a window using gtk_window_begin_move_drag(). We need the configure events so we
can generate wxMoveEvent, which AUI needs in order to re-attach a floating pane.
This is functionally a revert of b8789b9d6f for backends other than Wayland.
See #18372#18669