Commit graph

4651 commits

Author SHA1 Message Date
Vadim Zeitlin
95f16e63d2 Consistently use @see in Doxygen documentation
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.
2023-02-20 23:02:18 +01:00
Miguel Gimenez
9f55d568c2 Add support for client data to wxAuiToolBar
Store data passed to AddTool() in wxAuiToolBarItem and provide
wxToolBar-like functions for setting and getting this pointer.

See #23276.

Closes #23271.
2023-02-20 22:59:03 +01:00
Vadim Zeitlin
41be6dbdbe Merge branch 'opengl-default-attrs'
Stop requesting multi-sampling in wxGLCanvas by default.

See #23260.
2023-02-20 18:26:52 +01:00
Vadim Zeitlin
3ed5e42441 Merge branch 'scintilla-5.0' of https://github.com/MaartenBent/wxWidgets
Update Scintilla to 5.0.

See #23117.
2023-02-20 18:25:35 +01:00
Vadim Zeitlin
238050bd51 Mention that wxAuiToolBar::AddTool() ignores client data
This parameter is not supported, so at least mention this in the
documentation.

See #23271.
2023-02-20 18:24:48 +01:00
Vadim Zeitlin
8e3dcf8cf8 Fix wxUILocale::GetSystemLocaleId() documentation
Somehow the function prototype was omitted, restore it.

Also update the @since version after backporting this function to 3.2.
2023-02-20 18:24:48 +01:00
Vadim Zeitlin
b4ab8de248 Avoid deprecation warnings due to recent wxPropertyGrid changes
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.
2023-02-19 23:38:04 +01:00
Artur Wieczorek
f1273ce152 Use class enums to implement bitmask types
To improve type safety of flags.
2023-02-19 22:36:21 +01:00
Maarten Bent
2a18a04dee
Regenerate wxSTC files after Scintilla update
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.
2023-02-14 22:43:18 +01:00
Vadim Zeitlin
1f9113b40a Add default ctor to wxGLCanvas
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.
2023-02-14 16:03:56 +00:00
Tobias Taschner
be10ce0713 Add wxWebViewEvent::IsTargetMainFrame()
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.
2023-02-08 17:42:06 +01:00
Vadim Zeitlin
453a52b942 Fix return value of wxToolBar::GetToolBitmapSize() under GTK/Mac
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.
2023-02-08 17:35:20 +01:00
Vadim Zeitlin
c4b71b3694 Merge branch 'default-locale-improve'
Improvements for handling default locale under macOS and Unix.

See #23119, #23147, #23226.

Closes #23114.
2023-02-08 17:33:19 +01:00
Tobias Taschner
b9e776ae43 Allow calling wxWebViewEdge::SetUserAgent() after Create()
Additionally implement wxWebViewEdge::GetUserAgent() via SDK.

This functionality is available with the slightly newer
WebView2 SDK required by previous changes.

See #23225.
2023-02-06 13:55:30 +01:00
Artur Wieczorek
159c3b1c6d Don't cache strings and variant values in wxPGGlobalVarsClass
Optimization gain is doubtful but complexity is high.
2023-02-05 19:07:25 +01:00
Vadim Zeitlin
14714856b3 Add wxUILocale::GetSystemLocaleId()
This function replaces the existing GetSystemLocale() as it can
represent the locales that don't have any corresponding wxLanguage
values and for which GetSystemLocale() has no choice but to return
wxLANGUAGE_UNKNOWN.
2023-02-05 16:45:14 +01:00
Vadim Zeitlin
ce04dbc024 Recommend using wxUILocale::GetSystemLanguage() in wxLocale docs
The wxUILocale function really returns the default language unlike the
one in wxLocale which must kepe using the default locale for
compatibility, making its name confusing.
2023-02-05 15:51:33 +01:00
Vadim Zeitlin
0a1b0fbe01 Merge branch 'msw-about'
Improve generic and MSW "About" dialog appearance.

See #23196.
2023-02-03 15:11:48 +01:00
Vadim Zeitlin
255876075a Merge branch 'xrc-feature'
Add XRC "feature" attribute.

See #23184.
2023-02-03 15:09:55 +01:00
Scott Talbert
3cc00091e2 Document wxBookCtrlBase::GetControlSizer
The documentation for wxChoiceBook discusses using this method, but it
was not previously documented.

See #23211.

Co-Authored-By: Vadim Zeitlin <vadim@wxwidgets.org>
2023-02-03 15:08:55 +01:00
Vadim Zeitlin
05e49f7989 Add "About" dialog screenshots under different platforms
Show both "simple" and "fancy" (which just means with the web site
link specified here) forms from the dialogs sample.
2023-01-30 21:11:42 +01:00
Vadim Zeitlin
3fdebc96cd Add support for XRC "feature" attribute
This is a generalization of the existing "platform" attribute and allows
to only include some XRC elements if and only if an arbitrary "feature"
is enabled by the application before loading the XRC document.
2023-01-29 00:54:42 +00:00
Artur Wieczorek
5b92a7badc Use constexpr to declare constants in wxPropertyGrid 2023-01-22 20:15:01 +01:00
Vadim Zeitlin
0e9b52d335 Merge branch 'fontlist-findorcreate'
Fix wxFontList::FindOrCreateFont() for pixel and fractional point sizes.

See #23142.
2023-01-15 20:13:33 +00:00
Vadim Zeitlin
66f06effc2 Improve FindOrCreateFont() documentation
Explain that the overload taking wxFontInfo is preferred and why,
mention that the returned pointer must not be deleted and also give a
trivial example of using this function.
2023-01-14 16:39:41 +00:00
Vadim Zeitlin
4a38b9ea34 Document that wxFont::AddPrivateFont() needs an absolute path
It might have been unclear that an absolute path is required even under
Mac, where the fonts must be inside a fixed directory.
2023-01-14 14:51:04 +01:00
Vadim Zeitlin
f29e6fd8fe Add documentation for wxTEST_DIALOG() and related classes
Somehow this macro was never documented, do document it now, mostly by
reusing the existing documentation comments from include/wx/testing.h.
2023-01-13 17:53:39 +01:00
Blake-Madden
451772530c Fix typo in wxDEFINE_EVENT macro name in the documentation
Should be wxDEFINE_EVENT, not wxDEFINE_EVENT_TYPE.

Closes #23126.
2023-01-12 17:31:32 +01:00
Artur Wieczorek
f0b76076f4 Encapsulate data in wxPGValidationInfo
Implement more getters and setters to encapsulate data
in wxPGValidationInfo.
2023-01-06 18:06:38 +01:00
Vadim Zeitlin
e89f05faba Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.

Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.

Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
2023-01-05 21:41:38 +01:00
Blake-Madden
92b170b154
Offer workaround for embedded images in SVG 2023-01-03 17:54:11 -05:00
Blake-Madden
7f118d96d7
Mention embedded images in SVG not being supported
Also, fix minor doxygen formatting in note
2023-01-03 17:30:24 -05:00
Vadim Zeitlin
f5daf28932 Update copyright years to 2023
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-01-03 04:15:08 +01:00
Artur Wieczorek
d3c194590d Prevent from instantiation of wxPropertyGridIteratorBase
The purpose of this class is to be a base class
for wxPropertyGridIterator classes.
2022-12-30 14:10:29 +01:00
Vadim Zeitlin
208142c14a Merge branch 'msw-dark-mode'
Add experimental support for dark mode for wxMSW.

See #23028.
2022-12-27 22:20:34 +01:00
Vadim Zeitlin
7ce2ba9b0c Add wxSystemAppearance::AreAppsDark() and IsSystemDark()
This allows to determine if dark mode is enabled (for the applications
and/or the system UI itself, respectively) system-wide which is useful
now that IsDark() returns false unless MSWEnableDarkMode() is called.

Also document the incompatible change to IsDark().
2022-12-26 22:02:11 +00:00
Vadim Zeitlin
32daebe883 Don't return true from wxSystemAppearance::IsDark() in light mode
Even if the system is configured to use the dark mode, we shouldn't
return true from this function unless the application itself uses dark
mode, otherwise we're going to use wrong colours not providing enough
contrast with the system-provided ones.

This basically reverts #22020 as now that we have real dark mode
support, we should be using it instead.
2022-12-25 19:45:53 +00:00
Vadim Zeitlin
30dc3350dc Add wxSystemSettings::SelectLightDark() and use it
Add a convenient helper allowing to select between the two colours
depending on whether we're using light or dark mode.

Use this in a couple of places instead of manual tests for IsDark().

No real changes.
2022-12-25 19:45:53 +00:00
Vadim Zeitlin
61805ef7eb Improve wxToolBar appearance in dark mode
Fix labels and highlight colour and get rid of the white line on top of
the toolbar.

Unfortunately drop-down items are still not drawn correctly as I
couldn't find any way to customize the colour used for their arrow.
2022-12-25 19:45:53 +00:00
Vadim Zeitlin
717dfda9be Document that date/time picker controls don't support dark mode
There doesn't seem to be any way to change the appearance of these
controls, DTM_SETMCCOLOR only works when not using themes.
2022-12-25 19:45:52 +00:00
Vadim Zeitlin
9106a8306e Document wxMessageBox dark mode limitation
The native task dialog just doesn't seem to support dark mode and it
doesn't seem possible to change its colours manually neither.
2022-12-25 19:45:52 +00:00
Vadim Zeitlin
7fd236bf4a Add msw.dark-mode system option to allow turning it on easily
It doesn't make much sense to set this option programmatically, as the
application could just call MSWEnableDarkMode() directly instead, but
it's useful to have to allow enabling dark mode for any wx application
by just setting WX_MSW_DARK_MODE environment variable.
2022-12-25 19:45:51 +00:00
Blake-Madden
77b1f5be77 Explain how to display text objects from SVG files
Mention that lack of support for text elements in NanoSVG can be worked
around by rasterizing them.

Closes #23074.
2022-12-25 03:16:32 +01:00
Vadim Zeitlin
82eb445722 Merge branch 'webview_BrowserAcceleratorKeys' of https://github.com/TcT2k/wxWidgets into master
Add wxWebView::EnableBrowserAcceleratorKeys().

See #23070.
2022-12-23 20:08:16 +01:00
Vadim Zeitlin
795190ffbe Merge branch 'log-enable-mt-safe' into master
Minor improvements to logging MT-safety.

See #23054.
2022-12-23 20:07:50 +01:00
Tobias Taschner
db9419af4b
Add wxWebView::EnableBrowserAcceleratorKeys()
The edge backend has various accelerator keys enable per default.
This include Ctrl-P, Ctrl-F, F5 and others. In many uses of webview
this might not be desirable and can be disabled.

This is currently only implemented for the Edge backend.

Raises required WebView2 SDK version from 1.0.705.50 to 1.0.864.35
2022-12-23 14:12:36 +01:00
Artur Wieczorek
cf661f9293 Specify what is the limit set by wxPGProperty::SetMaxLength()
It needs to be stated clearly that the limit applies only to the text
the user can enter in the editor associated with property.
This constraint does not apply to the length of text represenations
of values set programmatically.
Corresponding test were added.
2022-12-22 20:53:44 +01:00
Vadim Zeitlin
2c937f4ae7 Annotate some MT-safe and unsafe wxLog functions
Document that wxLog::SetLogLevel() is not MT-safe and that wxLogNull
should be used instead of calling it to temporarily change the log level
from the other threads.
2022-12-18 21:41:05 +01:00
ali kettab
51d813cab7 wxQt: Make wxListCtrl::SetColumnWidth() conformant to documentation
Also update the listctrl sample to show it's effect on the second column
wxLIST_AUTOSIZE (Ctrl+R) to resize the column to content
wxLIST_AUTOSIZE_USEHEADER (Ctrl+Shift+R) to resize it to header section
2022-12-10 18:48:07 +01:00
ali kettab
4192b28a7f wxQt: fix wxListCtrl::GetCountPerPage() implementation
Use QTreeView's viewport height to get the right count per page
Also document that the control must contain at least one item in
order to return a valid value from the function.
2022-12-10 18:48:06 +01:00