Allow a library and an application to differ in __GXX_ABI_VERSION
within the range 1002-1008. The ABI changes made in this range
do not affect wxWidgets.
Declare _hypot() function globally, predefining __NO_INLINE__ in wx/math.h is
not enough as <math.h> is also included from some other standard headers, e.g.
<algorithm>, and including them results in the same bug as in wx/math.h
(i.e. https://sourceforge.net/p/mingw/bugs/2250/).
Including standard math.h header with both -O2 and -std=c++NN options results
in compilation error due to a bug in the header, see MinGW bug report at
https://sourceforge.net/p/mingw/bugs/2250/
Work around this to allow the library to compile in release build with
-std=c++11. This is ugly but better than failing to compile at all.
These options enable "strict ANSI" mode in MinGW which omits declarations of
POSIX functions from the standard headers. To allow the library and, possibly
even more importantly, the user code including our headers, to compile with
these options, declare the functions that we need ourselves.
This might appear to go against the spirit of "strict ANSI" mode, but the only
alternative would be to not use such functions at all and silently cripple the
library when -std=c++NN is used, compared to -std=g++NN case, and this doesn't
seem appealing neither.
Closes#16984.
Currently, customizing some dialogs for small screen environment is done statically on the build stage by setting wxPG_SMALL_SCREEN to 1 (what is done for WXWINCE only).
Instead, we can do this for all platforms in a dynamic manner, based on the classification provided by wxSystemSettings::GetScreenType() function.
In order to do so there is introduced a static helper function wxPropertyGrid::IsSmallScreen() which is used to select right parameters (size, position) for several dialogs in order to display them correctly on the small screen.
Apparently in some versions of the compiler even simply dereferencing a
pointer inside typeid() still provokes -Wpotentially-evaluated-expression.
Avoid this by dereferencing it outside and only using typeid() with
references.
Closes#16968.
This simplifies the code and fixes the bug with GetItemCount() returning wrong
(old) value in wxEVT_LIST_INSERT_ITEM event handler as m_count wasn't updated
by then yet.
Closes#3793.
This deprecated method was never actually defined, so could never be used. The
fact that nobody complained about it would seem to be an indication that it is
not used anywhere, so just remove it.
See #17007.
Parsing a format specifier with an asterisk (e.g. "%.*s") for the 64th
argument of wxPrintf() resulted in a buffer overrun as the check for the
maximal number of arguments didn't break out from the right loop.
Fix this by inserting an extra check for this.
Thanks Coverity for finding this one.
This constant wasn't very useful as it contained the description of the OS on
the machine where the library was built, not the one on which the application
using it was running. It also wasn't used anywhere in wxWidgets and apparently
wasn't meant to be used outside of it.
Finally, putting the output of `uname -r` into it created problems with
creating reproducible builds as just a change in the kernel version changed
the build results.
Closes#17002.
By default, to prevent wxPG from stealing focus from other controls, focus is moved to the grid only if it was already in one of its child controls.
When newly introduced wxPG_EX_ALWAYS_ALLOW_FOCUS flag is set then wxPG can take focus on the entire grid area (on canvas) even if focus is moved from another control.
Default wxPG behavior remains unchanged because wxPG_EX_ALWAYS_ALLOW_FOCUS flag must be explicitly set with wxPropertyGrid::SetExtraStyle function.
Closes#16993.
This ensures that a dangling pointer can't be dereferenced later and fixes a
fatal bug if wxCmdLineArgsArray::operator=() was called more than once (which
is however not supposed to normally happen).
Instead of using pass-trough getter just to check the bits of internal field there are implemented dedicated HasFlag() and HasFlagsExact() methods to do so.
There is no need for this, these methods are not supposed to be overridden as
they are only ever called by wxToolBar itself and making them virtual just
confused things.
See #16985.
This can result in a crash if the measuring code is called, possibly
indirectly, from a method of a cell object itself and if that cell is
displaced from the cache while caching the cell created in OnMeasureItem().
Closes#16651.
Move wxAnyButton::GetNormalState(), which allows wxToggleButton to override
what "normal" means for it, down to the platform-independent wxAnyButtonBase
class and use it now in wxGTK as well to correctly choose the pressed bitmap
for a toggle button in this state.
Closes#16771.
Update the name and the comment to explain better that this method returns the
state for which the bitmap is currently shown, not necessarily the current
state.
See #16771.
Use a helper hash map to allow efficiently finding message catalogs by name
instead of using linear search in a linked list which can be noticeably slow
when many catalogs are used.
This speeds up wxGetTranslation() when the domain is specified.
Closes#16975.
Interpret internal compiler version value 1900 as VC14. Notice that this
required adjusting the computation of the internal version from the
user-visible one because VC13 was skipped (hopefully no black cats crossed
paths with the manager responsible for this decision).
See #16854.
Scale the (still hard-coded) border in pixels by the content scale factor for
the platforms where this needs to be done, i.e. not wxGTK nor wxOSX where the
underlying toolkit already does it.
Allow calling this method with either wxSize, wxPoint or just an int.
Also provide a static overload allowing to use it even when no appropriate
wxWindow is available.
Factor out this code to a reusable ParseValueInPixels() function instead of
repeating it in GetSize() and GetDimension() (and using a hack to reuse it
from GetPosition()).
No real changes, just made some error messages more precise.
The shadow width was only used by wxMotif and bezel face not used at all since
a very, very long time, so just remove these methods from the ports which still
had them (just doing nothing) and remove support of the corresponding XRC
attributes.
A '-' keypress doesn't collapse a tree item with the native MSW tree
control. Instead, when not using the generic tree control, simulate a
keypress of WXK_LEFT to collapse the root item . This fixes the assert
checking if the root item is collapsed after the keypress.
Regression since 9d7a7ec556 (which
mistakenly may have had treectrltest.cpp as part of its commit).