Commit graph

76026 commits

Author SHA1 Message Date
Vadim Zeitlin
8f822d3c59 Simplify adding spacers in wxAuiToolBar::RealizeHelper()
There is no need to test for the orientation explicitly, as we can just
call AddSpacer() and pass it the spacer size in the direction of the
sizer (which is what we always need).

No real changes, just make the code simpler and nicer to read.
2023-12-25 17:51:05 +01:00
Vadim Zeitlin
bbba3b7cb9 Make wxAuiToolBar::RealizeHelper() return value actually useful
This function used to return bool, but it didn't just always return
true, but it's not even clear how could it possibly fail in theory, so
this was quite useless.

But Realize() itself used GetSize() after each call to RealizeHelper(),
so just make RealizeHelper() itself return this size, which allows to
shorten the code and get rid of a couple of levels of indentation.

No real changes.
2023-12-25 17:39:35 +01:00
Vadim Zeitlin
2573e61c19 Fix harmless MSVC warning about uninitialized variables in a test
MSVS 2022 gave C4701 when std::isinf(d) was used below in release build.
2023-12-25 17:24:55 +01:00
Vadim Zeitlin
a884d7da2f Re-realize wxAuiToolBar from SetOrientation()
This doesn't really change anything because the only existing caller of
SetOrientation() already called Realize() immediately afterwards anyhow
but it seems more logical to do it from SetOrientation() itself, as it
always needs to be done when the orientation changes.
2023-12-25 17:18:17 +01:00
PB
24952d0203 Fix confusing argument names in wxPersistentWindow docs
Use the same argument name as in the actual code in the class
constructor as well as the convenience function, instead of
wrongly copypasted "book".

See also 33de6dc (Fix confusing wxPersistentTLW ctor argument name,
2023-12-22).

Closes #24158.
2023-12-25 17:11:53 +01:00
Vadim Zeitlin
61edcbc5a6 Use WaitForEventAt() in Grid::CellClick test too
This test doesn't use the native header but somehow still fails on
AppVeyor and locally a very failure can be reproduced if the mouse is
moved while the test runs, so check for this here too.
2023-12-25 17:07:53 +01:00
Vadim Zeitlin
216b5a4b23 Also use WaitForEventAt() in Grid::SortClick test case
Abandon this test too if the mouse moves for whatever reason.
2023-12-25 17:07:53 +01:00
Vadim Zeitlin
8218e31418 Abandon tests waiting for mouse events if mouse moved
If the mouse pointer moves, for whatever unexplained reason, the click
is not going to happen, so don't wait for it.
2023-12-25 17:07:53 +01:00
Vadim Zeitlin
ab0a44a63a Give information about which section of grid tests fails
This is useful to see when the failure occurs exactly as the same checks
are performed in 3 different cases.
2023-12-25 15:18:05 +01:00
Artur Wieczorek
5725f0be41 Replace macro with inline function in wxPGPropertyGridIterator-related code
Replace wxPG_ITERATOR_CREATE_MASKS macro with inline function to ensure
type safety.
2023-12-25 15:10:14 +01:00
Artur Wieczorek
6a5b0667b5 Remove macro from wxPGPropertyGridIterator-related code
Remove simple wxPG_ITERATOR_PARENTEXMASK_TEST macro and use just the code
to increase code readability.
2023-12-25 15:10:08 +01:00
Artur Wieczorek
c8552aec0c Make wxPGPropertyFlags a bitmask
To improve type safety of flags.
2023-12-25 15:09:50 +01:00
Vadim Zeitlin
18bba7b70b Document correct way of handling wxAuiNotebookEvents
They need to be handled at wxAuiNotebook level as they are all processed
there and don't propagate up to the parent.

Closes #24118.
2023-12-25 15:01:15 +01:00
Vadim Zeitlin
83707a975d Use ProcessEvent() in wxAuiNotebook code
No real changes, just replace GetEventHandler()->ProcessEvent() with the
calls to this function, which does exactly the same thing, but is
shorter and more clear.
2023-12-25 14:45:20 +01:00
Maarten Bent
3d51977acf
Add debug postfix to libcef_dll_wrapper 2023-12-24 18:06:14 +01:00
Vadim Zeitlin
45d7ac6d94 Don't define a separate wxAuiManager::OnHintActivate()
This was only used under Mac but defined under all platforms.

Don't bother with defining it elsewhere and just use a trivial empty
lambda as wxEVT_ACTIVATE handler under Mac.

Note that it's not really clear if this is still needed neither, but it
doesn't cost much to keep this workaround just in case it is.
2023-12-24 17:21:12 +01:00
Vadim Zeitlin
b1c9ebd7be Don't use wxMiniFrame for hint window under Mac
wxMiniFrame is the same thing as wxFrame there, so there is no point in
using different code path for Mac.

No real changes.
2023-12-24 17:19:29 +01:00
Vadim Zeitlin
e605649f63 Set hint window background directly under Mac too
This does work, contrary to the comment saying that it doesn't: it must
have been when cf6fec73d7 (wxaui flags reworked a bit; allows any
hinting type to be explicity invoked; turning off hinting completely is
not possible; sample updated accordingly, 2006-10-26) was done, but not
any longer.

No real changes, just simplify the code.
2023-12-24 17:15:57 +01:00
Vadim Zeitlin
e4bce8f891 Simplify platform test when creating hint window
Instead of checking for all the other platforms, just check for non-Mac
as the code in this branch should work (and definitely should compile)
in any port and it's just wxOSX which requires special handling here.

This fixes the build under the other platforms (e.g. wxX11) broken by
the changes of e8a6f3b732 (Use wxSYS_COLOUR_HOTLIGHT for hint background
under Mac too, 2023-12-24).
2023-12-24 16:36:54 +01:00
Vadim Zeitlin
219f8908b5 Make hint window fade in animation actually noticeable
Using 5ms delay for the fade in timer and 4 point increment for the
value running from 0 to 50 meant that the entire fade in took 60ms which
wasn't really noticeable, i.e. couldn't be distinguished from not using
fade in at all.

Increase the delay to 15ms (which corresponds to ~60 FPS) and make the
animation last longer by increasing the transparency more progressively
to make the fade in actually visible.

In the future we probably ought to make all the values involved
(animation duration, initial and end values and the step) configurable
by adding some SetHintFadeInOptions() to wxAuiManager.
2023-12-24 16:21:37 +01:00
Vadim Zeitlin
48982e5aa4 Initialize m_hintFadeAmt in a more logical way
No changes, just don't make the code a bit more clear.
2023-12-24 16:15:15 +01:00
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