Add wxPrintDialogData::EnableCurrentPage() and implement support for it
under MSW, where it enables selecting the "Current page" radio button in
the pages selection area of the native dialog.
Update the sample to show the new function.
This replaces the previously implemented wxWebViewWindowInfo.
It explicitly breaks the previous API to enable WebKitGTK
integration and to make the usage in application code less error prone.
A new event wxEVT_WEBVIEW_NEWWINDOW_FEATURES is added to allow
access to the window features and the child web view.
This function must be called to be able to re-create the EGL drawing
surface after the window layout have changed, such as after a reparent
of the canvas or of it's grandparents.
Make it suitable for use in this case by re-creating the surface if
there already was one and document this function to make it part of the
public API.
Closes#23366.
While the user could select to print only the selection in the dialog,
there was no way for the program to specify which pages were selected,
making this choice impossible to handle.
Add new IsPageSelected() function which is now used to query which pages
are selected and should actually be printed.
Update the printing sample to show how this function is used.
Make it clear that the scale factor comes from the bitmap selected into
the device context and not from the "compatible" wxDC, as this is how
the code currently behaves (and this behaves arguably does make sense,
but also can't be changed without breaking the existing code in any
case).
In 40ff38b63b wxWebView::GetNativeConfiguration() was
added which isn't suitable if multiple wxWebViewEdge instances are created with
different options (as they must share the same options). To prevent such errors
the previous method is replaced by the new class wxWebViewConfiguration which
can be shared between various wxWebView instances.
This explicitly breaks API to improve usage.
In the future the new class could also enable a good way to wrap various
common options/configurations available via native API.
This function could be called on an already deleted object, which could
result in a crash, and always resulted in a TSAN error.
Fix this by calling it before releasing the internal lock, which
prevents this from happening, but will result in a deadlock if this
function is overridden to do something requiring any lock held by the
thread.
This is not ideal, but still seems to be like a lesser evil.
Add new class wxWebViewWindowInfo:
This new class returned by wxWebViewEvent::GetTargetWindowInfo() allows
to get information about the window that is about to be opened and to
set the window that will be used to display the content.
Improvements to wxApp initialization and modernize the code to use
std::unique_ptr<> instead of wxScopedPtr or, worse, macro-based scoped
pointers.
See #23319.
While these array classes are deprecated in the user code, they're still
used, for compatibility, in many places in wxWidgets API and allowing to
create them from initializer_list makes using it more ergonomic as it's
now possible to just pass an initializer list of items to fill the
control with, for example, instead of appending them one by one.
Closes#23309.
Replace macro-based scoped pointers with the standard class.
Also mention that using these macros and wxScopedPtr itself is
deprecated (but there are too many occurrences of the latter in the code
to change all of them now).
Note that wxMsgCatalog ctor and dtor had to be moved out of line to
allow using unique_ptr<> to an incomplete class as member. On the bright
side, we can just use unique_ptr<> instead of wxPluralFormsNodePtr which
was a local reimplementation of wxScopedPtr.
No real changes.
There is no real need to document this, it's not a valid enum value and
having it in this file without a trailing comma was a syntax error.
Closes#23298.
Adding such function was discussed a few times in the past and it's
going to be needed by wxWidgets itself in the next commit, so do add it,
finally, so that it could also be used from the application code too.
Although @see was used predominantly, a few places used @sa which is
equivalent to it but less readable, so switch to using @see everywhere.
No real changes.
Store data passed to AddTool() in wxAuiToolBarItem and provide
wxToolBar-like functions for setting and getting this pointer.
See #23276.
Closes#23271.
Rename the new overload of DoSetSplitterPosition() to use a different
name: not only this avoids deprecation warnings that broke all the CI
builds, but it also makes things more clear and simpler to use as all
the derived classes don't need to override both the deprecated overload
and the new one to avoid warnings about hiding a base class virtual
function and can just override the new one.
Also remove the default value "Refresh" for the flags which seems to be
inconsistent with the default value "Null" used elsewhere and prefer to
specify it explicitly.
This is useful because there is no really standard value for this colour
and the choice of grey (0x808080) is completely subjective, but also
because it may be useful to disable custom drawing of the border
entirely if it results in any problems with the future Windows versions.
See #23107.
Add MSW-specific wxDarkModeSettings class which can be used to customize
the colours used in the dark mode (and will be also used for other
customizations in the future).
This commit is best viewed using Git --color-moved option.
Using the box itself as the parent for some items and its parent window
as the parent for the other ones results in layout problems because the
correct offset is not used when positioning the items not using the box
as parent.
This has always been the case and it doesn't seem to be worth fixing, as
the scenario with the items not using the box as the parent is only
still supported for backwards compatibility anyhow, so just add an
assert checking for this and document this limitation.
Closes#23239.
Disable compositing when adding a window which is not a child of
wxStaticBox to wxStaticBoxSizer as sibling windows can't be painted
correctly inside one another when compositing is on.
Also add a debug warning when not using the static box as parent for the
windows inside it, to make it easier to notice the windows using a wrong
parent, and emphasize even more strongly that this is not the right way
to do it in the documentation.
Closes#23182.
Add both the Scintilla and Lexilla iface to the script.
Remove unused LinkLexers code.
Allow to get the Lexilla version, and show it in the stc sample.
It didn't make any sense to have Create() functions in this class
without the default ctor as they could be never used -- calling them
would result in creating the window twice.
Add the default ctor to make this class more similar to all the other
windows.
Allows to determine if a navigation is happening in the main frame
or an embedded iframe when handling wxEVT_WEBVIEW_NAVIGATING.
Additionally implement previously missing wxEVT_WEBVIEW_NAVIGATING
events for frames with the Edge backend.
See #23238.
Fix another pixel units confusion in wxToolBar code and ensure that
"sizeNeeded" is expressed in logical units when a fixed bitmap size is
set, to make it consistent with the case when it is not set, and also
because bitmap size is supposed to be expressed in logical pixels, in
both SetToolBitmapSize() and, for consistency, GetToolBitmapSize() too.
Also explicitly mention the latter in the documentation.
See #23228.
Closes#23222.