Commit Graph
6816 Commits
Author SHA1 Message Date
Vadim Zeitlin 41be6dbdbe Merge branch 'opengl-default-attrs'
Stop requesting multi-sampling in wxGLCanvas by default.

See #23260.
2023-02-20 18:26:52 +01:00
Vadim Zeitlin 3ed5e42441 Merge branch 'scintilla-5.0' of https://github.com/MaartenBent/wxWidgets
Update Scintilla to 5.0.

See #23117.
2023-02-20 18:25:35 +01:00
Vadim Zeitlin ec4ff44479 Don't show wrongly rounded value of π in the internat sample
We formatted the value with lesser precision than was used for
displaying it, resulting in unexpected display. Fix this by reducing the
number of digits used in the source (because they're lost anyhow when
formatting using the default precision) and the precision used when
displaying the number.

Closes #23192.
2023-02-20 18:24:48 +01:00
Artur Wieczorek f1273ce152 Use class enums to implement bitmask types
To improve type safety of flags.
2023-02-19 22:36:21 +01:00
Maarten Bent b0385e498c Rebake after bakefile changes 2023-02-14 22:52:26 +01:00
Maarten Bent c8c254db1a Update bakefile with Scintilla and Lexilla changes 2023-02-14 22:43:18 +01:00
Maarten Bent 2a18a04dee Regenerate wxSTC files after Scintilla update
Add both the Scintilla and Lexilla iface to the script.
Remove unused LinkLexers code.

Allow to get the Lexilla version, and show it in the stc sample.
2023-02-14 22:43:18 +01:00
Vadim Zeitlin be1807f29b Use wxGLAttributes instead of int[] in cube OpenGL sample
This is slightly more readable.

Also test for stereo support before trying to create a window using it.
2023-02-14 16:05:51 +00:00
Tobias Taschner be10ce0713 Add wxWebViewEvent::IsTargetMainFrame()
Allows to determine if a navigation is happening in the main frame
or an embedded iframe when handling wxEVT_WEBVIEW_NAVIGATING.

Additionally implement previously missing wxEVT_WEBVIEW_NAVIGATING
events for frames with the Edge backend.

See #23238.
2023-02-08 17:42:06 +01:00
Vadim Zeitlin aea6d248dc Update French translations of the internat sample 2023-02-07 13:52:19 +01:00
Vadim Zeitlin 576e3d5903 Update instructions for generating internat sample catalogs
Add more translation macros to xgettext invocations.
2023-02-07 13:51:42 +01:00
Vadim Zeitlin 3e571ef253 Merge branch 'gtk-treectrl-text-size'
Improve size and handling of in-place editor in wxGenericTreeCtrl.

See #23001.
2023-02-06 19:47:42 +01:00
Artur Wieczorek ad6bb3a10a Adjust propgrid sample to look better on HiDPI display 2023-02-05 19:05:44 +01:00
Vadim Zeitlin 0a1b0fbe01 Merge branch 'msw-about'
Improve generic and MSW "About" dialog appearance.

See #23196.
2023-02-03 15:11:48 +01:00
Vadim Zeitlin a8d8022529 Allow using F2 for renaming items in the treectrl sample
This makes it simpler to test this functionality and it's also the
standard key for doing this, at least under MSW.
2023-02-02 17:13:09 +01:00
Vadim Zeitlin 17827947ec Don't show "developer" in the simple "About" dialog
This doesn't look well in the native Mac or MSW versions, so leave it
out to make the dialog nicer by default.
2023-01-30 21:11:42 +01:00
Vadim Zeitlin 9fbc7abea1 Update copyright year in the dialogs sample "About"
This is not critical, so might not be worth updating it every year, but
using 2006 there is still a bit too vintage.
2023-01-30 21:11:42 +01:00
Artur Wieczorek ec25a5c83c Execute automated tests for wxPropertyGrid
Move existing manually executed tests in propgrid sample to the test
suite executed automatically.
2023-01-30 17:28:17 +01:00
Maarten Bent 601f8c840c Update joystick sample
Draw on a wxPanel, there is no need for a wxScrolledWindow.
Remove unused constructor arguments.
Use wxID_EXIT instead of JOYTEST_QUIT.
Show in the statusbar which buttons are pressed.

Remove wxClientDC and draw in the paint handler instead.
Use different colours for the first 4 buttons.
Fix size and drawing coordinates when using high DPI.
2023-01-24 23:20:27 +01:00
Artur Wieczorek 266dc567fb Get rid of declaration of unused class in propgrid sample 2023-01-22 20:22:28 +01:00
Jens Göpfert 842ca1e8b8 Improve ScrollTo() when using wxDV_VARIABLE_LINE_HEIGHT
Calculate the last visible item based on item position instead of the
first visible row when using variable line heights.

Also extend the sample for testing EnsureVisible with item and column.

Closes #23102.

Closes #23128.
2023-01-19 21:02:13 +00:00
Vadim Zeitlin b1bdb95ee8 Use sizers in the notebook sample for better DPI change handling
Even simple static texts need to be put inside sizers to allow them to
update their size when the DPI changes, as they remain too small for the
new (higher) DPI otherwise when the sample window is moved from a
standard to high DPI monitor.

See #23088.
2023-01-13 19:45:01 +01:00
Vadim Zeitlin 804a82df8c Merge branch 'improve-manifest-docs'
Improve manifest docs.

See #23123.
2023-01-13 16:02:26 +00:00
Vadim Zeitlin 4e116ced45 Merge branch 'stc-dark-mode'
Improve support for dark mode in wxSTC.

See #23097.

Closes #19107.
2023-01-13 16:00:16 +00:00
Vadim Zeitlin e7297592cb Move manifest explanation in the main wxMSW install docs
This is important enough to be described directly there, especially now
when a manifest is required.
2023-01-09 23:22:17 +00:00
Vadim Zeitlin 3d2754d04a Remove code not doing anything from propgrid sample
This code, added back in 1c4293cb91 (added wxPropertyGrid from Jaakko
Salli (#9934), 2008-09-12), resulted in warnings about an unused
variable from clang and was generally confusing, so just remove this
code entirely as it's not clear what was actually the intention here.
2023-01-06 00:58:05 +01:00
Vadim Zeitlin 0c97244747 Merge branch 'drop-mem-debug'
Drop memory debugging/tracing support.

See #23115.
2023-01-06 00:56:01 +01:00
PB 42c2cb9936 Improve comments in samples/sample.rc
Provide more information about application manifest, High DPI support,
and contents of wx/msw/wx.rc file.

Use the correct file extension for docs/msw/winxp.md.

Closes #23116.
2023-01-06 00:54:00 +01:00
Vadim Zeitlin e89f05faba Remove memory debugging/tracing support and all related options
Drop disabled by default and pretty useless memory tracing code and all
the overlapping and poorly documented build options related to it.

Remove memory.cpp entirely and update all the make/project files, but
preserve the now completely trivial wx/memory.h for compatibility and
also keep including wx/string.h from wx/object.h as it seems like a lot
of existing code actually depends on this, even if it should not.

Replace the options in the propgrid sample with a couple of other
debug-related options that were not used before to avoid leaving the
"Debugging Section" completely empty.
2023-01-05 21:41:38 +01:00
Vadim Zeitlin d74c9e51da Remove memcheck sample
This sample wasn't really useful and demonstrated functionality which
was disabled by default since many years and will be completely removed
soon.
2023-01-05 18:24:57 +01:00
Vadim Zeitlin b7f24a65d8 Rebake after the copyright year update
This should have been part of f5daf28932 (Update copyright years to
2023, 2023-01-03).
2023-01-03 18:39:06 +01:00
Vadim Zeitlin f5daf28932 Update copyright years to 2023
Just run misc/scripts/inc_year and commit the results.

See #18690.
2023-01-03 04:15:08 +01:00
Vadim Zeitlin 79e97bd4ca Merge branch 'msw-dlls-arch-suffix'
Include arch-specific suffix in the DLLs names in makefile.vc too.

See #23053, #23093.
2022-12-31 17:02:07 +01:00
Vadim Zeitlin 8120d3f75d Merge branch 'avoid-unused-var-warnings' of https://github.com/PBfordev/wxWidgets
Avoid unused variable warnings.

See #23077.
2022-12-29 01:43:41 +01:00
Vadim Zeitlin 53935f6607 Improve stc sample appearance in dark mode
This shows one possible way of adapting the application to support dark
mode, using the default for/background colours and SelectLightDark() for
the custom ones.

Note that this replaces "background" field of the styles in this sample
as it was never used (more precisely, was always specified as "WHITE")
with the new "foregroundDark" field which is set pretty arbitrarily but
differently enough from the foreground used in light mode for the sample
to look better in dark mode.

Also remove some duplicated code for setting styles and remove the code
for setting the defaults completely, as this is unnecessary, and even
harmful, after the changes of the previous commit.
2022-12-28 23:53:06 +00:00
Vadim Zeitlin e0db72d80e Include arch-specific suffix in the DLLs names in makefile.vc too
This is similar to edcfeab29d (Include arch-specific suffix in the DLL
names in CMake builds too, 2022-12-23).

See #23053.
2022-12-28 22:06:41 +01:00
Vadim Zeitlin 208142c14a Merge branch 'msw-dark-mode'
Add experimental support for dark mode for wxMSW.

See #23028.
2022-12-27 22:20:34 +01:00
Vadim Zeitlin a7b39f63b3 Send wxEVT_SYS_COLOUR_CHANGED on dark/light theme change in wxMSW
wxOSX already does it, so do it in wxMSW too for consistency and because
it seems useful to be able to react to the same event in all cases.

Update the drawing sample to refresh its system colours scheme whenever
the theme is changed.
2022-12-26 22:10:32 +00:00
Vadim Zeitlin 7ce2ba9b0c Add wxSystemAppearance::AreAppsDark() and IsSystemDark()
This allows to determine if dark mode is enabled (for the applications
and/or the system UI itself, respectively) system-wide which is useful
now that IsDark() returns false unless MSWEnableDarkMode() is called.

Also document the incompatible change to IsDark().
2022-12-26 22:02:11 +00:00
PB b4a29dfab7 Remove unused variable from the dialogs sample 2022-12-24 12:49:09 +01:00
Tobias Taschner db9419af4b Add wxWebView::EnableBrowserAcceleratorKeys()
The edge backend has various accelerator keys enable per default.
This include Ctrl-P, Ctrl-F, F5 and others. In many uses of webview
this might not be desirable and can be disabled.

This is currently only implemented for the Edge backend.

Raises required WebView2 SDK version from 1.0.705.50 to 1.0.864.35
2022-12-23 14:12:36 +01:00
Artur Wieczorek cf661f9293 Specify what is the limit set by wxPGProperty::SetMaxLength()
It needs to be stated clearly that the limit applies only to the text
the user can enter in the editor associated with property.
This constraint does not apply to the length of text represenations
of values set programmatically.
Corresponding test were added.
2022-12-22 20:53:44 +01:00
Vadim Zeitlin 5bc7ffd8c7 Suppress -Wnonnull warning in the except sample
We really want to crash here, so disable the helpful warning that tries
to prevent us from doing it.
2022-12-18 23:21:19 +01:00
Vadim Zeitlin 92a076b12b Avoid -Wunused-result in the except sample
MinGW gcc 12 started giving this (useful) warning in STL build because
its std::vector::operator[] is declared with nodiscard attribute, but we
really don't want to use the result here, so suppress it.
2022-12-18 02:10:12 +01:00
ali kettab 51d813cab7 wxQt: Make wxListCtrl::SetColumnWidth() conformant to documentation
Also update the listctrl sample to show it's effect on the second column
wxLIST_AUTOSIZE (Ctrl+R) to resize the column to content
wxLIST_AUTOSIZE_USEHEADER (Ctrl+Shift+R) to resize it to header section
2022-12-10 18:48:07 +01:00
Vadim Zeitlin d05a909c58 Merge branch 'msw-composited-parent'
Fixes for using WS_EX_COMPOSITED in wxMSW.

See #23002.
2022-12-04 01:04:27 +01:00
Artur Wieczorek 1d85e22543 Implement new wxPGProperty::HasAnyChild() method
There are many checks in the code whether wxPGProperty has any child.
Doing so by checking if GetChildCount() is greater than zero doesn't
seem to express intent simply and clearly. With dedicated method this
could be done simpler and hopefully in a more optimal way.
2022-12-03 17:15:28 +01:00
Artur Wieczorek 2cc7f7d8d7 Use default ctor's and dtor's instead of those with empty bodies 2022-12-03 17:15:28 +01:00
Artur Wieczorek 48d226bb84 Adjust scrolled contents only for wxPaintDC (drawing sample)
Adjust scrolled contents for screen drawing directly in EVT_PAINT
handler instead of doing so conditionally for generic wxDC.
This also helps demonstrating if wxPaintDC transformations
are transferred properly to wxGCDC.
2022-11-29 18:41:08 +01:00
Vadim Zeitlin c5f613c941 Revert "Remove wxStaticBox custom drawing code entirely"
This reverts commit 616586f301 because it
turns out that using WS_EX_TRANSPARENT is incompatible with using
WS_EX_COMPOSITED (see parent commit).

Reintroducing all this code is painful, but there doesn't seem to be any
way of avoiding to have it as long as we use WS_EX_COMPOSITED. If we
stop using this style, we could revert this commit, this re-applying the
original change.

Closes #22982.
2022-11-28 19:04:59 +00:00