Commit Graph

4059 Commits

Author SHA1 Message Date
Blake Madden
28d705424b Fix double words and article mismatches in docs. 2021-03-10 14:28:20 -05:00
Vadim Zeitlin
bf8be6c58d Merge branch 'mac-filedlg-improvements' of https://github.com/discnl/wxWidgets
macOS wxFileDialog improvements.

See https://github.com/wxWidgets/wxWidgets/pull/2234
2021-03-06 12:18:43 +01:00
Vadim Zeitlin
3c92573dd7 Recommend using wxStaticBox as parent more strongly
Not doing it, i.e. creating the window inside the static box as its
siblings, rather than children, may appear to work, but actually doesn't
always do it, for example the windows are not shown correctly when using
RTL locale.

Closes #19086.
2021-03-05 22:53:27 +01:00
Andriy Byelikov
b2d97d1393 Add support for English locale for Israel (en_IL)
This locale is recognized by glibc, so add it to the known locales
database.

Closes https://github.com/wxWidgets/wxWidgets/pull/2252

See #19082.
2021-03-05 18:51:10 +01:00
Vadim Zeitlin
7bcac7bfde Merge branch 'unix-default-locale'
Improve handling of default locale and other locale-related fixes.

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

Closes #11594.
2021-03-05 18:48:30 +01:00
Vadim Zeitlin
3701baecde Merge branch 'webview_script_message' of https://github.com/TcT2k/wxWidgets
Add WebView script message and user scripts.

See https://github.com/wxWidgets/wxWidgets/pull/2237
2021-03-05 18:44:46 +01:00
Paul Cornett
30637ad3b6 Make wxGridEvent methods GetRow() and GetCol() const and not virtual
See #19085
2021-03-05 07:38:32 -08:00
Paul Cornett
4388b9bd6b Make some member functions const 2021-03-04 11:49:33 -08:00
Tobias Taschner
80c04e3941 Merge branch 'master' into webview_script_message 2021-03-01 09:57:13 +01:00
Vadim Zeitlin
afb57182e1 Merge branch 'gcc-edge'
Make it possible to build wxWebViewEdge with gcc or clang too.

Closes https://github.com/wxWidgets/wxWidgets/pull/2245
2021-03-01 00:09:52 +01:00
Maarten Bent
7532532800 Mention GCC/Clang support in wxWebViewEdge documentation
And add a comment explaining the name of the EventRegistrationToken include guard.
2021-03-01 00:09:23 +01:00
Tobias Taschner
5a30bbe38f Apply suggestions from code review
Co-authored-by: PB <PBforDev@gmail.com>
2021-02-28 22:33:15 +01:00
Tobias Taschner
f419240335 Add Apple transport security to wxWebView docs 2021-02-28 20:44:38 +01:00
Tobias Taschner
ca5133fff7 Add usage documentation to wxWebView::AddScriptMessageHandler() 2021-02-28 20:41:49 +01:00
Vadim Zeitlin
91ec900034 Explicitly disallow wxLANGUAGE_UNKNOWN in wxLocale::Init()
This value doesn't make here, so be upfront about it.
2021-02-28 20:04:33 +01:00
Tobias Taschner
575ae90d85 Fix trailing whitespace 2021-02-28 20:03:36 +01:00
Tobias Taschner
6f7ac6a934 Add wxWebView::AddUserScript()
This allows to inject javascript code across multiple pages
2021-02-26 23:41:39 +01:00
Tobias Taschner
f2bfa7d446 Initial AddScriptMessageHandler() documentation 2021-02-26 22:35:49 +01:00
Tobias Taschner
b1d558a612 Disabled dev tools per default for Edge
This unifies the behavior among backends and is probably
the more useful default for most applications.
2021-02-26 21:55:10 +01:00
Tobias Taschner
3af4702b11 Implement wxWebView::EnableAccessToDevTools() for GTK 2021-02-26 18:53:46 +01:00
Tobias Taschner
c3d0d7d000 Identify script handler in message event 2021-02-26 16:59:56 +01:00
Tobias Taschner
011035ef08 Add wxEVT_WEBVIEW_SCRIPT_MESSAGE_RECEIVED event 2021-02-26 15:41:41 +01:00
Vadim Zeitlin
2c9f6770a5 Merge branch 'valnum-unsigned'
Fix handling of unsigned types in numeric validators: don't accept
negative numbers as unsigned, allow using the full 64-bit range.

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

Closes #12967.
2021-02-23 21:52:27 +01:00
Vadim Zeitlin
eb64202ad4 Add support for unsigned long long to wxNumberFormatter
This is necessary in order to deal with the numbers greater than
wxINT64_MAX that can't be represented in just long long.

It also allows to implement the intuitive handling of minus sign for the
unsigned numbers, i.e. not to accept it in FromString(), unlike the
standard functions which do (and parse -1 as 0xffff...fff).

Also extend the tests to check for more boundary cases.
2021-02-22 11:49:19 +01:00
Vadim Zeitlin
b53f7ac904 Restore support for using faster dotted pens in wxMSW
Changes of d245dc9e1f (Fix drawing of dotted lines with wxDC in wxMSW,
2020-03-27) improved the appearance of dotted and dashed lines in wxMSW
but at the expense of significant (up to a factor of 300) slowdown.

Allow the applications for which the drawing performance is important to
explicitly request the old behaviour, with uglier, but faster, pens by
choosing to use low quality pens.

Update the graphics benchmark to allow specifying the pen quality and
verify that the performance when using it is the same as before 3.1.4.

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

See #7097.

Closes #18875.
2021-02-22 00:04:07 +01:00
Vadim Zeitlin
d3f051e328 Document wxNumberFormatter overloads using long long
These overloads were added back in f2a5052baa (Add support for long long
to wxNumberFormatter., 2011-01-19) but never documented.
2021-02-21 16:43:04 +01:00
Gary Allen
9b1829c300 Add wxRibbon panel border colour option
Add wxRIBBON_ART_PANEL_HOVER_BORDER_COLOUR and
wxRIBBON_ART_PANEL_HOVER_BORDER_GRADIENT_COLOUR to allow further
customization of wxRibbon panels.

Closes https://github.com/wxWidgets/wxWidgets/pull/2239
2021-02-20 13:29:33 +01:00
Dimitri Schoolwerth
40422db37d Add wxMac wxFileDialog::GetCurrentlySelectedFilterIndex() support
Simply set the relevant variable while changing selection and give
the extra control a chance to update.

Note that updating the UI currently asserts with the dialog sample if
wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES is 1 (toggable with Ctrl+Cmd+S in
the sample), This will be fixed in the next commit.
2021-02-15 00:37:45 +01:00
Tobias Taschner
e09063186c Provide generic wxWebView::Find() implementation
This implementation is based on javascript 'window.find()'
https://developer.mozilla.org/en-US/docs/Web/API/Window/find
It's not standard, but implemented in most browsers.

It's not a complete implementation as it can't determine how
many search results can be found.

If the backends API provides a native find interface it should be
used instead of this implementation, but it's good fallback.
2021-02-10 23:55:18 +01:00
Tobias Taschner
5512089d5b Apply suggestions from code review
Co-authored-by: VZ <vz-github@zeitlins.org>
2021-02-09 23:35:01 +01:00
Tobias Taschner
a3f85e9cd5 Implement wxEVT_WEBVIEW_FULLSCREEN_CHANGED in GTK 2021-02-09 22:28:29 +01:00
Tobias Taschner
f6a23a0431 Add wxEVT_WEBVIEW_FULLSCREEN_CHANGED event
The event is triggered by wxWebView when the page requests fullscreen view.

It's currently only implemented for the edge backend.
2021-02-09 22:28:29 +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
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
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
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
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
Tobias Taschner
d17e8978a6 Make wxWebView::RunScript() const 2021-02-05 22:18:31 +01:00
Tobias Taschner
788bef2cf2 Select Edge as the default backend on MSW
If enabled and available at runtime use the Edge backend.
This is probably more useful for most users.
2021-02-05 22:18:29 +01:00
Tobias Taschner
b351e7762d Move common wxWebView code to base class
Removes duplicate code in the various webview backends
2021-02-05 22:18:29 +01:00
Tobias Taschner
0d82348328 Add wxWebView::GetBackendVersionInfo()
Allows to get the WebView backend version if available
Currently implemented for IE, Edge and webkit2.
2021-02-05 22:18:28 +01:00
Tobias Taschner
489afb3336 Allow using a fixed version with wxWebViewEdge
A fixed version may be distributed with the application
and wxWebViewEdge::MSWSetBrowserExecutableDir() allows
it's usage with wxWebViewEdge.
2021-02-05 22:18:28 +01:00
Vadim Zeitlin
a8d869f2c8 Merge branch 'docs/avoid-recommending-wxNewId' of https://github.com/catalinr/wxWidgets
Fixes for wxNewId() documentation.

See https://github.com/wxWidgets/wxWidgets/pull/2211
2021-02-05 21:38:16 +01:00
Gary Allen
f4172b0b46 Allow overriding wxMenu::MSWCommand() in wxMSW
This can be useful to implement custom handling of WM_COMMAND for the
popup menus, so make this function virtual and document it to indicate
that it is now part of the public API.

Closes https://github.com/wxWidgets/wxWidgets/pull/2170
2021-02-05 12:04:25 +01:00
catalinr
bfa4dd01d7 Link wxNewId() with wxRegisterId() in the docs 2021-02-03 12:20:07 +02:00
Paul Cornett
d932e89d40 Document when wxColour::IsSolid() was added 2021-01-28 07:31:36 -08:00
Vadim Zeitlin
97eecc1cce Merge branch 'sizerflags-center-align'
Fix combining wxSizerFlags alignment and CenterXXX().

See https://github.com/wxWidgets/wxWidgets/pull/2190
2021-01-27 17:55:18 +01:00
Vadim Zeitlin
9130f8bfc6 Don't change orthogonal alignment in wxSizerFlags::CenterXXX()
It was unexpected that using wxSizerFlags().Right().CentreVertical()
didn't right-align the item because CentreVertical() reset the alignment
in the horizontal direction rather than just setting it in the vertical
one, so change this, document the new behaviour explicitly and add a new
unit test checking for it.

Closes #18989.
2021-01-25 12:58:04 +01:00
Vadim Zeitlin
4de8857c85 Add wxDynamicLibrary::Attach()
This is symmetric with Detach() and can be useful and doesn't cost
anything to have.
2021-01-25 00:15:24 +01:00