Commit Graph

68019 Commits

Author SHA1 Message Date
Maarten Bent
f67a7c08f7 Allow to build libpng on more platforms
Add the hardware-specific source files to the build systems. Do not add MIPS
and PowerPC to MSVC build files, because these include <stdint.h> which is not
available for old MSVC versions.
2020-04-19 16:31:22 +02:00
Vadim Zeitlin
287c1b1d11 Merge branch 'noexcept-event-tables'
Allow using noexcept handlers in event tables.

See https://github.com/wxWidgets/wxWidgets/pull/1788
2020-04-12 16:41:55 +02:00
Vadim Zeitlin
413fdfbfa4 Merge branch 'cmake-c++11-stl' of git://github.com/MaartenBent/wxWidgets
CMake: Improve STL checks, improve C++17/20 support.

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

Closes #18718.
2020-04-12 16:37:57 +02:00
Vadim Zeitlin
ed077e17cf Restore wxAnimation::GetFrame() constness
This got lost, almost surely accidentally, in 706c8e8ad6 (Merge branch
'disable-native-animation', 2020-04-07), so just restore it now.

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

Closes #18725.
2020-04-12 16:36:34 +02:00
Paul Cornett
2197f9d10e Match caret color to foreground color
Fixes cursor visibility in text control with non-default foreground color
See #18722
2020-04-11 08:48:12 -07:00
Artur Wieczorek
802ee492d6 Revert "Add option to present wxButton with wxNO_BORDER style in widgets sample"
This reverts commit 17b9c98121.

This option to select border style is already implemented in the widgets sample.
2020-04-10 20:48:21 +02:00
Artur Wieczorek
c4f5fd3581 Move duplicated code to rescale the bitmap to the shared function 2020-04-10 20:45:34 +02:00
Artur Wieczorek
f95d6463d3 Fix sizing wxBitmapButton used as wxPropertyGrid editor button
Since wxBitmapButton doesn't rescale embedded bitmap we need
to do this on our own to display entire bitmap even the button
is small.

Closes #18715.
2020-04-10 20:33:16 +02:00
Artur Wieczorek
c7aeba7ed5 Fix displaying labels in small wxPropertyGrid editor buttons
We need to create wxButtons without internal border (with
wxBU_EXACTFIT flag) to display button labels properly even
if buttons are small.

See #18715.
2020-04-10 20:31:11 +02:00
Scott Talbert
e8be37da3d Add missing documentation for wxTreeCtrl GetSpacing / SetSpacing
Closes https://github.com/wxWidgets/wxWidgets/pull/1787
2020-04-10 17:20:24 +02:00
Maarten Bent
c96014db27 CMake: install toucan.png with widgets sample
It is used on the StaticBitmap page.
2020-04-10 00:51:17 +02:00
Maarten Bent
b20daa9fb0 Fix using deleted function in TempStringRef
Use the constructor directly instead of via a make function.
2020-04-10 00:51:17 +02:00
Maarten Bent
362fe04b0f Fix previous local declaration warning in wxRegKey sample 2020-04-10 00:51:17 +02:00
Maarten Bent
52ef7157e7 Define wxMEMBER_DEFAULT similarly to the existing wxOVERRIDE
Also define wxHAS_MEMBER_DEFAULT allowing to check if '= default' is supported
(compilers that define c++11 and VS2015 and later).
2020-04-10 00:51:14 +02:00
Artur Wieczorek
215a6ee238 Implement wxBU_EXACTFIT style for wxButton under wxGTK3
GtkButton without inner border is just as big as its contents.
2020-04-09 22:50:19 +02:00
Artur Wieczorek
17b9c98121 Add option to present wxButton with wxNO_BORDER style in widgets sample 2020-04-09 22:49:14 +02:00
Vadim Zeitlin
c3810da549 Allow using noexcept methods with event tables macros
Explicitly remove noexcept before static-casting the member function
pointer to the base class pointer type to avoid compilation error with
C++17.

Add a test checking that this does work now.

Closes #18721.
2020-04-09 22:36:30 +02:00
Vadim Zeitlin
f4f70102ea Define wxNOEXCEPT similarly to the existing wxOVERRIDE
Also define wxHAS_NOEXCEPT allowing to check if noexcept is supported.

This is not used in the library yet, but probably should be.
2020-04-09 22:36:30 +02:00
Paul Cornett
d3c60b9524 Update gtk-3.0.m4 from gtk+-3.24.17 2020-04-09 09:39:32 -07:00
Paul Cornett
02ce30687b Use C linkage for callbacks 2020-04-09 09:37:07 -07:00
PB
80d5c95f93 Fix XRC link in Hello World example
Closes https://github.com/wxWidgets/wxWidgets/pull/1786
2020-04-08 22:55:39 +02:00
PB
b7edb46c6a Make vcpkg MSW instructions more MSW-like
Make command line instructions for vcpgk more similar to those used
for example for nmake. The MS Windows command line does not use $ as
the command prompt and batch files are more commonly used then Unix
shell scripts.

Closes https://github.com/wxWidgets/wxWidgets/pull/1785
2020-04-08 22:53:28 +02:00
Maarten Bent
89185875a9 Enable wxMEMBER_DELETE for MSVC
It is available since Visual Studio 2015.
2020-04-08 22:13:53 +02:00
Maarten Bent
7da632b438 Fix building test.cpp with c++17
uncaught_exception() has been replaced with uncaught_exceptions().
2020-04-08 22:13:53 +02:00
Maarten Bent
b931c4b52c Fix wxArrayString build error when using c++17 with MSVC
MSVC does not set the correct __cplusplus version, so check MSVC compiler
version as well.
2020-04-08 22:13:53 +02:00
Maarten Bent
4122511e76 CMake: Add c++20 option, enable setting c++ version for MSVC
MSVC supports setting the CMAKE_CXX_STANDARD since VS2015 update 2.
2020-04-08 22:13:52 +02:00
Maarten Bent
3c4c4ee273 CMake: Only test stl for c++ versions before 11 2020-04-07 19:28:46 +02:00
Maarten Bent
5c2d186132 CMake: Add variable to indicate if c++11 or later is enabled
Use it in macOS checks.
2020-04-07 19:28:46 +02:00
Maarten Bent
c8209a5111 CMake: Set wxBUILD_CXX_STANDARD globally instead of only on targets
This way the tests in setup.cmake will use the correct c++ version.
2020-04-07 19:09:58 +02:00
Paul Cornett
fab2d067b5 Fix Oracle compiler name
aCC is/was the HP-UX compiler
2020-04-07 08:43:57 -07:00
Artur Wieczorek
435764ee61 Display toolkit information in wxPG sample About box
This may help in diagnostics.
2020-04-07 17:20:03 +02:00
Stefan Csomor
80fd70e8f1 make NSString conversions available for all osx platforms 2020-04-07 12:04:01 +02:00
Stefan Csomor
2790b3cb29 wxCocoaLaunch is not available under iOS 2020-04-07 12:02:52 +02:00
Paul Cornett
902a2f0885 Remove wxAnimation copy ctor and copy-assignment operator implementations
The compiler-generated defaults will do the same thing
2020-04-06 20:26:49 -07:00
Vadim Zeitlin
706c8e8ad6 Merge branch 'disable-native-animation'
Allow the generic animation classes to be used on all platforms.

See https://github.com/wxWidgets/wxWidgets/pull/1768
2020-04-07 00:40:45 +02:00
Vadim Zeitlin
f2ed3a5376 Add static wxAnimationCtrl::CreateCompatibleAnimation()
This may be more convenient to use than CreateAnimation() if there is no
wxAnimationCtrl object at hand.
2020-04-06 23:33:07 +02:00
Vadim Zeitlin
cdf156e7e8 Remove redundant checks for IsOk() in wxAnimationGenericImpl
We already check that IsOk() returns true before calling these methods,
there is no need to do it again inside them.

Generally speaking, private functions may rely on public ones doing the
precondition checking.
2020-04-06 23:21:27 +02:00
Vadim Zeitlin
135c959fe7 Fix wxRTTI for wxAnimationCtrl when using generic implementation
It must use wxGenericAnimationCtrl as the base class in wxRTTI, as
otherwise wxAnimation::IsCompatibleWith() would fail in this case for
the generic implementation of wxAnimation.
2020-04-06 23:15:18 +02:00
Stefan Csomor
eaec76ee97 moving wxOSXCreateURLFromFileSystemPath to common OSX 2020-04-06 16:08:47 +02:00
Vadim Zeitlin
af7890e330 Reduce insignificant documentation changes with master
Restore the original amount of whitespace and remove WXDLLIMPEXP_CORE
which shouldn't have appeared in the documentation header in the first
place.
2020-04-06 01:30:46 +02:00
Vadim Zeitlin
a5b5573ee1 Restore lost check for __WXUNIVERSAL__ in wx/animate.h
Don't use native version when building wxUniv.
2020-04-06 01:28:01 +02:00
Vadim Zeitlin
103a01989e Document wxGenericAnimationCtrl as deriving from wxAnimationCtrl
Even though this is not really the case at the code level, this makes
more sense, as wxGenericAnimationCtrl adds methods to the interface
implemented by wxAnimationCtrl.

This also allows to avoid having notes indicating that some methods
don't work for the native version of the control -- by simply not having
them there.
2020-04-06 01:21:31 +02:00
Vadim Zeitlin
d9b1ca54ca Stop deriving native wxGTK wxAnimationCtrl from generic one
This is unnecessary and confusing.
2020-04-06 01:09:36 +02:00
Vadim Zeitlin
3678d67f92 Move wxGenericAnimationCtrl::m_animation to the base class
API of wxAnimationCtrlBase practically forces the derived classes to
have such method, so just add it and make GetAnimation() a simple
non-virtual accessor.
2020-04-06 01:03:39 +02:00
Vadim Zeitlin
b08db49bf6 Make wxAnimationImpl private and get rid of wxAnimationImplType
Simplify and streamline animation classes relationship: wxAnimation is
the only public class representing an animation and it can be created by
both the native wxAnimationCtrl and wxGenericAnimationCtrl using the new
public CreateAnimation() method.

Replace wxAnimationImplType enum with more flexible type info based
check.
2020-04-06 01:00:15 +02:00
Vadim Zeitlin
86d6cb8d1f Don't derive wxAnimationImpl from wxObject
This is just unnecessary and having wxAnimation::m_refData->m_refData is
confusing, both in wxGTK version where it's not used and in the generic
one where it is, but can be replaced by more type-safe m_decoder.
2020-04-06 00:00:10 +02:00
Artur Wieczorek
1dc0c777ae Return value of the proper type
Returned value should be the same type like the memeber variable.
2020-04-05 22:06:00 +02:00
Artur Wieczorek
810c1be640 Use GdiPlus::Status enum to represent status of GDI+ operation 2020-04-05 21:55:46 +02:00
Artur Wieczorek
f0e458e25c Get font family of private GDI+ font from the cache
When font family of a private font is retrieved with call to
Gdiplus::Font::GetFamily() then later on there is thrown access violation
exception when array of cached private font families (filled in by
Gdiplus::PrivateFontCollection::GetFamilies()) is deleted in
wxGDIPlusRenderer::Unload(). Call to Font::GetFamily() is done in
wxGDIPlusContext::GetTextExtent() so this issue can be seen once text
extent is retrieved for a private font.
Because it looks that calling to Font::GetFamily() for a private font is
messing up something in the array of cached private font families so
we should avoid calling this method and directly fetch corresponding font
family from the cache instead.
Reference to the cached font family would be stored in
the wxGDIPlusDataFont and it could be fetched from there directly instead
of making a call to Font::GetFamily().

Closes #18704.
2020-04-05 21:14:24 +02:00
Vadim Zeitlin
1bf48dfe29 Remove wxAnimationCtrlBase from wxRTTI
This is consistent with the other wxFooBase classes which are not part
of it, as they're considered implementation details and not parts of the
API.
2020-04-05 17:01:37 +02:00