Commit graph

7046 commits

Author SHA1 Message Date
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
Vadim Zeitlin
82cb7d1074 Merge branch 'generic-listctrl-center-label'
Fix centering of item label in generic wxListCtrl

See #2340, #24292.
2024-02-09 18:36:53 +01:00
Ian McInerney
9d3b8ba339 Test short labels in the listctrl sample too
This allows to easily verify that they work correctly in the icon view.

See #24292.
2024-02-09 18:35:53 +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
a401106da0 Merge branch 'cmake-misc' of https://github.com/MaartenBent/wxWidgets
Miscellaneous CMake improvements.

Note that the new required CMake version is 3.5 now.

See #24263.
2024-02-09 17:12:18 +01:00
Vadim Zeitlin
f6a1b1a18a Show loading wxPropertyGrid from XRC in the sample
Demonstrate defining wxPropertyGridManager in XRC.
2024-02-03 22:03:17 +01:00
Vadim Zeitlin
9c33be4f5e Use a helper lambda for naming history menu items
Shorten the code a bit more.

No real changes.
2024-02-02 18:01:24 +01:00
Vadim Zeitlin
44bc26f087 Use range-for loops for iterating over wxWebViewHistoryItems
No real changes, just simplify the code a bit.
2024-02-02 17:59:01 +01:00
Scott Talbert
3ef1aee986 Fix WebView sample when there are blank title pages in history
Otherwise, the wxMenu code asserts due to an empty item.
2024-02-01 20:56:36 -05:00
Vadim Zeitlin
a228377b7d Don't make propgrid sample so big on startup
This doesn't look great and also doesn't work correctly in high DPI.

Instead of trying to fix it, just hard code the size of the main frame
and also apply FromDIP() to the size of the child frame.
2024-01-30 01:55:14 +01:00
Vadim Zeitlin
3ca2594c3a Rename m_pSampleMultiButtonEditor in propgrid sample too
Similar to the previous commit, just rename a member variable to avoid
using "p" prefix for it which was inconsistent with the other variables
in the same class.
2024-01-30 01:55:14 +01:00
Vadim Zeitlin
5b064c0fde Avoid using Hungarian notation in propgrid sample
Rename m_pPropGridManager to just m_propGridManager for consistency with
the existing m_propGrid.
2024-01-30 01:55:14 +01:00
Vadim Zeitlin
cb852632e2 Remove local copies of m_pPropGridManager in propgrid sample
This made the code more difficult to understand as some functions were
called on m_pPropGridManager and other on pgman which referred to the
same object.

No real changes.
2024-01-30 01:55:14 +01:00
Maarten Bent
17b0033fc9
CMake: Update script for minimal sample
Update the minimum CMake version, to get rid of deprecation warning.
Remove wxWidgets_USE_FILE, this is not defined in CONFIG mode.
Link with the wxWidgets::wxWidgets target.
Use the manifest from wx.rc instead of the default MSVC manifest.
2024-01-28 18:37:42 +01:00
Vadim Zeitlin
6053381b34 Make keyboard sample window bigger on high DPI screens
Add missing FromDIP() when using hard-coded size.
2024-01-27 17:56:21 +01:00
Vadim Zeitlin
29caef7a5a Show pressed key category in the "keyboard" sample
Make it simple to check what does IsKeyInCategory() return for the
various keys.
2024-01-27 17:05:10 +01:00
ali kettab
9e61385878 Add wxRendererNative implementation for wxQt
Closes #24223.
2024-01-23 03:22:06 +01:00
Vadim Zeitlin
ff59ef301b Merge branch 'master' into webview-chromium 2024-01-17 00:22:39 +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
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
cfdfd14c59 Improve frame size in the listctrl sample
Make it bigger on high DPI displays and smaller on normal ones.
2024-01-07 00:35:39 +01:00
Artur Wieczorek
e2dcdb275b Use wxString() rather than wxEmptyString in propgrid sample 2024-01-06 22:43:01 +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
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
Artur Wieczorek
031435bd39 Use dedicated function to obtain decimal separator in propgrid sample 2024-01-06 22:42:30 +01:00
Vadim Zeitlin
83d69a1cd9 Revert "Add debug postfix to libcef_dll_wrapper"
This reverts commit 3d51977acf because
it's incompatible with the library names created by CMake when building
CEF directly, and not via wx CMake files.
2024-01-06 03:20:50 +01:00
Vadim Zeitlin
486865b446 Add wxFileConfig::MigrateLocalFile()
This can be useful for the existing applications switching to using
XDG-compliant config files location as they can just call this function
on startup to keep using the existing file.
2024-01-04 03:23:37 +01:00
Vadim Zeitlin
acf113f3f9 Update copyright years to 2024
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-12-31 18:56:06 +01:00
Paul Cornett
ce1d317768 Remove GLU dependency
See #23721
2023-12-28 14:49:42 -08:00
Vadim Zeitlin
7a306c4a42 Merge branch 'qt-fixes' of https://github.com/AliKet/wxWidgets
Many wxQt improvements and simplifications.

See #24135.
2023-12-27 02:57:14 +01:00
Vadim Zeitlin
1d328aa4e1 Add wxSplitterWindow::AlwaysUsesLiveUpdate()
This is similar to wxAuiManager::AlwaysUsesLiveResize() and does the
same thing, i.e. returns true if live update is always used, whether
wxSP_LIVE_UPDATE is enabled or not.

Use the new function in the sample to disable the menu item in the
environments where it doesn't do anything, as it was confusing to have
it under e.g. Wayland.
2023-12-26 19:27:50 +01:00
ali kettab
de2762bc02 Fix compilation error in auidemo sample under wxQt
Also fix ID_NotebookNoCloseButton menu item ui update which causes
OnUpdateUI() handler to run forever under wxQt.
2023-12-26 12:45:52 +01:00
Maarten Bent
3d51977acf
Add debug postfix to libcef_dll_wrapper 2023-12-24 18:06:14 +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
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
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
Maarten Bent
5a2c45b8f7
Fix running webview sample with Chromium on macOS 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
Vadim Zeitlin
bc19ed8387 Scale window size and splitter position by DPI in the sample
Make the window less tiny in high DPI under Windows and adjust the
initial splitter and drawing coordinates too.
2023-12-11 00:46:54 +01:00
Vadim Zeitlin
f667f765eb Initialize member variables in declaration in splitter sample
No real changes, just make things a bit simpler and safer.
2023-12-10 01:31:14 +01:00
ali kettab
5c46947c57 Fix wxStatusBar with field controls under wxQt
Postpone the creation of the QStatusBar fields until the first call to
SetStatusText(). This is to account for any field control added by the
user and also to avoid having to call UpdateFields() multiple times.

wxSTB_ELLIPSIZE_XXX and wxSTB_SHOW_TIPS supports are also implemented now.

The statbar sample is also updated: The OnSize() handler is removed because
it doesn't do much. that is: it is defined to keep the bitmap centered in the
status bar field it occupies if it is resized. but this is already done by the
wxStaticBitmap control, at least under wxMSW, wxGTK3 and wxQt.
2023-12-07 17:20:00 +01:00
ali kettab
2c9fee3d6f Add wxStatusBar::AddFieldControl() to simplify adding controls
This allows user codes to simply designate where their controls should
appear in the status bar without the need to handle wxEVT_SIZE
themselves.

They can still handle the event if the default positioning does not meet
their needs, but the new API is simpler and can be implemented for wxQt.

Closes #24092.
2023-12-05 00:39:04 +01:00
Vadim Zeitlin
6f501fd022 Merge branch 'qt-overlay' of https://github.com/AliKet/wxWidgets
Add native wxOverlay implementation under wxQt.

See #24080.
2023-12-03 15:00:34 +01:00
Vadim Zeitlin
e90817930a Merge branch 'master' into webview-chromium 2023-11-30 18:30:26 +01:00
Tim Eliseo
fce4941404 Add wxHAS_PREMULTIPLIED_ALPHA to abstract if wxBitmap pixels are premultiplied.
All previous relevant platform-specific tests have been changed to use this
symbol. Also, samples/image now premultiplies conditionally, correcting a
visual anomaly on wxGTK.
2023-11-26 13:23:52 -08:00
ali kettab
308f16d97b Fix caret sample under wxQt
wxQt has the same issue as wxOSX fixed here 21e02d5 (render characters
on OSX one by one as fractional widths leads to errors otherwise)
2023-11-23 22:49:15 +01:00