Commit graph

4713 commits

Author SHA1 Message Date
Vadim Zeitlin
4c8bf1e9e7 Don't mention wxString::GetWriteBuf() in the documentation
This function doesn't exist any longer since 5e2da5a106 (Get rid of v2.8
code, 2022-08-01).

Remove documentation of this function and its UngetWriteBuf()
counterpart and don't refer to them in wxStringBuffer[Length]
documentation.
2023-04-15 15:08:37 +01:00
Vadim Zeitlin
fb17a5ac38 Merge branch 'use-std-cont-1'
Set wxUSE_STD_CONTAINERS=1 by default.

See #23439.
2023-04-15 15:46:08 +02:00
Vadim Zeitlin
5e7b08f9ea Correct wxDC::GetContentScaleFactor() documentation
Document that it returns the same value as GetDPIScaleFactor() wxWindow
method and _not_ the wxWindow method with the same name.

This is very confusing, but there doesn't seem to be anything to be done
about it by now.

See #23441.
2023-04-13 15:07:32 +02:00
Vadim Zeitlin
bc3acf429e Fix formatting in wxDisplay::GetPPI() documentation
Avoid putting wxSize(0,0) on two lines.
2023-04-12 17:02:07 +02:00
Vadim Zeitlin
89e4f51f62 Update documentation after setting wxUSE_STD_CONTAINERS=1
Explain that the legacy container classes now inherit from the standard
classes by default and also how to update the existing code to compile
when using standard library-based implementations.
2023-04-10 20:39:50 +01:00
Vadim Zeitlin
3335be1362 Document WX_DECLARE_LIST and WX_DEFINE_LIST macros
Even though they're deprecated, they should still be documented, just as
similar WX_DECLARE_OBJARRAY and WX_DEFINE_OBJARRAY are.
2023-04-10 20:31:47 +01:00
Vadim Zeitlin
61f2fb078b Merge branch 'remove-wxT-from-docs'
Remove most occurrences of wxT() from the docs.

See #23436.
2023-04-10 16:22:42 +02:00
Vadim Zeitlin
15936efed9 Merge branch 'use-stl-tweaks'
Minor changes related to wxUSE_STL.

See #23435.
2023-04-10 16:21:36 +02:00
Vadim Zeitlin
58a7b7b31b Merge branch 'arrstr-from-vector'
Improve interoperability between wxArrayString and std::vector.

See #23434, #23036.
2023-04-10 16:20:16 +02:00
Vadim Zeitlin
60dacae204 Make it more clear that wxT_2() is obsolete
Say it explicitly and remove example of its use which shouldn't needed
any longer.
2023-04-10 14:25:27 +02:00
Vadim Zeitlin
41d0313f52 Update wxT() documentation after ASCII build removal
Explain that this macro always expands into a wide-string now.
2023-04-10 14:25:02 +02:00
PB
d378444010 Remove most occurrences of wxT() from the docs
wxT() macro rarely needed now, so do not use it in the docs
unless it is required.
2023-04-09 20:35:49 +02:00
Vadim Zeitlin
bf3d6374d6 Recommend against using wxList in the new code
Make it clear that it's yet another legacy class.
2023-04-09 02:33:22 +02:00
Vadim Zeitlin
e9527ee5a2 Define wxArchiveIterator in all builds, not just STL one
Doing this doesn't introduce any backwards compatibility problems, so do
it always, and not only when wxUSE_STL==1.
2023-04-09 02:33:22 +02:00
Vadim Zeitlin
e832ebbacc Add wxArrayString::AsVector() too
This provides the conversion in the other direction, which is needed
less often but it's still arguably better to have it than not to.
2023-04-08 22:45:11 +01:00
Vadim Zeitlin
23981273df Document that wxArrayString is a legacy class
Explain that it's only needed in order to pass a bunch of strings to the
existing function and also mention that it doesn't even need to be
created explicitly in most cases.
2023-04-08 22:29:12 +01:00
Vadim Zeitlin
cee7611c6a Add wxArrayString ctor from std::vector
Allow constructing wxArrayString from vectors of any compatible type,
including wxString itself as well as std::string or std::wstring.
2023-04-08 20:22:48 +02:00
Vadim Zeitlin
d0e892ac09 Merge branch 'toolbar-docs'
Improve wxToolBar documentation.

See #23427.
2023-04-08 16:35:51 +02:00
Vadim Zeitlin
a459580052 Fix remark about labels under Mac in wxToolBar::AddControl()
Use "new" (only used since 292e5e1f17 (OSX renaming round 2, 2008-07-30)
name of the preprocessor constant and mention that it's enabled by
default.
2023-04-08 16:32:03 +02:00
Vadim Zeitlin
435efa8b5a Mark new language constants as being new since wx 3.3.1
Add a convenient @since_wx alias which is more appropriate for
single-line comments than the standard @since, which would expand into
two paragraphs.

See #23426.
2023-04-08 14:50:47 +02:00
utelle
c8d2244c63 Update language database and fix some problems in it
Update the list of known languages/locales to match the list of known
locales in Windows 11, adding support for a number of new locales.

Additionally, the issues mentioned in #23419 are fixed, except the
native descriptions of Northern Luri (Luri translations of the
territories are not known).

Closes #23419.

Closes #23426.
2023-04-08 14:47:48 +02:00
PB
17b25122e2 Update wxToolBar documentation
Remove information relevant only for Pocket PC and also fix a
mistyped word.
2023-04-07 09:51:06 +02:00
Vadim Zeitlin
dee816bb5b Merge branch 'ci-utf8'
Fix UTF-8 build under MSW and improve its coverage in the CI jobs.

See #23313.

Closes #23328.
2023-03-30 19:46:05 +02:00
Vadim Zeitlin
e187667e6b Merge branch 'msw-print-dialog-pages'
Add support for printing "selection" and "current page" in wxMSW and
printing code cleanup.

See #23338, #23372.
2023-03-29 12:20:38 +02:00
Vadim Zeitlin
30ffcfe22e Merge branch 'statbox-empty-label-draw'
Fix custom drawing wxStaticBox with empty label in wxMSW.

See #23343.

Closes #23342.
2023-03-29 11:19:15 +01:00
Stefan Ziegler
d75956d3e6 Add support for printing only the current page
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.
2023-03-29 01:15:06 +02:00
Vadim Zeitlin
488950f724 Implement wxString::Shrink() in terms of shrink_to_fit()
Now that we use C++11 there is no need to have our own Shrink()
implementation when we can just use the standard function.

Also mention that it's the same as shrink_to_fit() in Shrink()
documentation.

No real changes, just simplify the code and make it more efficient.
2023-03-28 23:05:09 +02:00
Tobias Taschner
8038195952
Unify entries in wxWebViewEvent table 2023-03-24 15:10:42 +01:00
Tobias Taschner
e15a1ac18e
Add wxWebViewWindowFeatures and event
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.
2023-03-24 15:10:21 +01:00
Tobias Taschner
8d0685ee08
Add wxWebViewConfiguration support for webkitgtk2
Allows setting some webview settings which would be unavailable after
creation.
2023-03-24 15:10:20 +01:00
Dan Gudmundsson
23ccdb23c8 Improve and document wxGLCanvas::CreateSurface()
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.
2023-03-22 18:41:27 +01:00
Stefan Ziegler
e93570f681 Implement support for printing only selected pages in wxMSW
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.
2023-03-22 15:37:07 +01:00
Vadim Zeitlin
086a912e25 Improve wxMemoryDC scale factor documentation
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).
2023-03-22 00:29:38 +01:00
Vadim Zeitlin
f82bd9ea67 Merge branch 'webview_configuration' of https://github.com/TcT2k/wxWidgets
Add wxWebViewConfiguration.

See #23349.
2023-03-18 20:55:39 +01:00
Vadim Zeitlin
9ad79ba03a Merge branch 'thread-fixes'
Fix TSAN errors in thread unit tests.

See #23340.
2023-03-18 20:53:10 +01:00
Vadim Zeitlin
c202385f3a Add a note about icons to wxMessageDialog documentation
Explain that the requested icon is not always used.

Closes #23353.
2023-03-18 20:50:10 +01:00
Tobias Taschner
b48e5b4c66
Add wxWebViewConfiguration::SetDataPath()
While currently only implemented for the Edge backend GTK webkit could
also make use of such a setting.

Fixes: #19317
2023-03-17 09:29:46 +01:00
Tobias Taschner
dd4d5c75af
Add wxWebViewConfiguration
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.
2023-03-17 09:29:46 +01:00
Vadim Zeitlin
59312f5ba0 Fix possibly fatal race condition when calling OnDelete()
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.
2023-03-13 01:17:23 +01:00
Vadim Zeitlin
1c0e4dbf8e Merge branch 'webview_window_handling'
Add wxWebView child window handling.

See #23334.
2023-03-12 13:58:01 +01:00
Vadim Zeitlin
63ee6a3aa4 Consistently use "JavaScript", not "javascript", in documentation 2023-03-12 13:56:24 +01:00
Vadim Zeitlin
0fe6f04bfc Merge branch 'customize-dark-mode'
Allow customizing appearance in dark mode in wxMSW.

See #23275.
2023-03-12 13:42:45 +01:00
Vadim Zeitlin
24e8297bdd Change example in wxDarkModeSettings docs to avoid -Wswitch
As written, the code snippet in the docs would result in a warning from
gcc, so change it to avoid this.

See #23028.
2023-03-12 13:41:08 +01:00
Vadim Zeitlin
2ad3c0b428 Document restrictions on changing menu items appearance
Make it more clear that doing this should be avoided in portable code
and mention that owner drawn items are incompatible with dark mode.

See #23028.
2023-03-12 13:35:51 +01:00
Tobias Taschner
01ee3942f8
Add wxWebView child window handling
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.
2023-03-09 14:30:19 +01:00
Tobias Taschner
45d5de6a26
Add wxEVT_WEBVIEW_WINDOW_CLOSE_REQUESTED
This event is usually triggered by javascript calling window.close()
2023-03-09 14:29:25 +01:00
Miguel Gimenez
cf3dcb230a Use wxCOL_WIDTH_DEFAULT instead of -1 in wxDataViewCtrl functions
Replace -1 with wxCOL_WIDTH_DEFAULT in the header and the documentation
for clarity.

See #23325.
2023-03-09 00:11:32 +01:00
Vadim Zeitlin
d5a90896ae Merge branch 'app-init'
Improvements to wxApp initialization and modernize the code to use
std::unique_ptr<> instead of wxScopedPtr or, worse, macro-based scoped
pointers.

See #23319.
2023-03-07 19:27:10 +01:00
Lotendan
4d62df488b Add support for initializer_list to wx dynamic arrays
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.
2023-03-07 17:41:05 +01:00
Vadim Zeitlin
347d7fcccb Use std::unique_ptr<> instead of wxDECLARE_SCOPED_PTR
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.
2023-03-06 18:36:37 +00:00