Commit Graph

70077 Commits

Author SHA1 Message Date
ali kettab
db33e1549b Make wxWindow::TransferData{To,From}Window actually transfer to self 2021-02-15 15:38:21 +01:00
ali kettab
afbca9e1df Rename ValidationTraverserBase::DoForAllChildren to DoForSelfAndChildren 2021-02-15 15:28:28 +01:00
Maarten Bent
36ab71301c Add CI check for mixed line endings
Trigger workflow on all file changes.

Closes https://github.com/wxWidgets/wxWidgets/pull/2224
2021-02-09 22:17:13 +01:00
Vadim Zeitlin
7a74c0872c Merge branch 'msw_webview_edge3' of https://github.com/TcT2k/wxWidgets
Make using wxWebViewEdge even simpler in CMake builds.

See https://github.com/wxWidgets/wxWidgets/pull/2223
2021-02-09 15:22:56 +01:00
Gary Allen
2da5129e13 Allow customizing all tool colours in wxRibbonMSWArtProvider
A number wxRIBBON_ART_TOOOL_XXX constants were not taken into account by
GetColour() and SetColour() for some reason, even though the class did
have the corresponding member colour variables.

Fix this by simply adding cases for them to the existing switch.

Closes https://github.com/wxWidgets/wxWidgets/pull/2225
2021-02-09 15:03:34 +01:00
Artur Wieczorek
279ee715fd Fix creating wxCairoBitmapData from wxImage with mask
If source wxImage has a mask we need to create ARGB32 Cairo surface (even
for RGB image) and based on the mask values set the alpha values to fully
transparent or retain original values.
2021-02-09 00:14:12 +01:00
Artur Wieczorek
c7667c16f8 Add tests of creating wxGraphicsBitmap from wxImage 2021-02-09 00:14:12 +01:00
Vadim Zeitlin
f2d5ff0121 Make wxNumValidator::m_value protected rather than private
This is useful for writing overridden TransferXXX() methods in the
derived validator classes, give a motivating example in the docs.

See https://github.com/wxWidgets/wxWidgets/pull/2222
2021-02-08 22:43:48 +01:00
Tobias Taschner
1ee05c54ed CMake: Download SDK when wxUSE_WEBVIEW_EDGE=ON
Automatically download the WebView2 SDK from nuget (official repo for the SDK)
when enabling wxUSE_WEBVIEW_EDGE to simplify usage.
Copying to 3rdparty/webview2 is still supported optionally.
2021-02-08 21:29:08 +01:00
Artur Wieczorek
e74cc53775 Fix creating CGImage from wxBitmap
For internal purposes wxBitmap with mask should be converted to CGImage
with alpha values only (with no mask). This is i.a. needed to assure
compatibility of wxGraphicsBitmap format with other ports where these
bitmaps are in pure ARGB format.
2021-02-08 18:56:10 +01:00
Vadim Zeitlin
d4e5adf5d6 Merge branch 'webview_misc' of https://github.com/TcT2k/wxWidgets
More wxWebView miscellaneous improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2221
2021-02-08 13:50:25 +01:00
Vadim Zeitlin
b99c88767d Regenerated wxstd.pot using the new xgettext options
No real changes, ignore the huge diff which is due to reordering of all
the strings in this file after the changes of 87c56c7c1d (Do not sort
content of generated POT files alphabetically, 2021-01-23).

See https://github.com/wxWidgets/wxWidgets/pull/2214
2021-02-08 12:51:24 +01:00
Vadim Zeitlin
26eb738562 Merge branch 'drop-msw-it.po'
Remove platform-specific translations.

This is unnecessarily complicated for the single string that we
currently use this for, so just handle it specially.

Also some other minor translation-related improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2213
2021-02-08 12:50:43 +01:00
Vadim Zeitlin
0d3b04013f Merge branch 'cmake-benchmarks' of https://github.com/MaartenBent/wxWidgets
Add support for building benchmarks with CMake.

See https://github.com/wxWidgets/wxWidgets/pull/2220
2021-02-08 12:46:18 +01:00
Vadim Zeitlin
d6b8ed1e3c Merge branch '4238-fix-grid-multicell-editing' of https://github.com/discnl/wxWidgets
Fix grid multicell integrity after inserting/deleting rows/columns.

See https://github.com/wxWidgets/wxWidgets/pull/2192
2021-02-08 12:43:44 +01:00
Vadim Zeitlin
3978a0df0e Check stream error in LastRead() unit test too
It doesn't make sense to call LastRead() if an error happened while
reading, so check if it did.
2021-02-08 12:42:54 +01:00
Tobias Taschner
1cd0904260 Fix mixed line breaks in webview sources 2021-02-08 11:27:49 +01:00
Tobias Taschner
e0c705648f Add missing wxOVERRIDE to wxWebViewFactoryWebKit 2021-02-08 09:20:53 +01:00
Dimitri Schoolwerth
cc239f36cc Remove doc warning regarding wxGrid multicells and deletion
Since the parent commit multicells work correctly when deleting (and
inserting) rows (or columns) intersecting with them and the comment
warning about it resulting in a crash is no longer needed.

This reverts commit 4d8e8355b4 (Added a warning about multi-cells in
wxGrid::DeleteRows() docs., 2011-12-25).

See #4238.
2021-02-07 22:59:02 +01:00
Dimitri Schoolwerth
3123c76394 Fix grid multicell integrity after inserting/deleting rows/columns
Deal with possible size changes of a multicell (both main and inside
cells) when inserting or deleting rows or columns and, in the case of
deletion only, the disappearing of a multicell's main cell.

Closes #4238.
2021-02-07 22:59:02 +01:00
Dimitri Schoolwerth
d282ccf696 Add grid tests for multicell integrity after insertions/deletions
Multicells currently don't get any special treatment when inserting
or deleting rows or columns so neither a multicell's main size nor
inside cells' sizes (which are offsets to the main cell) are updated.
Most tests fail and will be fixed by the next commit.

See #4238.
2021-02-07 22:59:02 +01:00
Dimitri Schoolwerth
04a3dda5c5 Refactor common wxGridCellAttrData::UpdateAttrRows/Cols code
Move two symmetrical functions into one and clean up, preparing it for
multicell support.
2021-02-07 22:59:02 +01:00
Dimitri Schoolwerth
30de99470a Add multiple insertion support to grid sample
Only single insertions of rows and columns were supported, allow N
insertions provided the row/column selection is consecutive.
Do the same for deletions: while deleting selected rows and columns
already works it's useful to test deleting multiple positions at once.
2021-02-07 22:59:02 +01:00
Dimitri Schoolwerth
058192dde8 Add a few accelerators to menu items of grid sample
Add convenience accelerators for insert and delete menu options.
2021-02-07 22:59:02 +01:00
Dimitri Schoolwerth
bc7e5ffc56 Add basic tests for wxGrid cell attribute presence and count
Do some simple sanity checks with attributes, particularly overwriting
a cell with NULL attribute (as was already checked very usefully in
the grid sample for ref count reasons), and their total count in a grid
when inserting and deleting rows and columns.

While the tests are not particularly useful for the next intended grid
change, they do contain some functions that also work for upcoming tests
so these (harmless) tests are included as well.
2021-02-07 22:59:02 +01:00
Tobias Taschner
8a9db461ff Implement wxWebView::GetVersionInfo() for macOS
Return the operating system version as the WebKit
version used by WKWebView is bound to the OS.
(Also works for iOS)
2021-02-07 22:14:18 +01:00
Tobias Taschner
334872e726 Notify WebView2 API when minimizing a window with wxWebView
As suggested by the ICoreWebView2Controller documentation
call put_isVisible() when the window containing the
wxWebViewEdge is minimized/restored.
2021-02-07 21:48:02 +01:00
PB
623e6a4fc3 Make wxWebViewEdge visible after creating
Fixes: #18851
2021-02-07 21:33:28 +01:00
Maarten Bent
b3b5cde7f5 CMake: Mark some build options as advanced 2021-02-07 20:34:42 +01:00
Maarten Bent
9585e08365 CMake: Add benchmarks
Put each benchmark application in a sub-directory instead of specifying all in one
file, because cotire cannot create PCH targets for the same file twice (bench.cpp).
2021-02-07 20:34:42 +01:00
Maarten Bent
7b79423470 CMake: Add argument to specify console app that uses gui libraries 2021-02-07 20:11:56 +01:00
Vadim Zeitlin
e539cb69bb Remove platform-specific translations support
As shown by the fact that no other platform-specific translations were
ever added since the initial version of locale/msw/it.po added way back
in 4d931bcca0 (Translate '&Help' to '&' for italian Windows only,
2005-08-12), this is not especially useful, so just handle this
particular case specially in wxGetStockLabel() and remove support for
platform-specific translations.

This allows to simplify the makefiles and the catalog loading code as
there is no need to deal with the files in subdirectories any more.
2021-02-07 00:06:21 +01:00
Artur Wieczorek
414f211b8a Add tests of wxGraphicsBitmap
Add tests of creating wxGraphicsBitmap from specific to wxMSW and wxOSX
32-bit RGB wxBitmaps (non-alpha).
2021-02-06 21:43:47 +01:00
Artur Wieczorek
5b52a8646b Use IWICBitmap to cache bitmap in wxD2DBitmapResourceHolder (Direct2D)
IWICBitmap is more native than wxBitmap so it should better represent
the internal state of D2DBitmap.
2021-02-06 21:43:46 +01:00
Paul Cornett
28d1ddec90 Set layout direction for wxClientDC
Should have been part of
62c119fa1e (Fix RTL mirroring for wxClientDC, etc with GTK3, 2021-02-06)
2021-02-06 12:31:14 -08:00
AliKet
62ae887159 minor correction to widgets sample to work correctly in RTL layout 2021-02-06 08:39:01 -08:00
Paul Cornett
62c119fa1e Fix RTL mirroring for wxClientDC, etc with GTK3
The changes to the Cairo context must be done before wxGC::CreateFromNative()
is called, otherwise they will be overwritten
2021-02-06 08:28:13 -08:00
Vadim Zeitlin
b5282c682f Recognize wxGETTEXT_IN_CONTEXT macros in wx sources
Tell xgettext to extract the strings appearing inside
wxGETTEXT_IN_CONTEXT and wxGETTEXT_IN_CONTEXT_PLURAL too.
2021-02-06 15:15:29 +01:00
Vadim Zeitlin
94ee588e76 Add an almost empty message catalog with Georgian translations
Surprisingly, we had Georgian translations for the internat sample, but
not for wx itself.

Extract a couple of strings that were present in the sample catalog for
the string defined in wx into the main catalog for tidiness.
2021-02-06 14:58:10 +01:00
Vadim Zeitlin
aafed05b12 Use wxGetStockLabel() in internat sample
This allows to reuse "&File" translation already available in wxstd
catalog rather than translating it again in the sample catalogs for all
languages, so remove the now unnecessary translations from them.
2021-02-06 14:58:09 +01:00
Vadim Zeitlin
8293dcedef Factor out platform detection from XRC code into wxPlatformId
This will allow reusing the same strings in other places.

Also use this as opportunity to add "msw" as the (preferred) synonym for
"win" for general consistency.
2021-02-06 14:58:09 +01:00
Vadim Zeitlin
da45f88c53 Check stream error in LastRead() unit test too
It doesn't make sense to call LastRead() if an error happened while
reading, so check if it did.
2021-02-06 14:51:52 +01:00
Vadim Zeitlin
67fc7c5508 Merge branch 'remove-setup0.h'
Drop wx/setup0.h files hack and just use wx/setup.h.

See https://github.com/wxWidgets/wxWidgets/pull/2205
2021-02-06 14:26:25 +01:00
Vadim Zeitlin
6e145f8f9f Merge branch 'msw_edge_fixed' of https://github.com/TcT2k/wxWidgets
Allow using a fixed Edge version with wxWebViewEdge and other
wxWebView-related improvements and refactoring.

See https://github.com/wxWidgets/wxWidgets/pull/2212
2021-02-06 14:22:42 +01:00
Vadim Zeitlin
7cca64bb0e Merge branch 'i18n-enh' of https://github.com/lanurmi/wxWidgets
Keep strings in wxstd.pot in the natural, but the same under all
platforms, order.

See https://github.com/wxWidgets/wxWidgets/pull/2214
2021-02-06 14:21:25 +01:00
Artur Wieczorek
27141e6a7c Fix test of wxImage::InitAlpha() 2021-02-06 01:37:05 +01:00
Artur Wieczorek
1adc38c42b Add tests of wxImage::InitAlpha() 2021-02-06 01:07:32 +01:00
Artur Wieczorek
46302896e1 Fix caching source bitmap in wxD2DBitmapResourceHolder (Direct2D)
Because cached wxBitmap is used only to help in representing native D2D
bitmap in some operations it shouldn't be exposed directly and dedicated
methods should be implemented instead.
2021-02-06 00:36:45 +01:00
Artur Wieczorek
8c599408ab Fix creating GDI+ Bitmap from wxBitmap having both alpha channel and mask
If source wxBitmap has both alpha channel and mask we have to apply mask
to the target GDI+ Bitmap on our own by blending its alpha values with
mask. For non-masked pixels alpha channel values will remain intact and
for masked pixels they will be set to the transparent value (0).
2021-02-05 23:55:58 +01:00
Artur Wieczorek
20fc422550 Fix creating sub-bitmap of wxGraphicsBitmap (GDI+)
Retrieved sub-bitmap should have the same pixel format like
the source bitmap.
2021-02-05 23:53:28 +01:00