This allows the caller to log the message to the console in addition to
showing the message box, for example. Previously, this would be
impossible to do without getting the duplicates if the message box was
not shown, but now it is.
Serialize them to strings in wxFileConfig, just as we always did for
long, but use wxRegKey support for storing them directly to the registry
in wxRegConfig.
- Use subsections
- Unify layout of backend sections
- Refer to backends by consistent naming
- Remove Trident reference (while technically correct it's probably not very helpful for most)
- Add a warning to IE backend
- Add wxWebViewEdge doc
- Add missing event from wxWebViewEvent docs
This uses the native registry support for 64-bit values available since
Windows XP.
Note that SetValue64() can't be just called SetValue() as this would
introduce ambiguities when writing an int or an enum to the registry.
This could be avoided by providing overloads for all the arithmetic
types, but it's arguably better to be more clear about what exactly is
being written to the registry in this low-level class and using a
different name is definitely simpler.
This allows to show message boxes in ports other than wxMSW too by doing
it only when it is safe, i.e. when the GUI is initialized, while still
keeping the old code directly using the native MessageBox() function for
MSW for maximal robustness.
This trivial function just allows to avoid checking if wxTheApp is not
null before calling GetTopWindow() on it.
Replace the existing "wxTheApp && wxTheApp->GetTopWindow()" calls with
wxApp::GetMainTopWindow().
No real changes.
This adds a yet another conversion function, which is not ideal, but
still better than having to write ToStdString(wxConvUTF8) every time for
losslessly converting wxString to std::string: not only this is too
long, but it's also too easy to forget to specify wxConvUTF8, resulting
in data loss when using non-UTF-8 locale.
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.
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.
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.
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
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.
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.
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.
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
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.
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.
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
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.
Under MSW, don't set the state to State_Cancelled as soon as Cancel()
was called, as the request was still used from the other threads
afterwards, resulting in race conditions and crashes.
Fix this by just removing the SetState(State_Cancelled) call from the
main thread, as it was redundant anyhow. This also makes the behaviour
correspond to the documentation, which indicates that Cancel() works
asynchronously.
Also ensure, for all backends, that we actually cancel the request only
once, even if public Cancel() is called multiple times. This required
renaming the existing wxWebRequestImpl::Cancel() to DoCancel().
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.
It's up to the application code to decide how it handles the HTTP status
codes it gets back from server, there is no need to have a special
method for handling them in wxWebRequest itself.
We also shouldn't skip downloading the response body just because it was
unsuccessful, we may still need it (e.g. it's very common to return the
detailed error description in a JSON object in the message body when
returning some 4xx error), so don't do it in wxMSW implementation and
add a test verifying that we still get the expected body even for an
error status.
Also improve wxWebRequest::State values documentation.
Follow the convention of using the event macro names (rather than the
event type) names in @event documentation in wxNotificationMessage
documentation too, e.g. use EVT_NOTIFICATION_MESSAGE_CLICK rather than
wxEVT_NOTIFICATION_MESSAGE_CLICK.
Closes https://github.com/wxWidgets/wxWidgets/pull/2166
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.
Check that current state is State_Idle in wxWebRequest itself only once
instead of doing it in 2 (out of 3) wxWebRequestImpl implementations.
Also assert if this is not the case instead of silently doing nothing
which would surely be more difficult to debug.
Using shared pointer seems to be ill-advised here, the stream shouldn't
be shared as it's going to be used by wxWebRequest itself and can't be
used by the application code in parallel, so the ownership transfer
semantics is more appropriate.
We could take a wxScopedPtr<> instead, but wx API takes ownership of raw
pointers everywhere else, so do it here too.
Incidentally fix a bug with calling IsOk() on a possibly null pointer.