Using wxRegEx in wxCmpNaturalGeneric() introduced a dependency of the
base library on the regex library.
Replace wxRegEx with character classification functions wxIsspace(),
wxIspunct(), and wxIsdigit() to remove this rather unnecessary
dependency.
Closes https://github.com/wxWidgets/wxWidgets/pull/2014
Memory leaks in the test programs run by configure when using GTK 2
result in configuration failures when using -fsanitize=address in
{CXX,LD}FLAGS, so fix these leaks to allow configuring using
"CXXFLAGS=-fsanitize=address LDFLAGS=-fsanitize=address" together with
--with-gtk=2 (this already worked correctly with the default GTK 3).
Closes https://github.com/wxWidgets/wxWidgets/pull/2001
This was already done for clang -Winconsistent-missing-override, but
gcc has a similar warning since 5.1 and, moreover, latest versions of
clang support this gcc warning as well, so add a special macro which
handles both compilers and use it in all wx macros defining virtual
functions instead of just disabling one of the clang warnings.
Closes https://github.com/wxWidgets/wxWidgets/pull/2000
This is conceptually the same as the ratio of the current DPI to the
standard one, but can be implemented more directly for wxGTK3 and wxOSX
(although the latter doesn't implement it yet).
Just scale the standard PPI by the scaling factor instead of trying to
compute the actual physical PPI, as the latter is not useful and is
incompatible with the value used by all the other applications.
Add "--recursive" option which is needed since the changes of 37cf80240b
(Exclude unwanted files in wxMSW tags script, 2020-01-31) as otherwise
no files were parsed at all.
The global wxCurrentPopupWindow used by wxMSW wasn't reset in this case
and resulted in a crash during the next mouse or focus event.
Do it in wxPopupWindow dtor now, and not just when the popup is hidden.
Check that deselecting a row leaves the cells outside of this row
selected.
This requires passing "true" to the previous call of SelectRow() to
prevent it from clearing the existing selection, as it does by default.
These functions got broken by the changes of cdf3187fe5 (Improve rows,
columns and cells deselection in wxGrid, 2020-03-26), but this went
unnoticed because they were not covered by the unit tests, so add the
tests for them to prevent this from happening again in the future.
Use wxBRUSHSTYLE_SOLID/TRANSPARENT constants instead of wxPENSTYLE_XXX
ones, as even though they have the same values, using brush style for
the background makes more sense.
Also document that the default background mode is transparent.
This method is implemented in the generic version used under the other
platforms as well, but was documented as being MSW-only in 89bb3f0244
(interface revisions, 2008-10-17) for some reason.
Just remove the note added by that commit.
Instead of using dynamically created brushes (implicitly from stock colours)
we should use corresponding stock brushes because once created they are
stored in the cache what can slightly improve performance.
The instantiation of the global static mapping table may happen before
the instantiation of the wxArtIds, i.e. the copy-constructor would
access not yet valid wxArtId/wxString instances.
Delay the instantiation until the first call to wxArtIDToStock call.
This is still not 100% safe, as wxArtIDToStock may be called by a
constructor of a static instance, but hopefully nobody does that.
wxUSE_UNICODE_UTF8 is not default anywhere since a long time.
Also mention that wxUSE_UNICODE==0 build is already deprecated and will
be dropped in the future.
Add a build option (--disable-pic, wxBUILD_PIC=OFF) to disable it.
Note that it is always enabled for shared libraries and static third party libraries.
The pre-3.1.4 definitions of the constants were just string literals,
while the type were wxString typedefs. To avoid implicit conversion
these were converted to actual wxStrings.
While the interface now matched the implementation, this has several
drawbacks:
- every use of the "constant" now is a string construction at runtime
- the constant now is an rvalue, i.e. it is impossible to take its
address.
The latter breaks its use from wxPython.
The IDs are moved to a separate file which can be included multiple
times, once from the header to have the declarations in place, and once
to instantiate the wxStrings. Using a common file avoids the declaration
and definition going out of sync.
This was disabled, but only didn't work because wxSlider used tiny size
in wxGTK by default previously. After correcting this in aa2d159e8c (Use
more reasonable length for wxSlider in wxGTK by default, 2020-08-04),
the unit test passes with wxGTK too and can be reenabled.
Closes https://github.com/wxWidgets/wxWidgets/pull/1992
Use the same 100 DIPs as in wxMSW, to make the default behaviour more
useful.
Also update documentation to explain which size component should, and
should not, be specified when creating the slider.
Closes https://github.com/wxWidgets/wxWidgets/pull/2012
Requires updates of expat and tiff submodules.
Most libraries have their own CMakeLists, add a comment with a suggestion to
use this for implementing build-in support.
Relying on "check-resize" to detect when a "size-allocate" is in progess is
insufficient, resulting in the possibility of a window ending up with the wrong
size or position after inital layout. Using our existing "size-allocate"
handlers should be enough to detect the cases we care about.
See #18865