Commit graph

73463 commits

Author SHA1 Message Date
Artur Wieczorek
6f2ad4bfb4 Don't account for commit regarding comments only 2022-10-28 11:10:39 +02:00
Blake Madden
9c76bc27c0 Use wxID_HIGHEST instead of wxID_HIGHEST+1 in samples
There is no need to add 1 any more since the changes of 99c52403f9 (Use
usual half-open interval for wxID_LOWEST..wxID_HIGHEST, 2022-10-23), so
don't.

Closes #22923.
2022-10-28 01:43:46 +02:00
Vadim Zeitlin
66a148d51e Merge branch 'grid-refresh' of https://github.com/AliKet/wxWidgets
Simplify and improve wxGrid refresh logic.

See #22893.
2022-10-28 01:42:45 +02:00
ali kettab
05f8deaac4 Add test checking that wxWindow::Refresh() works as documented
Verify that refreshing the parent window also refreshes its children, as
it's supposed to.

Closes #22922.
2022-10-28 01:41:09 +02:00
ali kettab
9f0c2f67e8 Make wxQt::Refresh() compliant with the documentation
wxWindow::Refresh() documentation says:
Causes this window, and all of its children recursively, to be repainted.

This commit add the missing recursion explicitly as there is no way
to tell Qt to obey to the wx convention of refreshing windows.

Closes #22918.
2022-10-27 01:51:20 +02:00
Vadim Zeitlin
2a13fd238e Fix drawing of icons for non-root wxTreeCtrl items
Fix y coordinate value passed to wxDC::DrawBitmap() by restoring the
parentheses accidentally removed in 6dd4e73ea3 (Add wxDrawImageBitmap()
helper and use it in wx{List,Tree}Ctrl, 2022-10-25).
2022-10-27 01:48:39 +02:00
Artur Wieczorek
811cdc0ffc Use wxString() rather than wxEmptyString in wxPropertyGrid classes 2022-10-26 13:11:59 +02:00
Artur Wieczorek
99cc2eb17d Use range-based loop to iterate over vector 2022-10-26 12:10:56 +02:00
Artur Wieczorek
29bdf9fa4c Declare variable inside loop 2022-10-26 12:10:21 +02:00
Artur Wieczorek
3610bde8e2 Guard functions with wxCHECK macros rather than wxASSERT 2022-10-26 12:09:23 +02:00
Artur Wieczorek
2369557963 Use wxVariant() instead of wxNullVariant 2022-10-26 12:07:39 +02:00
Artur Wieczorek
2282594f24 Get rid of unnecessary variable assignment 2022-10-26 12:06:57 +02:00
Artur Wieczorek
8da1e1077b Get rid of dead code 2022-10-26 12:06:25 +02:00
Artur Wieczorek
db31a01615 Get rid of commented out code 2022-10-26 12:05:42 +02:00
Artur Wieczorek
825973558e Iterate over wxVector using iterator 2022-10-26 12:05:24 +02:00
Artur Wieczorek
f1cefb8be3 Use conditional operators to simplify statements 2022-10-26 11:58:04 +02:00
Vadim Zeitlin
5845312825 Merge branch 'generic-listctrl-hidpi-images'
Support high DPI images in generic wxListCtrl.

See #22916.
2022-10-26 02:39:28 +02:00
Vadim Zeitlin
7904c11f22 Merge branch 'dont-mess-with-pkg-config-libdir'
Don't change PKG_CONFIG_LIBDIR in configure, this is better done by its
caller.

See #22915.
2022-10-25 23:54:00 +02:00
PB
232e161ed6 Update strftime() link in wxDateTime::Format() docs
The old link to https://cplusplus.com became invalid.

Closes #22913.
2022-10-25 23:53:25 +02:00
Vadim Zeitlin
7ae2281874 Merge branch 'bitmap-macro'
Fix wxBITMAP() in wxQt and improve its documentation.

See #22911.
2022-10-25 23:52:21 +02:00
Vadim Zeitlin
99c52403f9 Use usual half-open interval for wxID_LOWEST..wxID_HIGHEST
The reserved wx IDs were previously in (wxID_LOWEST, wxID_HIGHEST]
range, which was very unusual, as C++ always uses intervals half-open in
the other direction, i.e. [begin, end).

It also conflicted (in theory, if not in practice, as wxID_HIGHEST
wasn't actually used for anything) with the common practice, used even
by wx own samples, of starting the custom IDs at wxID_HIGHEST rather
than wxID_HIGHEST+1.

So change this to use the standard convention, retroactively making all
the code using wxID_HIGHEST valid -- this seems better than insisting on
starting the IDs from wxID_HIGHEST+1.

Closes #22909.
2022-10-25 23:51:21 +02:00
Vadim Zeitlin
c94399121f Don't duplicate same code for small icon, list and report modes
Handle all of them in a single condition instead of using three
different ones.

No real changes.
2022-10-25 23:48:25 +02:00
Vadim Zeitlin
6dd4e73ea3 Add wxDrawImageBitmap() helper and use it in wx{List,Tree}Ctrl
Add a helper function calling wxDC::DrawBitmap() and hiding its ugly
"useMask" boolean parameter which was also error-prone, e.g. some
recently modified code passed wxIMAGELIST_DRAW_TRANSPARENT to it by
mistake.

No real changes, this is just a refactoring.
2022-10-25 23:48:25 +02:00
Vadim Zeitlin
69648b4322 Rename variable to have a less confusing name
After the changes of the last commit this variable is not of wxImageList
type any more, so its name became confusing, so rename it and also be a
bit more precise by indicating that it corresponds to the small, and not
normal, images.

No real changes.
2022-10-25 23:48:25 +02:00
Gerhard Stein
502e189f47 Support high DPI bitmaps in wxGenericListCtrl
Use wxWithImages::GetImageBitmapFor() instead of wxImageList in this
control code to ensure that we use the provided high DPI bitmaps, if we
have them, instead of always scaling up the fixed-size image list
images.

Closes #22907.
2022-10-25 23:48:25 +02:00
Vadim Zeitlin
c440fbce78 Disable use of host pkg-config in wxiOS CI build
Set PKG_CONFIG_LIBDIR=/dev/null explicitly to disable the use of the
host libraries when cross-compiling.
2022-10-25 21:38:27 +02:00
Vadim Zeitlin
2bdd648128 Remove unnecessary wxCONFIGURE_FLAGS environment variable
It was confusing to have both it and wxCONFIGURE_OPTIONS, so remove it
and just use its value as part of wxCONFIGURE_OPTIONS.

No real changes.
2022-10-25 20:50:24 +02:00
Vadim Zeitlin
6dbf59f34f Revert "Disable use of build system pkg-config files when cross-compiling"
This reverts commit 893ebbab0c because it
breaks cross-compiling using target-specific pkg-config installed on the
main system, which is a perfectly legitimate use case.

To avoid the original problem fixed by that commit, PKG_CONFIG_LIBDIR
needs to be set manually before running configure when using host
pkg-config -- but not when using target pkg-config.

Closes #22886.
2022-10-25 18:51:31 +02:00
Artur Wieczorek
ed6c25beed Skip tests known not to work under wxGTK 2022-10-25 11:24:07 +02:00
Artur Wieczorek
5e9609dfe0 Fix wxGCDC::DestroyClippingRegion() for wxMSW
We don't need special handling of clipping area in DestroyClippingRegion().
2022-10-25 11:01:56 +02:00
Artur Wieczorek
b16fdd50db Fix using wxGCDC (Cairo) with scrolled wxDC (wxMSW)
Since 4f9186f (Increase usable scrolling range in wxMSW by a
factor of 10,000, 2022-04-30) the shift of wxDC origin is not passed
through HDC so we need to apply it as an internal transform of
Cairo context. This transform is for internal purposes only and is
not exposed with GetTransform().

See #22480.
See #22914.
2022-10-25 11:01:25 +02:00
Artur Wieczorek
3fa1e9bd2b Pass reference to wxDC instead of pointer to wxD2DContext ctor 2022-10-25 10:58:27 +02:00
Artur Wieczorek
c87970b29d Fix using wxGCDC (Direct2D) with scrolled wxDC
Because since 4f9186f (Increase usable scrolling range in wxMSW by a
factor of 10,000, 2022-04-30) the shift of wxDC origin is not passed
through HDC so we need to apply it as an internal transform of
ID2D1RenderTarget. This transform is for internal purposes only and is
not exposed with GetTransform().

See #22480.
See #22914.
2022-10-25 10:57:06 +02:00
Artur Wieczorek
a23f159869 Fix using wxGCDC (GDI+) with scrolled wxDC
Instead of shifting origin of HDC we can apply required shift of wxDC
origin as an internal transform of the Graphics object. This transform
is for internal purposes only and is not exposed with GetTransform().

See #22480.
See #22914.
2022-10-25 10:53:55 +02:00
Artur Wieczorek
ee70221a0d Handle wxOSX-specific clipping in wxOSX wxWindowDC implementation
Instead of setting clipping for client area for wxOSX windows
with non-native borders in the common wxGCDC::DestroyClippingRegion()
we can encapsulate this operation in dedicated DestroyClippingRegion()
implementation in wxWindowDC.

See #19108.
See #22914.
2022-10-25 10:50:40 +02:00
Artur Wieczorek
7d3f776ec3 Extend tests to check clipping on wxGCDC when origin of its parent wxDC is shifted
See #22914.
See #22480.
2022-10-25 10:44:09 +02:00
Artur Wieczorek
9a2d594d9d Use logical 'and' operator in logical expressions 2022-10-25 10:42:47 +02:00
Artur Wieczorek
3c8ca52f0d Enclose test case tags in square brackets 2022-10-25 10:42:17 +02:00
Vadim Zeitlin
4eae6b7ff1 Improve wxBITMAP() documentation
Document wxHAS_IMAGE_RESOURCES and talk about wxBITMAP_PNG() before
wxBITMAP() instead of doing it as only an afterthought.
2022-10-23 16:31:52 +02:00
Vadim Zeitlin
6a00104cbd Use wxHAS_IMAGES_IN_RESOURCES instead of checking all platforms
No real changes, just simplify the preprocessor check.
2022-10-23 16:31:27 +02:00
Vadim Zeitlin
95b6e1270e Fix wxBITMAP() definition for wxQt
Define wxBITMAP() for all non-MSW ports in the same, working, way
instead of using a weird definition which happened to accidentally work
before for wxQt due to implicitly using wxImage ctor from XPN, but
doesn't work any longer since the changes of 5e53f74af1 (Make wxImage
ctor from XPM data explicit, 2021-04-17).

Closes #22908.
2022-10-23 16:07:25 +02:00
Vadim Zeitlin
adb29b1903 Merge branch 'scintilla_3.10.5' of https://github.com/MaartenBent/wxWidgets
Upgrade Scintilla to 3.21.1.

See #1331.
2022-10-23 16:03:31 +02:00
Vadim Zeitlin
4e52fbc4b5 Merge branch 'qt-fixes'
Various wxQt build fixes.

See #22902.
2022-10-23 15:55:03 +02:00
Vadim Zeitlin
ca4e70df74 Add a Docker container for regenerating wx configure
This allows doing it on any system with Docker instead of having to do
it only under Debian stable that was traditionally used for this.

Closes #22889.
2022-10-23 15:24:21 +02:00
Vadim Zeitlin
ee67242b5f Add support for wxUSE_TASKBARBUTTON option to configure
Add new --enable-taskbarbutton option and define wxUSE_TASKBARBUTTON as
1 by default instead of always defining it as 0, as was the case before.

Closes #22900.
2022-10-23 15:03:03 +02:00
Vadim Zeitlin
bd75dc392a Merge branch 'doc_cxx11_remove'
Remove "if C++11 is used" parts from the docs: it now always is.

See #22897.
2022-10-23 15:01:59 +02:00
PB
c22f6ba4fc Update comments in setup_inc.h and various wx/setup.h files
Update the outdated or just plain incorrect comments.

Closes #22857.
2022-10-23 15:00:38 +02:00
Vadim Zeitlin
ed510012ba Also add Unix files to wxQt CMake build
Similar to the last commit for configure-based build system.

Co-Authored-By: Maarten Bent <MaartenBent@users.noreply.github.com>
2022-10-23 14:53:44 +02:00
Maarten Bent
619071cb71
Fix NULL usage
Ignore scintilla files in NULL check.
Allow to use nullptr as an alias.
2022-10-22 21:30:37 +02:00
Maarten Bent
875e127108
Regenerate Xcode projects 2022-10-22 20:06:06 +02:00