Commit graph

73471 commits

Author SHA1 Message Date
Vadim Zeitlin
c78b0d652b Remove UNICODE build option, hardcode its value as 1
Also hardcode "u" suffix for the library names -- it doesn't make sense
any longer, but we need to keep it for compatibility.
2022-10-27 19:43:59 +02:00
Vadim Zeitlin
6e8290a9ce Stop defining _UNICODE in makefiles
This shouldn't be necessary any longer, so don't do it.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
53b3b979fe Remove tests for _UNICODE too
It is now always defined, so testing for it is useless.

Give an error in MSVC-specific header if it is not defined as it should
be.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
340998fe77 Add a note about not supporting wxUSE_UNICODE=0 to the change log 2022-10-27 19:43:30 +02:00
Vadim Zeitlin
d5617965a6 Remove extraneous "}" from macros documentation
Somehow this isn't a problem for Doxygen, but it's still wrong to have
unmatched "}" here.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
81807382b7 Remove all wxGTK_CONV macros except for wxGTK_CONV_FN
Use wxString::utf8_str() and FromUTF8() directly, there is no need for
the macros abstracting the difference between ANSI and Unicode builds
any longer.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
813fcbaf10 Remove wxUxThemeFont, it is useless now
This helper class converted between LOGFONTA and LOGFONTW, but not we
only ever use the latter.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
7927c9abc0 Stop mentioning --disable-unicode in build instructions
This option doesn't exist any more.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
32adaf0402 Remove ANSI wxGTK CI build
This is not supported any longer.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
df80d40349 Stop allocating wxLV_ITEM::m_buf on the heap
There is no need to do it when we can just use the object.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
4519d8e08a Remove wxUSE_UNICODE checks as they're always true now
Also remove all code guarded by "#if !wxUSE_UNICODE".
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
5c49448c75 Remove bakefile UNICODE_DEFINE variable, always define _UNICODE
It might be unnecessary to define it on command line at all, as it's
done in wx/setup.h, but keep doing it for now.

However stop using a variable for this, as setting wxUSE_UNICODE to 0 is
not supported any longer.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
0f5018252a Remove wxUSE_UNICODE from build-wxwidgets.py script
This is not needed any more, it will be defined anyhow.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
c8f29fea8f Remove most mentions of wxUSE_UNICODE from the documentation
Still document this symbol itself, but only as being defined as 1.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
885ab36c11 Remove wxUSE_UNICODE option from CMake too
Keep it in build.cfg just in case it's needed for compatibility, but
always define it as 1.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
a60c9b0f5e Remove --disable-unicode option from configure
Disabling Unicode support is not supported any longer.

Also report Unicode encoding used by wxString at the end of running
configure, this is more useful than just saying "wchar_t", as it's
platform-dependent.
2022-10-27 19:43:30 +02:00
Vadim Zeitlin
5d3e5ccf32 Always define wxUSE_UNICODE as 1
Remove the option allowing to set wxUSE_UNICODE to 0.
2022-10-27 01:04:15 +01: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