Change GTKGetEntryTextLength() to return a signed value, as it's always
either assigned to or compared with the signed variables anyhow.
This avoids a couple of -Wsign-compare warnings when building with g++
5.4 from Ubuntu 16.04.
Instead of running normally under some platforms and crashing under MSW
(when using themes) when passing NULL to GetCheckBoxSize(), now
consistently assert and return zero size everywhere.
Closes#18241.
The column is available in the GTK+ callback, so just pass it along to
avoid gratuitous inconsistency with the generic version.
Also update the sample to show the column value for these events.
This function has to be called from a GTK+ callback, so make it public
and also rename to GTKColumnToWX() to conform to the naming convention
mandating the use of "GTK" prefix for the public methods which are not
part of the public API.
While this is not done for all the ports yet, the new API allows
returning different PPI values for different monitors, unlike the old
(and still existing, but implemented in terms of the new one) global
function.
This function always returns true in practice and it's completely
useless to call it during each wxDC object construction, especially
because wxDC::m_colour itself is not used anywhere.
Allow getting the depth of any display, not just the primary one, even
though this is not implemented for Unix ports currently.
Mostly do this for consistency with the other display-related functions.
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.