It doesn't cost almost anything to provide this function, as we already
track showing and dismissing all modal dialogs in this class, and it can
(will) be useful, so add it.
These functions can't be really used, the controls are managed by the
picker itself and using SetTextCtrl(), in particular, has no chance of
working correctly because the picker wouldn't be connected to
wxEVT_TEXT and wxEVT_KILL_FOCUS events on it, as it should be.
Using static_cast<className*>(obj) when the object is not actually of
the given type is UB, so avoid it even if should be harmless in
practice, by simply omitting it: we only need "obj" to be a wxObject
here.
Note that this means that using wxCheckCast() or wxStaticCast() with a
type not deriving from wxObject is always UB, but there is not much that
we can do about it, so just document this explicitly.
Under certain circumstances it can make sense to use a locale other than
the default user locale.
One example would be, if an application wants to use a UI translation
with an RTL language (like Arabic) on a non-RTL system. This wouldn't
work with the default locale, because the layout direction would be
wrong.
Currently setting a non-default locale can already be achieved via
wxLocale anyway. Therefore wxUILocale::UseLocaleName() should be made
public, to allow for less side effects than using wxLocale.
Closes#23972.
All supported platforms provide 64-bit integer types since many years,
so remove the legacy wxLongLongWx implementation and rename
wxLongLongNative to just wxLongLong and always compile it in.
Note that wxLongLong itself must still be kept for compatibility as it
has member functions, such as GetValue() or ToString(), that can be used
in the existing code.
Although this is unusual in wxWidgets API, it really makes sense to let
wxAuiManager perform the scaling, if necessary, instead of asking every
implementation of wxAuiSerializer and wxAuiDeserializer to do it on
their own, so pass the values as DIPs to the former and assume the
values returned by the latter are in DIPs too to make things just work
even on the platforms where DIPs are not natively used (i.e. wxMSW).
Add wxAuiSerializer and wxAuiDeserializer classes and SaveLayout() and
LoadLayout() functions in wxAuiManager using them.
Show how these classes can be used to use XML for storing AUI layout in
the sample.
See #24225.
Try to make it as clear as possible that this class shouldn't be used
any longer without formally deprecating it (as it does still work in
wxMSW and, also, is still used in some of our own code).
wxWebRequest::AddHeader() was added to accompany the existing
SetHeader() method. In wxWebSession, AddCommonHeader() did exist
already but behaved like setting a header. Its behavior was adapted
to its name and SetCommonHeader() was added with the old behavior
to accompany AddCommonHeader().
The WinHTTP and CURL implementations of wxWebRequest do now append
multiple headers of the same name. The URLSession implementation
follows in the next commits.
HTTP headers like Set-Cookie can be present multiple times in a
web response by definition. The existing GetHeader() method is
not sufficient to cope with this situation.
This commit already adds an implementation for Windows.
Linux and macOS follow in the next commits.
Also known as [[gnu::warn_unused]].
Use __has_attribute to check availability of the attribute. (Is available
on recent GCC and Clang versions, not available on MSVC.)
Use the fonts set at wxAuiTabArt provider level in wxAuiNotebook, to
ensure that wxAuiNotebook::SetNormalFont() and SetSelectedFont()
actually work.
Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
Closes#24783.
This function doesn't exist any more since 5e2da5a106 (Get rid of v2.8
code, 2022-08-01) and was deprecated back in f944aec0cf (removed
SetVirtualSizeHints() and related code, 2007-12-15).
It seems that as of the below commit, doxygen changed its handling of
parsing backticks in comments such that it now fails to properly
generate documentation for the entire datetime.h file. Fix this by
closing the open backtick.
Also update the actual, non-documentation, header to match for
consistency, even if non-matching backticks are not a problem there.
See: https://github.com/doxygen/doxygen/commit/f18767307be20ca8d2ca81f74cc1f3446205282bCloses#24814.
Make a number of factual and formal changes. The most important
ones are noting that wxWebViewChromium does not support script
message handlers and accounting for the fact that there can be
multiple backends on each platform.
Implement it for Edge, WebKit2GTK and Chrome backends.
It doesn't seem possible to implement this for WebKit macOS backend and
IE backend doesn't support dev tools at all.
Also note that Edge backend doesn't seem to support closing the dev
tools window, so don't provide this functionality for now, even if it
could be implemented for WebKit2 and Chrome backends.
Remove outdated information about special meaning of wxRESIZE_BORDER
style flag on Windows.
Add a reference to ::wxDirSelector() and wxDirPickerCtrl.
Improve formatting by using @c where appropriate and fix few typos.
In the common dialogs overview, add that wxDirDialog can be used to
select also mutiple directories.
In wxDirSelector, provide the correct default argument for
the wxDirDialog style parameter, change the path parameter
name to match the implementation, and fix the example code.
Provide information about wxFD_ flags used by wxLoadFileSelector()
and wxSaveFileSelector().
Add missing default arguments for wxGetColourFromUser() and wxGetFontFromUser() parameters.
Improve formatting by using @c where appropriate.
This is an incompatible change, but it doesn't change anything under
Unix systems, where exit codes are most useful, and makes behaviour
consistent across all platforms, so it seems to be worth doing.
Unfortunately returning false from the (overridden) wxApp::OnInit() has
a side effect of exiting the application with inconsistent error code:
255 under Unix but 127 under MSW with MSVC.
While changing the default exit code in this case is probably a bad idea
because there are surely people relying on the current values, at least
allow changing it by explicitly calling the new SetErrorExitCode()
function.