Commit Graph

6447 Commits

Author SHA1 Message Date
Vadim Zeitlin
0f1d1d2ae9 Update wxSearchCtrl popup menu state after showing it
Fix the state of the check/radio items in the menu by updating the
template used by macOS to create the actual menu after showing it and
possibly changing the items state.

This is not ideal because changing the state from the program, e.g.
using wxMenuItem::Check(), still doesn't work correctly, i.e. isn't
reflected in the menu when it's shown, but better than nothing until a
better solution (which ideally would update the menu just before showing
it, but it's not clear how exactly can we do it, knowing that we don't
get wxEVT_MENU_OPEN for this menu neither) can be found.
2021-04-04 14:21:27 +02:00
Vadim Zeitlin
7112582f18 Show events from wxSearchCtrl menu in the widgets sample
Verify that we get the expected events from the menu items.
2021-04-04 13:48:37 +02:00
Vadim Zeitlin
e442d90b0d Merge branch 'webrequest-build-fixes' of https://github.com/MaartenBent/wxWidgets
wxWebRequest-related build fixes for MinGW.

See https://github.com/wxWidgets/wxWidgets/pull/2283
2021-03-23 14:16:07 +01:00
Vadim Zeitlin
5d6525ccf1 Merge branch 'webview_useragent' of https://github.com/TcT2k/wxWidgets
Add support for custom user agent to wxWebView.

See https://github.com/wxWidgets/wxWidgets/pull/2280
2021-03-19 22:39:00 +01:00
Maarten Bent
5bdd5e1432 Check if wxUSE_WEBREQUEST is defined 2021-03-18 20:49:57 +01:00
Paul Cornett
5154780bbf Avoid some -Wcast-qual warnings 2021-03-17 10:16:32 -07:00
Tobias Taschner
97e469c255 Add access to user agent for wxWebView
Allow setting a custom user agent for a webview.
Also allow access to the current user agent.
2021-03-16 22:53:00 +01:00
Artur Wieczorek
02af9b0295 Add option to demonstrate disabled wxPropertyGrid in propgrid sample 2021-03-12 20:35:06 +01:00
Paul Cornett
679c3ef714 Avoid setting layout direction to wxLayout_Default in widgets sample
wxMSW doesn't support setting wxLayout_Default
2021-03-11 08:49:59 -08: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
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
Artur Wieczorek
1c57699e92 Add ability to set bitmap margins for wxButton in widgets sample
This is to demonstrate the margins between the bitmap and the text
of the button.
2021-03-02 22:47:37 +01:00
Artur Wieczorek
ae5593bd23 Fix wxButton page in widgets sample
Enable image alignment radio box only if button with text and image
is active because it is applicable only in this case.
2021-03-02 22:34:44 +01:00
Tobias Taschner
80c04e3941 Merge branch 'master' into webview_script_message 2021-03-01 09:57:13 +01:00
PB
a75aa78263 Fix dragging file in DnD sample
At least on Microsoft Windows, it is possible to start dragging an unselected
wxTreeCtrl item. Therefore, in wxEVT_TREE_BEGIN_DRAG handler do not use the
path that is currently selected in the control but the one that is actually
being dragged.

Closes https://github.com/wxWidgets/wxWidgets/pull/2258
2021-03-01 00:03:21 +01:00
Tobias Taschner
166d7e2c83 Fix unused warning in sample 2021-02-28 20:06:59 +01:00
Tobias Taschner
2a16638e2a Fix EOL issues 2021-02-28 20:03:31 +01:00
Tobias Taschner
29bfcdfd5e Add common web message identifier 2021-02-27 11:55:50 +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
140e9825b7 Log error if script handler cannot be added 2021-02-26 21:41:02 +01:00
Tobias Taschner
3f23273f46 Fix typo in sample 2021-02-26 16:59:57 +01:00
Tobias Taschner
c3d0d7d000 Identify script handler in message event 2021-02-26 16:59:56 +01:00
Tobias Taschner
c78147b267 Add script command handler to sample 2021-02-26 16:59:56 +01:00
Tobias Taschner
a7ff7a8012 Implement script message for WKWebView backend 2021-02-26 16:59:56 +01:00
Dimitri Schoolwerth
84c989626d Make slowness of attribute lookups more apparent in grid sample
Multiply the number of rows in the grid sample by a factor of 10. This
demonstrates the slowness with attribute lookups better when using
checkered (Ctrl+Shift+K) or coloured (Ctrl+Shift+L) cells, as filling
the grid is slowed down by way more than a factor of 10. Scrolling also
becomes less responsive the further away from the home cell the view is.

As a result of increasing the row count also move the cells positioned
near the end of the grid there again, and don't use fixed coords for
them.
2021-02-15 12:36:03 +01:00
Dimitri Schoolwerth
823d79ce06 Demonstrate intensive attribute usage in grid sample
Add options to fill grid either half (checkered cells) or fully (all
cells coloured) with attributes. Available from Grid > "Toggle Checkered
Cells" and "Toggle Coloured Cells".
2021-02-15 12:36:03 +01:00
Dimitri Schoolwerth
25f981bfad Demonstrate wxOSX_FILEDIALOG_ALWAYS_SHOW_TYPES in dialogs sample
Add a menu option (Ctrl+Cmd+S) to toggle showing of the filter choice
with file types in open dialogs on macOS.
2021-02-15 00:37:45 +01:00
Vadim Zeitlin
d2c3c6a35b Merge branch 'msw_webview_edge4' of https://github.com/TcT2k/wxWidgets
Fix missing events for in-document navigation with wxWebViewEdge,
implement Find() for it and add wxEVT_WEBVIEW_FULLSCREEN_CHANGED for it
and wxGTK.

See https://github.com/wxWidgets/wxWidgets/pull/2227
2021-02-14 19:37:44 +01:00
Maarten Bent
dbcfe56ae5 Make wxPenStyleComboBox in Combo sample DPI aware 2021-02-13 01:59:24 +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
Tobias Taschner
693d946ffc DPI independent default size in WebView sample 2021-02-09 18:02:36 +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
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
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
AliKet
62ae887159 minor correction to widgets sample to work correctly in RTL layout 2021-02-06 08:39:01 -08: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
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
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
febd185fc6 Merge branch 'web-request'
Add wxWebViewRequest and related classes allowing to use HTTPS and
HTTP/2.

See https://github.com/wxWidgets/wxWidgets/pull/977
2021-01-17 18:19:47 +01:00
Vadim Zeitlin
970ab0a1ae Make sure wxEVT_WEBREQUEST_DATA is processed in the main thread
This event was processed in a worker thread, which was different from
all the other events and also almost surely not thread-safe, so change
this and queue it for processing in the main thread instead.

Use wxMemoryBuffer instead of non-owning pointer in wxWebRequestEvent
and reset the buffer used internally every time to ensure the data is
still available by the time the event is processed.

Also increase the amount of data downloaded in the "advanced" page of
the sample as it has to be greater than wxWEBREQUEST_BUFFER_SIZE, which
is currently 64KiB, to have a chance of seeing the value actually
change, otherwise all the data arrives in a single event. As it is,
using the maximal size supported by the httpbin service, we only get 2
events.
2021-01-16 23:53:15 +01:00
Vadim Zeitlin
ce4cb33c20 Remove tooltip tracking code from wxOSX
This doesn't seem to be necessary and is actually actively harmful, as
this code prevented tooltips from working with non-native windows, such
as those used inside wxSplitterWindow in the splitter sample.

Just remove this code entirely and add SetToolTip() calls to the sample
to show that they do work now.

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

Closes #14220.
2021-01-16 18:54:27 +01:00
Vadim Zeitlin
717e6590bd Merge branch 'macos_wkwebview' of https://github.com/TcT2k/wxWidgets
Use WKWebView for wxWebView Implementation under Apple systems.

See https://github.com/wxWidgets/wxWidgets/pull/2113
2021-01-16 16:20:58 +01:00
Vadim Zeitlin
588dcab629 Merge branch 'cmake-min-ios-version' of https://github.com/discnl/wxWidgets
Differentiate between macOS and iOS minimal supported version for CMake
builds.

See https://github.com/wxWidgets/wxWidgets/pull/2146
2021-01-16 16:16:16 +01:00
Vadim Zeitlin
e6cedf6649 Really support milliseconds in wxLog
Although this was supposed to work, specifying "%l" in wxLog time stamp
format actually didn't because wxLog timestamps were stored as seconds.

Fix this by storing them as milliseconds and add a simple test (not
executed by default) showing that "%l" works correctly now.

Still keep the old wxLogRecordInfo::timestamp field for compatibility,
as it was documented.

See #13059.
2021-01-15 14:55:06 +01:00
Vadim Zeitlin
5e8a14ff41 Update dialogs sample to use wxWebCredentials too
This should have been done in abcc31c6b2 (Update wxCredentialEntryDialog
to use wxWebCredentials, 2021-01-10).
2021-01-12 14:59:14 +01:00
Vadim Zeitlin
20a3317839 Rename wxWebRequestEvent::GetResponseFileName() to GetDataFile()
This is shorter and doesn't imply that just the name (and not the full
path) is being returned.

Also rename wxWebResponse::GetFileName() to GetDataFile() for the same
reasons and for consistency. And document this previously undocumented
method.
2021-01-12 03:34:40 +01:00
Catalin Raceanu
76167e271b Insert comma for clarity in a message in the sample
No real changes.
2021-01-11 02:57:15 +01:00