Commit Graph

67753 Commits

Author SHA1 Message Date
Tobias Taschner
12c462d424 Add TODOs for unimplemented wxWebViewEdge features 2020-01-16 10:10:02 +01:00
Tobias Taschner
5dae0333b3 Improve wxWebViewEdge::RunScriptSync() error handling 2020-01-16 09:56:36 +01:00
Tobias Taschner
9f11abd8fc Rename wxWebView::EnableDevTools() to EnableAccessToDevTools() 2020-01-16 09:38:35 +01:00
Tobias Taschner
f48770ee5a Remove outdated code and comment 2020-01-15 22:21:16 +01:00
Tobias Taschner
b4764bbf4f Fix typo in interface/wx/webview.h
Co-Authored-By: PB <PBforDev@gmail.com>
2020-01-15 22:14:23 +01:00
Tobias Taschner
f8e69e4166 Call CoTaskMemFree() on LPWSTR return by WebView2 API 2020-01-15 22:13:12 +01:00
Tobias Taschner
964992e7ff Move WebView2 event handling from lambdas to functions 2020-01-15 21:51:58 +01:00
Tobias Taschner
bbde6e2e88 Move wxWebViewEdge implementation to private header 2020-01-15 21:23:37 +01:00
Vadim Zeitlin
1ace3b336e Update strings of already created wxGridCellChoiceEditor too
Calling wxGridCellChoiceEditor::SetParameters() didn't have any effect
if the editor had been already used because this method only updated the
internally stored m_choices, used for creating the combobox, but not the
strings actually used by the combobox, if it had been already created.

Also mention that this works in the documentation.

Closes #10465.
2020-01-15 20:03:56 +01:00
Tobias Taschner
0d00af5913 Add wxLogApiError() to important WebView2 API calls 2020-01-15 17:05:34 +01:00
Tobias Taschner
903279a9af Add a note about WebView2 SDK license requirements 2020-01-15 17:05:34 +01:00
Tobias Taschner
bf6b51e702 Various small code fixups 2020-01-15 17:05:27 +01:00
Tobias Taschner
bce0e65a80 Rename wxWebView::IsDevToolsEnabled() to IsAccessToDevToolsEnabled() 2020-01-15 16:22:43 +01:00
Tobias Taschner
e20296fee2 Remove explicit check for Windows 7 2020-01-15 16:17:45 +01:00
Tobias Taschner
dea80692b4 Use wxDL_INIT_FUNC() macro 2020-01-15 16:13:26 +01:00
Tobias Taschner
21cc8a4e49 Update setup.h files 2020-01-15 15:58:30 +01:00
Tobias Taschner
c3f0b7a6cb Apply suggestions from code review
Co-Authored-By: VZ <vz-github@zeitlins.org>
2020-01-15 15:55:49 +01:00
Lauri Nurmi
e8b8b0288f Make wxNewId() and others return/take wxWindowID rather than int
wxWindowID is a typedef of int, so nothing should really change, except
for the improved readability.

Closes https://github.com/wxWidgets/wxWidgets/pull/1682
2020-01-15 14:28:33 +01:00
Vadim Zeitlin
fdc2e1b8bd Merge branch 'grid-ellipsize'
Implement support for ellipsization in wxGrid.

See https://github.com/wxWidgets/wxWidgets/pull/1705
2020-01-15 14:23:29 +01:00
ExplorerLog
4636c563c7 Fix "Quit" menu item help translation to zh_CN
Closes https://github.com/wxWidgets/wxWidgets/pull/1706.

Closes https://github.com/wxWidgets/Phoenix/issues/1484.
2020-01-15 12:23:33 +01:00
Tobias Taschner
049d253a85 Fix typo and wording in webview documentation 2020-01-14 09:55:30 +01:00
Tobias Taschner
19b85d6370 Update interface/wx/webview.h
Co-Authored-By: PB <PBforDev@gmail.com>
2020-01-12 21:10:41 +01:00
Tobias Taschner
e365fbbac8 Update include guards
Co-Authored-By: PB <PBforDev@gmail.com>
2020-01-12 20:05:47 +01:00
Vadim Zeitlin
f5548e399e Fix problem with dragged icon remaining on screen under MSW 10
Always perform cleanup on drop, even if OnDrop() threw an exception.

Closes #18499.
2020-01-11 23:37:38 +01:00
Vadim Zeitlin
1b6856931a Fix problem with dragged icon remaining on screen under MSW 10
Always perform cleanup on drop, even if OnDrop() threw an exception.

Closes #18499.
2020-01-11 23:36:38 +01:00
Vadim Zeitlin
2c26830991 Fix closing minimized top level windows under Windows 10
Minimized windows don't seem to get any events after "Close" menu item
is selected from the system menu, so they were never actually destroyed
when closing them in this way.

Fix this by explicitly waking up the message loop after deleting the
window to ensure that the delayed destruction does happen.

Closes #18622.

See https://github.com/wxWidgets/wxWidgets/pull/1690
2020-01-11 23:14:10 +01:00
Vadim Zeitlin
13752968ea Fix closing minimized top level windows under Windows 10
Minimized windows don't seem to get any events after "Close" menu item
is selected from the system menu, so they were never actually destroyed
when closing them in this way.

Fix this by explicitly waking up the message loop after deleting the
window to ensure that the delayed destruction does happen.

Closes #18622.

See https://github.com/wxWidgets/wxWidgets/pull/1690
2020-01-11 23:13:03 +01:00
Vadim Zeitlin
46042843e8 Implement support for ellipsization mode in wxGrid
Add another wxGrid::DrawTextRectangle() overload, taking wxGridCellAttr
and ellipsizing the string if necessary, i.e. if the fitting mode of
this attribute indicates that we should do it.

Switch the code of all renderers for which it makes sense to use
ellipsization to use the new overload.
2020-01-11 19:15:15 +01:00
Vadim Zeitlin
41dcd9ecdb Add API for ellipsization support to wxGrid
This API is not implemented yet, i.e. ellipsization mode is not
respected for now. This commit just adds the API, documents it and adds
an example of using it in the sample.
2020-01-11 19:14:23 +01:00
Vadim Zeitlin
f13085441c Add wxGridFitMode and functions working with it
Replace "bool overflow" flag with a class allowing to specify the same
overflow/clipping behaviour currently, but also allowing to extend it,
notable to add ellipsization support, in the future.

Preserve the existing API by reimplementing it in terms of the new one.

Also update the same to demonstrate a cell which always overflows,
independently of the default cell behaviour.
2020-01-11 18:02:12 +01:00
Tobias Taschner
68c46681a0 Document wxWebViewEdge build process 2020-01-11 15:43:22 +01:00
Tobias Taschner
1f1202807b Implemented wxWebViewEdge::Print() 2020-01-11 15:06:29 +01:00
Tobias Taschner
a1a155618e Set Edge data folder to UserLocalDataDir 2020-01-11 14:59:08 +01:00
Tobias Taschner
f919b6e2f5 Rename from webview_edgec to webview_edge 2020-01-11 14:47:47 +01:00
Vadim Zeitlin
325408f062 Make wxGridCellAttr ctor taking a single argument explicit
There doesn't seem to be any reason for allowing to implicitly convert
wxGridCellAttr pointer to wxGridCellAttr object.
2020-01-11 14:05:09 +01:00
Tobias Taschner
d72e5874eb Add wxWebView methods to enable dev tools
Currently only implemented for the Edge (Chromium) backend.
2020-01-10 22:27:36 +01:00
Tobias Taschner
f2196abca3 Add wxWebViewEdgeChromium to other build systems 2020-01-10 22:22:30 +01:00
Tobias Taschner
6750d30102 Load WebView2Loader.dll dynamically 2020-01-10 22:22:29 +01:00
Markus Pingel
6a99e7e273 Add wxWebView Edge (Chromium) implementation
This backend requires WebView2 SDK and enables usage of Edge (Chromium)
on Windows 7 and newer
2020-01-10 22:22:28 +01:00
Tobias Taschner
1afeaa324d Added new build option wxUSE_WEBVIEW_EDGE 2020-01-10 21:42:18 +01:00
Vadim Zeitlin
59111e0d11 Suppress warnings due to use of deprecated WebKit functions
This is not the best solution, but getting dozens of lines of warnings
when compiling this file is not great neither and there doesn't seem to
be anything else to do about this.
2020-01-10 19:20:26 +01:00
Lauri Nurmi
09e0b3927b Fix building tests when configured with --disable-log
Add missing wxUSE_LOG checks to wxTextCtrl test and disable wxLog test
entirely when wxUSE_LOG==0.

Closes https://github.com/wxWidgets/wxWidgets/pull/1703
2020-01-10 16:38:41 +01:00
Igor Korot
b8d689422f Check item index in wxListCtrl::GetItemState() in wxMSW too
This was already the case in the generic version, but wxMSW one just
silently returned 0 for invalid item index.

Make it consistent with the other platforms and SetItemState() by
checking the index in it too.

Closes https://github.com/wxWidgets/wxWidgets/pull/1702
2020-01-10 16:36:12 +01:00
Ian McInerney
64ac20536a Remove event macros expansions from the documentation
The expansions do not really add anything to the documentation
page, and can be confusing at first.

Closes https://github.com/wxWidgets/wxWidgets/pull/1701
2020-01-10 16:30:20 +01:00
Vadim Zeitlin
7dd0ad9a0d Merge branch 'composite-contextmenu-event'
Fix event object and ID of wxEVT_CONTEXT_MENU sent from parts of a
composite control.

See https://github.com/wxWidgets/wxWidgets/pull/1698
2020-01-09 23:27:17 +01:00
Vadim Zeitlin
e3eb05df72 Skip not handled mouse events in wxGrid code
Unhandled mouse events should be skipped. Otherwise wxEVT_CONTEXT_MENU
event couldn't be generated by right clicking anywhere inside wxGrid and
could be only generated for the main grid part (but not the labels) by
pressing Shift-F10 under MSW.

Closes https://github.com/wxWidgets/wxWidgets/pull/1697
2020-01-09 23:26:46 +01:00
Vadim Zeitlin
52ae67ef86 Replace dynamic casts with virtual wxWindow::WXGetTextEntry()
Instead of checking for all text-like controls one by one in
wxCommandEvent::GetString(), call a virtual function checking for this.

This is simpler, less error-prone and faster -- at the cost of
increasing the vtbl size of all wxWindow-derived classes.

Closes https://github.com/wxWidgets/wxWidgets/pull/1696
2020-01-09 23:25:49 +01:00
Mitrik Sicilian
20ecab6268 Remove redundant const from Mac wxDataFormat methods return type
No real changes, but useless top-level const in the return type resulted
in -Wignored-qualifiers warning (if it was enabled).

Closes #18646.
2020-01-09 22:43:12 +01:00
Vadim Zeitlin
db5cf010d7 Improve wxLIST_STATE_DONTCARE documentation
Don't say that it's MSW-specific because it's just a symbolic name for
0, and is used under all platforms if no other flags are set.
2020-01-09 16:28:00 +01:00
Tobias Taschner
095a93e0c0 Add wxWebView::IsBackendAvailable()
This allows to check if a specified backend has been registered before creation of a new instance
2020-01-09 13:44:06 +01:00