This makes the code more readable, even though it almost doubles its
size -- but the corresponding reduction in the number of preprocessor
checks is still worth it.
This makes src/unix/displayx11.cpp almost readable as it's not littered
by "#ifndef __WXGTK20__" checks everywhere any more -- instead this file
is just not compiled as part of wxGTK2 at all any longer (it is still
included in wxGTK1 as well as wxX11 itself and wxMotif).
wxGTK code also can just include the new wx/unix/private/displayx11.h
instead of having to declare all the X11 functions it uses manually.
There should be no changes in behaviour, this is just a clean up.
Simplify the code by not making this function pure virtual as all the
ports except MSW had to override it just to return an empty string.
Instead, just return empty string by default as it's not critical to
force the derived classes to override this function.
Unfortunately Visual Studio 2017 defaults to Windows SDK 8.1
which is not installed with it. This workaround automatically
targets the latest Windows 10 SDK when building.
Closes https://github.com/wxWidgets/wxWidgets/pull/959Closes#18078.
If a wxScrolledWindow is only scrollable in one direction, its virtual
size should only extend beyond the actual size of the window in this
direction, as any contents not fitting the window wouldn't be visible
anyhow.
This file is already included in BASE_OSX_SHARED_SRC, which is part of
wxiOS sources, so there is no need to repeat it in OSX_IPHONE_SRC as
well.
This fixes warnings about ignoring duplicate rules in the makefile
in command line builds.
The use of wxS() is an optimization which can be used to avoid an
implicit conversion from narrow to wide strings, but such optimizations
are not really needed in the samples and just make their code less
readable, so remove them.
Closes https://github.com/wxWidgets/wxWidgets/pull/956
Centralize all display-related code in wxDisplay class and avoid
duplicating or reimplementing it in wxDisplaySize() and
wxClientDisplayRect() functions.
See https://github.com/wxWidgets/wxWidgets/pull/955
Instead of forwarding to these functions from wxDisplay implementation
in wxUSE_DISPLAY==0 case, make the functions themselves wrappers around
wxDisplay, which may, or not, depending on the platform, have a simpler
implementation in wxUSE_DISPLAY==0 case, but is always available in any
case.
As part of this change, only use src/osx/core/display.cpp in macOS
builds, not iOS ones and update the Xcode project accordingly too.
This cuts down on code duplication, especially in wxGTK, and facilitates
further additions to wxDisplay API.
Move declaration of wxOwnerDrawnBase::ms_defaultMargin to correct file.
Do not include headers when wxUSE_UIACTIONSIMULATOR is disabled.
Add guards for wxUSE_DRAG_AND_DROP.
Use a different wxFont constructor in printing sample, which is also available in WXQT.
Avoid a heap allocation on every wxDisplay creation by caching the
wxDisplayImpl objects once they're created.
Currently we never invalidate the cache, but we should add a way to do
it in the future.
This speeds up wxDisplay::GetGeometry() benchmark by a factor of 4.
This benchmark shows that wxGetDisplaySize() has only minimal overhead
compared to wxDisplaySize(), but wxDisplay().GetGeometry() is almost 3
times slower (under wxGTK).