This option is disabled in the GUI, but users can still specify it on the
command-line. Never add the linker flags to prevent errors (unsupported option
'-static-libgcc') or warnings (argument unused during compilation:
'-static-libstdc++').
Closes https://github.com/wxWidgets/wxWidgets/pull/2612Closes#19330.
Using this ctor is more convenient than using the default ctor and then
calling SetMin() and SetMax().
Document the new ctor and add tests showing that minimum and maximum
values are actually respected.
Closes https://github.com/wxWidgets/wxWidgets/pull/2610
wxPGProperty value edited in the first or last property of wxPropertyGrid
should be validated while attempting to navigate to the previous/next
property.
Closes#19315.
Don't use the ternary operator as t_str() doesn't return a pointer in
this build configuration.
Also remove outdated (and maybe even wrong) comment about MinGW headers,
as it's better to use a temporary variable just to avoid writing the
cast explicitly anyhow.
Closes#19338.
Include wx/textctrl.h, required here because wxTextCtrl is used as the
base class of wxPrintPageTextCtrl, explicitly instead of relying on it
being implicitly included by something else, as it happens in the
default build but not when validators are disabled.
Closes#19337.
Define __STDC_WANT_LIB_EXT1__ as early as possible to ensure that it's
defined before string.h is included by some other header without it.
Closes#19334.
This doesn't really change anything as the scaling factor is always the
same in both directions currently, but is more consistent with the other
places where Scale[XY]() are used.
This slightly amends the changes of 3787f55a6b (Add
wxDPIChangedEvent::Scale() and use it in this event handlers,
2021-07-11).
OpenVMS C++ compiler can't compile NanoSVG headers after including
wx/unichar.h, so include them as soon as possible, i.e. right after
wx/wxprec.h but before anything else.
This commit is best viewed with --color-moved git option.
There should be no more changes on this branch, and the ones so far are
not very important, but still update to its final version just for
consistency.
This fixes the wxGenericCalendarCtrl on wxGTK3 where the SpinCtrl is
much wider than on other platforms and should also ensure that the
control is always big enough in all locales under Mac.
Closes https://github.com/wxWidgets/wxWidgets/pull/2604Closes#11444.
Document that this function can leave the provided wxVariant null and
not return anything, but that if it does return some value, it must be
of the appropriate type.
Add an item with unspecified year and update the custom model GetValue()
to not return anything in this case to check, and confirm, that all
implementations handle this properly by simply not showing anything in
the cell in this case.
This is similar to the previous change to the generic version and simply
applies the same logic to the cells for which GetValue() returns null
value as for those for which HasValue() returns false.
In particular, don't draw them, as this would reuse the value of the
previously drawn item, which would be wrong -- just leave them blank if
PrepareForItem() returned false, which happens if GetValue() returned a
null value or a value of a wrong type.
We can't guarantee that GetValue() returns a valid value, even if
HasValue() returned true, so avoid calling SetValue() if it returned an
invalid one, as this risks triggering an assert failure and because this
function is typically called when repainting the control, there is a
good chance that we're going to reenter it while showing the assert
dialog box, resulting in an abort, which is not the best way to handle
GetValue() not returning a valid value -- especially when the generic
version doesn't do this, so the problem risks only appearing when
porting to Mac.
We call it inside the check ensuring that it is supported, so suppress
this warning (introduced in the recent e765756555 (OSX file dialog
extensions (#2592), 2021-11-26)) by casting the receiver to the generic
type, just as it's already done elsewhere in wxOSX code.
The bug was introduced in 9d86ba11e2 (Add support for wxBitmapBundle to
wxGTK wxNotebook, 2021-11-07) after which wxGtkNotebookPage::m_image
remained uninitialized if the page didn't have an image initially, so
fix it by simply initializing this pointer to NULL in this case.
It would arguably be better if wxGtkNotebookPage initialized all its
members in the ctor, but for now just fix the critical bug.
Closes#19332.
It's clear from the change history (relevant commits listed below) that these
are leftovers from code that is long gone.
ccdbdc8936 (Added native selection rectangle drawing., 2006-11-11)
05d9753817 (Just use the already existing wxRenderer::DrawItemSelectionRect(), 2006-11-14)
a4609ab847 (Implement wxRendererMac::DrawItemSelectionRect and move the generic wxTreeCtrl to using it to draw selected items., 2006-11-19)
Also don't duplicate this information in both how-to-add-new-sample.md
and how-to-add-files-to-build-system.md, just reference the former in
the latter instead.
Also fix some Markdown markup.
This file was listed in test.bkl but wasn't actually copied because the
value of <files> was overwritten by another <files> just below ever
since the changes of 21fe35aff7 (add wxImage test units to test loading
from both seekable and non-seekable streams, 2009-06-01).
Fix this by splitting this wx-data into 2 different ones, to avoid this
conflict.
wxDEPRECATED must be used for the entire declaration to really work,
but this wasn't the case for a few functions (and one typedef) guarded
by WXWIN_COMPATIBILITY_2_8, resulting in gcc -Wattributes warning about
the attribute being ignored and the declaration not being really marked
as deprecated.
Fix this by applying the deprecation macro to the entire declaration,
which works well for gcc and should hopefully work for MSVC too.
It turns out that region being added to DC with enabled RTL layout needs
to be defined using mirrored device x-coordinates.
So if we have DC with RTL layout we need to create a temporary mirrored
region and pass it to the DC instead of the original one.
Closes#19325.
Update the language database from the canonical sources:
- It now includes most locales supported by Windows 10.
- It now also has the following attributes for each entry:
- BCP 47-like locale tag.
- Reference to canonical name for generic language entries.
- Language name in this language itself.
- Also add data file with list of language script identifiers and
aliases based on ISO 15924.
- And update genlang.py to handle all the new attributes and data.
Also move database-related methods of wxLocale to wxUILocale and
just redirect wxLocale methods to the new wxUILocale ones (they are
still preserved for compatibility).
Closes https://github.com/wxWidgets/wxWidgets/pull/2594