Commit Graph

68535 Commits

Author SHA1 Message Date
Vadim Zeitlin
5870290b9c Merge branch 'cmake-target-names-and-pch' of https://github.com/MaartenBent/wxWidgets
CMake improvements: use "wx" prefix for the library names (and "wx::" as
an alias) and check that PCH support actually works.

See https://github.com/wxWidgets/wxWidgets/pull/1859
2020-05-19 14:39:14 +02:00
Stefan Csomor
ced68e3efa switching implementation because of problems under 10.15 2020-05-19 14:15:35 +02:00
wangqr
a06fb27f21 Implement wxSpinCtrl::GetSizeFromTextSize for wxOSX/Cocoa
The value is calculated based on size of wxTextCtrl
2020-05-19 00:24:31 -04:00
wangqr
dad9a02a40 Remeasure magic values for wxTextCtrl's border width on wxOSX/Cocoa
Measured on macOS Catalina. Also implements GetSizeFromTextSize
2020-05-19 00:18:51 -04:00
Maarten Bent
a416044479 CMake: document the library name changes as incompatible change 2020-05-19 02:00:08 +02:00
Vadim Zeitlin
e48d740ed7 Make props file work for builds using any prefix/DLL combinations
The existing wxwidgets.props wasn't particularly useful as it couldn't
be used with with wx DLLs when the user project configuration were not
called "DLL Debug" or "DLL Release" (and it makes little sense for the
user application to use "DLL" in its configuration names just because it
happens to use wx as DLL, of course).

It also couldn't be used with the libraries built using nmake with a
custom COMPILER_PREFIX, which, significantly, includes the official MSW
binaries.

Try to fix both problems by checking for the actually existing libraries
and using whichever ones we find. This is somewhat surprising for a
project file to do, but it seems like it should result in the most
useful behaviour in practice as it allows user projects importing this
file to work out of the box in all of the following situations:

  - Using official wxMSW binaries.
  - Building wxMSW from source without any customization.
  - Building wxMSW from source using reasonable custom compiler prefix.
2020-05-19 01:28:18 +02:00
Artur Wieczorek
edc553870f Fix displaying wxSpinCtrlDouble values with default precision
For the sake of consistency with native wxGTK implementation,
spin control value should be displayed with fixed precision.

See #17085.
2020-05-18 20:39:05 +02:00
Artur Wieczorek
19da5f61bb Update wxSpinCtrlDouble documentation
Closes #17085.
See #18764.
2020-05-18 19:13:31 +02:00
Artur Wieczorek
3ef2fc3560 Add test of default wxSpinCtrlDouble precision 2020-05-18 18:55:22 +02:00
Artur Wieczorek
c963c60a0f Determine initial wxSpinCtrlDouble precision
For native wxGTK implementation default spin control precision is derived
from the precision of the increment value. Fot the sake of consistency the
same should be done in the generic implementation.

Closes #18764.
2020-05-18 18:52:41 +02:00
Maarten Bent
ba3fd12efb CMake: fix linking the DLL sample in monolithic build 2020-05-17 20:01:03 +02:00
Maarten Bent
0f806ad96d CMake: use wx prefix in library names
Rename all library targets to start with wx. This way it does not use generic
names like base or core that could interfere with other libraries that add
include the wxWidgets project.
2020-05-17 20:01:02 +02:00
Maarten Bent
0c2d05f52f CMake: add library aliases using wx:: namespace 2020-05-17 20:01:02 +02:00
Maarten Bent
498b79d619 CMake: copy data of widgets sample to correct directory 2020-05-17 20:01:02 +02:00
Maarten Bent
ef741462cd CMake: fix file names in info header 2020-05-17 20:01:02 +02:00
Maarten Bent
e69755c203 CMake: check if the compiler supports using precompiled headers
Build the cotire test project and check if it succeeds. Also check if the
'had text segment at different address' warning does not appear in the build
output. If it does not succeed, disable usage of precompiled headers.

If the PCH option was changed, clean the project and rebuild it again. Do not
clean everytime the project is configured because (re)building the cotire test
project takes some time.
2020-05-17 20:01:01 +02:00
PB
6a04fd2f42 Fix few more things in wxMediaCtrl docs
Should be merged with the previous commit.

Fixes a typo introduced in the previous commit.
Updates the section about force linking a module.
2020-05-16 14:56:00 +02:00
PB
e6eaf6425c Improve wxMediaCtrl documentation
Fix the totally broken example code.
Replace "movie" with "media" where appropriate.
Fix few spelling and grammar errors.
2020-05-16 14:29:45 +02:00
wangqr
2f74942eca Improve IME related comments in ScintillaWX 2020-05-14 20:36:05 -04:00
ali kettab
59ad9f46e6 Make wxUIActionSimulator works more reliably on GTK/X11
Add wxXSync class which adds delays between the synthesized events
sufficient for them to be processed by the higher layers (X, GTK).

This makes it possible to run the UI tests by default with wxGTK.

Closes https://github.com/wxWidgets/wxWidgets/pull/1845
2020-05-15 00:36:00 +02:00
Vadim Zeitlin
a2a3897124 Simplify wxWindowID definition
Define it in wx/defs.h directly instead of conditionally including
wx/windowid.h from there just in order to get this type definition.

This has several advantages:

- wxWindowIDRef is not defined in (maybe) non-GUI code including
  wx/defs.h, as it should be the case for this class defined in
  core library only.
- wx/windowid.h becomes a normal header, including wx/defs.h as
  (almost) all the other ones instead of being exceptional.
- wx/windowid.h doesn't need to be included by wx/utils.h at all
  just to get wxWindowID definition.

Closes https://github.com/wxWidgets/wxWidgets/pull/1850
2020-05-15 00:02:14 +02:00
Vadim Zeitlin
7a82a0bbf5 Assume dlerror() function is always available when dlopen() is
Remove separate checks for dlerror() which don't seem to be needed under
any platform any longer.

No real changes, just slim down configure/CMake a tiny bit.
2020-05-15 00:00:06 +02:00
Vadim Zeitlin
fea8c608b1 Remove checks for shl_load() from configure/CMake
This function is not used any more since e289eb07e1 (Get rid of
non-POSIX code for loading dynlibs on *nix, 2020-05-13), so don't check
for it and don't defined the corresponding HAVE_SHL_LOAD symbol.
2020-05-14 23:59:38 +02:00
Vadim Zeitlin
2e6fec3601 Remove unnecessary c_str() call
No real changes.
2020-05-14 23:53:45 +02:00
Vadim Zeitlin
9df975f2a9 Merge branch 'gcc10-cxx20'
Compilation fixes for g++10 in C++20 mode.

See https://github.com/wxWidgets/wxWidgets/pull/1851
2020-05-14 23:50:29 +02:00
Lauri Nurmi
e289eb07e1 Get rid of non-POSIX code for loading dynlibs on *nix
The alternative, (non-POSIX) shl_xxx() API is/was apparently available on
HP-UX, but even there the POSIX dlxxx() functions have been the preferred
way to load libraries since the past ~20 years.
2020-05-13 10:07:48 +03:00
Lauri Nurmi
c50784ba0b Use the same function for logging dynlib errors on all platforms
Reduces the amount of #ifdefs scattered all over the code, thereby
simplifying the code.

The function was renamed from Error() to ReportError() to emphasize what
its purpose is.

Error messages logged on *nix are now a bit more verbose, as they are
prefixed with our own description text, which were earlier omitted on
platforms using the dlxxx() API.
2020-05-13 10:07:47 +03:00
wangqr
59370f36c8 Add imm32.lib to wxStyledTextCtrl in configure.in 2020-05-11 15:11:21 -04:00
Blake Eryx
fb5c13ed00
Update docs about DisplayEditorDialog replacing OnButtonClick (?) (#1853)
Update doc for DisplayEditorDialog change
2020-05-11 20:04:31 +02:00
wangqr
a6e7409888 Rebake after adding imm32.lib to wxSTC 2020-05-11 00:37:56 -04:00
wangqr
f730da3c14 Add imm32.lib to wxStyledTextCtrl 2020-05-11 00:37:56 -04:00
wangqr
e07640fb75 Forward IME messages to ScintillaWX and handle them
The handling code is copied from ScintillaWin

Closes #18759
2020-05-11 00:37:49 -04:00
Vadim Zeitlin
499252ace8 Fix unit tests compilation in C++20
There is no more overload of std::ostream::operator<<() for wchar_t in
C++20, i.e. it is explicitly deleted, so we need to define some other
way of printing wchar_t out from Catch macros.

Do it by specializing Catch::StringMaker<> for it and outputting it
either as a (7 bit) ASCII character, if this is what it is, or as a
Unicode character code otherwise, as this will probably be more useful
in case of a test failure.
2020-05-10 23:05:41 +02:00
Vadim Zeitlin
63626acbe4 Fix std::ostream::operator<<(wxScopedWCharBuffer)
This never worked correctly as using operator<<() with wchar_t pointer
just fell back to the overload for void pointers, i.e. printed out the
address of the wide string, which wasn't especially useful, but with
C++20 it doesn't even compile, as this overload is explicitly deleted.

Fix both problems at once by actually doing something useful for it
instead and printing out data in either current encoding or UTF-8 if
converting it to the current encoding failed.
2020-05-10 23:00:00 +02:00
Vadim Zeitlin
176b9dde90 Fix wxString iterator comparison in C++20
In C++20 the reverse comparison operators are also considered when
searching for the operator to use and a wrong operator was selected for
comparisons between iterator and const_iterator, that would result in an
infinite recursion at run-time.

Fix this, thanks to the nice gcc 10 warning about it, by explicitly
defining the operators for this overload set too instead of relying on
implicit conversions.

Although not all these overloads are necessary, and they are only
necessary in C++20, it seems better to define all of them and always
just to be perfectly explicit and clear, as this code is not exactly
simple to follow.
2020-05-10 22:57:41 +02:00
Vadim Zeitlin
30079ad0e6 Fix building GUI tests with MSVC
This was broken by da48b9e45d (adding an iOS build to travis (#1847),
2020-05-08), as we can't use preprocessor directives inside macro
arguments with MSVC (at least with its traditional preprocessor).

Use a helper macro to make this work again.
2020-05-10 02:15:52 +02:00
Vadim Zeitlin
216c14d346 Merge branch 'travis-other-archs' into window-id
Minor fixes for testing PPC/s390 architectures on Travis CI.

See https://github.com/wxWidgets/wxWidgets/pull/1844
2020-05-09 23:37:43 +02:00
Vadim Zeitlin
3e724ffa96 Merge branch 'memoryfs-iter' into window-id
Fix bug in wxMemoryFSHandler iteration.

See https://github.com/wxWidgets/wxWidgets/pull/1833
2020-05-09 23:37:14 +02:00
Vadim Zeitlin
d3b9686099 Take number of digits into account in GTK wxSpinCtrlDouble
When determining the entry width in wxSpinCtrlDouble, we need to account
not only for the width of the integer part, but also for the number of
digits that determines the width of the fractional part.

Do it in the overridden version of (now virtual) GtkSetEntryWidth().

See https://github.com/wxWidgets/wxWidgets/pull/1817

Closes #18734.
2020-05-09 23:36:25 +02:00
Vadim Zeitlin
3ab187f75f Add a test for "%e" to wxDateTime::ParseFormat()
See https://github.com/wxWidgets/wxWidgets/pull/1842
2020-05-09 23:23:31 +02:00
Vadim Zeitlin
2cf0537722 Correct the test for ParseFormat() with fall back date
This was added back in b5f85206a9 (fix ParseFormat("%d") to set the date
it finds (#10002), 2008-09-26), but the test didn't do what the comment
said and didn't use the default date object it added.

Fix this now to finally do what was intended all these years ago.
2020-05-09 23:22:13 +02:00
Stefan Csomor
da48b9e45d
adding an iOS build to travis (#1847)
* fixing compilation of tests that cannot build

bracket code with the corresponding wxUSE… macros

* adding directive for iOS

* adding a switch for skipping the run - not the build of tests

right now I don’t know yet, how to run the test binary in the iOS simulator, but building it is still a good test in itself

* adding skipping of tests

* increasing minimum deployment to get proper c++17 support

* using --disable-sys-libs, restoring other targets

even when the zlib in -isysroot is used, due to deployment on lower iOS versions inflateValidate may not be available and crash. The guards are evaluated using macros from the zlib from the SDK, not from the lowest version supported.
2020-05-08 08:01:56 +02:00
Stefan Csomor
665bed8521 skipping gui test and samples for now on ios 2020-05-07 13:01:43 +02:00
Stefan Csomor
396eafd15f correct option name 2020-05-07 11:17:16 +02:00
Stefan Csomor
ccf241ef95 force built-in tiff on ios 2020-05-07 10:59:52 +02:00
Stefan Csomor
0edda02847 removing register keyword
needed for c++17 compatibility, this file is only used in iOS builds
2020-05-07 10:36:51 +02:00
Stefan Csomor
f6bb4aa6e2 copy paste error with tripple dash 2020-05-07 09:13:22 +02:00
Stefan Csomor
50b1f8b183 first attempt at ios travis 2020-05-07 08:29:05 +02:00
Vadim Zeitlin
b30dfcc8d5 Ignore failures in PPC/s390 builds
They fail just too often for some infrastructure flakiness reasons and
constantly result in false positives.
2020-05-06 22:47:26 +02:00
Vadim Zeitlin
7e5c8915c5 Changes labels of wxBase builds on PPC/s390 architectures
We're only building wxBase there, not the full wxGTK.
2020-05-06 22:44:43 +02:00