We still provide this #define, but there is no reason to use it inside
the library itself, so replace it with the more clear wxWCharBuffer.
No real changes.
The question of which type should be used in the absence of the format
string still seems to be valid, but not really related to using (or not)
UTF-8.
Leave the comment, but remove the FIXME, as it almost certainly won't be
fixed (but hopefully all this code might get removed as part of #22880).
Also replace a leftover NULL with nullptr for consistency and to pacify
the code style check.
Also remove a FIXME-UTF8 which wasn't really relevant, this looks like a
good enough place for the check of wxUSE_UTF8_LOCALE_ONLY consistency.
No real changes.
This addresses a FIXME comment in this template, it was written in a
generic form to compile in both Unicode and ANSI builds of the library,
but now it can be written more simply and efficiently (in the "char"
case).
No real changes.
Some wxString functions using wide strings still took wxMBConv just for
consistency with the same functions taking narrow strings in ANSI build,
but this doesn't really make sense any longer because the same code
can't be compiled with different values of wxChar -- it is always the
same thing as wchar_t now, and so we shouldn't pass unused conversion
objects to these functions any more.
So give deprecation warning when these functions are used (but without
formally deprecating them, as it doesn't cost much to keep them) and
avoid using them in the library code.
This could be also used by the applications if they decided to call it
directly, for whatever reason, but, hopefully, this shouldn't be a
common occurrence, as passing wide file name is really inconvenient, and
it was deprecated since 2.8, so should be safe to remove by now.
This was needed in ANSI build only and so isn't needed any longer now
that it's not supported any more, so simplify the code and stop passing
fonts/encodings everywhere when we don't actually need them at all.
Use wxString::utf8_str() and FromUTF8() directly, there is no need for
the macros abstracting the difference between ANSI and Unicode builds
any longer.
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.
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.
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.
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.
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.
Add missing namespaces and includes.
Use correct parameter types.
Remove overridden methods that do not exist anymore.
Add methods that do need to be overridden (without implementation).
Update listbox action implementation.
SCI_LOADLEXERLIBRARY is now handled inside ScintillaBase::WndProc.
Cleanup includes, use copy from ScintillaWin.cxx for scintilla includes.
Replace the deprecated functions with the new equivalents when this
doesn't really change the code semantics.
Also add new compat.h private header where more functions like
wxQtGetWidthFromMetrics() can be added in the future.
There are still quite a few of deprecation warnings requiring more
changes remaining.
Use Catch2 public header instead of using internal Catch v1 headers: we
can do this now because Catch2 supports (albeit in a rather ugly way)
being used with PCH.
This is similar to the just added GetImageBitmapFor() and works both
when using legacy wxImageList and wxBitmapBundle.
Use the new function in wxGenericTreeCtrl code.
This function is simpler to use than calling GetBitmapBundle() first and
then calling GetBitmapFor() on it, avoids creating a temporary
wxBitmapBundle unnecessarily when wxImageList is used and, most
importantly, is public and not protected, which will allow
wxGenericTreeCtrl to use it for the other image lists than the main one.
The slightly unwieldy name is due to trying to use "Image" in all public
functions of this class, which should hopefully minimize clashes with
any user-defined functions that may exist in the classes deriving from
it, without requiring the use of even uglier "WX" prefix.
No real changes yet.
This is a combination of running clang-tidy with modernize-use-nullptr
check for some ports (GTK, X11, OSX) and manual changes to the ports for
which it couldn't be used easily (MSW, DFB) and also manually updating
the docs.
Also replace NULL with null or nullptr in the comments as this is more
consistent with the use of nullptr in the code and makes it simpler to
grep for the remaining occurrences of NULL itself.
And also use null in the assert messages.
Only a few occurrences of "NULL" are still left in non-C files, mostly
corresponding to unclear comments or string output which it might not be
safe to change.
This is not needed any longer since we don't need wxQsort() in
wx/vector.h any more after eb97bf90e4 (Remove custom wxVector
implementation, 2022-10-11).
This function will need to be used from other places too, so make it
available in the base class itself.
Also disable WS_EX_COMPOSITED for this window itself too.