Commit graph

21128 commits

Author SHA1 Message Date
Vadim Zeitlin
f37401dde3 Merge branch 'webview-chromium'
Add Chromium-based wxWebView backend.

See #706.
2024-01-19 03:07:44 +01:00
ali kettab
152ec01122 Fix wxEVT_SET_CURSOR handling under wxQt
Really fix wxSetCursorEvent handling for wxAUI done in commit f608b34
(Send set cursor events whenever there is mouse movement) without
breaking the other controls, i.e. wxSplitterWindow, wxHeaderCtrl and
wxGrid.

Pass the mouse position by const reference to QtSendSetCursorEvent().

Closes #24217.
2024-01-19 02:56:45 +01:00
Randalphwa
38d8980283 Add optional wxXmlParseError to wxXmlDocument::Load()
If a pointer to the structure is passed in to Load(), it will be filled
in if a parsing error occurs.

Closes #24215.
2024-01-19 02:55:54 +01:00
Randalphwa
30b98c81b1 Replace #ifdef with #if in WXWIN_COMPATIBILITY_3_2 check
This matches the rest of the code base, allowing setup.h to have:

    #define WXWIN_COMPATIBILITY_3_2  0

See #24215.
2024-01-19 02:52:51 +01:00
Blake Madden
567f8c47af Add wxRibbonBar::GetPageById()
To find a page by ID currently you have to use a recursive FindWindow
(which would also look at the child Panel windows). This function allows
for finding a page by ID more elegantly.

Closes #24211.
2024-01-19 02:49:47 +01:00
Vadim Zeitlin
ee691af12d Merge branch 'qt-some-cleanups' of https://github.com/AliKet/wxWidgets
Some more wxQt fixes and cleanups.

See #24210.
2024-01-19 02:47:52 +01:00
Vadim Zeitlin
fae1f35e08 Allow customizing CEF log file and log level
Add new wxWebViewConfigurationChromium class which corresponds to the
"native" configuration used in the other backends and contains (some)
fields of CefSettings in this one.
2024-01-17 01:16:06 +01:00
Vadim Zeitlin
ff59ef301b Merge branch 'master' into webview-chromium 2024-01-17 00:22:39 +01:00
Maarten Bent
ea5f585e89
Add system option to never use AutoSystemDpiAware
Add the option 'msw.native-dialogs-pmdpi' that will always show the native msw dialogs
as per monitor dpi aware, even when there are displays with different dpi.
2024-01-14 19:41:01 +01:00
Maarten Bent
9befda5c26
Only use AutoSystemDpiAware when displays have different DPI
So the native win32 dialogs, like font and colour picker, are not shown blurry unnecessary.

Fixes #24121
2024-01-14 19:41:00 +01:00
ali kettab
05ebdb7ebd Emphasize that wxQtSignalHandler is for wxWindow handlers only under wxQt
There is no change in behaviour because this has already been the case since its inception.
2024-01-14 14:23:41 +01:00
ali kettab
90d56e52a3 Fix creating wxMenuItem with nullptr parent under wxQt
This is documented and is already the case for the other ports.
2024-01-14 14:23:41 +01:00
Vadim Zeitlin
a2f7a933e8 Merge branch 'no-global-ops'
Don't define operators for wx types in global scope.

This results in much better error messages when the compiler gives an
error about failing to resolve a call to some operator in user code
because it doesn't list all the wx-defined operators as candidates. In
practice, this cuts down error messages from 500 (!) lines to 2 with
gcc.

See #24190.
2024-01-12 18:42:39 +01:00
Vadim Zeitlin
565775a2c8 Merge branch 'bitmap-create-log-size'
Add wxBitmap::CreateWithLogicalSize() and use it.

See #24199.
2024-01-12 18:37:20 +01:00
Vadim Zeitlin
d7cff61267 Merge branch 'default-xdg-config'
Use XDG-compliant location by default in wxFileConfig.

See #24195.
2024-01-12 18:31:58 +01:00
ali kettab
03ad7039d6 Don't expose implementation only class to public under wxQt
No real changes
2024-01-11 23:42:36 +01:00
Vadim Zeitlin
56d857152d Don't use comma operator in wxPoint operators
This was probably done unintentionally in 8ccbd7e95d (Implement
operator/=(int) and operator*=(int) for wxPoint and wxRealPoint.,
2024-01-04) and results in warnings from clang.
2024-01-11 00:49:32 +01:00
Vadim Zeitlin
afc635f845 Merge branch 'aui-repaint'
Fix some wxAUI repaint problems and switch to using live resize
everywhere by default.

See #24166.
2024-01-10 18:43:24 +01:00
Vadim Zeitlin
4f666c227a Merge branches 'aui-close-on-all-fix', 'aui-current-after-drag', 'aui-hint', 'aui-tbar-realize' and 'aui-book-rm-current'
Merge miscellaneous AUI fixes and improvements.

See #24159, #24160, #24161, #24164, #24184.
2024-01-10 18:39:41 +01:00
Vadim Zeitlin
9cc5e5d276 Add wxBitmap::CreateWithLogicalSize()
This function should be used instead of CreateWithDIPSize() in portable
code, the latter is currently often used to do what this function is
doing, but this only works correctly in wxOSX and wxGTK3 but not wxMSW.
2024-01-09 03:15:56 +01:00
Vadim Zeitlin
6586afb0a5 Use XDG-compliant location by default in wxFileConfig
Still use the traditional dot file if it already exists, but prefer
using the new location otherwise, i.e. for the new program installation.

Add wxCONFIG_USE_HOME to allow forcing the use of the old location if
really necessary.

Also use the new style as default "old style" of MigrateLocalFile() so
that calling it even when using XDG layout in wxStandardPaths still
works as expected.
2024-01-08 00:43:26 +01:00
Vadim Zeitlin
4fc2281286 Add wxLogCollector
This class is more convenient than wxLogBuffer that it uses and can be
used to collect all the logged messages in a string during its lifetime.
2024-01-07 22:43:55 +01:00
Vadim Zeitlin
2566a1abf5 Add wxLogFormatterNone
This trivial class allows to easily disable all log formatting,
including time stamping and level-dependent prefixes.
2024-01-07 22:31:52 +01:00
Vadim Zeitlin
30dd7e9095 Add wxLogBuffer::Clear()
This can be used to prevent the log buffer contents from being flushed
when replacing it with another logger, which is typically undesirable.
2024-01-07 22:12:52 +01:00
Vadim Zeitlin
b294a6b2bc Merge branch 'config-xdg'
Make it easier to use wxFileConfig in XDG-compliant way.

See #24180.
2024-01-07 16:13:15 +01:00
Vadim Zeitlin
cc8fbeed56 Merge branch 'xml-conv-simplify'
Simplify and modernize wxXmlDocument code.

See #24179.
2024-01-07 16:12:31 +01:00
Vadim Zeitlin
2349586e28 Hide operator<<() overloads for wxString and related classes
As not defining operator<<() overload taking wxScopedCharBuffer in the
global scope prevents it from being considered as an overload resolution
candidate (which is, of course, the whole point), it also prevents it
from being used for the classes convertible to it, such as wxCharBuffer,
so we need to define operator<<() overloaded for the latter explicitly
too.

We also need a new wxScopedCharTypeBufferStreamSupport helper in order
to define different operators inside different specializations of
wxScopedCharTypeBuffer<>.
2024-01-07 00:28:16 +01:00
Vadim Zeitlin
3b62433a3f Hide overloaded wxTimeSpan and wxDateSpan operator*()
Define them in these classes scope instead of at the global scope.
2024-01-06 23:06:02 +01:00
Vadim Zeitlin
3c151ac815 Hide overloaded operators on wxPoint2DInt and wxPoint2DDouble
Define all the arithmetic operators working with these objects inside
the corresponding classes and not at the global scope.
2024-01-06 23:06:02 +01:00
Vadim Zeitlin
a763de6940 Hide operator+() overloads for wxString::iterator and related
Don't define these operators in the global scope.
2024-01-06 23:06:02 +01:00
Vadim Zeitlin
09eff033d9 Hide operator<<() overloads used for wxVariant support too
Add new wxDECLARE_VARIANT_OBJECT_EXPORTED() macro defining these
operators as friend functions inside the class declaration and replace
all uses of DECLARE_VARIANT_OBJECT_EXPORTED() inside the core library
with the new macro to avoid defining any operator<<() overloads in the
global scope.

Also add wxIMPLEMENT_VARIANT_OBJECT() for consistency, even though it is
not really needed.
2024-01-06 23:06:02 +01:00
Vadim Zeitlin
7f56c7c068 Hide operator<<() and operator>>() overlods for wxLongLong_t
And wxULongLong_t.
2024-01-06 23:06:02 +01:00
Vadim Zeitlin
0122ce20c4 Hide operator<<() overloaded for wxBitmapBundle
Define it inside this class and not in the global scope.
2024-01-06 23:06:02 +01:00
Artur Wieczorek
efa2870cb4 Rename wxPGKeyboardActions type to wxPGKeyboardAction
For regular enumeration singular name is more appropriate.
2024-01-06 22:42:55 +01:00
Artur Wieczorek
3cb3d62212 Use enum class to represent NumericType
This is for better type safety.
2024-01-06 22:42:49 +01:00
Artur Wieczorek
e7ab6a6d53 Use enum class to represent wxPGNumericValidationConstants
This is for better type safety.
2024-01-06 22:42:43 +01:00
Artur Wieczorek
ca3acd7a03 Use enum class to implement wxPGPropValFormatFlags as bitmask
This is for better type safety of the flags.
2024-01-06 22:42:38 +01:00
Vadim Zeitlin
30c8c64e45 Allow changing wxWebViewBackendChromium data directory path
Use the value provided via wxWebViewConfiguration::SetDataPath() if any.
2024-01-06 03:20:50 +01:00
Vadim Zeitlin
416e241e6a Add wxWebViewConfigurationImplChromium scaffolding
It is perfectly useless for now, but provides place to add more things
in the upcoming commits.
2024-01-06 03:20:50 +01:00
Vadim Zeitlin
bddd46d343 Disable wxDeprecatedGUIConstants comparisons without 3.2 compat
Start preparing for removing these deprecated comparison operators.
2024-01-06 02:06:31 +01:00
Vadim Zeitlin
020f22de15 Define comparison and arithmetic operators as hidden friends
Change these operators in all the other classes to hidden friends too.
2024-01-06 02:06:31 +01:00
Vadim Zeitlin
09515ad4ce Make wxString and wxUniChar comparison operators friends too
Don't define them in the global scope to improve error messages.

Also move the rest of wxString operators into the class scope.
2024-01-06 02:06:31 +01:00
Vadim Zeitlin
acb24e7066 Don't define operators on common GDI classes in global scope
Use "hidden friend" idiom instead and define these operators as friend
functions inside the corresponding class scope, so that they're only
found using ADL and, in particular, don't appear as candidates when
looking for any operator.

In practice, this significantly reduces the error messages given if some
operator (e.g. "==") is applied to a type not defined it, as the
compiler doesn't need to consider converting this type to wxPoint,
wxRealPoint, wxRect, wxSize etc, nor to complain about failing to do it.
2024-01-06 01:29:24 +01:00
David Miguel Susano Pinto
68bef2fbf3 Add compound operators * and / to wxPoint and wxRealPoint
Also add unit tests for them as well as for the existing additive
compound operators.
2024-01-05 19:34:43 +01:00
David Miguel Susano Pinto
1300c56f0d Put wxRealPoint operators in the same order as wxPoint ones 2024-01-05 19:31:14 +01:00
David Miguel Susano Pinto
11c3034177 Implement unary minus for wxRealPoint, same as wxPoint. 2024-01-05 12:44:11 +00:00
David Miguel Susano Pinto
b9b0cce41b include/wx/gdicmn.h: reorder to match the order in interface/wx/gdicmn.h. 2024-01-05 12:44:11 +00:00
David Miguel Susano Pinto
66e7d0bce8 Implement + and - between wxRealPoint and wxSize.
These operators are part of the documented interface for wxRealPoint
but were never implemented.  This commit implements them.
2024-01-05 12:44:11 +00:00
David Miguel Susano Pinto
8ccbd7e95d Implement operator/=(int) and operator*=(int) for wxPoint and wxRealPoint.
These operators are part of the documented interface but were never
implemented.  This commit implements them.
2024-01-05 12:43:57 +00:00
David Miguel Susano Pinto
9a5d2ffade Correct names of variables in wxPoint and wxRealPoint arithmetic operators.
The arithmetic operators for wxPoint and wxRealPoint are quite
repetitive and were made by copy-paste from the wxSize operators.
Because of that, some of the names are a bit misleading which this
commit changes.  The changes are:

1. replace s/sz with p/pt for point variables (likely 's' comes from
   copied code used for wxSize variables)

2. replace 'i' with 'f' for floating point types (likely 'i' comes
   from copied code used for integer types)

3. replace 'factor' with 'divisor' for division operations (factors
   are the multiplication operands, not division)
2024-01-05 11:28:11 +00:00