Commit graph

76005 commits

Author SHA1 Message Date
Vadim Zeitlin
787fd98142 Remove unnecessary dynamic cast to wxPseudoTransparentFrame
Just test whether we're using "Venetian blinds" hint directly instead of
testing for whether we use wxPseudoTransparentFrame which can be also
used for the default transparent hint if transparency is not supported
natively.

This doesn't change much in practice, but just avoid using dynamic cast
unnecessarily.
2023-12-24 16:08:17 +01:00
Vadim Zeitlin
e8a6f3b732 Use wxSYS_COLOUR_HOTLIGHT for hint background under Mac too
This works nicely in both light and dark mode and is better than just
hard-coding wxBLUE.
2023-12-24 15:55:40 +01:00
Vadim Zeitlin
f79b9d01c5 Make wxAUI hint window highlight colour more noticeable
This makes the hint much more visible under wxGTK where the previously
used wxSYS_COLOUR_ACTIVECAPTION was typically too light in the default
light mode and almost completely invisible in dark mode.

Under wxMSW appearance in dark mode is also improved, although the hint
is still not very visible there -- but this is still better than being
completely invisible before.

Closes #23987.
2023-12-24 15:54:17 +01:00
Vadim Zeitlin
f330490287 Document that wxAUI_MGR_RECTANGLE_HINT shouldn't be used
It doesn't work under wxGTK and wxOSX because wxScreenDC can't be used
there.
2023-12-24 15:32:02 +01:00
Vadim Zeitlin
b458e05502 Revert "Fix user-visible with AUI tab selection after dragging"
This reverts commit b1fcf100ff because it
doesn't seem to be necessary any more, as the bug reported in #15071
that was fixed by that commit can't be reproduce any longer in the
current version and this commit resulted in other bugs, notably #24042
and probably also #24063.
2023-12-24 03:06:48 +01:00
Vadim Zeitlin
5ae2e3593e Fix close button handling in wxAuiTabContainer::IsTabVisible()
The existing code didn't work correctly when wxAUI_NB_CLOSE_ON_ALL_TABS
style was used as it didn't check for it and so assumed that the close
button was only shown on the current page.

This resulted in wrong result being returned from this function for the
right most tab which could not actually fit into the available space
when rendered (because Render() did draw all close buttons correctly)
and, because of this, not showing the tab entirely when MakeTabVisible()
was called, e.g. when adding a new tab.

Closes #24096.
2023-12-24 02:28:16 +01:00
Vadim Zeitlin
a2120bb6e1 Factor out wxAuiTabContainer::GetCloseButtonState()
Extract the function for determining whether the close button should be
shown for the given page in a reusable function.

No real changes yet.
2023-12-24 02:27:37 +01:00
Vadim Zeitlin
550849b786 Allow adding and deleting notebook tabs in the AUI sample
This is useful for testing that wxAuiNotebook updates correctly when
this is done.
2023-12-24 02:26:39 +01:00
Artur Wieczorek
1b5a43599a Preserve wxPGProperty parent while adding property to alphabetic items array
Real wxPGProperty parent has to be preserved for wxPropertyGridIterator
to work properly.
2023-12-23 18:58:33 +01:00
Artur Wieczorek
6dd129049f Initialize array for wxPropertyGrid alphabetic mode only once
Array holding items to use in non-categoric mode should be created and
initially populated only once.

Closes #24145.
2023-12-23 18:57:38 +01:00
Vadim Zeitlin
99434fa005 Add wx/persist/combobox.h to the headers list
In particular this ensures that it is installed by "make install".

See #24157.
2023-12-22 18:43:57 +01:00
Vadim Zeitlin
27585bf2c3 Hardcode minimal widget sample notebook size
Not doing this resulted in the window being tiny by default, so it's
better than nothing, even if it's clearly still not ideal.

See #24154.
2023-12-22 17:40:00 +01:00
ali kettab
7c592ba361 Make WidgetsPage pages scrollable in the widgets sample
Because some pages in the sample contain too much content to fit entirely
in the visible area of the page. Under wxQt port, this is true regardless
of the state of the window (whether it is maximized or not) some content
remains hidden and inaccessible.

Closes #24154.
2023-12-22 12:29:45 +01:00
Blake-Madden
a059061eb7 Replace wxDECLARE_NO_COPY_CLASS with deleted functions in samples
Use standard C++11 way of making classes non-copyable instead of
wx-specific macro.

Closes #24150.
2023-12-22 12:21:54 +01:00
mcorino
33de6dce6f Fix confusing wxPersistentTLW ctor argument name
Fix an obvious copy/paste error.

Closes #24156.
2023-12-22 12:18:29 +01:00
mcorino
f80e2459de Fix missing semicolon in HasMultipleSelection() documentation
Missing semicolon on latest method addition causes doxygen parsing
issues which in turn causes problems for dependent projects like wxRuby
and wxPython.

Closes #24155.
2023-12-22 12:18:29 +01:00
Scott Hanson
1bf80138e9 Fix wxDir compilation with wxUSE_STD_STRING_CONV_IN_WXSTRING
When enabling this build option, implicit conversion to wchar_t * is
not available, so convert wxString to it explicitly.

Closes #24149.
2023-12-22 12:18:29 +01:00
Vadim Zeitlin
4f1a249b76 Call CefDoMessageLoopWork() even more aggressively
Calling this function from OnInternalIdle() is not always enough, so
call it before processing each and every event to ensure that CEF can
really do whatever it needs to be doing internally.

This doesn't seem to noticeably slow down the program and solves weird
problems, like embedded text boxes (e.g. search zones on the web sites)
not getting focus on click.
2023-12-22 02:20:49 +01:00
Vadim Zeitlin
ed128bbe15 Use early return if CEF initialization fails
No real changes, just make the code more consistent and simpler to
extend.
2023-12-22 02:10:37 +01:00
Vadim Zeitlin
be6f046421 Remove wx/evtloop.h header which became unnecessary
wxEventLoop is not used in this file any more after the changes of
11d04389a0 (Add support for using wxWebViewChromium from non-main
thread, 2023-11-29).
2023-12-22 02:09:36 +01:00
Maarten Bent
948545ba81
Include helper ID in chromium helper plist
Same as the cefsimple example does.

CMake already has code to replace this variable.
2023-12-21 21:41:04 +01:00
Paul Cornett
44248eb78a Support setting thickness when creating wxGauge with GTK >= 3.20
This stopped working in GTK 3.14, but became possible to fix in 3.20
with the addition of the "min-width"/"min-height" properties.
See #24107
2023-12-21 12:31:25 -08:00
Maarten Bent
5a2c45b8f7
Fix running webview sample with Chromium on macOS 2023-12-21 21:31:04 +01:00
Maarten Bent
dbf1eb91ce
CMake: Show macOS architecture in configuring summary 2023-12-21 21:31:04 +01:00
Maarten Bent
6b6c5f5378
CMake: Fix building webview sample with Chromium
The macOS code is based on the cefsimple example in the cef distribution.
2023-12-21 21:27:14 +01:00
Maarten Bent
2821fe0127
Fix building webview_chromium on macOS 2023-12-21 21:26:42 +01:00
Maarten Bent
62c6533fa7
CMake: Update webview related checks 2023-12-21 21:26:41 +01:00
Maarten Bent
3453d8c97d
CMake: Fix building libcef_dll_wrapper
Check for 'libcef_dll' instead of 'cef_paths.gypi', because the minimal distribution doesn't contain the last one.
Mark all CEF variables as advanced, so they don't show up in the default CMake GUI.
2023-12-21 21:19:16 +01:00
Maarten Bent
256b7e4046
CMake: Update CEF to latest version
Support more architectures.
2023-12-21 21:19:06 +01:00
Maarten Bent
bff7c317af
CMake: Fix CMake 3.5 deprecation warning 2023-12-21 21:18:54 +01:00
Vadim Zeitlin
cf3699bd7a Rename wxCefApp to wxCefBrowserApp
The new name is more precise, as there can be other CefApp subclasses
used in the other CEF processes too.

No real changes.
2023-12-20 18:09:45 +01:00
Vadim Zeitlin
6f130c121f Add wxWebViewChromium::SetRoot()
This allows to define a prefix for all the files used by the application
in the browser.
2023-12-20 01:39:02 +01:00
Vadim Zeitlin
322677ad38 Replace WindowOpenDisposition with cef_window_open_disposition_t
WindowOpenDisposition is an inherited typedef from a base class and may
result in ambiguity errors if more than one base class defines it, so
use the actual type corresponding to it to preventively solve this
problem.

No real changes yet.
2023-12-20 01:35:38 +01:00
Vadim Zeitlin
7adcc8f954 Don't use arm64 for universal binaries by default under macOS 10
This architecture is supported since macOS 11.
2023-12-19 02:11:06 +01:00
Viachaslau Lisouski
ca405352e0 Add wxFileSystemHandler for "data" scheme
This notably allows embedding images directly in HTML.

Closes #24138.
2023-12-18 22:19:11 +01:00
Vadim Zeitlin
68eaff5c02 Merge branch 'valgen-wxlb_single' of https://github.com/wsu-cb/wxWidgets
Extend wxGenericValidator to work with single selection wxListBox,
3-state wxCheckBox and wxColourPickerCtrl.

See #24134.
2023-12-18 20:02:24 +01:00
Blake-Madden
0a743cdf12 Don't free a locked HGLOBAL in wxMSW printing code
This resulted in at least a use-after-free ASAN warning and possibly
actual memory corruption, so ensure that we unlock m_devMode before
freeing and resetting it.

Closes #24146.

Co-authored-by: Vadim Zeitlin <vadim@wxwidgets.org>
2023-12-18 19:57:28 +01:00
Bill Su
ff68b61b84
Update interface/wx/valgen.h
Co-authored-by: VZ <vz-github@zeitlins.org>
2023-12-18 11:43:28 -05:00
Vadim Zeitlin
50325bd2cd Reset stored position in wxMSW wxFileDialog dtor, not ctor
As there is more then one ctor since 11ed91af8f (Add missing default
constructor of wxFileDialog in wxMSW, 2023-12-03), this code would need
to be duplicated in the default ctor too now, but it seems simpler and
more logical to move it to the dtor instead.

See #24113.
2023-12-18 16:51:58 +01:00
Vadim Zeitlin
f8a6f0cd39 Initialize wxFileDialog::m_data in default ctor in wxMSW too
This corrects a problem introduced in 11ed91af8f (Add missing default
constructor of wxFileDialog in wxMSW, 2023-12-03) as m_data remained
uninitialized when default ctor was used.

See #24113.
2023-12-18 16:49:35 +01:00
Vadim Zeitlin
eabaec546b Restore "wxSuffix" MSBuild macro for compatibility
Restore the macro removed in 0d6f2f2b85 (Remove wxSuffix from MSBuild
files, it's always "u" now, 2022-10-28) as it can still be used in the
user projects importing wx properties files and it doesn't cost anything
to keep it.
2023-12-18 15:06:33 +01:00
Blake-Madden
0a1042292d Don't add new line when copying only one wxGrid cell to clipboard
Append the new line character only before starting the next line instead
of doing it after each line to avoid having it when there is just one
line, as this as unexpected when copying a single cell.

Closes #24139.
2023-12-18 14:09:37 +01:00
Artur Wieczorek
41109f64f0 Initialize member variables 2023-12-17 16:47:52 +01:00
Artur Wieczorek
74bacb097f Guard function with wxCHECK rather than wxASSERT 2023-12-17 16:47:46 +01:00
Artur Wieczorek
d95074e48d Use dedicated function to get value from wxPGChoicesData 2023-12-17 16:47:40 +01:00
Artur Wieczorek
63805074df Use standard library function to swap items in the array 2023-12-17 16:47:35 +01:00
Artur Wieczorek
a8f3e0da70 Get rid of of unsupported overloads of wxIntProperty::DoValidation()
wxIntProperty::DoValidation() overloads for wxLongLong_t and wxULongLong_t
parameters are not supported because for these types there are no direct
conversions to wxVariant.
Arguments of such types will be handled by overloads for wxLongLong
and wxULongLong.
2023-12-17 16:47:30 +01:00
Artur Wieczorek
6afdde58b5 Make wxFloatProperty wxUILocale-aware.
wxUILocale settings (especially decimal separator) needs to be taken
into account while formatting and validating numbers.

Closes #24140.
2023-12-17 16:47:18 +01:00
Bill Su
fb6a7d5a8e wxGenericValidator: add support for wxCheckBoxState 2023-12-17 02:10:51 -05:00
Bill Su
486b25bd2a fix #include <> to "" 2023-12-14 21:26:57 -05:00