Commit graph

4957 commits

Author SHA1 Message Date
AliKet
bad07efa70 wxAuiManager::AlwaysUsesLiveResize() documentation updated
This is no longer true as wxAUI now uses wxOverlay to display the resizing hint
in non-live resize mode, which should work on all platforms.
2024-02-09 23:26:37 +01:00
ali kettab
a38175885c Use wxOverlay to show sash feedback in non-live resize mode in wxSplitterWindow
Make non-live resizing possible on all supported platforms thanks to wxOverlay.
Previously, live resizing was the only supported mode under these platforms:
wxMac, wxQt and wxGTK3 under Wayland.

Also remove no longer needed function AlwaysUsesLiveUpdate and its documentation.
2024-02-09 23:26:36 +01:00
AliKet
7b75d0a256 Added per-pixel alpha blending capability to wxOverlay under wxMSW
By default, wxMSW overlay uses a constant alpha for the window's opacity which
can be changed by the added wxOverlay::SetOpacity() function. For some applications,
that's all they need. But for others, per-pixel alpha blending is a requirement.
This capability can be enabled by calling SetOpacity(-1) before initializing the
overlay. But the drawing must be done via a graphics context because the standard DC
under MSW does not support alpha drawing.

Also request that the overlay window be positioned below any floating windows
on the target (if any).
2024-02-09 23:26:35 +01:00
Vadim Zeitlin
a6cc89777b Allow passing -1 to wxPGProperty::SetChoiceSelection() again
This used to be possible in 3.0 but was disallowed back in 29bf859fae
(Check if new index is in range before selecting new value in
wxPGProperty::SetChoiceSelection., 2014-11-29). However there doesn't
seem to be any real harm in still allowing to do this, so handle -1 as a
special case here.

Closes #24279.

Closes #24281.
2024-02-09 17:21:52 +01:00
Vadim Zeitlin
33ef342dcc Merge branch 'propgrid-xrc'
Add support for loading wxPropertyGrid from XRC.

See #24274.
2024-02-09 17:20:22 +01:00
Vadim Zeitlin
21255ee197 Document wxIPV4address::Hostname(unsigned long) overload
Just mention that it exists too.
2024-02-09 17:19:49 +01:00
Vadim Zeitlin
fe599e4757 Add wxXmlResourceHandler::GetNodeAttribute()
Add another helper function that can be used in XRC handlers without
using wxXmlNode directly.
2024-02-03 21:46:15 +01:00
Vadim Zeitlin
921018cfc8 Add wxXmlResourceHandler::GetNodeName()
This allows to get the name of the node which is needed for XRC handlers
using specific elements instead of using the object elements with
specific name attribute.
2024-02-03 21:46:15 +01:00
Vadim Zeitlin
9ab62c02fd Make wxXmlResourceHandlerImpl::GetNodeContent() const
There doesn't seem to be any reason not to and it's more consistent with
the other similar functions.
2024-02-03 21:46:15 +01:00
Vadim Zeitlin
9550c37e29 Support inherited attributes in wxPropertyGrid XRC handler
Allow specifying recurse="1" to inherit the attribute, as this is much
nicer than having to specify it for all the children.

Also add support for this to wxPropertyGridPopulator, which is used by
the XRC handler.
2024-02-03 21:46:15 +01:00
Vadim Zeitlin
99eca07ac5 Some minor spelling fixes in wxPropertyGrid documentation
Also fix a couple of things in the actual header for consistency with
the same fixes done in the documentation.

No real changes.
2024-01-30 01:55:14 +01:00
Bill Su
74f88f9131 Add wxRadioButton group support to wxGenericValidator
Enable wxGenericValidator(int*) to work with wxRadioButton groups
when applied to the first element of the group.  The value will be
the index of the selected button within the group.

Closes #24264.
2024-01-30 01:52:59 +01:00
oneeyeman1
91de9867ee Add wxStandardPaths::GetSharedLibrariesDir()
This function returns the directory with the application's shared
libraries, which is different from the plugins directory under Mac.

Closes #24052.
2024-01-28 18:41:20 +01:00
Scott Talbert
fc35ad92bb Remove unnecessary empty destructors
These cause a problem for GCC 14 which detects that there are no
corresponding copy constructors and assignment operators and gives
-Wdeprecated-copy-dtor due to their presence, e.g.

/home/fedora/swt2c/wxWidgets/bld/bk-deps g++ -c -o test_allheaders_allheaders.o  -I/home/fedora/swt2c/wxWidgets/bld/lib/wx/include/gtk3-unicode-3.3 -I../../include -D_FILE_OFFSET_BITS=64 -I/usr/include/gtk-3.0 -I/usr/include/pango-1.0 -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/cairo -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/atk-1.0 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/at-spi2-atk/2.0 -I/usr/include/cloudproviders -I/usr/include/webp -I/usr/include/blkid -I/usr/include/at-spi-2.0 -I/usr/include/gio-unix-2.0 -I/usr/include/libmount -I/usr/include/pixman-1 -I/usr/include/libxml2 -I/usr/include/fribidi -I/usr/include/sysprof-6 -pthread -I/usr/include/libpng16 -DWITH_GZFILEOP  -D__WXGTK__      -I../../tests -DWXUSINGDLL -I../../tests/../samples -I../../3rdparty/catch/single_include -pthread -Wall -Wundef -Wunused-parameter -Wno-ctor-dtor-privacy -Woverloaded-virtual -O2 -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/glib-2.0 -I/usr/lib64/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/blkid -I/usr/include/fribidi -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libmount -I/usr/include/libxml2 -I/usr/include/sysprof-6 -I/usr/include/libpng16 -DWITH_GZFILEOP -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/webp -I/usr/include/gtk-3.0/unix-print -I/usr/include/gtk-3.0 -I/usr/include/dbus-1.0 -I/usr/lib64/dbus-1.0/include -I/usr/include/atk-1.0 -I/usr/include/at-spi2-atk/2.0 -I/usr/include/cloudproviders -I/usr/include/at-spi-2.0 -I/usr/include/gio-unix-2.0  -fvisibility=hidden -fvisibility-inlines-hidden -fPIC -DPIC   ../../tests/allheaders.cpp
In file included from ../../include/wx/evtloop.h:13,
                 from ../../tests/testprec.h:5,
                 from ../../tests/allheaders.cpp:369:
../../include/wx/event.h: In copy constructor ‘wxSetCursorEvent::wxSetCursorEvent(const wxSetCursorEvent&)’:
../../include/wx/event.h:1943:11: error: implicitly-declared ‘wxCursor::wxCursor(const wxCursor&)’ is deprecated [-Werror=deprecated-copy-dtor]
 1943 |           m_cursor(event.m_cursor)
      |           ^~~~~~~~~~~~~~~~~~~~~~~~
In file included from ../../include/wx/cursor.h:51,
                 from ../../include/wx/event.h:21:
../../include/wx/gtk/cursor.h:37:13: note: because ‘wxCursor’ has user-provided ‘virtual wxCursor::~wxCursor()’
   37 |     virtual ~wxCursor();
      |             ^
../../include/wx/event.h: In member function ‘void wxSetCursorEvent::SetCursor(const wxCursor&)’:
../../include/wx/event.h:1949:57: error: implicitly-declared ‘wxCursor& wxCursor::operator=(const wxCursor&)’ is deprecated [-Werror=deprecated-copy-dtor]
 1949 |     void SetCursor(const wxCursor& cursor) { m_cursor = cursor; }
      |                                                         ^~~~~~
../../include/wx/gtk/cursor.h:37:13: note: because ‘wxCursor’ has user-provided ‘virtual wxCursor::~wxCursor()’
   37 |     virtual ~wxCursor();
      |             ^

Fixes #24248.

Closes #24255.
2024-01-28 18:16:07 +01:00
Blake-Madden
d495c50637 Replace 16-bit code in MSW wxGetUserName() with use of netapi32
Uses NetAPIXXX functions now instead of GetProfileString().

Also update the documentation.

Closes #24242.
2024-01-28 18:05:38 +01:00
Vadim Zeitlin
3dad98e06d Merge branch 'tab-key-category'
Exclude Ctrl+I from "TAB" key category and Ctrl+H from the "cut" one.

See #24258.
2024-01-28 17:32:54 +01:00
Vadim Zeitlin
cc9f9af400 Flush wxLogGui before showing a modal dialog
This ensures that any messages passed to wxLogError() or other functions
are shown before wxMessageBox() that could be referring to them instead
of it happening while the message box is shown (most ports, including
wxGTK) or only after it is dismissed (wxMSW).

See #24231.

Closes #24228.
2024-01-28 17:31:38 +01:00
Vadim Zeitlin
460c35ff0e Return false from wxKeyEvent::IsKeyInCategory(WXK_TAB) for Ctrl+I
Although TAB and Ctrl+I generate the same key code in the events passed
to wxEVT_CHAR handlers, it seems more reasonable to only consider the
former to be in "TAB category", but not the latter.

See #10268.

Closes #24254.
2024-01-27 17:56:21 +01:00
Vadim Zeitlin
5e1890c068 Merge branch 'cef-docs'
CEF-related documentation and build improvements.

See #24230.
2024-01-24 17:44:01 +01:00
Vadim Zeitlin
1b4dfc292a Merge branch 'vlistbox-current-accessors' of https://github.com/wsu-cb/wxWidgets
wxVListBox: add GetCurrent()/SetCurrent() accessors.

See #24204.
2024-01-22 21:41:28 +01:00
Vadim Zeitlin
b3c1a6adfd Document CEF_RUNTIME_LIBRARY_FLAG switch for building CEF
This must match the options used when building wx itself.

Also mention CEF_USE_SANDBOX while discussing CEF build options.
2024-01-20 00:58:39 +01:00
Vadim Zeitlin
f37401dde3 Merge branch 'webview-chromium'
Add Chromium-based wxWebView backend.

See #706.
2024-01-19 03:07:44 +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
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
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
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
ec80639d79 Merge branch 'aui-events'
Slightly improve and better document AUI events handling.

No real changes.
2024-01-12 18:38:24 +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
b822d7d9e1 Fix use of "NULL" in GetOrCreateAccessible() documentation
This should have been part of 81e9373efa (Add missing documentation of
wxWindow accessibility functions, 2024-01-11).
2024-01-12 18:36:24 +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
DietmarSchwertberger
81e9373efa Add missing documentation of wxWindow accessibility functions
Ensure they're present in the interface header as this is also required
for wrapping them in other languages, such as Python.

Closes #24209.
2024-01-11 22:16:36 +01:00
Bill Su
89e78831f7 wxVListBox: add GetCurrent()/SetCurrent() accessors 2024-01-11 00:47:04 -05: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
340bbea71d Remove irrelevant mentions of encoding from wxXmlDocument docs
The corresponding parameter was removed in cc8fbeed56 (Merge branch
'xml-conv-simplify', 2024-01-07) but it was still mentioned in the
description.
2024-01-10 18:07:36 +01:00
mcorino
c1b7ce5932 Fix typing error in interface def.
missing whitespace between arg type and name
2024-01-10 17:56:08 +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
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
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