Commit graph

73585 commits

Author SHA1 Message Date
PB
4a69f36f22 Remove application testing if samples don't crash
Hopefully, we will not need a specialized application testing
whether a sample crashes on start-up or not anymore.
2022-11-20 10:29:39 +01:00
PB
8eca0f0a3a Remove wxEmulator
The devices it was intended for are no longer used.
2022-11-20 10:25:45 +01:00
PB
3c53df1f92 Remove GTK notebook test code
Such code does not need to be a part of wxWidgets repository.
2022-11-20 10:21:45 +01:00
PB
57ab5f5d1a Remove old technical notes
The technical notes were replaced by other documents long time ago.
2022-11-19 21:36:25 +01:00
Vadim Zeitlin
222cf952f4 Merge branch 'remove-panel-base'
Remove unnecessary class.

See #22966.
2022-11-16 15:20:31 +01:00
ali kettab
a9b54975a6 wxQt: Add wxFrame::GetClientAreaOrigin() override
This ensure that wxWindow::ClientToScreen() returns consistent results
for the top level and children windows.

Closes #22969.
2022-11-16 15:18:20 +01:00
Vadim Zeitlin
20571f07e2 Get rid of platform-specific wxPanel classes
There is no need to have them as they were identical for all platforms.

This basically reverts 5b87bd6c0b (Split wxPanel in wxPanelBase and
platform-specific files., 2011-03-20) as, 10+ years later, it turns out
that we're not going to have more MSW-specific parts, but none of them.

No real changes.
2022-11-12 21:54:35 +01:00
Vadim Zeitlin
544855c5ea Remove unused IsCanvasWindow() from wxUniv
This function existed but was never used, so just remove it.
2022-11-12 21:50:48 +01:00
Vadim Zeitlin
cf920319ed Remove redundant wxControlContainer forward declaration
We already include the header containing its full declaration just
above.

No real changes.
2022-11-12 21:43:21 +01:00
Vadim Zeitlin
f8ce99bf66 Merge branch 'more-cxx11-fixes'
More simplifications that are possible now that C++11 is required.

No real changes to the behaviour.

See #22962.

Closes #22684.
2022-11-12 18:03:12 +01:00
Vadim Zeitlin
5904d177fb Merge branch 'msw-drop-pre7-support'
Drop pre Windows 7 versions support.

Closes #22961.
2022-11-12 18:02:32 +01:00
Vadim Zeitlin
4a650cf001 Get rid of wxHAS_MSW_TASKDIALOG checks
All the necessary declarations should be available in the SDK headers of
any still supported compilers.

Note that we still need to keep the run-time checks because the task
dialog may be unavailable even in the latest OS versions when using old
comctl32.dll, as it happens if the application doesn't have a manifest
specifying the use of comctl32.dll v6.

See #22689.
2022-11-12 16:58:09 +00:00
Vadim Zeitlin
e09d786b62 Remove code using LCID-based locale functions
Now that XP is not supported any longer, we can assume that functions
using locale names are always available and they're preferable, so
remove the LCID-based wxUILocale implementation.
2022-11-12 16:58:09 +00:00
Vadim Zeitlin
43ff845e77 Remove Windows XP and Vista support
Supporting XP requires too many hacks, and while it wouldn't be very
difficult to support Vista as long as we support Windows 7, it's still
not worth it because nobody uses this system anyhow.

Remove most of XP-specific code and don't use wxDynamicLibrary for using
the functions not present in it any longer.

Don't use <wspiapi.h> neither as we shouldn't use it any more.

Update some comments to not mention Windows versions not supported any
longer and also remove mentions of "Vista and newer Windows versions"
from the documentation as this is now always the case.

This commit is best viewed ignoring whitespace-only changes.
2022-11-12 16:57:52 +00:00
Vadim Zeitlin
e0d7d488d1 Merge branch 'msw-menuitem-text-measure'
Fix measuring menu items text when using custom fonts in high DPI.

See #22958.
2022-11-12 17:54:10 +01:00
Vadim Zeitlin
63696b55cf Merge branch 'searchctrl-textentry'
Derive generic wxSearchCtrl from wxTextEntry too.

See #22954.
2022-11-12 17:52:16 +01:00
Vadim Zeitlin
d9734baed5 Add msw.window.no-composited system option
For some applications turning off double buffering for individual
windows may be infeasible, so allow doing it globally using this system
option.

Note that wxAutoBufferedPaintDC still does no buffering in wxMSW now,
even when this option is set, so setting it will result in flickering in
any code using it. The solution is to use wxBufferedPaintDC directly in
the programs that use this option.

Closes #22953.
2022-11-12 17:51:27 +01:00
Vadim Zeitlin
1c2ec47676 Merge branch 'msw-statbox-paint'
Fix and simplify painting wxStaticBox in wxMSW.

See #22952.

Closes #22940.
2022-11-12 17:42:40 +01:00
Vadim Zeitlin
7ac2558437 Merge branch 'qt-process-enter' of https://github.com/AliKet/wxWidgets
Fix wxEVT_TEXT_ENTER processing in wxQt.

See #22942.
2022-11-12 17:41:34 +01:00
Vadim Zeitlin
b200d7032f Merge branch 'qt-fixups'
Various fixes and improvements for wxQt.

Closes #22932.
2022-11-12 17:37:54 +01:00
ali kettab
b263497257 Rename local variable to avoid compiler warning 2022-11-12 17:37:11 +01:00
ali kettab
be192c8d50 Make wxQtEnsureSignalsBlocked available to all wxQt classes
and use it instead of using a pair of calls to blockSignals()
2022-11-12 17:37:11 +01:00
ali kettab
0e16f21d0f wxQt: Add missing override to wxComboBox 2022-11-12 17:37:11 +01:00
ali kettab
d9a0e937bd wxQt: Make wxChoice::GetString() conformant to documentation 2022-11-12 17:37:11 +01:00
ali kettab
1d12873751 wxCheckListBox::Check() should not emit any event under wxQt
In fact, this is the documented behaviour and also what the other ports
are currently doing.
2022-11-12 17:37:11 +01:00
ali kettab
23db0483af Make disabling the window before creating it work under wxQt 2022-11-12 17:37:04 +01:00
ali kettab
119f24761c Changes after review suggestions 2022-11-11 17:21:01 +01:00
Vadim Zeitlin
699042a272 Remove EnterHandlingTextCtrl class from the dialogs sample
This code was simplified by 16473d9b19 (Make class used as template
parameter local now that we can, 2022-11-11) but we can simplify it even
more by just getting rid of this class completely and using a small
lambda as the event handler.

No real changes.
2022-11-11 13:58:18 +01:00
Vadim Zeitlin
0f6c54cdb6 Define __WXFUNCTION__ as __func__ and don't use it any more
Use __func__ without checking if the compiler supports it, it's part of
C++11 and so should be supported by all compilers.

Also use __func__ instead of __WXFUNCTION__ in our own code.

No real changes.
2022-11-11 01:24:13 +01:00
Vadim Zeitlin
cf01a2827b Use lambdas with wxImage::ApplyToAllPixels()
This makes the code simpler, as it avoids the need for packing/unpacking
the operation parameters into helper classes and allows to remove
WeightValue completely, and potentially more efficient, as the calls
should be inlined now instead of being performed via a function pointer.

No real changes otherwise.
2022-11-11 01:15:58 +01:00
Vadim Zeitlin
abd1fd990d Use std::modf() instead of computing fractional part manually
No real changes, just a simplification.
2022-11-11 00:44:38 +01:00
Vadim Zeitlin
128b2a4e90 Use variadic templates in custom wxFileDialog controls code
This gets rid of a hack with unnecessary TextCtrlImpl ctor argument and
allows to reuse AddToLayoutAndReturn() for ChoiceImpl, requiring 2
arguments and not (at most) 1, as all the other classes, too.

No real changes, this is just a simplification/prettification.
2022-11-11 00:40:07 +01:00
Vadim Zeitlin
16473d9b19 Make class used as template parameter local now that we can
Address a minor TODO-C++11 comment in the dialogs sample by moving the
class declaration into the function using it, now that we don't have to
keep it outside it.

This commit is best viewed with Git --color-moved option.
2022-11-11 00:34:40 +01:00
Vadim Zeitlin
db486eae2e Replace StateEventProcessor used in wxWebRequest code with lambda
No real changes, just simplify the code now that we can use C++11.

This commit is best viewed with Git --color-moved option.
2022-11-11 00:34:03 +01:00
Vadim Zeitlin
d761ba0f8f Fix check for native command link button support
It's only available in comctl32.dll v6.10, not under Windows Vista or
later, i.e. it can be not available even in the latest Windows versions
if comctl32.dll v5.82 is used, as is the case for all applications not
specifying that they use comctl32.dll v6 in their manifest and, in
particular, in the applications not using a manifest at all.
2022-11-10 20:45:18 +00:00
Gerhard Gruber
065ff2d2d8 Add wxNotebook::GetTabRect() to retrieve the tab position
This function is currently only implemented in wxMSW and wxUniv and just
asserts under the other platforms.

Also add a helper GetTabOrientation().

Update the documentation and add a minimal test case for the new
function.

Closes #22941.
2022-11-10 16:43:43 +01:00
Vadim Zeitlin
b4b23ac423 Merge branch 'always-use-thread-local'
Always use thread_local as we can rely on compiler TLS support working
under Windows 7 and later.

There are some known problems in MinGW thread local variable support,
but they only affect (obsolete) 32-bit builds and will hopefully be
fixed in this compiler soon.

See #22917.
2022-11-10 16:32:42 +01:00
Vadim Zeitlin
4709e9b585 Use correct DPI for computing menu item extents
Ensure that the right DPI is used for scaling the font for the owner
drawn menu items in wxMSW instead of always using the standard DPI,
which resulted in the menu being too narrow and truncating part of the
label.

Closes #22957.
2022-11-10 14:59:36 +00:00
Vadim Zeitlin
a240aa8cfe Factor out wxMenuItem::GetMenuTextExtent() helper
The code of this function was used in two places, factor it out into
just a single one before modifying it -- see upcoming commit.

No real changes yet.
2022-11-10 13:44:37 +00:00
Stefan Csomor
0515ccf3a1 Fix position of "Window" menu in wxOSX
Make sure the window menu is not inserted after but in front of the help
menu.

See #22870.

Closes #22871.
2022-11-09 19:32:35 +01:00
PB
f1985c6ba2 Use [[nodiscard]] with functions returning object to be freed
Add wxNODISCARD macro which is defined as [[nodiscard]] if supported,
or the compiler-specific equivalent if one exists or nothing if not
available.

Start using it for some places with a risk of memory leak.

Closes #22943.
2022-11-09 18:59:44 +01:00
Vadim Zeitlin
696ccff4ef Merge branch 'wxPen-docs' of https://github.com/Blake-Madden/wxWidgets
Improve pen attributes documentation.

See #22939.
2022-11-09 18:57:23 +01:00
Vadim Zeitlin
616586f301 Remove wxStaticBox custom drawing code entirely
Get rid of a big amount of non-trivial drawing code at the price of
having to switch to using a control label if the foreground colour is
changed, as we can't change the label colour otherwise now.

The only known drawback of this change is that the box will flicker now
if doubler buffering is disabled. But as long as we do use double
buffering, it shouldn't be a problem.
2022-11-09 15:50:43 +00:00
Blake-Madden
1faa400d89
Remove wxPENSTYLE_STIPPLE_MASK_* from docs
These pen styles are treated the same as `wxPENSTYLE_STIPPLE` throughout the ports.
2022-11-08 19:41:18 -05:00
Vadim Zeitlin
c501fd0c0f Derive generic wxSearchCtrl from only wxTextEntry too
This is similar to the changes of 020b6ebcb8 (Derive from wxTextEntry
instead of wxTextCtrlBase, 2019-12-29) for wxGTK and removes the methods
that don't exist in the other ports from the generic wxSearchCtrl too.
2022-11-08 23:28:24 +00:00
Vadim Zeitlin
76145b377c Document that wxSearchCtrl derives only from wxTextEntry
It doesn't derive from wxTextCtrl in all ports, even if it does in some
of them.

Closes #22951.
2022-11-09 00:06:02 +01:00
Vadim Zeitlin
5002fb0351 Merge branch 'update-obsolete-docs'
More updates after switch to C++11.

Closes #22936.
2022-11-08 23:41:30 +01:00
PB
b112dfb4a0 Update Windows Theme support page 2022-11-08 23:41:12 +01:00
PB
82f4d5dde0 Update Build and Install Instructions for Windows
Just change "Windows XP" support to "Theme Support" when referring
to visual styles.
2022-11-08 23:41:12 +01:00
PB
a46e50b31d Update wxMSW part of Platform Details overview
Just change minimal supported MSVS version from 2005 to 2015.
2022-11-08 23:41:12 +01:00